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