11import eslint from '@eslint/js'
2+ import { defineConfig } from 'eslint/config'
3+ import importPlugin from 'eslint-plugin-import'
24import tseslint from 'typescript-eslint'
35
4- export default tseslint . config (
6+ export default defineConfig (
57 {
68 ignores : [
79 'esm/**/*' ,
@@ -10,6 +12,7 @@ export default tseslint.config(
1012 '*.mjs' ,
1113 'example/*' ,
1214 'src/autoSql.js' ,
15+ 'src/autoSql.ts' ,
1316 ] ,
1417 } ,
1518 {
@@ -21,6 +24,7 @@ export default tseslint.config(
2124 } ,
2225 } ,
2326 eslint . configs . recommended ,
27+ importPlugin . flatConfigs . recommended ,
2428 ...tseslint . configs . recommended ,
2529 ...tseslint . configs . stylisticTypeChecked ,
2630 ...tseslint . configs . strictTypeChecked ,
@@ -37,6 +41,25 @@ export default tseslint.config(
3741 '@typescript-eslint/no-unsafe-argument' : 0 ,
3842 '@typescript-eslint/restrict-plus-operands' : 0 ,
3943 semi : [ 'error' , 'never' ] ,
44+
45+ 'import/no-unresolved' : 'off' ,
46+ 'import/extensions' : [ 'error' , 'ignorePackages' ] ,
47+ 'import/order' : [
48+ 'error' ,
49+ {
50+ named : true ,
51+ 'newlines-between' : 'always' ,
52+ alphabetize : {
53+ order : 'asc' ,
54+ } ,
55+ groups : [
56+ 'builtin' ,
57+ [ 'external' , 'internal' ] ,
58+ [ 'parent' , 'sibling' , 'index' , 'object' ] ,
59+ 'type' ,
60+ ] ,
61+ } ,
62+ ] ,
4063 } ,
4164 } ,
4265)
0 commit comments