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