Skip to content

Commit 432ca6d

Browse files
Turn off ESLint rules handled by TypeScript
1 parent 812aa47 commit 432ca6d

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

eslint.config.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@ export default defineConfig([
3131
tsconfigRootDir: rootPath,
3232
},
3333
},
34+
rules: {
35+
// Turn off rules that are handled by TypeScript
36+
// https://typescript-eslint.io/troubleshooting/typed-linting/performance/#eslint-plugin-import
37+
'import/default': 'off',
38+
'import/named': 'off',
39+
'import/namespace': 'off',
40+
'import/no-cycle': 'off',
41+
'import/no-deprecated': 'off',
42+
'import/no-named-as-default': 'off',
43+
'import/no-named-as-default-member': 'off',
44+
'import/no-unresolved': 'off',
45+
'import/no-unused-modules': 'off',
46+
},
3447
settings: {
3548
'import/resolver': {
3649
node: true,
@@ -56,9 +69,6 @@ export default defineConfig([
5669
plugins: {
5770
'react-hooks': pluginReactHooks,
5871
},
59-
rules: {
60-
'import/no-unresolved': 'off',
61-
},
6272
settings: {
6373
react: {
6474
version: 'detect',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"lint:fix": "yarn lint:js:fix && yarn lint:prettier:fix",
6060
"lint:prettier": "prettier --check .",
6161
"lint:prettier:fix": "prettier --write .",
62-
"lint:js": "eslint .",
62+
"lint:js": "eslint . --max-warnings 0",
6363
"lint:js:fix": "yarn lint:js --fix",
6464
"lint:types": "tsc --build tsconfig.json --pretty",
6565
"build-storybook": "storybook build",

0 commit comments

Comments
 (0)