44 * -------------------------------------------------------------------------------------------- */
55
66import { defineConfig , globalIgnores } from 'eslint/config' ;
7- import _import from 'eslint-plugin-import' ;
7+ import importX from 'eslint-plugin-import-x ' ;
88import globals from 'globals' ;
99import js from '@eslint/js' ;
1010import json from '@eslint/json' ;
@@ -14,17 +14,13 @@ import tseslint from 'typescript-eslint';
1414
1515
1616export default defineConfig ( [
17-
18- _import . flatConfigs . recommended ,
19- _import . flatConfigs . typescript ,
2017
2118 globalIgnores ( [
2219 'out/*' ,
2320 'dist/*' ,
2421 'eslint.config.mjs' ,
2522 ] ) ,
2623
27- //tseslint.configs.recommendedTypeChecked,
2824 {
2925 files : [
3026 'src/**/*.ts' ,
@@ -51,6 +47,13 @@ export default defineConfig([
5147 }
5248 } ,
5349
50+ plugins :{
51+ 'import-x' : importX ,
52+ '@typescript-eslint' : tseslint . plugin
53+ } ,
54+
55+ extends : [ 'import-x/flat/recommended' , 'import-x/flat/typescript' ] ,
56+
5457 rules : {
5558 '@typescript-eslint/naming-convention' : [
5659 'warn' ,
@@ -72,9 +75,9 @@ export default defineConfig([
7275 ] ,
7376 'curly' : [ 'error' , 'all' ] ,
7477 'eqeqeq' : 'error' ,
75- 'import/no-dynamic-require' : 'error' ,
76- 'import/no-default-export' : 'error' ,
77- 'import/no-self-import' : 'error' ,
78+ 'import-x /no-dynamic-require' : 'error' ,
79+ 'import-x /no-default-export' : 'error' ,
80+ 'import-x /no-self-import' : 'error' ,
7881 'max-len' : [ 'error' , {
7982 'code' : 120 , // needs to be in sync w/ .prettierrc printWidth
8083 'ignoreUrls' : true ,
0 commit comments