Skip to content

Commit a7b23a9

Browse files
authored
Merge pull request #3571 from gdg-x/copilot/update-eslint-to-v10
Migrate ESLint config to v10 and remove eslint-plugin-import
2 parents 3b5fdc6 + 0afa50a commit a7b23a9

7 files changed

Lines changed: 258 additions & 814 deletions

File tree

‎eslint.config.js‎

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ import eslintConfigPrettier from 'eslint-config-prettier';
88
import htmlPlugin from 'eslint-plugin-html';
99
import htmlEslintPlugin from '@html-eslint/eslint-plugin';
1010
import htmlEslintParser from '@html-eslint/parser';
11-
import importPlugin from 'eslint-plugin-import';
1211
import jestPlugin from 'eslint-plugin-jest';
13-
import jestDomPlugin from 'eslint-plugin-jest-dom';
1412
import testingLibraryPlugin from 'eslint-plugin-testing-library';
1513
import globals from 'globals';
1614

@@ -60,16 +58,15 @@ export default [
6058
},
6159
plugins: {
6260
'@typescript-eslint': typescriptEslint,
63-
import: importPlugin,
6461
jest: jestPlugin,
65-
'jest-dom': jestDomPlugin,
6662
'testing-library': testingLibraryPlugin,
6763
},
6864
rules: {
6965
...js.configs.recommended.rules,
7066

7167
// Disable conflicting rules
7268
'no-unused-vars': 'off', // Replaced by @typescript-eslint/no-unused-vars
69+
'preserve-caught-error': 'off',
7370

7471
// Jest rules
7572
'jest/max-expects': ['warn', { max: 10 }],
@@ -81,12 +78,6 @@ export default [
8178
// Testing library rules
8279
'testing-library/no-node-access': 'warn',
8380

84-
// Import rules
85-
'import/no-unresolved': 'error',
86-
'import/named': 'error',
87-
'import/default': 'error',
88-
'import/export': 'error',
89-
9081
// TypeScript rules
9182
'@typescript-eslint/unbound-method': 'warn',
9283
'@typescript-eslint/no-unused-vars': [
@@ -115,17 +106,6 @@ export default [
115106
],
116107
'linebreak-style': 0,
117108
},
118-
settings: {
119-
'import/parsers': {
120-
'@typescript-eslint/parser': ['.ts', '.tsx'],
121-
},
122-
'import/resolver': {
123-
typescript: {
124-
alwaysTryTypes: true,
125-
project: './tsconfig.json',
126-
},
127-
},
128-
},
129109
},
130110

131111
// Service Worker files (allow importScripts)

0 commit comments

Comments
 (0)