@perfective/eslint-config 0.29.2 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.adoc +24 -18
- package/README.md +20 -16
- package/config/node.d.ts +7 -0
- package/config/node.js +7 -11
- package/config/plugin.d.ts +9 -0
- package/config/plugin.js +22 -26
- package/config.js +1 -6
- package/cypress.d.ts +5 -0
- package/cypress.js +31 -56
- package/index.d.ts +46 -12
- package/index.js +100 -144
- package/jest-dom.js +8 -11
- package/jest.d.ts +6 -0
- package/jest.js +29 -24
- package/package.json +18 -17
- package/rules/array-func/index.d.ts +1 -2
- package/rules/array-func/index.js +14 -50
- package/rules/cypress/index.d.ts +11 -3
- package/rules/cypress/index.js +23 -57
- package/rules/eslint/index.js +6 -9
- package/rules/eslint/layout-formatting.js +64 -67
- package/rules/eslint/possible-problems.js +96 -99
- package/rules/eslint/suggestions.js +181 -182
- package/rules/eslint-comments/best-practices.js +8 -11
- package/rules/eslint-comments/index.d.ts +1 -2
- package/rules/eslint-comments/index.js +9 -45
- package/rules/eslint-comments/stylistic-issues.js +9 -18
- package/rules/import/helpful-warnings.js +11 -14
- package/rules/import/index.js +11 -14
- package/rules/import/module-systems.js +10 -13
- package/rules/import/rules/no-extraneous-dependencies.d.ts +3 -0
- package/rules/import/rules/no-extraneous-dependencies.js +20 -21
- package/rules/import/static-analysis.js +26 -29
- package/rules/import/style-guide.js +33 -36
- package/rules/jest/index.js +98 -72
- package/rules/jest/typescript-eslint.js +5 -8
- package/rules/jest-dom/index.js +19 -55
- package/rules/jsdoc/index.d.ts +1 -1
- package/rules/jsdoc/index.js +158 -344
- package/rules/n/index.d.ts +1 -1
- package/rules/n/index.js +64 -98
- package/rules/prefer-arrow/index.d.ts +1 -2
- package/rules/prefer-arrow/index.js +14 -50
- package/rules/promise/index.d.ts +1 -2
- package/rules/promise/index.js +35 -73
- package/rules/rxjs/index.d.ts +1 -1
- package/rules/rxjs/index.js +60 -96
- package/rules/security/index.d.ts +1 -2
- package/rules/security/index.js +22 -58
- package/rules/simple-import-sort/index.js +12 -48
- package/rules/simple-import-sort/rules/imports.d.ts +11 -0
- package/rules/simple-import-sort/rules/imports.js +18 -32
- package/rules/stylistic/js/index.d.ts +9 -2
- package/rules/stylistic/js/index.js +198 -236
- package/rules/stylistic/jsx/index.d.ts +8 -2
- package/rules/stylistic/jsx/index.js +81 -117
- package/rules/stylistic/plus/index.d.ts +6 -2
- package/rules/stylistic/plus/index.js +14 -50
- package/rules/stylistic/ts/index.d.ts +8 -2
- package/rules/stylistic/ts/index.js +135 -169
- package/rules/testing-library/index.js +41 -77
- package/rules/typescript-eslint/extension-rules.js +113 -116
- package/rules/typescript-eslint/index.d.ts +2 -0
- package/rules/typescript-eslint/index.js +9 -45
- package/rules/typescript-eslint/rules/typescript-eslint-naming-convention.d.ts +5 -0
- package/rules/typescript-eslint/rules/typescript-eslint-naming-convention.js +24 -30
- package/rules/typescript-eslint/supported-rules.d.ts +2 -0
- package/rules/typescript-eslint/supported-rules.js +256 -319
- package/rules/unicorn/index.d.ts +7 -2
- package/rules/unicorn/index.js +178 -209
- package/rules/unicorn/rules/prevent-abbreviations.d.ts +8 -0
- package/rules/unicorn/rules/prevent-abbreviations.js +30 -8
- package/rules.js +4 -14
- package/rxjs.d.ts +5 -0
- package/rxjs.js +21 -57
- package/testing-library.js +8 -11
|
@@ -1,319 +1,256 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
'
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
'
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
'@typescript-eslint/prefer-ts-expect-error': 'off',
|
|
258
|
-
'@typescript-eslint/promise-function-async': ['warn', {
|
|
259
|
-
checkArrowFunctions: false,
|
|
260
|
-
}],
|
|
261
|
-
'@typescript-eslint/require-array-sort-compare': ['error', {
|
|
262
|
-
ignoreStringArrays: true,
|
|
263
|
-
}],
|
|
264
|
-
'@typescript-eslint/restrict-plus-operands': ['error', {
|
|
265
|
-
allowAny: false,
|
|
266
|
-
allowBoolean: false,
|
|
267
|
-
allowNullish: false,
|
|
268
|
-
allowNumberAndString: false,
|
|
269
|
-
allowRegExp: false,
|
|
270
|
-
skipCompoundAssignments: false,
|
|
271
|
-
}],
|
|
272
|
-
'@typescript-eslint/restrict-template-expressions': ['error', {
|
|
273
|
-
allowAny: false,
|
|
274
|
-
allowArray: false,
|
|
275
|
-
allowBoolean: false,
|
|
276
|
-
allowNullish: false,
|
|
277
|
-
allowNumber: false,
|
|
278
|
-
allowRegExp: false,
|
|
279
|
-
allowNever: false,
|
|
280
|
-
}],
|
|
281
|
-
'@typescript-eslint/sort-type-constituents': 'off',
|
|
282
|
-
'@typescript-eslint/strict-boolean-expressions': ['error', {
|
|
283
|
-
allowString: false,
|
|
284
|
-
allowNumber: false,
|
|
285
|
-
allowNullableEnum: false,
|
|
286
|
-
allowNullableObject: true,
|
|
287
|
-
allowNullableBoolean: false,
|
|
288
|
-
allowNullableString: false,
|
|
289
|
-
allowNullableNumber: false,
|
|
290
|
-
allowAny: false,
|
|
291
|
-
}],
|
|
292
|
-
'@typescript-eslint/switch-exhaustiveness-check': ['error', {
|
|
293
|
-
allowDefaultCaseForExhaustiveSwitch: false,
|
|
294
|
-
requireDefaultForNonUnion: true,
|
|
295
|
-
}],
|
|
296
|
-
'@typescript-eslint/triple-slash-reference': ['error', {
|
|
297
|
-
path: 'never',
|
|
298
|
-
types: 'always',
|
|
299
|
-
lib: 'never',
|
|
300
|
-
}],
|
|
301
|
-
'@typescript-eslint/type-annotation-spacing': 'off',
|
|
302
|
-
'@typescript-eslint/typedef': ['error', {
|
|
303
|
-
arrayDestructuring: false,
|
|
304
|
-
arrowParameter: false,
|
|
305
|
-
memberVariableDeclaration: true,
|
|
306
|
-
objectDestructuring: false,
|
|
307
|
-
parameter: true,
|
|
308
|
-
propertyDeclaration: true,
|
|
309
|
-
variableDeclaration: false,
|
|
310
|
-
variableDeclarationIgnoreFunction: false,
|
|
311
|
-
}],
|
|
312
|
-
'@typescript-eslint/unbound-method': ['error', {
|
|
313
|
-
ignoreStatic: false,
|
|
314
|
-
}],
|
|
315
|
-
'@typescript-eslint/unified-signatures': ['error', {
|
|
316
|
-
ignoreDifferentlyNamedParameters: true,
|
|
317
|
-
}],
|
|
318
|
-
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'error',
|
|
319
|
-
};
|
|
1
|
+
import { typescriptEslintNamingConvention } from "./rules/typescript-eslint-naming-convention.js";
|
|
2
|
+
export const supportedRules = {
|
|
3
|
+
'@typescript-eslint/adjacent-overload-signatures': 'error',
|
|
4
|
+
'@typescript-eslint/array-type': ['warn', {
|
|
5
|
+
default: 'array',
|
|
6
|
+
readonly: 'array'
|
|
7
|
+
}],
|
|
8
|
+
'@typescript-eslint/await-thenable': 'error',
|
|
9
|
+
'@typescript-eslint/ban-ts-comment': 'error',
|
|
10
|
+
'@typescript-eslint/ban-tslint-comment': 'warn',
|
|
11
|
+
'@typescript-eslint/ban-types': 'off',
|
|
12
|
+
'@typescript-eslint/class-literal-property-style': 'off',
|
|
13
|
+
'@typescript-eslint/consistent-generic-constructors': ['warn', 'type-annotation'],
|
|
14
|
+
'@typescript-eslint/consistent-indexed-object-style': ['warn', 'record'],
|
|
15
|
+
'@typescript-eslint/consistent-type-assertions': ['error', {
|
|
16
|
+
assertionStyle: 'as',
|
|
17
|
+
arrayLiteralTypeAssertions: 'allow-as-parameter',
|
|
18
|
+
objectLiteralTypeAssertions: 'allow'
|
|
19
|
+
}],
|
|
20
|
+
'@typescript-eslint/consistent-type-definitions': ['warn', 'interface'],
|
|
21
|
+
'@typescript-eslint/consistent-type-exports': ['off', {
|
|
22
|
+
fixMixedExportsWithInlineTypeSpecifier: true
|
|
23
|
+
}],
|
|
24
|
+
'@typescript-eslint/consistent-type-imports': ['warn', {
|
|
25
|
+
prefer: 'no-type-imports',
|
|
26
|
+
disallowTypeAnnotations: true
|
|
27
|
+
}],
|
|
28
|
+
'@typescript-eslint/explicit-function-return-type': ['error', {
|
|
29
|
+
allowConciseArrowFunctionExpressionsStartingWithVoid: true,
|
|
30
|
+
allowDirectConstAssertionInArrowFunctions: true,
|
|
31
|
+
allowExpressions: false,
|
|
32
|
+
allowFunctionsWithoutTypeParameters: false,
|
|
33
|
+
allowHigherOrderFunctions: true,
|
|
34
|
+
allowIIFEs: false,
|
|
35
|
+
allowTypedFunctionExpressions: true,
|
|
36
|
+
allowedNames: []
|
|
37
|
+
}],
|
|
38
|
+
'@typescript-eslint/explicit-member-accessibility': 'warn',
|
|
39
|
+
'@typescript-eslint/explicit-module-boundary-types': 'error',
|
|
40
|
+
'@typescript-eslint/member-delimiter-style': 'off',
|
|
41
|
+
'@typescript-eslint/member-ordering': ['error', {
|
|
42
|
+
default: ['signature', 'call-signature', 'public-static-field', 'public-abstract-field', 'public-decorated-field', 'public-instance-field', 'protected-static-field', 'protected-abstract-field', 'protected-decorated-field', 'protected-instance-field', 'private-static-field', '#private-static-field', 'private-decorated-field', 'private-instance-field', '#private-instance-field', 'field', 'static-initialization', 'constructor', 'public-static-method', 'public-static-set', 'public-static-get', 'public-abstract-method', 'public-abstract-set', 'public-abstract-get', 'public-decorated-method', 'public-decorated-set', 'public-decorated-get', 'public-instance-method', 'public-instance-set', 'public-instance-get', 'protected-static-method', 'protected-static-set', 'protected-static-get', 'protected-abstract-method', 'protected-abstract-set', 'protected-abstract-get', 'protected-decorated-method', 'protected-decorated-set', 'protected-decorated-get', 'protected-instance-method', 'protected-instance-set', 'protected-instance-get', 'private-static-method', '#private-static-method', 'private-static-set', 'private-static-get', '#private-static-set', '#private-static-get', 'private-decorated-method', 'private-decorated-set', 'private-decorated-get', 'private-instance-method', '#private-instance-method', 'private-instance-set', 'private-instance-get', '#private-instance-set', '#private-instance-get', 'method']
|
|
43
|
+
}],
|
|
44
|
+
'@typescript-eslint/method-signature-style': ['warn', 'property'],
|
|
45
|
+
'@typescript-eslint/naming-convention': ['error', ...typescriptEslintNamingConvention()],
|
|
46
|
+
'@typescript-eslint/no-array-delete': 'error',
|
|
47
|
+
'@typescript-eslint/no-base-to-string': 'error',
|
|
48
|
+
'@typescript-eslint/no-confusing-non-null-assertion': 'warn',
|
|
49
|
+
'@typescript-eslint/no-confusing-void-expression': ['warn', {
|
|
50
|
+
ignoreArrowShorthand: true,
|
|
51
|
+
ignoreVoidOperator: false
|
|
52
|
+
}],
|
|
53
|
+
'@typescript-eslint/no-deprecated': 'error',
|
|
54
|
+
'@typescript-eslint/no-duplicate-enum-values': 'error',
|
|
55
|
+
'@typescript-eslint/no-duplicate-type-constituents': ['error', {
|
|
56
|
+
ignoreIntersections: false,
|
|
57
|
+
ignoreUnions: false
|
|
58
|
+
}],
|
|
59
|
+
'@typescript-eslint/no-dynamic-delete': 'warn',
|
|
60
|
+
'@typescript-eslint/no-empty-interface': ['off', {
|
|
61
|
+
allowSingleExtends: true
|
|
62
|
+
}],
|
|
63
|
+
'@typescript-eslint/no-empty-object-type': ['error', {
|
|
64
|
+
allowInterfaces: 'always',
|
|
65
|
+
allowObjectTypes: 'never'
|
|
66
|
+
}],
|
|
67
|
+
'@typescript-eslint/no-explicit-any': ['error', {
|
|
68
|
+
fixToUnknown: false,
|
|
69
|
+
ignoreRestArgs: false
|
|
70
|
+
}],
|
|
71
|
+
'@typescript-eslint/no-extra-non-null-assertion': 'warn',
|
|
72
|
+
'@typescript-eslint/no-extraneous-class': ['error', {
|
|
73
|
+
allowConstructorOnly: false,
|
|
74
|
+
allowEmpty: false,
|
|
75
|
+
allowStaticOnly: false,
|
|
76
|
+
allowWithDecorator: true
|
|
77
|
+
}],
|
|
78
|
+
'@typescript-eslint/no-floating-promises': ['error', {
|
|
79
|
+
allowForKnownSafeCalls: [],
|
|
80
|
+
allowForKnownSafePromises: [],
|
|
81
|
+
checkThenables: true,
|
|
82
|
+
ignoreIIFE: false,
|
|
83
|
+
ignoreVoid: true
|
|
84
|
+
}],
|
|
85
|
+
'@typescript-eslint/no-for-in-array': 'error',
|
|
86
|
+
'@typescript-eslint/no-import-type-side-effects': 'warn',
|
|
87
|
+
'@typescript-eslint/no-inferrable-types': 'off',
|
|
88
|
+
'@typescript-eslint/no-invalid-void-type': ['error', {
|
|
89
|
+
allowInGenericTypeArguments: true
|
|
90
|
+
}],
|
|
91
|
+
'@typescript-eslint/no-meaningless-void-operator': ['warn', {
|
|
92
|
+
checkNever: true
|
|
93
|
+
}],
|
|
94
|
+
'@typescript-eslint/no-misused-new': 'error',
|
|
95
|
+
'@typescript-eslint/no-misused-promises': ['error', {
|
|
96
|
+
checksConditionals: true,
|
|
97
|
+
checksVoidReturn: true
|
|
98
|
+
}],
|
|
99
|
+
'@typescript-eslint/no-misused-spread': 'error',
|
|
100
|
+
'@typescript-eslint/no-mixed-enums': 'error',
|
|
101
|
+
'@typescript-eslint/no-namespace': 'error',
|
|
102
|
+
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
|
|
103
|
+
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
|
|
104
|
+
'@typescript-eslint/no-non-null-assertion': 'error',
|
|
105
|
+
'@typescript-eslint/no-redundant-type-constituents': 'error',
|
|
106
|
+
'@typescript-eslint/no-unnecessary-type-parameters': 'error',
|
|
107
|
+
'@typescript-eslint/no-require-imports': ['error', {
|
|
108
|
+
allow: []
|
|
109
|
+
}],
|
|
110
|
+
'@typescript-eslint/no-restricted-types': ['error', {
|
|
111
|
+
types: {
|
|
112
|
+
object: {
|
|
113
|
+
message: ['The `object` type is currently hard to use', '(https://github.com/microsoft/TypeScript/issues/21732).'].join(' '),
|
|
114
|
+
suggest: ['Record<string, unknown>']
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}],
|
|
118
|
+
'@typescript-eslint/no-this-alias': 'error',
|
|
119
|
+
'@typescript-eslint/no-type-alias': 'off',
|
|
120
|
+
'@typescript-eslint/no-unnecessary-boolean-literal-compare': ['warn', {
|
|
121
|
+
allowComparingNullableBooleansToTrue: true,
|
|
122
|
+
allowComparingNullableBooleansToFalse: true
|
|
123
|
+
}],
|
|
124
|
+
'@typescript-eslint/no-unnecessary-condition': ['warn', {
|
|
125
|
+
allowConstantLoopConditions: false,
|
|
126
|
+
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
|
|
127
|
+
checkTypePredicates: true
|
|
128
|
+
}],
|
|
129
|
+
'@typescript-eslint/no-unnecessary-parameter-property-assignment': 'error',
|
|
130
|
+
'@typescript-eslint/no-unnecessary-qualifier': 'warn',
|
|
131
|
+
'@typescript-eslint/no-unnecessary-template-expression': 'error',
|
|
132
|
+
'@typescript-eslint/no-unnecessary-type-arguments': 'warn',
|
|
133
|
+
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
|
|
134
|
+
'@typescript-eslint/no-unnecessary-type-constraint': 'warn',
|
|
135
|
+
'@typescript-eslint/no-unsafe-argument': 'error',
|
|
136
|
+
'@typescript-eslint/no-unsafe-assignment': 'error',
|
|
137
|
+
'@typescript-eslint/no-unsafe-call': 'error',
|
|
138
|
+
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
|
|
139
|
+
'@typescript-eslint/no-unsafe-enum-comparison': 'error',
|
|
140
|
+
'@typescript-eslint/no-unsafe-function-type': 'warn',
|
|
141
|
+
'@typescript-eslint/no-unsafe-member-access': 'error',
|
|
142
|
+
'@typescript-eslint/no-unsafe-return': 'error',
|
|
143
|
+
'@typescript-eslint/no-unsafe-type-assertion': 'off',
|
|
144
|
+
'@typescript-eslint/no-unsafe-unary-minus': 'error',
|
|
145
|
+
'@typescript-eslint/no-useless-empty-export': 'warn',
|
|
146
|
+
'@typescript-eslint/no-useless-template-literal': 'off',
|
|
147
|
+
'@typescript-eslint/no-var-requires': ['error', {
|
|
148
|
+
allow: []
|
|
149
|
+
}],
|
|
150
|
+
'@typescript-eslint/no-wrapper-object-types': 'warn',
|
|
151
|
+
'@typescript-eslint/non-nullable-type-assertion-style': 'error',
|
|
152
|
+
'@typescript-eslint/parameter-properties': ['error', {
|
|
153
|
+
prefer: 'parameter-property'
|
|
154
|
+
}],
|
|
155
|
+
'@typescript-eslint/prefer-as-const': 'warn',
|
|
156
|
+
'@typescript-eslint/prefer-enum-initializers': 'error',
|
|
157
|
+
'@typescript-eslint/prefer-find': 'error',
|
|
158
|
+
'@typescript-eslint/prefer-for-of': 'error',
|
|
159
|
+
'@typescript-eslint/prefer-function-type': 'warn',
|
|
160
|
+
'@typescript-eslint/prefer-includes': 'warn',
|
|
161
|
+
'@typescript-eslint/prefer-literal-enum-member': ['error', {
|
|
162
|
+
allowBitwiseExpressions: true
|
|
163
|
+
}],
|
|
164
|
+
'@typescript-eslint/prefer-namespace-keyword': 'warn',
|
|
165
|
+
'@typescript-eslint/prefer-nullish-coalescing': ['error', {
|
|
166
|
+
ignoreBooleanCoercion: false,
|
|
167
|
+
ignoreTernaryTests: false,
|
|
168
|
+
ignoreConditionalTests: true,
|
|
169
|
+
ignoreMixedLogicalExpressions: true,
|
|
170
|
+
ignorePrimitives: {
|
|
171
|
+
bigint: false,
|
|
172
|
+
boolean: false,
|
|
173
|
+
number: false,
|
|
174
|
+
string: false
|
|
175
|
+
}
|
|
176
|
+
}],
|
|
177
|
+
'@typescript-eslint/prefer-optional-chain': ['error', {
|
|
178
|
+
checkAny: true,
|
|
179
|
+
checkUnknown: true,
|
|
180
|
+
checkString: true,
|
|
181
|
+
checkNumber: true,
|
|
182
|
+
checkBoolean: true,
|
|
183
|
+
checkBigInt: true,
|
|
184
|
+
requireNullish: false
|
|
185
|
+
}],
|
|
186
|
+
'@typescript-eslint/prefer-readonly': 'warn',
|
|
187
|
+
'@typescript-eslint/prefer-readonly-parameter-types': 'off',
|
|
188
|
+
'@typescript-eslint/prefer-reduce-type-parameter': 'warn',
|
|
189
|
+
'@typescript-eslint/prefer-regexp-exec': 'warn',
|
|
190
|
+
'@typescript-eslint/prefer-return-this-type': 'warn',
|
|
191
|
+
'@typescript-eslint/prefer-string-starts-ends-with': ['warn', {
|
|
192
|
+
allowSingleElementEquality: 'never'
|
|
193
|
+
}],
|
|
194
|
+
'@typescript-eslint/prefer-ts-expect-error': 'off',
|
|
195
|
+
'@typescript-eslint/promise-function-async': ['warn', {
|
|
196
|
+
checkArrowFunctions: false
|
|
197
|
+
}],
|
|
198
|
+
'@typescript-eslint/require-array-sort-compare': ['error', {
|
|
199
|
+
ignoreStringArrays: true
|
|
200
|
+
}],
|
|
201
|
+
'@typescript-eslint/restrict-plus-operands': ['error', {
|
|
202
|
+
allowAny: false,
|
|
203
|
+
allowBoolean: false,
|
|
204
|
+
allowNullish: false,
|
|
205
|
+
allowNumberAndString: false,
|
|
206
|
+
allowRegExp: false,
|
|
207
|
+
skipCompoundAssignments: false
|
|
208
|
+
}],
|
|
209
|
+
'@typescript-eslint/restrict-template-expressions': ['error', {
|
|
210
|
+
allowAny: false,
|
|
211
|
+
allowArray: false,
|
|
212
|
+
allowBoolean: false,
|
|
213
|
+
allowNullish: false,
|
|
214
|
+
allowNumber: false,
|
|
215
|
+
allowRegExp: false,
|
|
216
|
+
allowNever: false
|
|
217
|
+
}],
|
|
218
|
+
'@typescript-eslint/sort-type-constituents': 'off',
|
|
219
|
+
'@typescript-eslint/strict-boolean-expressions': ['error', {
|
|
220
|
+
allowString: false,
|
|
221
|
+
allowNumber: false,
|
|
222
|
+
allowNullableEnum: false,
|
|
223
|
+
allowNullableObject: true,
|
|
224
|
+
allowNullableBoolean: false,
|
|
225
|
+
allowNullableString: false,
|
|
226
|
+
allowNullableNumber: false,
|
|
227
|
+
allowAny: false
|
|
228
|
+
}],
|
|
229
|
+
'@typescript-eslint/switch-exhaustiveness-check': ['error', {
|
|
230
|
+
allowDefaultCaseForExhaustiveSwitch: false,
|
|
231
|
+
requireDefaultForNonUnion: true
|
|
232
|
+
}],
|
|
233
|
+
'@typescript-eslint/triple-slash-reference': ['error', {
|
|
234
|
+
path: 'never',
|
|
235
|
+
types: 'always',
|
|
236
|
+
lib: 'never'
|
|
237
|
+
}],
|
|
238
|
+
'@typescript-eslint/type-annotation-spacing': 'off',
|
|
239
|
+
'@typescript-eslint/typedef': ['error', {
|
|
240
|
+
arrayDestructuring: false,
|
|
241
|
+
arrowParameter: false,
|
|
242
|
+
memberVariableDeclaration: true,
|
|
243
|
+
objectDestructuring: false,
|
|
244
|
+
parameter: true,
|
|
245
|
+
propertyDeclaration: true,
|
|
246
|
+
variableDeclaration: false,
|
|
247
|
+
variableDeclarationIgnoreFunction: false
|
|
248
|
+
}],
|
|
249
|
+
'@typescript-eslint/unbound-method': ['error', {
|
|
250
|
+
ignoreStatic: false
|
|
251
|
+
}],
|
|
252
|
+
'@typescript-eslint/unified-signatures': ['error', {
|
|
253
|
+
ignoreDifferentlyNamedParameters: true
|
|
254
|
+
}],
|
|
255
|
+
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'error'
|
|
256
|
+
};
|