1
1
import eslint from '@eslint/js' ;
2
2
import eslintConfigPrettier from 'eslint-config-prettier' ;
3
- import eslintPluginImport from 'eslint-plugin-import' ;
3
+ import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript' ;
4
+ import * as eslintPluginImportX from 'eslint-plugin-import-x' ;
4
5
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended' ;
5
6
import eslintPluginReact from 'eslint-plugin-react' ;
6
- import eslintPluginReactHooks from 'eslint-plugin-react-hooks' ;
7
7
import eslintPluginJsxA11y from 'eslint-plugin-jsx-a11y' ;
8
- // eslint-disable-next-line import/no-unresolved
9
- import tseslint from 'typescript-eslint' ;
8
+ import * as eslintPluginReactHooks from ' eslint-plugin-react-hooks' ;
9
+ import * as tseslint from 'typescript-eslint' ;
10
10
11
11
export default tseslint . config (
12
12
eslint . configs . recommended ,
13
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
14
- eslintPluginImport . flatConfigs . recommended ,
13
+ eslintPluginImportX . flatConfigs . recommended ,
14
+ eslintPluginImportX . flatConfigs . typescript ,
15
15
...tseslint . configs . strictTypeChecked ,
16
16
...tseslint . configs . stylisticTypeChecked ,
17
17
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
@@ -31,6 +31,7 @@ export default tseslint.config(
31
31
} ,
32
32
} ,
33
33
settings : {
34
+ 'import-x/resolver-next' : [ createTypeScriptImportResolver ( ) ] ,
34
35
react : { version : 'detect' } ,
35
36
} ,
36
37
} ,
@@ -80,8 +81,8 @@ export default tseslint.config(
80
81
} ,
81
82
] ,
82
83
83
- 'import/no-default-export' : 'error' ,
84
- 'import/order' : [
84
+ 'import-x /no-default-export' : 'error' ,
85
+ 'import-x /order' : [
85
86
'error' ,
86
87
{
87
88
groups : [ 'builtin' , 'external' , 'internal' , 'parent' , 'sibling' ] ,
@@ -92,7 +93,6 @@ export default tseslint.config(
92
93
} ,
93
94
} ,
94
95
] ,
95
- 'import/no-unresolved' : 'off' ,
96
96
} ,
97
97
} ,
98
98
) ;
0 commit comments