Skip to content

Commit

Permalink
fix: bump incorrect typescript-eslint peerDep
Browse files Browse the repository at this point in the history
and fix the test for that
  • Loading branch information
mightyiam committed Oct 12, 2024
1 parent 94c3f7e commit 5d1261f
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 95 deletions.
141 changes: 50 additions & 91 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-n": "^17.0.0",
"eslint-plugin-promise": "^7.0.0",
"typescript-eslint": "^8.0.0"
"typescript-eslint": "^8.3.0"
},
"peerDependencies": {
"eslint": "^8.0.1",
Expand Down Expand Up @@ -94,7 +94,7 @@
"tsconfigs": "5.0.0",
"type-fest": "4.26.1",
"typescript": "5.6.3",
"typescript-eslint_bottom": "npm:typescript-eslint@8.0.0"
"typescript-eslint_bottom": "npm:typescript-eslint@8.3.0"
},
"files": [
"lib/index.js",
Expand Down
8 changes: 6 additions & 2 deletions src/test/compatibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ test('our configuration is compatible with the plugin and parser at bottom of de
'typescript-eslint_bottom version is min of dep',
)

const filePath = 'src/index.ts'

const config = {
...exported,
files: [filePath],
languageOptions: {
parser: tseslintBottomParser,
parserOptions: {
Expand All @@ -39,15 +42,16 @@ test('our configuration is compatible with the plugin and parser at bottom of de
},
plugins: {
...exported.plugins,
'typescript-eslint': tseslintBottomPlugin,
'@typescript-eslint': tseslintBottomPlugin,
},
} satisfies TSESLint.FlatConfig.Config

const eslint = new TSESLint.FlatESLint({
overrideConfigFile: true,
baseConfig: [config],
})

const results = await eslint.lintText('', { filePath: 'src/index.ts' })
const results = await eslint.lintText('', { filePath })

// eslint-disable-next-line @typescript-eslint/no-magic-numbers
t.true(results.length > 0)
Expand Down

0 comments on commit 5d1261f

Please sign in to comment.