@@ -3,7 +3,8 @@ import {fileURLToPath} from 'node:url';
33import  jsdoc  from  'eslint-plugin-jsdoc' ; 
44import  config  from  'eslint-config-mourner' ; 
55import  tseslint  from  'typescript-eslint' ; 
6- import  importPlugin  from  'eslint-plugin-import' ; 
6+ import  { createNodeResolver ,  importX }  from  'eslint-plugin-import-x' ; 
7+ import  { createTypeScriptImportResolver }  from  'eslint-import-resolver-typescript' ; 
78import  { globalIgnores }  from  'eslint/config' ; 
89import  { includeIgnoreFile }  from  '@eslint/compat' ; 
910import  tsConfig  from  './tsconfig.json'  with  { type : 'json' } ; 
@@ -19,7 +20,7 @@ export default tseslint.config(
1920    // eslint-disable-next-line @typescript-eslint/no-unsafe-argument 
2021    ...config , 
2122    tseslint . configs . recommendedTypeChecked , 
22-     importPlugin . flatConfigs . recommended , 
23+     importX . flatConfigs . recommended , 
2324    jsdoc . configs [ 'flat/recommended' ] , 
2425
2526    // Settings 
@@ -32,16 +33,11 @@ export default tseslint.config(
3233        } , 
3334
3435        settings : { 
35-             'import/parsers' : { 
36+             'import-x /parsers' : { 
3637                '@typescript-eslint/parser' : [ '.ts' ] , 
3738            } , 
3839
39-             'import/resolver' : { 
40-                 node : true , 
41-                 typescript : { 
42-                     project : './tsconfig.json' , 
43-                 } , 
44-             } , 
40+             'import-x/resolver-next' : [ createTypeScriptImportResolver ( ) ,  createNodeResolver ( ) ] , 
4541
4642            jsdoc : { 
4743                mode : 'typescript' , 
@@ -74,7 +70,7 @@ export default tseslint.config(
7470            'array-bracket-spacing' : 'off' , 
7571            'consistent-return' : 'off' , 
7672            'global-require' : 'off' , 
77-             'import/no-commonjs' : 'error' , 
73+             'import-x /no-commonjs' : 'error' , 
7874            'key-spacing' : 'off' , 
7975            'no-eq-null' : 'off' , 
8076            'no-lonely-if' : 'off' , 
@@ -163,16 +159,16 @@ export default tseslint.config(
163159    // Import plugin rules 
164160    { 
165161        rules : { 
166-             'import/named' : 'off' , 
167-             'import/namespace' : 'off' , 
168-             'import/default' : 'off' , 
169-             'import/no-named-as-default-member' : 'off' , 
170-             'import/no-unresolved' : 'off' , 
171-             'import/no-named-as-default' : 'off' , 
162+             'import-x /named' : 'off' , 
163+             'import-x /namespace' : 'off' , 
164+             'import-x /default' : 'off' , 
165+             'import-x /no-named-as-default-member' : 'off' , 
166+             'import-x /no-unresolved' : 'off' , 
167+             'import-x /no-named-as-default' : 'off' , 
172168            'no-duplicate-imports' : 'off' , 
173-             'import/no-duplicates' : 'error' , 
169+             'import-x /no-duplicates' : 'error' , 
174170
175-             'import/order' : [ 'error' ,  { 
171+             'import-x /order' : [ 'error' ,  { 
176172                groups : [ [ 
177173                    'builtin' , 
178174                    'external' , 
@@ -187,14 +183,14 @@ export default tseslint.config(
187183                'newlines-between' : 'always' , 
188184            } ] , 
189185
190-             'import/no-restricted-paths' : [ 'error' ,  { 
186+             'import-x /no-restricted-paths' : [ 'error' ,  { 
191187                zones : [ { 
192188                    target : './src/style-spec' , 
193189                    from : [ './src/!(style-spec)/**/*' ,  './3d-style/**/*' ] , 
194190                } ] , 
195191            } ] , 
196192
197-             'import/extensions' : [ 'error' ,  { 
193+             'import-x /extensions' : [ 'error' ,  { 
198194                ts : 'ignorePackages' , 
199195                js : 'always' , 
200196                json : 'always' , 
0 commit comments