11import eslint from '@eslint/js' ;
22import 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' ;
45import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended' ;
56import eslintPluginReact from 'eslint-plugin-react' ;
6- import eslintPluginReactHooks from 'eslint-plugin-react-hooks' ;
77import 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' ;
1010
1111export default tseslint . config (
1212 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 ,
1515 ...tseslint . configs . strictTypeChecked ,
1616 ...tseslint . configs . stylisticTypeChecked ,
1717 // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
@@ -31,6 +31,7 @@ export default tseslint.config(
3131 } ,
3232 } ,
3333 settings : {
34+ 'import-x/resolver-next' : [ createTypeScriptImportResolver ( ) ] ,
3435 react : { version : 'detect' } ,
3536 } ,
3637 } ,
@@ -80,8 +81,8 @@ export default tseslint.config(
8081 } ,
8182 ] ,
8283
83- 'import/no-default-export' : 'error' ,
84- 'import/order' : [
84+ 'import-x /no-default-export' : 'error' ,
85+ 'import-x /order' : [
8586 'error' ,
8687 {
8788 groups : [ 'builtin' , 'external' , 'internal' , 'parent' , 'sibling' ] ,
@@ -92,7 +93,6 @@ export default tseslint.config(
9293 } ,
9394 } ,
9495 ] ,
95- 'import/no-unresolved' : 'off' ,
9696 } ,
9797 } ,
9898) ;
0 commit comments