@@ -208,15 +208,16 @@ export function defineScTsConfig(...configs: Parameters<typeof defineConfig>): R
208208
209209 // this config is for js and ts but needs to override the upper ones
210210 {
211- files : [ '**/*.{ts,mts,cts,js,mjs,cjs}' ] ,
212- extends : [ ] ,
213211 plugins : {
214212 import : eslintPluginImport ,
215213 'unused-imports' : eslintPluginUnusedImports ,
216214 } ,
217215 rules : {
216+ 'import/order' : 'off' , // handled by simple-import-sort
218217 'import/no-deprecated' : 'error' ,
218+ 'import/first' : 'error' ,
219219 'import/no-extraneous-dependencies' : 'error' ,
220+ 'import/newline-after-import' : [ 'error' , { count : 1 } ] , // do not change count - only works with prettier when 1
220221 'import/no-internal-modules' : [ 'error' , { allow : [ 'aws-cdk-lib/*' , '@aws-cdk/*' ] } ] ,
221222
222223 // no-unused-vars does not support a fixer for "unused imports" which is highly shitty.
@@ -248,7 +249,7 @@ export function defineScTsConfig(...configs: Parameters<typeof defineConfig>): R
248249 // for files which are not part of the src/ folder and for test files
249250 // it is ok to use dependencies that are listed inside the root package.json (e.g. @shiftcode/eslint-config-recommended)
250251 {
251- files : [ '!**/src/**/*.{ts,mts,cts,js,mjs,cjs} ' , '**/*.spec.ts' , '**/*.test.ts' ] ,
252+ files : [ '!**/src/**' , '**/*.spec.ts' , '**/*.test.ts' ] ,
252253 rules : {
253254 'import/no-extraneous-dependencies' : [ 'error' , { packageDir : [ '.' , '../..' ] } ] ,
254255 } ,
0 commit comments