1- import typescriptEslint from " @typescript-eslint/eslint-plugin" ;
2- import tsdoc from " eslint-plugin-tsdoc" ;
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" ;
8-
9- const __filename = fileURLToPath ( import . meta. url ) ;
10- const __dirname = path . dirname ( __filename ) ;
1+ import typescriptEslint from ' @typescript-eslint/eslint-plugin'
2+ import tsdoc from ' eslint-plugin-tsdoc'
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'
8+
9+ const __filename = fileURLToPath ( import . meta. url )
10+ const __dirname = path . dirname ( __filename )
1111const compat = new FlatCompat ( {
12- baseDirectory : __dirname ,
13- recommendedConfig : js . configs . recommended ,
14- allConfig : js . configs . all
15- } ) ;
12+ baseDirectory : __dirname ,
13+ recommendedConfig : js . configs . recommended ,
14+ allConfig : js . configs . all ,
15+ } )
1616
17- export default [ {
17+ export default [
18+ {
1819 ignores : [
19- " **/node_modules" ,
20- " **/dist" ,
21- " **/coverage" ,
22- " scripts/generator-adapter" ,
23- " **/.yarn" ,
24- " **/.vscode" ,
25- " **/srcdocs" ,
20+ ' **/node_modules' ,
21+ ' **/dist' ,
22+ ' **/coverage' ,
23+ ' scripts/generator-adapter' ,
24+ ' **/.yarn' ,
25+ ' **/.vscode' ,
26+ ' **/srcdocs' ,
2627 ] ,
27- } , ...compat . extends ( "eslint:recommended" , "plugin:@typescript-eslint/recommended" , "prettier" ) , {
28+ } ,
29+ ...compat . extends ( 'eslint:recommended' , 'plugin:@typescript-eslint/recommended' , 'prettier' ) ,
30+ {
2831 plugins : {
29- " @typescript-eslint" : typescriptEslint ,
30- tsdoc,
32+ ' @typescript-eslint' : typescriptEslint ,
33+ tsdoc,
3134 } ,
3235
3336 languageOptions : {
34- parser : tsParser ,
37+ parser : tsParser ,
3538 } ,
3639
3740 rules : {
38- "tsdoc/syntax" : "warn" ,
39-
40- "array-callback-return" : [ "error" , {
41- allowImplicit : false ,
42- checkForEach : true ,
43- } ] ,
44-
45- "no-constant-binary-expression" : "error" ,
46- "no-constructor-return" : "error" ,
47- "no-duplicate-imports" : "error" ,
48- "no-promise-executor-return" : "error" ,
49- "no-self-compare" : "error" ,
50- "no-template-curly-in-string" : "error" ,
51- "no-unmodified-loop-condition" : "error" ,
52- "no-unreachable-loop" : "error" ,
53- "no-unused-private-class-members" : "error" ,
54- "require-atomic-updates" : "error" ,
55-
56- "@typescript-eslint/no-unused-vars" : [ "warn" , {
57- argsIgnorePattern : "^_" ,
58- caughtErrorsIgnorePattern : "^_"
59- } ] ,
60-
61- "capitalized-comments" : [ "error" , "always" , {
62- ignoreConsecutiveComments : true ,
63- } ] ,
64-
65- complexity : [ "error" , 25 ] ,
66- curly : "error" ,
67- "default-case-last" : "error" ,
68- "default-param-last" : "error" ,
69- eqeqeq : [ "error" , "smart" ] ,
70- "func-names" : "error" ,
71-
72- "func-style" : [ "error" , "declaration" , {
73- allowArrowFunctions : true ,
74- } ] ,
75-
76- "grouped-accessor-pairs" : [ "error" , "getBeforeSet" ] ,
77- "max-depth" : [ "error" , 4 ] ,
78- "max-nested-callbacks" : [ "error" , 3 ] ,
79- "max-params" : [ "error" , 4 ] ,
80-
81- "new-cap" : [ "error" , {
82- newIsCapExceptions : [ "ctor" ] ,
83- } ] ,
84-
85- "no-caller" : "error" ,
86-
87- "no-confusing-arrow" : [ "error" , {
88- allowParens : true ,
89- } ] ,
90-
91- "no-console" : [ "warn" ] ,
92- "no-div-regex" : "error" ,
93- "no-eval" : "error" ,
94- "no-extend-native" : "error" ,
95- "no-extra-bind" : "error" ,
96- "no-extra-label" : "error" ,
97- "no-extra-semi" : "error" ,
98- "no-floating-decimal" : "error" ,
99- "no-implied-eval" : "error" ,
100- "no-invalid-this" : "error" ,
101- "no-labels" : "error" ,
102- "no-lonely-if" : "error" ,
103- "no-multi-assign" : "error" ,
104- "no-multi-str" : "error" ,
105- "no-nested-ternary" : "error" ,
106- "no-new" : "error" ,
107- "no-new-func" : "error" ,
108- "no-new-object" : "error" ,
109- "no-new-wrappers" : "error" ,
110- "no-param-reassign" : "error" ,
111- "no-proto" : "error" ,
112- "no-return-assign" : "error" ,
113- "no-return-await" : "error" ,
114- "no-sequences" : "error" ,
115- "no-shadow" : "off" ,
116- "@typescript-eslint/no-shadow" : "error" ,
117- "no-unneeded-ternary" : "error" ,
118- "no-useless-call" : "error" ,
119- "no-useless-computed-key" : "error" ,
120- "no-useless-concat" : "error" ,
121- "no-useless-rename" : "error" ,
122- "no-var" : "error" ,
123- "operator-assignment" : [ "error" , "always" ] ,
124- "prefer-arrow-callback" : "error" ,
125- "prefer-const" : "error" ,
126- "prefer-exponentiation-operator" : "error" ,
127- "prefer-object-spread" : "error" ,
128- "prefer-promise-reject-errors" : "error" ,
129- "prefer-regex-literals" : "error" ,
130- "prefer-rest-params" : "error" ,
131- "prefer-spread" : "error" ,
132- "prefer-template" : "error" ,
133- "spaced-comment" : [ "error" , "always" ] ,
134- "symbol-description" : "error" ,
135- yoda : "error" ,
41+ 'tsdoc/syntax' : 'warn' ,
42+
43+ 'array-callback-return' : [
44+ 'error' ,
45+ {
46+ allowImplicit : false ,
47+ checkForEach : true ,
48+ } ,
49+ ] ,
50+
51+ 'no-constant-binary-expression' : 'error' ,
52+ 'no-constructor-return' : 'error' ,
53+ 'no-duplicate-imports' : 'error' ,
54+ 'no-promise-executor-return' : 'error' ,
55+ 'no-self-compare' : 'error' ,
56+ 'no-template-curly-in-string' : 'error' ,
57+ 'no-unmodified-loop-condition' : 'error' ,
58+ 'no-unreachable-loop' : 'error' ,
59+ 'no-unused-private-class-members' : 'error' ,
60+ 'require-atomic-updates' : 'error' ,
61+
62+ '@typescript-eslint/no-unused-vars' : [
63+ 'warn' ,
64+ {
65+ argsIgnorePattern : '^_' ,
66+ caughtErrorsIgnorePattern : '^_' ,
67+ } ,
68+ ] ,
69+
70+ 'capitalized-comments' : [
71+ 'error' ,
72+ 'always' ,
73+ {
74+ ignoreConsecutiveComments : true ,
75+ } ,
76+ ] ,
77+
78+ complexity : [ 'error' , 25 ] ,
79+ curly : 'error' ,
80+ 'default-case-last' : 'error' ,
81+ 'default-param-last' : 'error' ,
82+ eqeqeq : [ 'error' , 'smart' ] ,
83+ 'func-names' : 'error' ,
84+
85+ 'func-style' : [
86+ 'error' ,
87+ 'declaration' ,
88+ {
89+ allowArrowFunctions : true ,
90+ } ,
91+ ] ,
92+
93+ 'grouped-accessor-pairs' : [ 'error' , 'getBeforeSet' ] ,
94+ 'max-depth' : [ 'error' , 4 ] ,
95+ 'max-nested-callbacks' : [ 'error' , 3 ] ,
96+ 'max-params' : [ 'error' , 4 ] ,
97+
98+ 'new-cap' : [
99+ 'error' ,
100+ {
101+ newIsCapExceptions : [ 'ctor' ] ,
102+ } ,
103+ ] ,
104+
105+ 'no-caller' : 'error' ,
106+
107+ 'no-confusing-arrow' : [
108+ 'error' ,
109+ {
110+ allowParens : true ,
111+ } ,
112+ ] ,
113+
114+ 'no-console' : [ 'warn' ] ,
115+ 'no-div-regex' : 'error' ,
116+ 'no-eval' : 'error' ,
117+ 'no-extend-native' : 'error' ,
118+ 'no-extra-bind' : 'error' ,
119+ 'no-extra-label' : 'error' ,
120+ 'no-extra-semi' : 'error' ,
121+ 'no-floating-decimal' : 'error' ,
122+ 'no-implied-eval' : 'error' ,
123+ 'no-invalid-this' : 'error' ,
124+ 'no-labels' : 'error' ,
125+ 'no-lonely-if' : 'error' ,
126+ 'no-multi-assign' : 'error' ,
127+ 'no-multi-str' : 'error' ,
128+ 'no-nested-ternary' : 'error' ,
129+ 'no-new' : 'error' ,
130+ 'no-new-func' : 'error' ,
131+ 'no-new-object' : 'error' ,
132+ 'no-new-wrappers' : 'error' ,
133+ 'no-param-reassign' : 'error' ,
134+ 'no-proto' : 'error' ,
135+ 'no-return-assign' : 'error' ,
136+ 'no-return-await' : 'error' ,
137+ 'no-sequences' : 'error' ,
138+ 'no-shadow' : 'off' ,
139+ '@typescript-eslint/no-shadow' : 'error' ,
140+ 'no-unneeded-ternary' : 'error' ,
141+ 'no-useless-call' : 'error' ,
142+ 'no-useless-computed-key' : 'error' ,
143+ 'no-useless-concat' : 'error' ,
144+ 'no-useless-rename' : 'error' ,
145+ 'no-var' : 'error' ,
146+ 'operator-assignment' : [ 'error' , 'always' ] ,
147+ 'prefer-arrow-callback' : 'error' ,
148+ 'prefer-const' : 'error' ,
149+ 'prefer-exponentiation-operator' : 'error' ,
150+ 'prefer-object-spread' : 'error' ,
151+ 'prefer-promise-reject-errors' : 'error' ,
152+ 'prefer-regex-literals' : 'error' ,
153+ 'prefer-rest-params' : 'error' ,
154+ 'prefer-spread' : 'error' ,
155+ 'prefer-template' : 'error' ,
156+ 'spaced-comment' : [ 'error' , 'always' ] ,
157+ 'symbol-description' : 'error' ,
158+ yoda : 'error' ,
136159 } ,
137- } , {
138- files : [ "test/**/*.ts" ] ,
160+ } ,
161+ {
162+ files : [ 'test/**/*.ts' ] ,
139163
140164 rules : {
141- " require-atomic-updates" : " off" ,
165+ ' require-atomic-updates' : ' off' ,
142166 } ,
143- } ] ;
167+ } ,
168+ ]
0 commit comments