linted 16.12.2-rc.0 → 16.12.2-rc.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/rules/html/{_enable.d.ts → enable.d.ts} +1 -1
- package/dist/rules/html/enable.d.ts.map +1 -0
- package/dist/rules/html/enable.js +15 -0
- package/dist/rules/html/enable.js.map +1 -0
- package/dist/rules/{mocha/_recommended.d.ts → html/enable_recommended.d.ts} +1 -1
- package/dist/rules/html/enable_recommended.d.ts.map +1 -0
- package/dist/rules/html/enable_recommended.js +8 -0
- package/dist/rules/html/enable_recommended.js.map +1 -0
- package/dist/rules/{_html.d.ts → html.d.ts} +1 -1
- package/dist/rules/html.d.ts.map +1 -0
- package/dist/rules/html.js +4 -0
- package/dist/rules/html.js.map +1 -0
- package/dist/rules/js/{_enable.d.ts → enable.d.ts} +1 -1
- package/dist/rules/js/{_enable.d.ts.map → enable.d.ts.map} +1 -1
- package/dist/rules/js/{_enable.js → enable.js} +281 -45
- package/dist/rules/js/enable.js.map +1 -0
- package/dist/rules/js/{stylistic.d.ts → enable_stylistic.d.ts} +25 -25
- package/dist/rules/js/{stylistic.d.ts.map → enable_stylistic.d.ts.map} +1 -1
- package/dist/rules/js/enable_stylistic.js +585 -0
- package/dist/rules/js/enable_stylistic.js.map +1 -0
- package/dist/rules/{_js.d.ts → js.d.ts} +25 -25
- package/dist/rules/{_js.d.ts.map → js.d.ts.map} +1 -1
- package/dist/rules/js.js +4 -0
- package/dist/rules/js.js.map +1 -0
- package/dist/rules/json/{_enable.d.ts → enable.d.ts} +1 -1
- package/dist/rules/json/enable.d.ts.map +1 -0
- package/dist/rules/json/{_enable.js → enable.js} +3 -3
- package/dist/rules/json/enable.js.map +1 -0
- package/dist/rules/json/enable_x.d.ts.map +1 -1
- package/dist/rules/json/enable_x.js +48 -8
- package/dist/rules/json/enable_x.js.map +1 -1
- package/dist/rules/{_json.d.ts → json.d.ts} +1 -1
- package/dist/rules/json.d.ts.map +1 -0
- package/dist/rules/{_json.js → json.js} +2 -2
- package/dist/rules/json.js.map +1 -0
- package/dist/rules/jsonc/override.d.ts.map +1 -1
- package/dist/rules/jsonc/override.js +12 -3
- package/dist/rules/jsonc/override.js.map +1 -1
- package/dist/rules/{_jsonc.d.ts → jsonc.d.ts} +1 -1
- package/dist/rules/jsonc.d.ts.map +1 -0
- package/dist/rules/{_jsonc.js → jsonc.js} +2 -2
- package/dist/rules/jsonc.js.map +1 -0
- package/dist/rules/md/{_enable.d.ts → enable.d.ts} +1 -1
- package/dist/rules/md/enable.d.ts.map +1 -0
- package/dist/rules/md/enable.js +14 -0
- package/dist/rules/md/enable.js.map +1 -0
- package/dist/rules/{_md.d.ts → md.d.ts} +1 -1
- package/dist/rules/md.d.ts.map +1 -0
- package/dist/rules/md.js +3 -0
- package/dist/rules/md.js.map +1 -0
- package/dist/rules/mocha/{_enable.d.ts → enable.d.ts} +1 -1
- package/dist/rules/mocha/enable.d.ts.map +1 -0
- package/dist/rules/mocha/enable.js +3 -0
- package/dist/rules/mocha/enable.js.map +1 -0
- package/dist/rules/{html/_recommended.d.ts → mocha/enable_recommended.d.ts} +1 -1
- package/dist/rules/mocha/enable_recommended.d.ts.map +1 -0
- package/dist/rules/mocha/enable_recommended.js +8 -0
- package/dist/rules/mocha/enable_recommended.js.map +1 -0
- package/dist/rules/{_mocha.d.ts → mocha.d.ts} +1 -1
- package/dist/rules/mocha.d.ts.map +1 -0
- package/dist/rules/mocha.js +4 -0
- package/dist/rules/mocha.js.map +1 -0
- package/dist/rules/svelte/disable.d.ts +5 -0
- package/dist/rules/svelte/disable.d.ts.map +1 -0
- package/dist/rules/svelte/disable.js +8 -0
- package/dist/rules/svelte/disable.js.map +1 -0
- package/dist/rules/svelte/disable_js.d.ts.map +1 -1
- package/dist/rules/svelte/disable_js.js +8 -3
- package/dist/rules/svelte/disable_js.js.map +1 -1
- package/dist/rules/svelte/disable_ts.d.ts.map +1 -1
- package/dist/rules/svelte/disable_ts.js +8 -3
- package/dist/rules/svelte/disable_ts.js.map +1 -1
- package/dist/rules/svelte/{_enable.d.ts → enable.d.ts} +1 -1
- package/dist/rules/svelte/enable.d.ts.map +1 -0
- package/dist/rules/svelte/enable.js +190 -0
- package/dist/rules/svelte/enable.js.map +1 -0
- package/dist/rules/svelte/enable_x.d.ts.map +1 -1
- package/dist/rules/svelte/enable_x.js +15 -3
- package/dist/rules/svelte/enable_x.js.map +1 -1
- package/dist/rules/{_svelte.d.ts → svelte.d.ts} +27 -27
- package/dist/rules/{_svelte.d.ts.map → svelte.d.ts.map} +1 -1
- package/dist/rules/{_svelte.js → svelte.js} +4 -4
- package/dist/rules/svelte.js.map +1 -0
- package/dist/rules/ts/{disable_compiler.d.ts → disable.d.ts} +2 -2
- package/dist/rules/ts/disable.d.ts.map +1 -0
- package/dist/rules/ts/{disable_compiler.js → disable.js} +3 -4
- package/dist/rules/ts/disable.js.map +1 -0
- package/dist/rules/ts/disable_x.d.ts.map +1 -1
- package/dist/rules/ts/disable_x.js +1 -2
- package/dist/rules/ts/disable_x.js.map +1 -1
- package/dist/rules/ts/{_enable.d.ts → enable.d.ts} +1 -1
- package/dist/rules/ts/enable.d.ts.map +1 -0
- package/dist/rules/ts/{_enable.js → enable.js} +173 -29
- package/dist/rules/ts/enable.js.map +1 -0
- package/dist/rules/ts/enable_x.d.ts.map +1 -1
- package/dist/rules/ts/enable_x.js +32 -5
- package/dist/rules/ts/enable_x.js.map +1 -1
- package/dist/rules/{_ts.d.ts → ts.d.ts} +26 -26
- package/dist/rules/{_ts.d.ts.map → ts.d.ts.map} +1 -1
- package/dist/rules/{_ts.js → ts.js} +4 -4
- package/dist/rules/ts.js.map +1 -0
- package/dist/rules/yml/{_enable.d.ts → enable.d.ts} +1 -1
- package/dist/rules/yml/enable.d.ts.map +1 -0
- package/dist/rules/yml/enable.js +60 -0
- package/dist/rules/yml/enable.js.map +1 -0
- package/dist/rules/yml/enable_x.d.ts.map +1 -1
- package/dist/rules/yml/enable_x.js +57 -9
- package/dist/rules/yml/enable_x.js.map +1 -1
- package/dist/rules/{_yml.d.ts → yml.d.ts} +1 -1
- package/dist/rules/yml.d.ts.map +1 -0
- package/dist/rules/{_yml.js → yml.js} +2 -2
- package/dist/rules/yml.js.map +1 -0
- package/dist/rules.d.ts +75 -75
- package/dist/rules.js +9 -9
- package/dist/rules.js.map +1 -1
- package/package.json +2 -2
- package/src/rules/html/enable.ts +16 -0
- package/src/rules/html/enable_recommended.ts +9 -0
- package/src/rules/html.ts +4 -0
- package/src/rules/js/enable.ts +524 -0
- package/src/rules/js/enable_stylistic.ts +608 -0
- package/src/rules/js.ts +4 -0
- package/src/rules/json/{_enable.ts → enable.ts} +3 -5
- package/src/rules/json/enable_x.ts +48 -9
- package/src/rules/{_json.ts → json.ts} +1 -1
- package/src/rules/jsonc/override.ts +13 -6
- package/src/rules/{_jsonc.ts → jsonc.ts} +1 -1
- package/src/rules/md/enable.ts +15 -0
- package/src/rules/md.ts +3 -0
- package/src/rules/mocha/enable.ts +3 -0
- package/src/rules/mocha/enable_recommended.ts +9 -0
- package/src/rules/mocha.ts +4 -0
- package/src/rules/svelte/disable.ts +9 -0
- package/src/rules/svelte/disable_js.ts +10 -6
- package/src/rules/svelte/disable_ts.ts +8 -4
- package/src/rules/svelte/{_enable.ts → enable.ts} +120 -21
- package/src/rules/svelte/enable_x.ts +15 -4
- package/src/rules/{_svelte.ts → svelte.ts} +3 -3
- package/src/rules/ts/{disable_compiler.ts → disable.ts} +3 -4
- package/src/rules/ts/disable_x.ts +2 -6
- package/src/rules/ts/{_enable.ts → enable.ts} +176 -33
- package/src/rules/ts/enable_x.ts +37 -12
- package/src/rules/{_ts.ts → ts.ts} +3 -3
- package/src/rules/yml/{_enable.ts → enable.ts} +38 -7
- package/src/rules/yml/enable_x.ts +56 -9
- package/src/rules/{_yml.ts → yml.ts} +1 -1
- package/src/rules.ts +9 -9
- package/dist/rules/_html.d.ts.map +0 -1
- package/dist/rules/_html.js +0 -4
- package/dist/rules/_html.js.map +0 -1
- package/dist/rules/_js.js +0 -4
- package/dist/rules/_js.js.map +0 -1
- package/dist/rules/_json.d.ts.map +0 -1
- package/dist/rules/_json.js.map +0 -1
- package/dist/rules/_jsonc.d.ts.map +0 -1
- package/dist/rules/_jsonc.js.map +0 -1
- package/dist/rules/_md.d.ts.map +0 -1
- package/dist/rules/_md.js +0 -3
- package/dist/rules/_md.js.map +0 -1
- package/dist/rules/_mocha.d.ts.map +0 -1
- package/dist/rules/_mocha.js +0 -4
- package/dist/rules/_mocha.js.map +0 -1
- package/dist/rules/_svelte.js.map +0 -1
- package/dist/rules/_ts.js.map +0 -1
- package/dist/rules/_yml.d.ts.map +0 -1
- package/dist/rules/_yml.js.map +0 -1
- package/dist/rules/html/_enable.d.ts.map +0 -1
- package/dist/rules/html/_enable.js +0 -10
- package/dist/rules/html/_enable.js.map +0 -1
- package/dist/rules/html/_recommended.d.ts.map +0 -1
- package/dist/rules/html/_recommended.js +0 -5
- package/dist/rules/html/_recommended.js.map +0 -1
- package/dist/rules/js/_enable.js.map +0 -1
- package/dist/rules/js/stylistic.js +0 -270
- package/dist/rules/js/stylistic.js.map +0 -1
- package/dist/rules/json/_enable.d.ts.map +0 -1
- package/dist/rules/json/_enable.js.map +0 -1
- package/dist/rules/md/_enable.d.ts.map +0 -1
- package/dist/rules/md/_enable.js +0 -9
- package/dist/rules/md/_enable.js.map +0 -1
- package/dist/rules/mocha/_enable.d.ts.map +0 -1
- package/dist/rules/mocha/_enable.js +0 -4
- package/dist/rules/mocha/_enable.js.map +0 -1
- package/dist/rules/mocha/_recommended.d.ts.map +0 -1
- package/dist/rules/mocha/_recommended.js +0 -5
- package/dist/rules/mocha/_recommended.js.map +0 -1
- package/dist/rules/svelte/_enable.d.ts.map +0 -1
- package/dist/rules/svelte/_enable.js +0 -90
- package/dist/rules/svelte/_enable.js.map +0 -1
- package/dist/rules/svelte/disable_x.d.ts +0 -5
- package/dist/rules/svelte/disable_x.d.ts.map +0 -1
- package/dist/rules/svelte/disable_x.js +0 -4
- package/dist/rules/svelte/disable_x.js.map +0 -1
- package/dist/rules/ts/_enable.d.ts.map +0 -1
- package/dist/rules/ts/_enable.js.map +0 -1
- package/dist/rules/ts/disable_compiler.d.ts.map +0 -1
- package/dist/rules/ts/disable_compiler.js.map +0 -1
- package/dist/rules/yml/_enable.d.ts.map +0 -1
- package/dist/rules/yml/_enable.js +0 -28
- package/dist/rules/yml/_enable.js.map +0 -1
- package/src/rules/_html.ts +0 -4
- package/src/rules/_js.ts +0 -4
- package/src/rules/_md.ts +0 -3
- package/src/rules/_mocha.ts +0 -4
- package/src/rules/html/_enable.ts +0 -13
- package/src/rules/html/_recommended.ts +0 -7
- package/src/rules/js/_enable.ts +0 -287
- package/src/rules/js/stylistic.ts +0 -294
- package/src/rules/md/_enable.ts +0 -14
- package/src/rules/mocha/_enable.ts +0 -5
- package/src/rules/mocha/_recommended.ts +0 -7
- package/src/rules/svelte/disable_x.ts +0 -8
@@ -1,22 +1,29 @@
|
|
1
|
-
import {
|
1
|
+
import { enable, level, state } from "../_strings.js";
|
2
2
|
|
3
3
|
const
|
4
|
-
{ enable } = id,
|
5
4
|
{ ERROR, OFF } = level,
|
6
5
|
{ Never, Explicit } = state;
|
7
6
|
|
8
7
|
export default [
|
9
8
|
enable,
|
10
9
|
{
|
11
|
-
// https://typescript-eslint.io/rules/?=xextension-xdeprecated#rules
|
10
|
+
// https://typescript-eslint.io/rules/?=xextension-xdeprecated#rules
|
12
11
|
"@typescript-eslint/adjacent-overload-signatures": OFF,
|
13
|
-
"@typescript-eslint/array-type": [
|
12
|
+
"@typescript-eslint/array-type": [
|
13
|
+
ERROR,
|
14
|
+
{
|
15
|
+
"default": "array",
|
16
|
+
readonly: "array",
|
17
|
+
},
|
18
|
+
],
|
14
19
|
"@typescript-eslint/await-thenable": ERROR,
|
15
20
|
"@typescript-eslint/ban-ts-comment": [
|
16
21
|
ERROR,
|
17
22
|
{
|
18
23
|
"ts-check": false,
|
19
|
-
"ts-expect-error": {
|
24
|
+
"ts-expect-error": {
|
25
|
+
descriptionFormat: "^: BUG: .+$",
|
26
|
+
},
|
20
27
|
"ts-ignore": true,
|
21
28
|
"ts-nocheck": true,
|
22
29
|
minimumDescriptionLength: 32,
|
@@ -26,10 +33,28 @@ export default [
|
|
26
33
|
"@typescript-eslint/class-literal-property-style": [ERROR, "fields"],
|
27
34
|
"@typescript-eslint/consistent-generic-constructors": [ERROR, "constructor"],
|
28
35
|
"@typescript-eslint/consistent-indexed-object-style": [ERROR, "record"],
|
29
|
-
"@typescript-eslint/consistent-type-assertions": [
|
36
|
+
"@typescript-eslint/consistent-type-assertions": [
|
37
|
+
ERROR,
|
38
|
+
{
|
39
|
+
assertionStyle: "as",
|
40
|
+
objectLiteralTypeAssertions: Never,
|
41
|
+
},
|
42
|
+
],
|
30
43
|
"@typescript-eslint/consistent-type-definitions": OFF,
|
31
|
-
"@typescript-eslint/consistent-type-exports": [
|
32
|
-
|
44
|
+
"@typescript-eslint/consistent-type-exports": [
|
45
|
+
ERROR,
|
46
|
+
{
|
47
|
+
fixMixedExportsWithInlineTypeSpecifier: false,
|
48
|
+
},
|
49
|
+
],
|
50
|
+
"@typescript-eslint/consistent-type-imports": [
|
51
|
+
ERROR,
|
52
|
+
{
|
53
|
+
disallowTypeAnnotations: true,
|
54
|
+
fixStyle: "separate-type-imports",
|
55
|
+
prefer: "type-imports",
|
56
|
+
},
|
57
|
+
],
|
33
58
|
"@typescript-eslint/explicit-function-return-type": OFF,
|
34
59
|
"@typescript-eslint/explicit-member-accessibility": [
|
35
60
|
ERROR,
|
@@ -230,9 +255,21 @@ export default [
|
|
230
255
|
},
|
231
256
|
],
|
232
257
|
"@typescript-eslint/no-confusing-non-null-assertion": ERROR,
|
233
|
-
"@typescript-eslint/no-confusing-void-expression": [
|
258
|
+
"@typescript-eslint/no-confusing-void-expression": [
|
259
|
+
ERROR,
|
260
|
+
{
|
261
|
+
ignoreArrowShorthand: true,
|
262
|
+
ignoreVoidOperator: true,
|
263
|
+
},
|
264
|
+
],
|
234
265
|
"@typescript-eslint/no-duplicate-enum-values": ERROR,
|
235
|
-
"@typescript-eslint/no-duplicate-type-constituents": [
|
266
|
+
"@typescript-eslint/no-duplicate-type-constituents": [
|
267
|
+
ERROR,
|
268
|
+
{
|
269
|
+
ignoreIntersections: false,
|
270
|
+
ignoreUnions: false,
|
271
|
+
},
|
272
|
+
],
|
236
273
|
"@typescript-eslint/no-dynamic-delete": ERROR,
|
237
274
|
"@typescript-eslint/no-empty-object-type": [
|
238
275
|
ERROR,
|
@@ -242,7 +279,13 @@ export default [
|
|
242
279
|
allowObjectTypes: Never,
|
243
280
|
},
|
244
281
|
],
|
245
|
-
"@typescript-eslint/no-explicit-any": [
|
282
|
+
"@typescript-eslint/no-explicit-any": [
|
283
|
+
ERROR,
|
284
|
+
{
|
285
|
+
fixToUnknown: true,
|
286
|
+
ignoreRestArgs: false,
|
287
|
+
},
|
288
|
+
],
|
246
289
|
"@typescript-eslint/no-extra-non-null-assertion": ERROR,
|
247
290
|
"@typescript-eslint/no-extraneous-class": [
|
248
291
|
ERROR,
|
@@ -253,12 +296,36 @@ export default [
|
|
253
296
|
allowWithDecorator: false,
|
254
297
|
},
|
255
298
|
],
|
256
|
-
"@typescript-eslint/no-floating-promises": [
|
299
|
+
"@typescript-eslint/no-floating-promises": [
|
300
|
+
ERROR,
|
301
|
+
{
|
302
|
+
checkThenables: true,
|
303
|
+
ignoreVoid: true,
|
304
|
+
ignoreIIFE: false,
|
305
|
+
},
|
306
|
+
],
|
257
307
|
"@typescript-eslint/no-for-in-array": ERROR,
|
258
308
|
"@typescript-eslint/no-import-type-side-effects": ERROR,
|
259
|
-
"@typescript-eslint/no-inferrable-types": [
|
260
|
-
|
261
|
-
|
309
|
+
"@typescript-eslint/no-inferrable-types": [
|
310
|
+
ERROR,
|
311
|
+
{
|
312
|
+
ignoreParameters: false,
|
313
|
+
ignoreProperties: false,
|
314
|
+
},
|
315
|
+
],
|
316
|
+
"@typescript-eslint/no-invalid-void-type": [
|
317
|
+
ERROR,
|
318
|
+
{
|
319
|
+
allowInGenericTypeArguments: true,
|
320
|
+
allowAsThisParameter: false,
|
321
|
+
},
|
322
|
+
],
|
323
|
+
"@typescript-eslint/no-meaningless-void-operator": [
|
324
|
+
ERROR,
|
325
|
+
{
|
326
|
+
checkNever: true,
|
327
|
+
},
|
328
|
+
],
|
262
329
|
"@typescript-eslint/no-misused-new": ERROR,
|
263
330
|
"@typescript-eslint/no-misused-promises": [
|
264
331
|
ERROR,
|
@@ -280,15 +347,43 @@ export default [
|
|
280
347
|
"@typescript-eslint/no-non-null-asserted-optional-chain": ERROR,
|
281
348
|
"@typescript-eslint/no-non-null-assertion": ERROR,
|
282
349
|
"@typescript-eslint/no-redundant-type-constituents": ERROR,
|
283
|
-
"@typescript-eslint/no-restricted-types": OFF
|
284
|
-
"@typescript-eslint/no-require-imports": [
|
285
|
-
|
286
|
-
|
287
|
-
|
350
|
+
"@typescript-eslint/no-restricted-types": OFF /* preference - no shared custom types across all projects that I wish to ban*/,
|
351
|
+
"@typescript-eslint/no-require-imports": [
|
352
|
+
ERROR,
|
353
|
+
{
|
354
|
+
allow: [],
|
355
|
+
},
|
356
|
+
],
|
357
|
+
"@typescript-eslint/no-this-alias": [
|
358
|
+
ERROR,
|
359
|
+
{
|
360
|
+
allowDestructuring: true,
|
361
|
+
allowedNames: [],
|
362
|
+
},
|
363
|
+
],
|
364
|
+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": [
|
365
|
+
ERROR,
|
366
|
+
{
|
367
|
+
allowComparingNullableBooleansToTrue: true,
|
368
|
+
allowComparingNullableBooleansToFalse: true,
|
369
|
+
},
|
370
|
+
],
|
371
|
+
"@typescript-eslint/no-unnecessary-condition": [
|
372
|
+
ERROR,
|
373
|
+
{
|
374
|
+
allowConstantLoopConditions: false,
|
375
|
+
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
|
376
|
+
},
|
377
|
+
],
|
288
378
|
"@typescript-eslint/no-unnecessary-qualifier": ERROR,
|
289
379
|
"@typescript-eslint/no-unnecessary-template-expression": ERROR,
|
290
380
|
"@typescript-eslint/no-unnecessary-type-arguments": ERROR,
|
291
|
-
"@typescript-eslint/no-unnecessary-type-assertion": [
|
381
|
+
"@typescript-eslint/no-unnecessary-type-assertion": [
|
382
|
+
ERROR,
|
383
|
+
{
|
384
|
+
typesToIgnore: [],
|
385
|
+
},
|
386
|
+
],
|
292
387
|
"@typescript-eslint/no-unnecessary-type-constraint": ERROR,
|
293
388
|
"@typescript-eslint/no-unnecessary-type-parameters": ERROR,
|
294
389
|
"@typescript-eslint/no-unsafe-argument": ERROR,
|
@@ -303,14 +398,24 @@ export default [
|
|
303
398
|
"@typescript-eslint/no-useless-empty-export": ERROR,
|
304
399
|
"@typescript-eslint/no-wrapper-object-types": ERROR,
|
305
400
|
"@typescript-eslint/non-nullable-type-assertion-style": OFF,
|
306
|
-
"@typescript-eslint/parameter-properties": [
|
401
|
+
"@typescript-eslint/parameter-properties": [
|
402
|
+
ERROR,
|
403
|
+
{
|
404
|
+
prefer: "parameter-property" /* "parameter-property" | "class-property" */,
|
405
|
+
},
|
406
|
+
],
|
307
407
|
"@typescript-eslint/prefer-as-const": ERROR,
|
308
408
|
"@typescript-eslint/prefer-enum-initializers": ERROR,
|
309
409
|
"@typescript-eslint/prefer-find": ERROR,
|
310
410
|
"@typescript-eslint/prefer-for-of": ERROR,
|
311
411
|
"@typescript-eslint/prefer-function-type": ERROR,
|
312
412
|
"@typescript-eslint/prefer-includes": ERROR,
|
313
|
-
"@typescript-eslint/prefer-literal-enum-member": [
|
413
|
+
"@typescript-eslint/prefer-literal-enum-member": [
|
414
|
+
ERROR,
|
415
|
+
{
|
416
|
+
allowBitwiseExpressions: false,
|
417
|
+
},
|
418
|
+
],
|
314
419
|
"@typescript-eslint/prefer-namespace-keyword": ERROR,
|
315
420
|
"@typescript-eslint/prefer-nullish-coalescing": [
|
316
421
|
ERROR,
|
@@ -340,12 +445,22 @@ export default [
|
|
340
445
|
requireNullish: false,
|
341
446
|
},
|
342
447
|
],
|
343
|
-
"@typescript-eslint/prefer-readonly": [
|
344
|
-
|
448
|
+
"@typescript-eslint/prefer-readonly": [
|
449
|
+
ERROR,
|
450
|
+
{
|
451
|
+
onlyInlineLambdas: false,
|
452
|
+
},
|
453
|
+
],
|
454
|
+
"@typescript-eslint/prefer-readonly-parameter-types": OFF /* preference - WAY too restrictive */,
|
345
455
|
"@typescript-eslint/prefer-reduce-type-parameter": ERROR,
|
346
456
|
"@typescript-eslint/prefer-regexp-exec": ERROR,
|
347
457
|
"@typescript-eslint/prefer-return-this-type": ERROR,
|
348
|
-
"@typescript-eslint/prefer-string-starts-ends-with": [
|
458
|
+
"@typescript-eslint/prefer-string-starts-ends-with": [
|
459
|
+
ERROR,
|
460
|
+
{
|
461
|
+
allowSingleElementEquality: Never,
|
462
|
+
},
|
463
|
+
],
|
349
464
|
"@typescript-eslint/promise-function-async": [
|
350
465
|
ERROR,
|
351
466
|
{
|
@@ -357,7 +472,12 @@ export default [
|
|
357
472
|
checkMethodDeclarations: true,
|
358
473
|
},
|
359
474
|
],
|
360
|
-
"@typescript-eslint/require-array-sort-compare": [
|
475
|
+
"@typescript-eslint/require-array-sort-compare": [
|
476
|
+
ERROR,
|
477
|
+
{
|
478
|
+
ignoreStringArrays: true,
|
479
|
+
},
|
480
|
+
],
|
361
481
|
"@typescript-eslint/restrict-plus-operands": [
|
362
482
|
ERROR,
|
363
483
|
{
|
@@ -381,7 +501,7 @@ export default [
|
|
381
501
|
allowRegExp: false,
|
382
502
|
}, /* investigate: make stricter */
|
383
503
|
],
|
384
|
-
"@typescript-eslint/return-await": [ERROR, "in-try-catch"]
|
504
|
+
"@typescript-eslint/return-await": [ERROR, "in-try-catch"] /* BUG: doc incorrectly states that this extends the DEPRECATED (since 8.46) no-return-await: https://typescript-eslint.io/rules/return-await */,
|
385
505
|
"@typescript-eslint/strict-boolean-expressions": [
|
386
506
|
ERROR,
|
387
507
|
{
|
@@ -396,11 +516,34 @@ export default [
|
|
396
516
|
allowNullableString: false,
|
397
517
|
},
|
398
518
|
], /* requires tsconfig: strictNullChecks */
|
399
|
-
"@typescript-eslint/switch-exhaustiveness-check": [
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
519
|
+
"@typescript-eslint/switch-exhaustiveness-check": [
|
520
|
+
ERROR,
|
521
|
+
{
|
522
|
+
allowDefaultCaseForExhaustiveSwitch: false,
|
523
|
+
requireDefaultForNonUnion: true,
|
524
|
+
},
|
525
|
+
],
|
526
|
+
"@typescript-eslint/triple-slash-reference": [
|
527
|
+
ERROR,
|
528
|
+
{
|
529
|
+
lib: Never /** always | never */,
|
530
|
+
path: Never /** always | never */,
|
531
|
+
types: Never /** always | never | prefer-import */,
|
532
|
+
},
|
533
|
+
],
|
534
|
+
"@typescript-eslint/typedef": OFF /* tsconfig: { noImplicitAny, strictPropertyInitialization } */,
|
535
|
+
"@typescript-eslint/unbound-method": [
|
536
|
+
ERROR,
|
537
|
+
{
|
538
|
+
ignoreStatic: false,
|
539
|
+
},
|
540
|
+
],
|
541
|
+
"@typescript-eslint/unified-signatures": [
|
542
|
+
ERROR,
|
543
|
+
{
|
544
|
+
ignoreDifferentlyNamedParameters: false,
|
545
|
+
},
|
546
|
+
],
|
404
547
|
"@typescript-eslint/use-unknown-in-catch-callback-variable": ERROR,
|
405
548
|
},
|
406
549
|
] as const;
|
package/src/rules/ts/enable_x.ts
CHANGED
@@ -1,17 +1,15 @@
|
|
1
|
-
import {
|
1
|
+
import { enable_x, level, state } from "../_strings.js";
|
2
2
|
|
3
3
|
const
|
4
|
-
{ enable_x } = id,
|
5
4
|
{ ERROR, OFF } = level,
|
6
5
|
{ Always, All } = state;
|
7
6
|
|
8
7
|
export default [
|
9
8
|
enable_x,
|
10
9
|
{
|
11
|
-
|
12
|
-
|
13
|
-
"@typescript-eslint/
|
14
|
-
"@typescript-eslint/consistent-return": OFF, /* tsconfig: noImplicitReturns */
|
10
|
+
// https://typescript-eslint.io/rules/?=extension-xdeprecated#rules
|
11
|
+
"@typescript-eslint/class-methods-use-this": OFF /* preference -- eslint:off */,
|
12
|
+
"@typescript-eslint/consistent-return": OFF /* tsconfig: noImplicitReturns */,
|
15
13
|
"@typescript-eslint/default-param-last": ERROR,
|
16
14
|
"@typescript-eslint/dot-notation": [
|
17
15
|
ERROR,
|
@@ -47,8 +45,8 @@ export default [
|
|
47
45
|
"@typescript-eslint/no-loop-func": ERROR,
|
48
46
|
"@typescript-eslint/no-magic-numbers": OFF,
|
49
47
|
"@typescript-eslint/no-redeclare": OFF /* tsc (let, const, -var) */,
|
50
|
-
"@typescript-eslint/no-restricted-imports": OFF
|
51
|
-
"@typescript-eslint/no-shadow": OFF
|
48
|
+
"@typescript-eslint/no-restricted-imports": OFF /* preference */,
|
49
|
+
"@typescript-eslint/no-shadow": OFF /* investigate */,
|
52
50
|
"@typescript-eslint/no-unused-expressions": [
|
53
51
|
ERROR,
|
54
52
|
{
|
@@ -77,14 +75,41 @@ export default [
|
|
77
75
|
variables: true,
|
78
76
|
allowNamedExports: false,
|
79
77
|
enums: true,
|
80
|
-
typedefs: false
|
78
|
+
typedefs: false /* changed 14.2.2 (still questionable) */,
|
81
79
|
ignoreTypeReferences: true,
|
82
80
|
},
|
83
81
|
],
|
84
82
|
"@typescript-eslint/no-useless-constructor": ERROR,
|
85
|
-
"@typescript-eslint/only-throw-error": [
|
86
|
-
|
87
|
-
|
83
|
+
"@typescript-eslint/only-throw-error": [
|
84
|
+
ERROR,
|
85
|
+
{
|
86
|
+
allowThrowingAny: false,
|
87
|
+
allowThrowingUnknown: false,
|
88
|
+
},
|
89
|
+
],
|
90
|
+
"@typescript-eslint/prefer-destructuring": [
|
91
|
+
ERROR,
|
92
|
+
{
|
93
|
+
VariableDeclarator: {
|
94
|
+
array: true,
|
95
|
+
object: true,
|
96
|
+
},
|
97
|
+
AssignmentExpression: {
|
98
|
+
array: false,
|
99
|
+
object: false,
|
100
|
+
},
|
101
|
+
},
|
102
|
+
{
|
103
|
+
enforceForRenamedProperties: false,
|
104
|
+
enforceForDeclarationWithTypeAnnotation: false,
|
105
|
+
},
|
106
|
+
],
|
107
|
+
"@typescript-eslint/prefer-promise-reject-errors": [
|
108
|
+
ERROR,
|
109
|
+
{
|
110
|
+
allowEmptyReject: false,
|
111
|
+
},
|
112
|
+
],
|
88
113
|
"@typescript-eslint/require-await": ERROR,
|
89
114
|
},
|
90
115
|
] as const;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import Js from "./
|
2
|
-
import DisableCompiler from "./ts/
|
1
|
+
import Js from "./js.js";
|
2
|
+
import DisableCompiler from "./ts/disable.js";
|
3
3
|
import DisableX from "./ts/disable_x.js";
|
4
4
|
import EnableX from "./ts/enable_x.js";
|
5
|
-
import Enable from "./ts/
|
5
|
+
import Enable from "./ts/enable.js";
|
6
6
|
|
7
7
|
export default [
|
8
8
|
...Js,
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import {
|
1
|
+
import { enable, level, state } from "../_strings.js";
|
2
2
|
|
3
3
|
const
|
4
|
-
{ enable } = id,
|
5
4
|
{ ERROR, OFF } = level,
|
6
5
|
{ Never, Always, Double } = state;
|
7
6
|
|
@@ -11,11 +10,37 @@ export default [
|
|
11
10
|
// https://ota-meshi.github.io/eslint-plugin-yml/rules/#yaml-rules
|
12
11
|
"yml/block-mapping-colon-indicator-newline": [ERROR, Never],
|
13
12
|
"yml/block-mapping-question-indicator-newline": [ERROR, Never],
|
14
|
-
"yml/block-mapping": [
|
15
|
-
|
16
|
-
|
13
|
+
"yml/block-mapping": [
|
14
|
+
ERROR,
|
15
|
+
{
|
16
|
+
singleline: Never,
|
17
|
+
multiline: Always,
|
18
|
+
},
|
19
|
+
],
|
20
|
+
"yml/block-sequence-hyphen-indicator-newline": [
|
21
|
+
ERROR,
|
22
|
+
Never,
|
23
|
+
{
|
24
|
+
nestedHyphen: Always,
|
25
|
+
blockMapping: Never,
|
26
|
+
},
|
27
|
+
],
|
28
|
+
"yml/block-sequence": [
|
29
|
+
ERROR,
|
30
|
+
{
|
31
|
+
singleline: Always,
|
32
|
+
multiline: Always,
|
33
|
+
},
|
34
|
+
],
|
17
35
|
"yml/file-extension": OFF,
|
18
|
-
"yml/indent": [
|
36
|
+
"yml/indent": [
|
37
|
+
ERROR,
|
38
|
+
2,
|
39
|
+
{
|
40
|
+
indentBlockSequences: true,
|
41
|
+
indicatorValueIndent: 2,
|
42
|
+
},
|
43
|
+
],
|
19
44
|
"yml/key-name-casing": OFF,
|
20
45
|
"yml/no-empty-document": ERROR,
|
21
46
|
"yml/no-empty-key": ERROR,
|
@@ -24,7 +49,13 @@ export default [
|
|
24
49
|
"yml/no-tab-indent": ERROR,
|
25
50
|
"yml/no-trailing-zeros": ERROR,
|
26
51
|
"yml/plain-scalar": [ERROR, Always],
|
27
|
-
"yml/quotes": [
|
52
|
+
"yml/quotes": [
|
53
|
+
ERROR,
|
54
|
+
{
|
55
|
+
prefer: Double,
|
56
|
+
avoidEscape: true,
|
57
|
+
},
|
58
|
+
],
|
28
59
|
"yml/require-string-key": ERROR,
|
29
60
|
"yml/sort-keys": OFF,
|
30
61
|
"yml/sort-sequence-values": OFF,
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import {
|
1
|
+
import { enable_x, level, state } from "../_strings.js";
|
2
2
|
|
3
3
|
const
|
4
|
-
{ enable_x } = id,
|
5
4
|
{ ERROR } = level,
|
6
5
|
{ Never, Always, Strict } = state;
|
7
6
|
|
@@ -9,13 +8,61 @@ export default [
|
|
9
8
|
enable_x,
|
10
9
|
{
|
11
10
|
// https://ota-meshi.github.io/eslint-plugin-yml/rules/#extension-rules
|
12
|
-
"yml/flow-mapping-curly-newline": [
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
11
|
+
"yml/flow-mapping-curly-newline": [
|
12
|
+
ERROR,
|
13
|
+
{
|
14
|
+
consistent: false,
|
15
|
+
multiline: true,
|
16
|
+
minProperties: 2,
|
17
|
+
},
|
18
|
+
],
|
19
|
+
"yml/flow-mapping-curly-spacing": [
|
20
|
+
ERROR,
|
21
|
+
Always,
|
22
|
+
{
|
23
|
+
arraysInObjects: true,
|
24
|
+
objectsInObjects: true,
|
25
|
+
},
|
26
|
+
],
|
27
|
+
"yml/flow-sequence-bracket-newline": [
|
28
|
+
ERROR,
|
29
|
+
{
|
30
|
+
multiline: true,
|
31
|
+
minItems: null,
|
32
|
+
},
|
33
|
+
],
|
34
|
+
"yml/flow-sequence-bracket-spacing": [
|
35
|
+
ERROR,
|
36
|
+
Never,
|
37
|
+
{
|
38
|
+
singleValue: false,
|
39
|
+
objectsInArrays: false,
|
40
|
+
arraysInArrays: false,
|
41
|
+
},
|
42
|
+
],
|
43
|
+
"yml/key-spacing": [
|
44
|
+
ERROR,
|
45
|
+
{
|
46
|
+
beforeColon: false,
|
47
|
+
afterColon: true,
|
48
|
+
mode: Strict,
|
49
|
+
},
|
50
|
+
],
|
51
|
+
"yml/no-irregular-whitespace": [
|
52
|
+
ERROR,
|
53
|
+
{
|
54
|
+
skipQuotedScalars: true,
|
55
|
+
skipComments: false,
|
56
|
+
},
|
57
|
+
],
|
58
|
+
"yml/no-multiple-empty-lines": [
|
59
|
+
ERROR,
|
60
|
+
{
|
61
|
+
max: 1,
|
62
|
+
maxEOF: 1,
|
63
|
+
maxBOF: 0,
|
64
|
+
},
|
65
|
+
],
|
19
66
|
"yml/spaced-comment": [ERROR, Always],
|
20
67
|
},
|
21
68
|
] as const;
|
package/src/rules.ts
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
import type { Core } from "@eslinted/core";
|
2
|
-
import js from "./rules/
|
3
|
-
import ts from "./rules/
|
4
|
-
import svelte from "./rules/
|
5
|
-
import mocha from "./rules/
|
6
|
-
import html from "./rules/
|
7
|
-
import json from "./rules/
|
8
|
-
import jsonc from "./rules/
|
9
|
-
import yml from "./rules/
|
10
|
-
import md from "./rules/
|
2
|
+
import js from "./rules/js.js";
|
3
|
+
import ts from "./rules/ts.js";
|
4
|
+
import svelte from "./rules/svelte.js";
|
5
|
+
import mocha from "./rules/mocha.js";
|
6
|
+
import html from "./rules/html.js";
|
7
|
+
import json from "./rules/json.js";
|
8
|
+
import jsonc from "./rules/jsonc.js";
|
9
|
+
import yml from "./rules/yml.js";
|
10
|
+
import md from "./rules/md.js";
|
11
11
|
|
12
12
|
export default {
|
13
13
|
js,
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_html.d.ts","sourceRoot":"","sources":["../../src/rules/_html.ts"],"names":[],"mappings":";;;;;;AAGA,wBAA8C"}
|
package/dist/rules/_html.js
DELETED
package/dist/rules/_html.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_html.js","sourceRoot":"","sources":["../../src/rules/_html.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,eAAe,CAAC,WAAW,EAAE,MAAM,CAAU,CAAC"}
|
package/dist/rules/_js.js
DELETED
package/dist/rules/_js.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_js.js","sourceRoot":"","sources":["../../src/rules/_js.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,eAAe,CAAC,eAAe,EAAE,MAAM,CAAU,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_json.d.ts","sourceRoot":"","sources":["../../src/rules/_json.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAA0C"}
|
package/dist/rules/_json.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_json.js","sourceRoot":"","sources":["../../src/rules/_json.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,oBAAoB,CAAC;AACzC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,eAAe,CAAC,OAAO,EAAE,MAAM,CAAU,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_jsonc.d.ts","sourceRoot":"","sources":["../../src/rules/_jsonc.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAAgD"}
|
package/dist/rules/_jsonc.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_jsonc.js","sourceRoot":"","sources":["../../src/rules/_jsonc.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAE/C,eAAe,CAAC,GAAG,IAAI,EAAE,YAAY,CAAU,CAAC"}
|
package/dist/rules/_md.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_md.d.ts","sourceRoot":"","sources":["../../src/rules/_md.ts"],"names":[],"mappings":";;;;;AAEA,wBAAiC"}
|
package/dist/rules/_md.js
DELETED
package/dist/rules/_md.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_md.js","sourceRoot":"","sources":["../../src/rules/_md.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,eAAe,CAAC,MAAM,CAAU,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_mocha.d.ts","sourceRoot":"","sources":["../../src/rules/_mocha.ts"],"names":[],"mappings":";;;;;;AAGA,wBAA8C"}
|
package/dist/rules/_mocha.js
DELETED
package/dist/rules/_mocha.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_mocha.js","sourceRoot":"","sources":["../../src/rules/_mocha.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,yBAAyB,CAAC;AAClD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,eAAe,CAAC,WAAW,EAAE,MAAM,CAAU,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_svelte.js","sourceRoot":"","sources":["../../src/rules/_svelte.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,UAAU,CAAC;AACjC,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC,eAAe;IACb,GAAG,SAAS;IACZ,SAAS;IACT,SAAS;IACT,QAAQ;IACR,OAAO;IACP,MAAM;CACE,CAAC"}
|
package/dist/rules/_ts.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_ts.js","sourceRoot":"","sources":["../../src/rules/_ts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,eAAe,MAAM,0BAA0B,CAAC;AACvD,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,OAAO,MAAM,kBAAkB,CAAC;AACvC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,eAAe;IACb,GAAG,EAAE;IACL,eAAe;IACf,QAAQ;IACR,OAAO;IACP,MAAM;CACE,CAAC"}
|
package/dist/rules/_yml.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_yml.d.ts","sourceRoot":"","sources":["../../src/rules/_yml.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAA0C"}
|
package/dist/rules/_yml.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_yml.js","sourceRoot":"","sources":["../../src/rules/_yml.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,eAAe,CAAC,OAAO,EAAE,MAAM,CAAU,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_enable.d.ts","sourceRoot":"","sources":["../../../src/rules/html/_enable.ts"],"names":[],"mappings":";;;;;;AAMA,wBAMW"}
|