1- import typescriptEslintEslintPlugin from " @typescript-eslint/eslint-plugin" ;
2- import globals from " globals" ;
3- import tsParser from " @typescript-eslint/parser" ;
4- import path from " node:path" ;
5- import { fileURLToPath } from " node:url" ;
6- import js from " @eslint/js" ;
7- import { FlatCompat } from " @eslint/eslintrc" ;
1+ import typescriptEslintPlugin from ' @typescript-eslint/eslint-plugin' ;
2+ import globals from ' globals' ;
3+ import tsParser from ' @typescript-eslint/parser' ;
4+ import path from ' node:path' ;
5+ import { fileURLToPath } from ' node:url' ;
6+ import js from ' @eslint/js' ;
7+ import { FlatCompat } from ' @eslint/eslintrc' ;
88
99const __filename = fileURLToPath ( import . meta. url ) ;
1010const __dirname = path . dirname ( __filename ) ;
1111const compat = new FlatCompat ( {
1212 baseDirectory : __dirname ,
1313 recommendedConfig : js . configs . recommended ,
14- allConfig : js . configs . all
14+ allConfig : js . configs . all ,
1515} ) ;
1616
17- export default [ {
18- ignores : [ "**/.eslintrc.js" ] ,
19- } , ...compat . extends ( "plugin:@typescript-eslint/recommended" ) , {
20- plugins : {
21- "@typescript-eslint" : typescriptEslintEslintPlugin ,
17+ export default [
18+ {
19+ ignores : [ '**/eslint.config.mjs' ] ,
2220 } ,
23-
24- languageOptions : {
25- globals : {
26- ...globals . node ,
27- ...globals . jest ,
21+ ...compat . extends (
22+ 'plugin:@typescript-eslint/recommended' ,
23+ 'plugin:prettier/recommended' ,
24+ ) ,
25+ {
26+ plugins : {
27+ '@typescript-eslint' : typescriptEslintPlugin ,
2828 } ,
2929
30- parser : tsParser ,
31- ecmaVersion : 5 ,
32- sourceType : "module" ,
30+ languageOptions : {
31+ globals : {
32+ ...globals . node ,
33+ ...globals . jest ,
34+ } ,
3335
34- parserOptions : {
35- project : "tsconfig.json" ,
36- tsconfigRootDir : "./" ,
37- } ,
38- } ,
36+ parser : tsParser ,
37+ ecmaVersion : 5 ,
38+ sourceType : 'module' ,
3939
40- rules : {
41- "@typescript-eslint/interface-name-prefix" : "off" ,
42- "@typescript-eslint/explicit-function-return-type" : "off" ,
43- "@typescript-eslint/explicit-module-boundary-types" : "off" ,
44- "@typescript-eslint/no-explicit-any" : "off" ,
45- "@typescript-eslint/no-unused-expressions" : "off" ,
46- "eol-last" : "off" ,
47- "brace-style" : "off" ,
48- "comma-dangle" : "off" ,
49- "comma-spacing" : "off" ,
50- eqeqeq : "off" ,
51- indent : "off" ,
52- "key-spacing" : "off" ,
53- "keyword-spacing" : "off" ,
54- "max-len" : "off" ,
55- "no-ex-assign" : "off" ,
56- "no-extra-boolean-cast" : "off" ,
57- "no-floating-decimal" : "off" ,
58- "no-multi-spaces" : "off" ,
59- "no-throw-literal" : "off" ,
60- "no-unreachable" : "off" ,
61- radix : "off" ,
62- "quote-props" : "off" ,
63- quotes : "off" ,
64- "space-before-function-paren" : "off" ,
65- "space-in-parens" : "off" ,
66- "space-infix-ops" : "off" ,
67- "space-unary-ops" : "off" ,
68- "spaced-comment" : "off" ,
69- indent : [ "warn" , "tab" , {
70- SwitchCase : 1 ,
40+ parserOptions : {
41+ project : path . resolve ( __dirname , 'tsconfig.json' ) ,
42+ } ,
43+ } ,
7144
72- ignoredNodes : [
73- "FunctionExpression > .params[decorators.length > 0]" ,
45+ rules : {
46+ '@typescript-eslint/interface-name-prefix' : 'off' ,
47+ '@typescript-eslint/explicit-function-return-type' : 'off' ,
48+ '@typescript-eslint/explicit-module-boundary-types' : 'off' ,
49+ '@typescript-eslint/no-explicit-any' : 'off' ,
50+ indent : [
51+ 'error' ,
52+ 'tab' ,
53+ {
54+ SwitchCase : 1 ,
55+ flatTernaryExpressions : false ,
56+ ignoredNodes : [
57+ 'FunctionExpression[params]:has(Identifier[decorators])' ,
58+ "FunctionExpression > .params[decorators.length > 0]" ,
7459 "FunctionExpression > .params > :matches(Decorator, :not(:first-child))" ,
7560 "ClassBody.body > PropertyDefinition[decorators.length > 0] > .key" ,
61+ ] ,
62+ } ,
7663 ] ,
77- } ] ,
64+ 'comma-dangle' : 'off' ,
65+ } ,
7866 } ,
79- } ] ;
67+ ] ;
0 commit comments