forked from typescript-eslint/typescript-eslint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use eslint 9 internally (typescript-eslint#9119)
* eslint 9 * add compat * add fixup * fixup react * add more fixups * add issue comment * lint and empty types * fix types * remove eslint9 ci test * rename * update no-restricted-imports snapshot * update build script * change quote style * revert renaming * begin migrating config files * migrate markdown to v9 * migrate recommended-does-not-require-program * migrate eslint.config.js * migrate vue-sfc, except for TS errors * remove flatconfig boolean * remove config file option * remove deprecated rules * correct issue * revert style change * add clarifying comment * remove unnecessary suppression * remove unnecessary suppression * remove unused suppression
- Loading branch information
1 parent
0d70d62
commit 86811d7
Showing
27 changed files
with
224 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
packages/eslint-plugin/tests/schema-snapshots/no-restricted-imports.shot
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
packages/integration-tests/fixtures/markdown/eslint.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import markdown from 'eslint-plugin-markdown'; | ||
import tseslint from 'typescript-eslint'; | ||
|
||
export default tseslint.config( | ||
tseslint.configs.base, | ||
// this will also ensure that eslint will force lint the markdown files | ||
{ plugins: { markdown }, files: ['**/*.md'], processor: 'markdown/markdown' }, | ||
{ | ||
files: ['**/*.md/*.{js,ts,jsx,tsx,javascript,node}'], | ||
rules: { | ||
'@typescript-eslint/no-explicit-any': 'error', | ||
'no-console': 'error', | ||
}, | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"type": "module", | ||
"devDependencies": { | ||
"eslint-plugin-markdown": "latest" | ||
} | ||
|
17 changes: 7 additions & 10 deletions
17
...ded-does-not-require-program/.eslintrc.js → ...does-not-require-program/eslint.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
import eslint from '@eslint/js'; | ||
import tseslint from 'typescript-eslint'; | ||
|
||
// This integration test exists to make sure that the recommended config does | ||
// not require a program to be specified to ensure a fast and simple initial | ||
// setup. Users can add on one of our other configs if they want to opt in to | ||
// more expensive checks. | ||
module.exports = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
], | ||
plugins: ['@typescript-eslint'], | ||
}; | ||
export default tseslint.config( | ||
eslint.configs.recommended, | ||
...tseslint.configs.recommended, | ||
); |
1 change: 1 addition & 0 deletions
1
packages/integration-tests/fixtures/recommended-does-not-require-program/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"type": "module", | ||
"devDependencies": {} | ||
} |
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
packages/integration-tests/fixtures/vue-jsx/eslint.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import tseslint from 'typescript-eslint'; | ||
import pluginVue from 'eslint-plugin-vue'; | ||
|
||
export default tseslint.config( | ||
tseslint.configs.base, | ||
...pluginVue.configs['flat/essential'], | ||
{ | ||
languageOptions: { | ||
parserOptions: { ecmaFeatures: { jsx: true }, parser: tseslint.parser }, | ||
}, | ||
rules: { '@typescript-eslint/no-explicit-any': 'error' }, | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"type": "module", | ||
"devDependencies": { | ||
"vue-eslint-parser": "latest", | ||
"eslint-plugin-vue": "latest", | ||
|
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
packages/integration-tests/fixtures/vue-sfc/eslint.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import pluginVue from 'eslint-plugin-vue'; | ||
import tseslint from 'typescript-eslint'; | ||
|
||
export default tseslint.config( | ||
tseslint.configs.base, | ||
...pluginVue.configs['flat/essential'], | ||
{ | ||
languageOptions: { | ||
parserOptions: { | ||
parser: tseslint.parser, | ||
project: '/usr/linked/tsconfig.json', | ||
}, | ||
}, | ||
rules: { | ||
'@typescript-eslint/no-explicit-any': 'error', | ||
'@typescript-eslint/no-unnecessary-type-assertion': 'error', | ||
'semi-spacing': 'error', | ||
}, | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"type": "module", | ||
"devDependencies": { | ||
"vue-eslint-parser": "latest", | ||
"eslint-plugin-vue": "latest", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.