@eslinted/defaults 12.10.0 → 12.11.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/dist/index.d.ts +99 -912
- package/dist/index.d.ts.map +1 -1
- package/dist/rules/index.d.ts +99 -492
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/scopes/enable.d.ts +0 -2
- package/dist/rules/scopes/enable.d.ts.map +1 -1
- package/dist/rules/scopes/enable.js +0 -3
- package/dist/rules/scopes/enable.js.map +1 -1
- package/dist/rules/scopes/enable.style.d.ts +24 -134
- package/dist/rules/scopes/enable.style.d.ts.map +1 -1
- package/dist/rules/scopes/enable.style.js +22 -192
- package/dist/rules/scopes/enable.style.js.map +1 -1
- package/dist/rules/scopes/index.d.ts +24 -136
- package/dist/rules/scopes/index.d.ts.map +1 -1
- package/dist/rules/scopes/json/index.d.ts +7 -20
- package/dist/rules/scopes/json/index.d.ts.map +1 -1
- package/dist/rules/scopes/json/plugin/extension.d.ts +7 -20
- package/dist/rules/scopes/json/plugin/extension.d.ts.map +1 -1
- package/dist/rules/scopes/json/plugin/extension.js +7 -41
- package/dist/rules/scopes/json/plugin/extension.js.map +1 -1
- package/dist/rules/scopes/mocha/chai/index.d.ts +0 -2
- package/dist/rules/scopes/mocha/chai/index.d.ts.map +1 -1
- package/dist/rules/scopes/mocha/chai/index.js +0 -2
- package/dist/rules/scopes/mocha/chai/index.js.map +1 -1
- package/dist/rules/scopes/mocha/enable.d.ts +3 -10
- package/dist/rules/scopes/mocha/enable.d.ts.map +1 -1
- package/dist/rules/scopes/mocha/enable.js +3 -19
- package/dist/rules/scopes/mocha/enable.js.map +1 -1
- package/dist/rules/scopes/mocha/index.d.ts +3 -12
- package/dist/rules/scopes/mocha/index.d.ts.map +1 -1
- package/dist/rules/scopes/svelte/enable.d.ts +19 -91
- package/dist/rules/scopes/svelte/enable.d.ts.map +1 -1
- package/dist/rules/scopes/svelte/enable.js +20 -153
- package/dist/rules/scopes/svelte/enable.js.map +1 -1
- package/dist/rules/scopes/svelte/extension/index.d.ts +2 -7
- package/dist/rules/scopes/svelte/extension/index.d.ts.map +1 -1
- package/dist/rules/scopes/svelte/extension/index.js +2 -11
- package/dist/rules/scopes/svelte/extension/index.js.map +1 -1
- package/dist/rules/scopes/svelte/index.d.ts +21 -98
- package/dist/rules/scopes/svelte/index.d.ts.map +1 -1
- package/dist/rules/scopes/ts/enable.d.ts +31 -163
- package/dist/rules/scopes/ts/enable.d.ts.map +1 -1
- package/dist/rules/scopes/ts/enable.js +32 -380
- package/dist/rules/scopes/ts/enable.js.map +1 -1
- package/dist/rules/scopes/ts/extension/index.d.ts +1 -20
- package/dist/rules/scopes/ts/extension/index.d.ts.map +1 -1
- package/dist/rules/scopes/ts/extension/index.js +2 -25
- package/dist/rules/scopes/ts/extension/index.js.map +1 -1
- package/dist/rules/scopes/ts/index.d.ts +32 -183
- package/dist/rules/scopes/ts/index.d.ts.map +1 -1
- package/dist/rules/scopes/yml/index.d.ts +12 -43
- package/dist/rules/scopes/yml/index.d.ts.map +1 -1
- package/dist/rules/scopes/yml/plugin/extension.d.ts +5 -22
- package/dist/rules/scopes/yml/plugin/extension.d.ts.map +1 -1
- package/dist/rules/scopes/yml/plugin/extension.js +5 -36
- package/dist/rules/scopes/yml/plugin/extension.js.map +1 -1
- package/dist/rules/scopes/yml/plugin/index.d.ts +7 -21
- package/dist/rules/scopes/yml/plugin/index.d.ts.map +1 -1
- package/dist/rules/scopes/yml/plugin/index.js +8 -44
- package/dist/rules/scopes/yml/plugin/index.js.map +1 -1
- package/package.json +1 -1
- package/src/rules/scopes/enable.style.ts +41 -239
- package/src/rules/scopes/enable.ts +0 -11
- package/src/rules/scopes/json/plugin/extension.ts +9 -47
- package/src/rules/scopes/mocha/chai/index.ts +0 -2
- package/src/rules/scopes/mocha/enable.ts +3 -19
- package/src/rules/scopes/svelte/disable.ts +1 -1
- package/src/rules/scopes/svelte/enable.ts +22 -157
- package/src/rules/scopes/svelte/extension/index.ts +1 -11
- package/src/rules/scopes/ts/enable.ts +34 -424
- package/src/rules/scopes/ts/extension/index.ts +2 -27
- package/src/rules/scopes/yml/plugin/extension.ts +4 -37
- package/src/rules/scopes/yml/plugin/index.ts +8 -58
|
@@ -3,7 +3,6 @@ import {
|
|
|
3
3
|
// OFF,
|
|
4
4
|
ON,
|
|
5
5
|
never,
|
|
6
|
-
explicit,
|
|
7
6
|
} from "../../_strings";
|
|
8
7
|
|
|
9
8
|
export const TsEnable = {
|
|
@@ -13,66 +12,27 @@ export const TsEnable = {
|
|
|
13
12
|
// "@typescript-eslint/adjacent-overload-signatures": OFF,
|
|
14
13
|
// "@typescript-eslint/array-type": OFF /* preference: ideally, I'd like to don't-care mutable arrays while requiring readonly [] syntax for immutable arrays, but there is no way to do that with the current rule options */,
|
|
15
14
|
"@typescript-eslint/await-thenable": ON,
|
|
16
|
-
"@typescript-eslint/ban-ts-comment":
|
|
17
|
-
ON,
|
|
18
|
-
{
|
|
19
|
-
"ts-check": false,
|
|
20
|
-
"ts-expect-error": {
|
|
21
|
-
descriptionFormat: "^:? (?:TEST|BUG): .+$",
|
|
22
|
-
},
|
|
23
|
-
"ts-ignore": true,
|
|
24
|
-
"ts-nocheck": true,
|
|
25
|
-
minimumDescriptionLength: 10,
|
|
26
|
-
},
|
|
27
|
-
],
|
|
15
|
+
"@typescript-eslint/ban-ts-comment": ON,
|
|
28
16
|
"@typescript-eslint/ban-tslint-comment": ON,
|
|
29
|
-
"@typescript-eslint/class-literal-property-style":
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
],
|
|
33
|
-
"@typescript-eslint/consistent-generic-constructors": [
|
|
34
|
-
ON,
|
|
35
|
-
"constructor",
|
|
36
|
-
],
|
|
37
|
-
"@typescript-eslint/consistent-indexed-object-style": [
|
|
38
|
-
ON,
|
|
39
|
-
"record",
|
|
40
|
-
],
|
|
17
|
+
"@typescript-eslint/class-literal-property-style": ON,
|
|
18
|
+
"@typescript-eslint/consistent-generic-constructors": ON,
|
|
19
|
+
"@typescript-eslint/consistent-indexed-object-style": ON,
|
|
41
20
|
"@typescript-eslint/consistent-type-assertions": [
|
|
42
21
|
ON,
|
|
43
22
|
{
|
|
44
|
-
assertionStyle: "as",
|
|
45
23
|
arrayLiteralTypeAssertions: never,
|
|
46
24
|
objectLiteralTypeAssertions: never,
|
|
47
25
|
},
|
|
48
26
|
],
|
|
49
27
|
// "@typescript-eslint/consistent-type-definitions": OFF,
|
|
50
|
-
"@typescript-eslint/consistent-type-exports":
|
|
51
|
-
|
|
52
|
-
{
|
|
53
|
-
fixMixedExportsWithInlineTypeSpecifier: false,
|
|
54
|
-
},
|
|
55
|
-
],
|
|
56
|
-
"@typescript-eslint/consistent-type-imports": [
|
|
57
|
-
ON,
|
|
58
|
-
{
|
|
59
|
-
disallowTypeAnnotations: true,
|
|
60
|
-
fixStyle: "separate-type-imports",
|
|
61
|
-
prefer: "type-imports",
|
|
62
|
-
},
|
|
63
|
-
],
|
|
28
|
+
"@typescript-eslint/consistent-type-exports": ON,
|
|
29
|
+
"@typescript-eslint/consistent-type-imports": ON,
|
|
64
30
|
// "@typescript-eslint/explicit-function-return-type": OFF,
|
|
65
31
|
"@typescript-eslint/explicit-member-accessibility": [
|
|
66
32
|
ON,
|
|
67
33
|
{
|
|
68
|
-
accessibility: explicit,
|
|
69
|
-
ignoredMethodNames: [],
|
|
70
34
|
overrides: {
|
|
71
|
-
properties: explicit,
|
|
72
35
|
constructors: "no-public",
|
|
73
|
-
accessors: explicit,
|
|
74
|
-
methods: explicit,
|
|
75
|
-
parameterProperties: explicit,
|
|
76
36
|
},
|
|
77
37
|
},
|
|
78
38
|
],
|
|
@@ -81,189 +41,14 @@ export const TsEnable = {
|
|
|
81
41
|
ON,
|
|
82
42
|
{
|
|
83
43
|
"default": {
|
|
84
|
-
memberTypes: [
|
|
85
|
-
// Index signature
|
|
86
|
-
"signature",
|
|
87
|
-
"call-signature",
|
|
88
|
-
|
|
89
|
-
// Fields
|
|
90
|
-
"public-static-field",
|
|
91
|
-
"protected-static-field",
|
|
92
|
-
"private-static-field",
|
|
93
|
-
"#private-static-field",
|
|
94
|
-
|
|
95
|
-
"public-decorated-field",
|
|
96
|
-
"protected-decorated-field",
|
|
97
|
-
"private-decorated-field",
|
|
98
|
-
|
|
99
|
-
"public-instance-field",
|
|
100
|
-
"protected-instance-field",
|
|
101
|
-
"private-instance-field",
|
|
102
|
-
"#private-instance-field",
|
|
103
|
-
|
|
104
|
-
"public-abstract-field",
|
|
105
|
-
"protected-abstract-field",
|
|
106
|
-
|
|
107
|
-
"public-field",
|
|
108
|
-
"protected-field",
|
|
109
|
-
"private-field",
|
|
110
|
-
"#private-field",
|
|
111
|
-
|
|
112
|
-
"static-field",
|
|
113
|
-
"instance-field",
|
|
114
|
-
"abstract-field",
|
|
115
|
-
"decorated-field",
|
|
116
|
-
"field",
|
|
117
|
-
|
|
118
|
-
// Static initialization
|
|
119
|
-
"static-initialization",
|
|
120
|
-
|
|
121
|
-
// Constructors
|
|
122
|
-
"public-constructor",
|
|
123
|
-
"protected-constructor",
|
|
124
|
-
"private-constructor",
|
|
125
|
-
"constructor",
|
|
126
|
-
|
|
127
|
-
// Accessors
|
|
128
|
-
"public-static-accessor",
|
|
129
|
-
"protected-static-accessor",
|
|
130
|
-
"private-static-accessor",
|
|
131
|
-
"#private-static-accessor",
|
|
132
|
-
|
|
133
|
-
"public-decorated-accessor",
|
|
134
|
-
"protected-decorated-accessor",
|
|
135
|
-
"private-decorated-accessor",
|
|
136
|
-
|
|
137
|
-
"public-instance-accessor",
|
|
138
|
-
"protected-instance-accessor",
|
|
139
|
-
"private-instance-accessor",
|
|
140
|
-
"#private-instance-accessor",
|
|
141
|
-
|
|
142
|
-
"public-abstract-accessor",
|
|
143
|
-
"protected-abstract-accessor",
|
|
144
|
-
|
|
145
|
-
"public-accessor",
|
|
146
|
-
"protected-accessor",
|
|
147
|
-
"private-accessor",
|
|
148
|
-
"#private-accessor",
|
|
149
|
-
|
|
150
|
-
"static-accessor",
|
|
151
|
-
"instance-accessor",
|
|
152
|
-
"abstract-accessor",
|
|
153
|
-
"decorated-accessor",
|
|
154
|
-
"accessor",
|
|
155
|
-
|
|
156
|
-
// Getters
|
|
157
|
-
"public-static-get",
|
|
158
|
-
"protected-static-get",
|
|
159
|
-
"private-static-get",
|
|
160
|
-
"#private-static-get",
|
|
161
|
-
|
|
162
|
-
"public-decorated-get",
|
|
163
|
-
"protected-decorated-get",
|
|
164
|
-
"private-decorated-get",
|
|
165
|
-
|
|
166
|
-
"public-instance-get",
|
|
167
|
-
"protected-instance-get",
|
|
168
|
-
"private-instance-get",
|
|
169
|
-
"#private-instance-get",
|
|
170
|
-
|
|
171
|
-
"public-abstract-get",
|
|
172
|
-
"protected-abstract-get",
|
|
173
|
-
|
|
174
|
-
"public-get",
|
|
175
|
-
"protected-get",
|
|
176
|
-
"private-get",
|
|
177
|
-
"#private-get",
|
|
178
|
-
|
|
179
|
-
"static-get",
|
|
180
|
-
"instance-get",
|
|
181
|
-
"abstract-get",
|
|
182
|
-
"decorated-get",
|
|
183
|
-
"get",
|
|
184
|
-
|
|
185
|
-
// Setters
|
|
186
|
-
"public-static-set",
|
|
187
|
-
"protected-static-set",
|
|
188
|
-
"private-static-set",
|
|
189
|
-
"#private-static-set",
|
|
190
|
-
|
|
191
|
-
"public-decorated-set",
|
|
192
|
-
"protected-decorated-set",
|
|
193
|
-
"private-decorated-set",
|
|
194
|
-
|
|
195
|
-
"public-instance-set",
|
|
196
|
-
"protected-instance-set",
|
|
197
|
-
"private-instance-set",
|
|
198
|
-
"#private-instance-set",
|
|
199
|
-
|
|
200
|
-
"public-abstract-set",
|
|
201
|
-
"protected-abstract-set",
|
|
202
|
-
|
|
203
|
-
"public-set",
|
|
204
|
-
"protected-set",
|
|
205
|
-
"private-set",
|
|
206
|
-
"#private-set",
|
|
207
|
-
|
|
208
|
-
"static-set",
|
|
209
|
-
"instance-set",
|
|
210
|
-
"abstract-set",
|
|
211
|
-
"decorated-set",
|
|
212
|
-
"set",
|
|
213
|
-
|
|
214
|
-
// Methods
|
|
215
|
-
"public-static-method",
|
|
216
|
-
"protected-static-method",
|
|
217
|
-
"private-static-method",
|
|
218
|
-
"#private-static-method",
|
|
219
|
-
|
|
220
|
-
"public-decorated-method",
|
|
221
|
-
"protected-decorated-method",
|
|
222
|
-
"private-decorated-method",
|
|
223
|
-
|
|
224
|
-
"public-instance-method",
|
|
225
|
-
"protected-instance-method",
|
|
226
|
-
"private-instance-method",
|
|
227
|
-
"#private-instance-method",
|
|
228
|
-
|
|
229
|
-
"public-abstract-method",
|
|
230
|
-
"protected-abstract-method",
|
|
231
|
-
|
|
232
|
-
"public-method",
|
|
233
|
-
"protected-method",
|
|
234
|
-
"private-method",
|
|
235
|
-
"#private-method",
|
|
236
|
-
|
|
237
|
-
"static-method",
|
|
238
|
-
"instance-method",
|
|
239
|
-
"abstract-method",
|
|
240
|
-
"decorated-method",
|
|
241
|
-
"method",
|
|
242
|
-
],
|
|
243
44
|
optionalityOrder: "required-first",
|
|
244
|
-
order: "as-written",
|
|
245
45
|
},
|
|
246
|
-
|
|
247
46
|
},
|
|
248
47
|
],
|
|
249
|
-
"@typescript-eslint/method-signature-style":
|
|
250
|
-
ON,
|
|
251
|
-
"property",
|
|
252
|
-
],
|
|
48
|
+
"@typescript-eslint/method-signature-style": ON,
|
|
253
49
|
// "@typescript-eslint/naming-convention": OFF,
|
|
254
50
|
"@typescript-eslint/no-array-delete": ON,
|
|
255
|
-
"@typescript-eslint/no-base-to-string":
|
|
256
|
-
ON,
|
|
257
|
-
{
|
|
258
|
-
checkUnknown: false /* PREFERENCE & @default */,
|
|
259
|
-
ignoredTypeNames: [
|
|
260
|
-
"Error",
|
|
261
|
-
"RegExp",
|
|
262
|
-
"URL",
|
|
263
|
-
"URLSearchParams",
|
|
264
|
-
] /* @default */,
|
|
265
|
-
},
|
|
266
|
-
],
|
|
51
|
+
"@typescript-eslint/no-base-to-string": ON,
|
|
267
52
|
"@typescript-eslint/no-confusing-non-null-assertion": ON,
|
|
268
53
|
"@typescript-eslint/no-confusing-void-expression": [
|
|
269
54
|
ON,
|
|
@@ -275,63 +60,32 @@ export const TsEnable = {
|
|
|
275
60
|
],
|
|
276
61
|
// "@typescript-eslint/no-deprecated": OFF /* incompatible: Cannot be used with jsDocParsingMode: "none" */,
|
|
277
62
|
"@typescript-eslint/no-duplicate-enum-values": ON,
|
|
278
|
-
"@typescript-eslint/no-duplicate-type-constituents":
|
|
279
|
-
ON,
|
|
280
|
-
{
|
|
281
|
-
ignoreIntersections: false,
|
|
282
|
-
ignoreUnions: false,
|
|
283
|
-
},
|
|
284
|
-
],
|
|
63
|
+
"@typescript-eslint/no-duplicate-type-constituents": ON,
|
|
285
64
|
"@typescript-eslint/no-dynamic-delete": ON,
|
|
286
|
-
"@typescript-eslint/no-empty-object-type":
|
|
287
|
-
ON,
|
|
288
|
-
{
|
|
289
|
-
// allowWithName: /regex/,
|
|
290
|
-
allowInterfaces: never,
|
|
291
|
-
allowObjectTypes: never,
|
|
292
|
-
},
|
|
293
|
-
],
|
|
65
|
+
"@typescript-eslint/no-empty-object-type": ON,
|
|
294
66
|
"@typescript-eslint/no-explicit-any": [
|
|
295
67
|
ON,
|
|
296
68
|
{
|
|
297
69
|
fixToUnknown: true,
|
|
298
|
-
ignoreRestArgs: false,
|
|
299
70
|
},
|
|
300
71
|
],
|
|
301
72
|
"@typescript-eslint/no-extra-non-null-assertion": ON,
|
|
302
73
|
"@typescript-eslint/no-extraneous-class": [
|
|
303
74
|
ON,
|
|
304
75
|
{
|
|
305
|
-
allowConstructorOnly: false,
|
|
306
76
|
allowEmpty: true,
|
|
307
|
-
allowStaticOnly: false,
|
|
308
|
-
allowWithDecorator: false,
|
|
309
77
|
},
|
|
310
78
|
],
|
|
311
79
|
"@typescript-eslint/no-floating-promises": [
|
|
312
80
|
ON,
|
|
313
81
|
{
|
|
314
82
|
checkThenables: true,
|
|
315
|
-
ignoreVoid: true,
|
|
316
|
-
ignoreIIFE: false,
|
|
317
83
|
},
|
|
318
84
|
],
|
|
319
85
|
"@typescript-eslint/no-for-in-array": ON,
|
|
320
86
|
"@typescript-eslint/no-import-type-side-effects": ON,
|
|
321
|
-
"@typescript-eslint/no-inferrable-types":
|
|
322
|
-
|
|
323
|
-
{
|
|
324
|
-
ignoreParameters: false,
|
|
325
|
-
ignoreProperties: false,
|
|
326
|
-
},
|
|
327
|
-
],
|
|
328
|
-
"@typescript-eslint/no-invalid-void-type": [
|
|
329
|
-
ON,
|
|
330
|
-
{
|
|
331
|
-
allowInGenericTypeArguments: true,
|
|
332
|
-
allowAsThisParameter: false,
|
|
333
|
-
},
|
|
334
|
-
],
|
|
87
|
+
"@typescript-eslint/no-inferrable-types": ON,
|
|
88
|
+
"@typescript-eslint/no-invalid-void-type": ON,
|
|
335
89
|
"@typescript-eslint/no-meaningless-void-operator": [
|
|
336
90
|
ON,
|
|
337
91
|
{
|
|
@@ -339,26 +93,8 @@ export const TsEnable = {
|
|
|
339
93
|
},
|
|
340
94
|
],
|
|
341
95
|
"@typescript-eslint/no-misused-new": ON,
|
|
342
|
-
"@typescript-eslint/no-misused-promises":
|
|
343
|
-
|
|
344
|
-
{
|
|
345
|
-
checksConditionals: true,
|
|
346
|
-
checksSpreads: true,
|
|
347
|
-
checksVoidReturn: {
|
|
348
|
-
arguments: true,
|
|
349
|
-
attributes: true,
|
|
350
|
-
properties: true,
|
|
351
|
-
returns: true,
|
|
352
|
-
variables: true,
|
|
353
|
-
},
|
|
354
|
-
},
|
|
355
|
-
],
|
|
356
|
-
"@typescript-eslint/no-misused-spread": [
|
|
357
|
-
ON,
|
|
358
|
-
{
|
|
359
|
-
allow: [],
|
|
360
|
-
},
|
|
361
|
-
],
|
|
96
|
+
"@typescript-eslint/no-misused-promises": ON,
|
|
97
|
+
"@typescript-eslint/no-misused-spread": ON,
|
|
362
98
|
"@typescript-eslint/no-mixed-enums": ON,
|
|
363
99
|
// "@typescript-eslint/no-namespace": OFF,
|
|
364
100
|
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": ON,
|
|
@@ -366,44 +102,15 @@ export const TsEnable = {
|
|
|
366
102
|
// "@typescript-eslint/no-non-null-assertion": OFF /* preference */,
|
|
367
103
|
"@typescript-eslint/no-redundant-type-constituents": ON,
|
|
368
104
|
// "@typescript-eslint/no-restricted-types": OFF /* preference - no shared custom types across all projects that I wish to ban */,
|
|
369
|
-
"@typescript-eslint/no-require-imports":
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
},
|
|
374
|
-
],
|
|
375
|
-
"@typescript-eslint/no-this-alias": [
|
|
376
|
-
ON,
|
|
377
|
-
{
|
|
378
|
-
allowDestructuring: true,
|
|
379
|
-
allowedNames: [],
|
|
380
|
-
},
|
|
381
|
-
],
|
|
382
|
-
"@typescript-eslint/no-unnecessary-boolean-literal-compare": [
|
|
383
|
-
ON,
|
|
384
|
-
{
|
|
385
|
-
allowComparingNullableBooleansToTrue: true,
|
|
386
|
-
allowComparingNullableBooleansToFalse: true,
|
|
387
|
-
},
|
|
388
|
-
],
|
|
389
|
-
"@typescript-eslint/no-unnecessary-condition": [
|
|
390
|
-
ON,
|
|
391
|
-
{
|
|
392
|
-
allowConstantLoopConditions: never,
|
|
393
|
-
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
|
|
394
|
-
},
|
|
395
|
-
],
|
|
105
|
+
"@typescript-eslint/no-require-imports": ON,
|
|
106
|
+
"@typescript-eslint/no-this-alias": ON,
|
|
107
|
+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": ON,
|
|
108
|
+
"@typescript-eslint/no-unnecessary-condition": ON,
|
|
396
109
|
"@typescript-eslint/no-unnecessary-parameter-property-assignment": ON,
|
|
397
110
|
"@typescript-eslint/no-unnecessary-qualifier": ON,
|
|
398
111
|
"@typescript-eslint/no-unnecessary-template-expression": ON,
|
|
399
112
|
"@typescript-eslint/no-unnecessary-type-arguments": ON,
|
|
400
|
-
"@typescript-eslint/no-unnecessary-type-assertion":
|
|
401
|
-
ON,
|
|
402
|
-
{
|
|
403
|
-
checkLiteralConstAssertions: false,
|
|
404
|
-
typesToIgnore: [],
|
|
405
|
-
},
|
|
406
|
-
],
|
|
113
|
+
"@typescript-eslint/no-unnecessary-type-assertion": ON,
|
|
407
114
|
"@typescript-eslint/no-unnecessary-type-constraint": ON,
|
|
408
115
|
"@typescript-eslint/no-unnecessary-type-conversion": ON,
|
|
409
116
|
"@typescript-eslint/no-unnecessary-type-parameters": ON,
|
|
@@ -423,7 +130,7 @@ export const TsEnable = {
|
|
|
423
130
|
"@typescript-eslint/parameter-properties": [
|
|
424
131
|
ON,
|
|
425
132
|
{
|
|
426
|
-
prefer: "parameter-property" /*
|
|
133
|
+
prefer: "parameter-property" /* parameter-property | @default class-property */,
|
|
427
134
|
},
|
|
428
135
|
],
|
|
429
136
|
"@typescript-eslint/prefer-as-const": ON,
|
|
@@ -432,77 +139,19 @@ export const TsEnable = {
|
|
|
432
139
|
"@typescript-eslint/prefer-for-of": ON,
|
|
433
140
|
"@typescript-eslint/prefer-function-type": ON,
|
|
434
141
|
"@typescript-eslint/prefer-includes": ON,
|
|
435
|
-
"@typescript-eslint/prefer-literal-enum-member":
|
|
436
|
-
ON,
|
|
437
|
-
{
|
|
438
|
-
allowBitwiseExpressions: false,
|
|
439
|
-
},
|
|
440
|
-
],
|
|
142
|
+
"@typescript-eslint/prefer-literal-enum-member": ON,
|
|
441
143
|
"@typescript-eslint/prefer-namespace-keyword": ON,
|
|
442
|
-
"@typescript-eslint/prefer-nullish-coalescing":
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
|
|
446
|
-
ignoreBooleanCoercion: false,
|
|
447
|
-
ignoreConditionalTests: false,
|
|
448
|
-
ignoreIfStatements: false,
|
|
449
|
-
ignoreMixedLogicalExpressions: false,
|
|
450
|
-
ignorePrimitives: {
|
|
451
|
-
bigint: false,
|
|
452
|
-
"boolean": false,
|
|
453
|
-
number: false,
|
|
454
|
-
string: false,
|
|
455
|
-
},
|
|
456
|
-
ignoreTernaryTests: false,
|
|
457
|
-
},
|
|
458
|
-
], /* requires tsconfig: strictNullChecks */
|
|
459
|
-
"@typescript-eslint/prefer-optional-chain": [
|
|
460
|
-
ON,
|
|
461
|
-
{
|
|
462
|
-
allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: false,
|
|
463
|
-
checkAny: true,
|
|
464
|
-
checkBigInt: true,
|
|
465
|
-
checkBoolean: true,
|
|
466
|
-
checkNumber: true,
|
|
467
|
-
checkString: true,
|
|
468
|
-
checkUnknown: true,
|
|
469
|
-
requireNullish: false,
|
|
470
|
-
},
|
|
471
|
-
],
|
|
472
|
-
"@typescript-eslint/prefer-readonly": [
|
|
473
|
-
ON,
|
|
474
|
-
{
|
|
475
|
-
onlyInlineLambdas: false,
|
|
476
|
-
},
|
|
477
|
-
],
|
|
144
|
+
"@typescript-eslint/prefer-nullish-coalescing": ON /* requires tsconfig: strictNullChecks */,
|
|
145
|
+
"@typescript-eslint/prefer-optional-chain": ON,
|
|
146
|
+
"@typescript-eslint/prefer-readonly": ON,
|
|
478
147
|
// "@typescript-eslint/prefer-readonly-parameter-types": OFF /* preference - WAY too restrictive */,
|
|
479
148
|
"@typescript-eslint/prefer-reduce-type-parameter": ON,
|
|
480
149
|
"@typescript-eslint/prefer-regexp-exec": ON,
|
|
481
150
|
"@typescript-eslint/prefer-return-this-type": ON,
|
|
482
|
-
"@typescript-eslint/prefer-string-starts-ends-with":
|
|
483
|
-
|
|
484
|
-
{
|
|
485
|
-
allowSingleElementEquality: never,
|
|
486
|
-
},
|
|
487
|
-
],
|
|
488
|
-
"@typescript-eslint/promise-function-async": [
|
|
489
|
-
ON,
|
|
490
|
-
{
|
|
491
|
-
allowAny: false,
|
|
492
|
-
allowedPromiseNames: [],
|
|
493
|
-
checkArrowFunctions: true,
|
|
494
|
-
checkFunctionDeclarations: true,
|
|
495
|
-
checkFunctionExpressions: true,
|
|
496
|
-
checkMethodDeclarations: true,
|
|
497
|
-
},
|
|
498
|
-
],
|
|
151
|
+
"@typescript-eslint/prefer-string-starts-ends-with": ON,
|
|
152
|
+
"@typescript-eslint/promise-function-async": ON,
|
|
499
153
|
"@typescript-eslint/related-getter-setter-pairs": ON,
|
|
500
|
-
"@typescript-eslint/require-array-sort-compare":
|
|
501
|
-
ON,
|
|
502
|
-
{
|
|
503
|
-
ignoreStringArrays: true,
|
|
504
|
-
},
|
|
505
|
-
],
|
|
154
|
+
"@typescript-eslint/require-array-sort-compare": ON,
|
|
506
155
|
"@typescript-eslint/restrict-plus-operands": [
|
|
507
156
|
ON,
|
|
508
157
|
{
|
|
@@ -511,68 +160,29 @@ export const TsEnable = {
|
|
|
511
160
|
allowNullish: false,
|
|
512
161
|
allowNumberAndString: false,
|
|
513
162
|
allowRegExp: false,
|
|
514
|
-
skipCompoundAssignments: false,
|
|
515
163
|
},
|
|
516
164
|
],
|
|
517
165
|
"@typescript-eslint/restrict-template-expressions": [
|
|
518
166
|
ON,
|
|
519
167
|
{
|
|
520
|
-
allowAny: true,
|
|
521
|
-
allowArray: true,
|
|
522
|
-
allowBoolean: true,
|
|
523
168
|
allowNullish: false,
|
|
524
|
-
allowNumber: true,
|
|
525
169
|
allowNever: false,
|
|
526
170
|
allowRegExp: false,
|
|
527
|
-
},
|
|
171
|
+
},
|
|
528
172
|
],
|
|
529
|
-
"@typescript-eslint/return-await":
|
|
530
|
-
ON,
|
|
531
|
-
"in-try-catch",
|
|
532
|
-
] /* BUG: doc incorrectly states that this extends the DEPRECATED (since 8.46) no-return-await: https://typescript-eslint.io/rules/return-await */,
|
|
173
|
+
"@typescript-eslint/return-await": ON /* BUG: doc incorrectly states that this extends the DEPRECATED (since 8.46) no-return-await: https://typescript-eslint.io/rules/return-await */,
|
|
533
174
|
"@typescript-eslint/strict-boolean-expressions": [
|
|
534
175
|
ON,
|
|
535
176
|
{
|
|
536
|
-
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
|
|
537
|
-
allowAny: false,
|
|
538
|
-
allowNumber: true,
|
|
539
|
-
allowString: false,
|
|
540
|
-
allowNullableBoolean: false,
|
|
541
|
-
allowNullableEnum: false,
|
|
542
|
-
allowNullableNumber: false,
|
|
543
177
|
allowNullableObject: false,
|
|
544
|
-
|
|
178
|
+
allowString: false,
|
|
545
179
|
},
|
|
546
180
|
], /* requires tsconfig: strictNullChecks */
|
|
547
|
-
"@typescript-eslint/switch-exhaustiveness-check":
|
|
548
|
-
|
|
549
|
-
{
|
|
550
|
-
allowDefaultCaseForExhaustiveSwitch: false,
|
|
551
|
-
considerDefaultExhaustiveForUnions: true,
|
|
552
|
-
requireDefaultForNonUnion: true,
|
|
553
|
-
},
|
|
554
|
-
],
|
|
555
|
-
"@typescript-eslint/triple-slash-reference": [
|
|
556
|
-
ON,
|
|
557
|
-
{
|
|
558
|
-
lib: never /** always | never */,
|
|
559
|
-
path: never /** always | never */,
|
|
560
|
-
types: never /** always | never | prefer-import */,
|
|
561
|
-
},
|
|
562
|
-
],
|
|
181
|
+
"@typescript-eslint/switch-exhaustiveness-check": ON,
|
|
182
|
+
// "@typescript-eslint/triple-slash-reference": OFF /* preference - who gives a fuck */,
|
|
563
183
|
// "@typescript-eslint/typedef": OFF /* tsconfig: { noImplicitAny, strictPropertyInitialization } */,
|
|
564
|
-
"@typescript-eslint/unbound-method":
|
|
565
|
-
|
|
566
|
-
{
|
|
567
|
-
ignoreStatic: false,
|
|
568
|
-
},
|
|
569
|
-
],
|
|
570
|
-
"@typescript-eslint/unified-signatures": [
|
|
571
|
-
ON,
|
|
572
|
-
{
|
|
573
|
-
ignoreDifferentlyNamedParameters: false,
|
|
574
|
-
},
|
|
575
|
-
],
|
|
184
|
+
"@typescript-eslint/unbound-method": ON,
|
|
185
|
+
"@typescript-eslint/unified-signatures": ON,
|
|
576
186
|
"@typescript-eslint/use-unknown-in-catch-callback-variable": ON,
|
|
577
187
|
} as const,
|
|
578
188
|
};
|
|
@@ -2,7 +2,6 @@ import {
|
|
|
2
2
|
ID,
|
|
3
3
|
// OFF,
|
|
4
4
|
ON,
|
|
5
|
-
all,
|
|
6
5
|
} from "../../../_strings";
|
|
7
6
|
|
|
8
7
|
export const TsEnableExtension = {
|
|
@@ -15,9 +14,7 @@ export const TsEnableExtension = {
|
|
|
15
14
|
"@typescript-eslint/dot-notation": [
|
|
16
15
|
ON,
|
|
17
16
|
{
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// TS-only
|
|
17
|
+
// TS-only:
|
|
21
18
|
allowPrivateClassPropertyAccess: true,
|
|
22
19
|
allowProtectedClassPropertyAccess: true,
|
|
23
20
|
allowIndexSignaturePropertyAccess: true,
|
|
@@ -36,49 +33,27 @@ export const TsEnableExtension = {
|
|
|
36
33
|
// "@typescript-eslint/no-restricted-imports": OFF /* preference */,
|
|
37
34
|
// "@typescript-eslint/no-shadow": OFF /* ESLint now supports TS (was: investigate) */,
|
|
38
35
|
// "@typescript-eslint/no-unused-expressions": OFF /* ESLint now supports TS (preference -- eslint:OFF) */,
|
|
39
|
-
"@typescript-eslint/no-unused-vars":
|
|
40
|
-
ON,
|
|
41
|
-
{
|
|
42
|
-
vars: all,
|
|
43
|
-
args: all,
|
|
44
|
-
caughtErrors: all,
|
|
45
|
-
ignoreRestSiblings: false,
|
|
46
|
-
ignoreClassWithStaticInitBlock: false,
|
|
47
|
-
reportUsedIgnorePattern: true,
|
|
48
|
-
},
|
|
49
|
-
],
|
|
36
|
+
"@typescript-eslint/no-unused-vars": ON,
|
|
50
37
|
// "@typescript-eslint/no-use-before-define": OFF /* ESLint now supports TS */,
|
|
51
38
|
// "@typescript-eslint/no-useless-constructor": OFF /* ESLint now supports TS */,
|
|
52
39
|
"@typescript-eslint/only-throw-error": [
|
|
53
40
|
ON,
|
|
54
41
|
{
|
|
55
|
-
allowRethrowing: true,
|
|
56
42
|
allowThrowingAny: false,
|
|
57
|
-
allowThrowingUnknown: false,
|
|
58
43
|
},
|
|
59
44
|
],
|
|
60
45
|
"@typescript-eslint/prefer-destructuring": [
|
|
61
46
|
ON,
|
|
62
47
|
{
|
|
63
|
-
VariableDeclarator: {
|
|
64
|
-
array: true,
|
|
65
|
-
object: true,
|
|
66
|
-
},
|
|
67
48
|
AssignmentExpression: {
|
|
68
49
|
array: false,
|
|
69
50
|
object: false,
|
|
70
51
|
},
|
|
71
52
|
},
|
|
72
|
-
{
|
|
73
|
-
enforceForRenamedProperties: false,
|
|
74
|
-
enforceForDeclarationWithTypeAnnotation: false,
|
|
75
|
-
},
|
|
76
53
|
],
|
|
77
54
|
"@typescript-eslint/prefer-promise-reject-errors": [
|
|
78
55
|
ON,
|
|
79
56
|
{
|
|
80
|
-
allowEmptyReject: false,
|
|
81
|
-
allowThrowingAny: false,
|
|
82
57
|
allowThrowingUnknown: true,
|
|
83
58
|
},
|
|
84
59
|
],
|