33import eslint from '@eslint/js' ;
44import stylistic from '@stylistic/eslint-plugin' ;
55import tseslint from 'typescript-eslint' ;
6- import eslintImport from " eslint-plugin-import" ;
6+ import eslintImport from ' eslint-plugin-import' ;
77
8- import vitest from " @vitest/eslint-plugin" ;
8+ import vitest from ' @vitest/eslint-plugin' ;
99
1010import { includeIgnoreFile } from '@eslint/compat' ;
11- import path from " node:path" ;
12- import { fileURLToPath } from " node:url" ;
11+ import path from ' node:path' ;
12+ import { fileURLToPath } from ' node:url' ;
1313
1414const __filename = fileURLToPath ( import . meta. url ) ;
1515const __dirname = path . dirname ( __filename ) ;
16- const gitignorePath = path . resolve ( __dirname , " ./.gitignore" ) ;
16+ const gitignorePath = path . resolve ( __dirname , ' ./.gitignore' ) ;
1717
1818export default tseslint . config (
1919 includeIgnoreFile ( gitignorePath ) ,
@@ -36,10 +36,10 @@ export default tseslint.config(
3636 eslint . configs . recommended ,
3737 ...tseslint . configs . strict ,
3838 ...tseslint . configs . stylistic ,
39+ eslintImport . flatConfigs . recommended ,
40+ eslintImport . flatConfigs . typescript ,
3941 {
4042 files : [ 'src/**/*.ts' ] ,
41- ...eslintImport . flatConfigs . recommended ,
42- ...eslintImport . flatConfigs . typescript ,
4343 plugins : {
4444 '@stylistic' : stylistic ,
4545 '@stylistic/ts' : stylistic ,
@@ -56,20 +56,20 @@ export default tseslint.config(
5656 } ,
5757 } ,
5858 rules : {
59- '@stylistic/semi' : [ " error" , " always" ] ,
60- '@stylistic/ts /indent' : [ 'error' , 2 ] ,
61- 'comma-dangle' : [ " error" , " always-multiline" ] ,
59+ '@stylistic/semi' : [ ' error' , ' always' ] ,
60+ // '@stylistic/indent': ['error', 2],
61+ '@stylistic/ comma-dangle' : [ ' error' , ' always-multiline' ] ,
6262 '@stylistic/quotes' : [ 'error' , 'single' ] ,
6363 } ,
6464 } ,
6565 {
66- files : [ " test/**" ] , // or any other pattern
66+ files : [ ' test/**' ] , // or any other pattern
6767 plugins : {
6868 vitest
6969 } ,
7070 rules : {
7171 ...vitest . configs ?. recommended . rules , // you can also use vitest.configs.all.rules to enable all rules
72- " vitest/max-nested-describe" : [ " error" , { " max" : 3 } ] // you can also modify rules' behavior using option like this
72+ ' vitest/max-nested-describe' : [ ' error' , { ' max' : 3 } ] // you can also modify rules' behavior using option like this
7373 } ,
7474 } ,
7575) ;
0 commit comments