linted 16.12.2-rc.2 → 16.12.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. package/.github/workflows/RELEASE.yml +35 -35
  2. package/.github/workflows/rc.yml +35 -35
  3. package/LICENSE +21 -21
  4. package/README.md +390 -390
  5. package/SECURITY.md +9 -9
  6. package/dist/imports/plugins.d.ts.map +1 -1
  7. package/dist/imports.d.ts.map +1 -1
  8. package/eslint.config.js +3 -3
  9. package/package.json +99 -99
  10. package/src/files/html.ts +1 -1
  11. package/src/files/js.ts +1 -1
  12. package/src/files/json.ts +1 -1
  13. package/src/files/jsonc.ts +4 -4
  14. package/src/files/md.ts +1 -1
  15. package/src/files/mocha.ts +1 -1
  16. package/src/files/svelte.ts +1 -1
  17. package/src/files/ts.ts +5 -5
  18. package/src/files/yml.ts +5 -5
  19. package/src/files.ts +22 -22
  20. package/src/imports/parsers.ts +15 -15
  21. package/src/imports/plugins.ts +19 -19
  22. package/src/imports.ts +8 -8
  23. package/src/index.ts +36 -36
  24. package/src/rules/_strings/id.ts +18 -18
  25. package/src/rules/_strings/level.ts +6 -6
  26. package/src/rules/_strings/state.ts +56 -56
  27. package/src/rules/_strings.ts +6 -6
  28. package/src/rules/html/enable.ts +16 -16
  29. package/src/rules/html/enable_recommended.ts +9 -9
  30. package/src/rules/html.ts +4 -4
  31. package/src/rules/js/enable.ts +524 -524
  32. package/src/rules/js/enable_stylistic.ts +608 -608
  33. package/src/rules/js.ts +4 -4
  34. package/src/rules/json/enable.ts +33 -33
  35. package/src/rules/json/enable_x.ts +89 -89
  36. package/src/rules/json.ts +4 -4
  37. package/src/rules/jsonc/override.ts +16 -16
  38. package/src/rules/jsonc.ts +4 -4
  39. package/src/rules/md/enable.ts +15 -15
  40. package/src/rules/md.ts +3 -3
  41. package/src/rules/mocha/enable.ts +3 -3
  42. package/src/rules/mocha/enable_recommended.ts +9 -9
  43. package/src/rules/mocha.ts +4 -4
  44. package/src/rules/svelte/disable.ts +9 -9
  45. package/src/rules/svelte/disable_js.ts +11 -11
  46. package/src/rules/svelte/disable_ts.ts +9 -9
  47. package/src/rules/svelte/enable.ts +228 -228
  48. package/src/rules/svelte/enable_x.ts +20 -20
  49. package/src/rules/svelte.ts +15 -15
  50. package/src/rules/ts/disable.ts +22 -22
  51. package/src/rules/ts/disable_x.ts +32 -32
  52. package/src/rules/ts/enable.ts +549 -549
  53. package/src/rules/ts/enable_x.ts +115 -115
  54. package/src/rules/ts.ts +13 -13
  55. package/src/rules/yml/enable.ts +64 -64
  56. package/src/rules/yml/enable_x.ts +68 -68
  57. package/src/rules/yml.ts +4 -4
  58. package/src/rules.ts +22 -22
  59. package/tsconfig.json +161 -161
  60. package/types/markdownlint/index.d.ts +3 -3
  61. package/types/markdownlint/parser.d.ts +9 -9
  62. package/types/mocha/index.d.ts +8 -8
  63. package/dist/rules/_html.d.ts +0 -8
  64. package/dist/rules/_html.d.ts.map +0 -1
  65. package/dist/rules/_html.js +0 -4
  66. package/dist/rules/_html.js.map +0 -1
  67. package/dist/rules/_js.d.ts +0 -765
  68. package/dist/rules/_js.d.ts.map +0 -1
  69. package/dist/rules/_js.js +0 -4
  70. package/dist/rules/_js.js.map +0 -1
  71. package/dist/rules/_json.d.ts +0 -74
  72. package/dist/rules/_json.d.ts.map +0 -1
  73. package/dist/rules/_json.js +0 -4
  74. package/dist/rules/_json.js.map +0 -1
  75. package/dist/rules/_jsonc.d.ts +0 -77
  76. package/dist/rules/_jsonc.d.ts.map +0 -1
  77. package/dist/rules/_jsonc.js +0 -4
  78. package/dist/rules/_jsonc.js.map +0 -1
  79. package/dist/rules/_md.d.ts +0 -7
  80. package/dist/rules/_md.d.ts.map +0 -1
  81. package/dist/rules/_md.js +0 -3
  82. package/dist/rules/_md.js.map +0 -1
  83. package/dist/rules/_mocha.d.ts +0 -8
  84. package/dist/rules/_mocha.d.ts.map +0 -1
  85. package/dist/rules/_mocha.js +0 -4
  86. package/dist/rules/_mocha.js.map +0 -1
  87. package/dist/rules/_svelte.d.ts +0 -1269
  88. package/dist/rules/_svelte.d.ts.map +0 -1
  89. package/dist/rules/_svelte.js +0 -15
  90. package/dist/rules/_svelte.js.map +0 -1
  91. package/dist/rules/_ts.d.ts +0 -1133
  92. package/dist/rules/_ts.d.ts.map +0 -1
  93. package/dist/rules/_ts.js +0 -13
  94. package/dist/rules/_ts.js.map +0 -1
  95. package/dist/rules/_yml.d.ts +0 -73
  96. package/dist/rules/_yml.d.ts.map +0 -1
  97. package/dist/rules/_yml.js +0 -4
  98. package/dist/rules/_yml.js.map +0 -1
  99. package/dist/rules/html/_enable.d.ts +0 -8
  100. package/dist/rules/html/_enable.d.ts.map +0 -1
  101. package/dist/rules/html/_enable.js +0 -10
  102. package/dist/rules/html/_enable.js.map +0 -1
  103. package/dist/rules/html/_recommended.d.ts +0 -3
  104. package/dist/rules/html/_recommended.d.ts.map +0 -1
  105. package/dist/rules/html/_recommended.js +0 -5
  106. package/dist/rules/html/_recommended.js.map +0 -1
  107. package/dist/rules/js/_enable.d.ts +0 -348
  108. package/dist/rules/js/_enable.d.ts.map +0 -1
  109. package/dist/rules/js/_enable.js +0 -260
  110. package/dist/rules/js/_enable.js.map +0 -1
  111. package/dist/rules/js/stylistic.d.ts +0 -420
  112. package/dist/rules/js/stylistic.d.ts.map +0 -1
  113. package/dist/rules/js/stylistic.js +0 -270
  114. package/dist/rules/js/stylistic.js.map +0 -1
  115. package/dist/rules/json/_enable.d.ts +0 -27
  116. package/dist/rules/json/_enable.d.ts.map +0 -1
  117. package/dist/rules/json/_enable.js +0 -31
  118. package/dist/rules/json/_enable.js.map +0 -1
  119. package/dist/rules/md/_enable.d.ts +0 -7
  120. package/dist/rules/md/_enable.d.ts.map +0 -1
  121. package/dist/rules/md/_enable.js +0 -9
  122. package/dist/rules/md/_enable.js.map +0 -1
  123. package/dist/rules/mocha/_enable.d.ts +0 -3
  124. package/dist/rules/mocha/_enable.d.ts.map +0 -1
  125. package/dist/rules/mocha/_enable.js +0 -4
  126. package/dist/rules/mocha/_enable.js.map +0 -1
  127. package/dist/rules/mocha/_recommended.d.ts +0 -3
  128. package/dist/rules/mocha/_recommended.d.ts.map +0 -1
  129. package/dist/rules/mocha/_recommended.js +0 -5
  130. package/dist/rules/mocha/_recommended.js.map +0 -1
  131. package/dist/rules/svelte/_enable.d.ts +0 -126
  132. package/dist/rules/svelte/_enable.d.ts.map +0 -1
  133. package/dist/rules/svelte/_enable.js +0 -90
  134. package/dist/rules/svelte/_enable.js.map +0 -1
  135. package/dist/rules/svelte/disable_x.d.ts +0 -5
  136. package/dist/rules/svelte/disable_x.d.ts.map +0 -1
  137. package/dist/rules/svelte/disable_x.js +0 -4
  138. package/dist/rules/svelte/disable_x.js.map +0 -1
  139. package/dist/rules/ts/_enable.d.ts +0 -262
  140. package/dist/rules/ts/_enable.d.ts.map +0 -1
  141. package/dist/rules/ts/_enable.js +0 -359
  142. package/dist/rules/ts/_enable.js.map +0 -1
  143. package/dist/rules/ts/disable_compiler.d.ts +0 -18
  144. package/dist/rules/ts/disable_compiler.d.ts.map +0 -1
  145. package/dist/rules/ts/disable_compiler.js +0 -22
  146. package/dist/rules/ts/disable_compiler.js.map +0 -1
  147. package/dist/rules/yml/_enable.d.ts +0 -39
  148. package/dist/rules/yml/_enable.d.ts.map +0 -1
  149. package/dist/rules/yml/_enable.js +0 -28
  150. package/dist/rules/yml/_enable.js.map +0 -1
@@ -1,549 +1,549 @@
1
- import { enable, level, state } from "../_strings.js";
2
-
3
- const
4
- { ERROR, OFF } = level,
5
- { Never, Explicit } = state;
6
-
7
- export default [
8
- enable,
9
- {
10
- // https://typescript-eslint.io/rules/?=xextension-xdeprecated#rules
11
- "@typescript-eslint/adjacent-overload-signatures": OFF,
12
- "@typescript-eslint/array-type": [
13
- ERROR,
14
- {
15
- "default": "array",
16
- readonly: "array",
17
- },
18
- ],
19
- "@typescript-eslint/await-thenable": ERROR,
20
- "@typescript-eslint/ban-ts-comment": [
21
- ERROR,
22
- {
23
- "ts-check": false,
24
- "ts-expect-error": {
25
- descriptionFormat: "^: BUG: .+$",
26
- },
27
- "ts-ignore": true,
28
- "ts-nocheck": true,
29
- minimumDescriptionLength: 32,
30
- },
31
- ],
32
- "@typescript-eslint/ban-tslint-comment": ERROR,
33
- "@typescript-eslint/class-literal-property-style": [ERROR, "fields"],
34
- "@typescript-eslint/consistent-generic-constructors": [ERROR, "constructor"],
35
- "@typescript-eslint/consistent-indexed-object-style": [ERROR, "record"],
36
- "@typescript-eslint/consistent-type-assertions": [
37
- ERROR,
38
- {
39
- assertionStyle: "as",
40
- objectLiteralTypeAssertions: Never,
41
- },
42
- ],
43
- "@typescript-eslint/consistent-type-definitions": OFF,
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
- ],
58
- "@typescript-eslint/explicit-function-return-type": OFF,
59
- "@typescript-eslint/explicit-member-accessibility": [
60
- ERROR,
61
- {
62
- accessibility: Explicit,
63
- ignoredMethodNames: [],
64
- overrides: {
65
- properties: Explicit,
66
- constructors: "no-public",
67
- accessors: Explicit,
68
- methods: Explicit,
69
- parameterProperties: Explicit,
70
- },
71
- },
72
- ],
73
- "@typescript-eslint/explicit-module-boundary-types": OFF,
74
- "@typescript-eslint/member-ordering": [
75
- ERROR,
76
- {
77
- "default": {
78
- memberTypes: [
79
- // Index signature
80
- "signature",
81
- "call-signature",
82
-
83
- // Fields
84
- "public-static-field",
85
- "protected-static-field",
86
- "private-static-field",
87
- "#private-static-field",
88
-
89
- "public-decorated-field",
90
- "protected-decorated-field",
91
- "private-decorated-field",
92
-
93
- "public-instance-field",
94
- "protected-instance-field",
95
- "private-instance-field",
96
- "#private-instance-field",
97
-
98
- "public-abstract-field",
99
- "protected-abstract-field",
100
-
101
- "public-field",
102
- "protected-field",
103
- "private-field",
104
- "#private-field",
105
-
106
- "static-field",
107
- "instance-field",
108
- "abstract-field",
109
- "decorated-field",
110
- "field",
111
-
112
- // Static initialization
113
- "static-initialization",
114
-
115
- // Constructors
116
- "public-constructor",
117
- "protected-constructor",
118
- "private-constructor",
119
- "constructor",
120
-
121
- // Accessors
122
- "public-static-accessor",
123
- "protected-static-accessor",
124
- "private-static-accessor",
125
- "#private-static-accessor",
126
-
127
- "public-decorated-accessor",
128
- "protected-decorated-accessor",
129
- "private-decorated-accessor",
130
-
131
- "public-instance-accessor",
132
- "protected-instance-accessor",
133
- "private-instance-accessor",
134
- "#private-instance-accessor",
135
-
136
- "public-abstract-accessor",
137
- "protected-abstract-accessor",
138
-
139
- "public-accessor",
140
- "protected-accessor",
141
- "private-accessor",
142
- "#private-accessor",
143
-
144
- "static-accessor",
145
- "instance-accessor",
146
- "abstract-accessor",
147
- "decorated-accessor",
148
- "accessor",
149
-
150
- // Getters
151
- "public-static-get",
152
- "protected-static-get",
153
- "private-static-get",
154
- "#private-static-get",
155
-
156
- "public-decorated-get",
157
- "protected-decorated-get",
158
- "private-decorated-get",
159
-
160
- "public-instance-get",
161
- "protected-instance-get",
162
- "private-instance-get",
163
- "#private-instance-get",
164
-
165
- "public-abstract-get",
166
- "protected-abstract-get",
167
-
168
- "public-get",
169
- "protected-get",
170
- "private-get",
171
- "#private-get",
172
-
173
- "static-get",
174
- "instance-get",
175
- "abstract-get",
176
- "decorated-get",
177
- "get",
178
-
179
- // Setters
180
- "public-static-set",
181
- "protected-static-set",
182
- "private-static-set",
183
- "#private-static-set",
184
-
185
- "public-decorated-set",
186
- "protected-decorated-set",
187
- "private-decorated-set",
188
-
189
- "public-instance-set",
190
- "protected-instance-set",
191
- "private-instance-set",
192
- "#private-instance-set",
193
-
194
- "public-abstract-set",
195
- "protected-abstract-set",
196
-
197
- "public-set",
198
- "protected-set",
199
- "private-set",
200
- "#private-set",
201
-
202
- "static-set",
203
- "instance-set",
204
- "abstract-set",
205
- "decorated-set",
206
- "set",
207
-
208
- // Methods
209
- "public-static-method",
210
- "protected-static-method",
211
- "private-static-method",
212
- "#private-static-method",
213
-
214
- "public-decorated-method",
215
- "protected-decorated-method",
216
- "private-decorated-method",
217
-
218
- "public-instance-method",
219
- "protected-instance-method",
220
- "private-instance-method",
221
- "#private-instance-method",
222
-
223
- "public-abstract-method",
224
- "protected-abstract-method",
225
-
226
- "public-method",
227
- "protected-method",
228
- "private-method",
229
- "#private-method",
230
-
231
- "static-method",
232
- "instance-method",
233
- "abstract-method",
234
- "decorated-method",
235
- "method",
236
- ],
237
- optionalityOrder: "required-first",
238
- order: "as-written",
239
- },
240
-
241
- },
242
- ],
243
- "@typescript-eslint/method-signature-style": [ERROR, "property"],
244
- "@typescript-eslint/naming-convention": OFF,
245
- "@typescript-eslint/no-array-delete": ERROR,
246
- "@typescript-eslint/no-base-to-string": [
247
- ERROR,
248
- {
249
- ignoredTypeNames: [
250
- "Error",
251
- "RegExp",
252
- "URL",
253
- "URLSearchParams",
254
- ],
255
- },
256
- ],
257
- "@typescript-eslint/no-confusing-non-null-assertion": ERROR,
258
- "@typescript-eslint/no-confusing-void-expression": [
259
- ERROR,
260
- {
261
- ignoreArrowShorthand: true,
262
- ignoreVoidOperator: true,
263
- },
264
- ],
265
- "@typescript-eslint/no-duplicate-enum-values": ERROR,
266
- "@typescript-eslint/no-duplicate-type-constituents": [
267
- ERROR,
268
- {
269
- ignoreIntersections: false,
270
- ignoreUnions: false,
271
- },
272
- ],
273
- "@typescript-eslint/no-dynamic-delete": ERROR,
274
- "@typescript-eslint/no-empty-object-type": [
275
- ERROR,
276
- {
277
- // allowWithName: /regex/,
278
- allowInterfaces: Never,
279
- allowObjectTypes: Never,
280
- },
281
- ],
282
- "@typescript-eslint/no-explicit-any": [
283
- ERROR,
284
- {
285
- fixToUnknown: true,
286
- ignoreRestArgs: false,
287
- },
288
- ],
289
- "@typescript-eslint/no-extra-non-null-assertion": ERROR,
290
- "@typescript-eslint/no-extraneous-class": [
291
- ERROR,
292
- {
293
- allowConstructorOnly: false,
294
- allowEmpty: true,
295
- allowStaticOnly: false,
296
- allowWithDecorator: false,
297
- },
298
- ],
299
- "@typescript-eslint/no-floating-promises": [
300
- ERROR,
301
- {
302
- checkThenables: true,
303
- ignoreVoid: true,
304
- ignoreIIFE: false,
305
- },
306
- ],
307
- "@typescript-eslint/no-for-in-array": ERROR,
308
- "@typescript-eslint/no-import-type-side-effects": ERROR,
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
- ],
329
- "@typescript-eslint/no-misused-new": ERROR,
330
- "@typescript-eslint/no-misused-promises": [
331
- ERROR,
332
- {
333
- checksConditionals: true,
334
- checksSpreads: true,
335
- checksVoidReturn: {
336
- arguments: true,
337
- attributes: true,
338
- properties: true,
339
- returns: true,
340
- variables: true,
341
- },
342
- },
343
- ],
344
- "@typescript-eslint/no-mixed-enums": ERROR,
345
- "@typescript-eslint/no-namespace": OFF,
346
- "@typescript-eslint/no-non-null-asserted-nullish-coalescing": ERROR,
347
- "@typescript-eslint/no-non-null-asserted-optional-chain": ERROR,
348
- "@typescript-eslint/no-non-null-assertion": ERROR,
349
- "@typescript-eslint/no-redundant-type-constituents": ERROR,
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
- ],
378
- "@typescript-eslint/no-unnecessary-qualifier": ERROR,
379
- "@typescript-eslint/no-unnecessary-template-expression": ERROR,
380
- "@typescript-eslint/no-unnecessary-type-arguments": ERROR,
381
- "@typescript-eslint/no-unnecessary-type-assertion": [
382
- ERROR,
383
- {
384
- typesToIgnore: [],
385
- },
386
- ],
387
- "@typescript-eslint/no-unnecessary-type-constraint": ERROR,
388
- "@typescript-eslint/no-unnecessary-type-parameters": ERROR,
389
- "@typescript-eslint/no-unsafe-argument": ERROR,
390
- "@typescript-eslint/no-unsafe-assignment": ERROR,
391
- "@typescript-eslint/no-unsafe-call": ERROR,
392
- "@typescript-eslint/no-unsafe-declaration-merging": ERROR,
393
- "@typescript-eslint/no-unsafe-enum-comparison": ERROR,
394
- "@typescript-eslint/no-unsafe-function-type": ERROR,
395
- "@typescript-eslint/no-unsafe-member-access": ERROR,
396
- "@typescript-eslint/no-unsafe-return": ERROR,
397
- "@typescript-eslint/no-unsafe-unary-minus": ERROR,
398
- "@typescript-eslint/no-useless-empty-export": ERROR,
399
- "@typescript-eslint/no-wrapper-object-types": ERROR,
400
- "@typescript-eslint/non-nullable-type-assertion-style": OFF,
401
- "@typescript-eslint/parameter-properties": [
402
- ERROR,
403
- {
404
- prefer: "parameter-property" /* "parameter-property" | "class-property" */,
405
- },
406
- ],
407
- "@typescript-eslint/prefer-as-const": ERROR,
408
- "@typescript-eslint/prefer-enum-initializers": ERROR,
409
- "@typescript-eslint/prefer-find": ERROR,
410
- "@typescript-eslint/prefer-for-of": ERROR,
411
- "@typescript-eslint/prefer-function-type": ERROR,
412
- "@typescript-eslint/prefer-includes": ERROR,
413
- "@typescript-eslint/prefer-literal-enum-member": [
414
- ERROR,
415
- {
416
- allowBitwiseExpressions: false,
417
- },
418
- ],
419
- "@typescript-eslint/prefer-namespace-keyword": ERROR,
420
- "@typescript-eslint/prefer-nullish-coalescing": [
421
- ERROR,
422
- {
423
- allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
424
- ignoreConditionalTests: false,
425
- ignoreTernaryTests: false,
426
- ignoreMixedLogicalExpressions: false,
427
- ignorePrimitives: {
428
- bigint: false,
429
- "boolean": false,
430
- number: false,
431
- string: false,
432
- },
433
- },
434
- ], /* requires tsconfig: strictNullChecks */
435
- "@typescript-eslint/prefer-optional-chain": [
436
- ERROR,
437
- {
438
- allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: false,
439
- checkAny: true,
440
- checkBigInt: true,
441
- checkBoolean: true,
442
- checkNumber: true,
443
- checkString: true,
444
- checkUnknown: true,
445
- requireNullish: false,
446
- },
447
- ],
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 */,
455
- "@typescript-eslint/prefer-reduce-type-parameter": ERROR,
456
- "@typescript-eslint/prefer-regexp-exec": ERROR,
457
- "@typescript-eslint/prefer-return-this-type": ERROR,
458
- "@typescript-eslint/prefer-string-starts-ends-with": [
459
- ERROR,
460
- {
461
- allowSingleElementEquality: Never,
462
- },
463
- ],
464
- "@typescript-eslint/promise-function-async": [
465
- ERROR,
466
- {
467
- allowAny: false,
468
- allowedPromiseNames: [],
469
- checkArrowFunctions: true,
470
- checkFunctionDeclarations: true,
471
- checkFunctionExpressions: true,
472
- checkMethodDeclarations: true,
473
- },
474
- ],
475
- "@typescript-eslint/require-array-sort-compare": [
476
- ERROR,
477
- {
478
- ignoreStringArrays: true,
479
- },
480
- ],
481
- "@typescript-eslint/restrict-plus-operands": [
482
- ERROR,
483
- {
484
- allowAny: false,
485
- allowBoolean: false,
486
- allowNullish: false,
487
- allowNumberAndString: false,
488
- allowRegExp: false,
489
- skipCompoundAssignments: false,
490
- },
491
- ],
492
- "@typescript-eslint/restrict-template-expressions": [
493
- ERROR,
494
- {
495
- allowAny: true,
496
- allowArray: true,
497
- allowBoolean: true,
498
- allowNullish: false,
499
- allowNumber: true,
500
- allowNever: false,
501
- allowRegExp: false,
502
- }, /* investigate: make stricter */
503
- ],
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 */,
505
- "@typescript-eslint/strict-boolean-expressions": [
506
- ERROR,
507
- {
508
- allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
509
- allowAny: false,
510
- allowNumber: true,
511
- allowString: false,
512
- allowNullableBoolean: false,
513
- allowNullableEnum: false,
514
- allowNullableNumber: false,
515
- allowNullableObject: false,
516
- allowNullableString: false,
517
- },
518
- ], /* requires tsconfig: strictNullChecks */
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
- ],
547
- "@typescript-eslint/use-unknown-in-catch-callback-variable": ERROR,
548
- },
549
- ] as const;
1
+ import { enable, level, state } from "../_strings.js";
2
+
3
+ const
4
+ { ERROR, OFF } = level,
5
+ { Never, Explicit } = state;
6
+
7
+ export default [
8
+ enable,
9
+ {
10
+ // https://typescript-eslint.io/rules/?=xextension-xdeprecated#rules
11
+ "@typescript-eslint/adjacent-overload-signatures": OFF,
12
+ "@typescript-eslint/array-type": [
13
+ ERROR,
14
+ {
15
+ "default": "array",
16
+ readonly: "array",
17
+ },
18
+ ],
19
+ "@typescript-eslint/await-thenable": ERROR,
20
+ "@typescript-eslint/ban-ts-comment": [
21
+ ERROR,
22
+ {
23
+ "ts-check": false,
24
+ "ts-expect-error": {
25
+ descriptionFormat: "^: BUG: .+$",
26
+ },
27
+ "ts-ignore": true,
28
+ "ts-nocheck": true,
29
+ minimumDescriptionLength: 32,
30
+ },
31
+ ],
32
+ "@typescript-eslint/ban-tslint-comment": ERROR,
33
+ "@typescript-eslint/class-literal-property-style": [ERROR, "fields"],
34
+ "@typescript-eslint/consistent-generic-constructors": [ERROR, "constructor"],
35
+ "@typescript-eslint/consistent-indexed-object-style": [ERROR, "record"],
36
+ "@typescript-eslint/consistent-type-assertions": [
37
+ ERROR,
38
+ {
39
+ assertionStyle: "as",
40
+ objectLiteralTypeAssertions: Never,
41
+ },
42
+ ],
43
+ "@typescript-eslint/consistent-type-definitions": OFF,
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
+ ],
58
+ "@typescript-eslint/explicit-function-return-type": OFF,
59
+ "@typescript-eslint/explicit-member-accessibility": [
60
+ ERROR,
61
+ {
62
+ accessibility: Explicit,
63
+ ignoredMethodNames: [],
64
+ overrides: {
65
+ properties: Explicit,
66
+ constructors: "no-public",
67
+ accessors: Explicit,
68
+ methods: Explicit,
69
+ parameterProperties: Explicit,
70
+ },
71
+ },
72
+ ],
73
+ "@typescript-eslint/explicit-module-boundary-types": OFF,
74
+ "@typescript-eslint/member-ordering": [
75
+ ERROR,
76
+ {
77
+ "default": {
78
+ memberTypes: [
79
+ // Index signature
80
+ "signature",
81
+ "call-signature",
82
+
83
+ // Fields
84
+ "public-static-field",
85
+ "protected-static-field",
86
+ "private-static-field",
87
+ "#private-static-field",
88
+
89
+ "public-decorated-field",
90
+ "protected-decorated-field",
91
+ "private-decorated-field",
92
+
93
+ "public-instance-field",
94
+ "protected-instance-field",
95
+ "private-instance-field",
96
+ "#private-instance-field",
97
+
98
+ "public-abstract-field",
99
+ "protected-abstract-field",
100
+
101
+ "public-field",
102
+ "protected-field",
103
+ "private-field",
104
+ "#private-field",
105
+
106
+ "static-field",
107
+ "instance-field",
108
+ "abstract-field",
109
+ "decorated-field",
110
+ "field",
111
+
112
+ // Static initialization
113
+ "static-initialization",
114
+
115
+ // Constructors
116
+ "public-constructor",
117
+ "protected-constructor",
118
+ "private-constructor",
119
+ "constructor",
120
+
121
+ // Accessors
122
+ "public-static-accessor",
123
+ "protected-static-accessor",
124
+ "private-static-accessor",
125
+ "#private-static-accessor",
126
+
127
+ "public-decorated-accessor",
128
+ "protected-decorated-accessor",
129
+ "private-decorated-accessor",
130
+
131
+ "public-instance-accessor",
132
+ "protected-instance-accessor",
133
+ "private-instance-accessor",
134
+ "#private-instance-accessor",
135
+
136
+ "public-abstract-accessor",
137
+ "protected-abstract-accessor",
138
+
139
+ "public-accessor",
140
+ "protected-accessor",
141
+ "private-accessor",
142
+ "#private-accessor",
143
+
144
+ "static-accessor",
145
+ "instance-accessor",
146
+ "abstract-accessor",
147
+ "decorated-accessor",
148
+ "accessor",
149
+
150
+ // Getters
151
+ "public-static-get",
152
+ "protected-static-get",
153
+ "private-static-get",
154
+ "#private-static-get",
155
+
156
+ "public-decorated-get",
157
+ "protected-decorated-get",
158
+ "private-decorated-get",
159
+
160
+ "public-instance-get",
161
+ "protected-instance-get",
162
+ "private-instance-get",
163
+ "#private-instance-get",
164
+
165
+ "public-abstract-get",
166
+ "protected-abstract-get",
167
+
168
+ "public-get",
169
+ "protected-get",
170
+ "private-get",
171
+ "#private-get",
172
+
173
+ "static-get",
174
+ "instance-get",
175
+ "abstract-get",
176
+ "decorated-get",
177
+ "get",
178
+
179
+ // Setters
180
+ "public-static-set",
181
+ "protected-static-set",
182
+ "private-static-set",
183
+ "#private-static-set",
184
+
185
+ "public-decorated-set",
186
+ "protected-decorated-set",
187
+ "private-decorated-set",
188
+
189
+ "public-instance-set",
190
+ "protected-instance-set",
191
+ "private-instance-set",
192
+ "#private-instance-set",
193
+
194
+ "public-abstract-set",
195
+ "protected-abstract-set",
196
+
197
+ "public-set",
198
+ "protected-set",
199
+ "private-set",
200
+ "#private-set",
201
+
202
+ "static-set",
203
+ "instance-set",
204
+ "abstract-set",
205
+ "decorated-set",
206
+ "set",
207
+
208
+ // Methods
209
+ "public-static-method",
210
+ "protected-static-method",
211
+ "private-static-method",
212
+ "#private-static-method",
213
+
214
+ "public-decorated-method",
215
+ "protected-decorated-method",
216
+ "private-decorated-method",
217
+
218
+ "public-instance-method",
219
+ "protected-instance-method",
220
+ "private-instance-method",
221
+ "#private-instance-method",
222
+
223
+ "public-abstract-method",
224
+ "protected-abstract-method",
225
+
226
+ "public-method",
227
+ "protected-method",
228
+ "private-method",
229
+ "#private-method",
230
+
231
+ "static-method",
232
+ "instance-method",
233
+ "abstract-method",
234
+ "decorated-method",
235
+ "method",
236
+ ],
237
+ optionalityOrder: "required-first",
238
+ order: "as-written",
239
+ },
240
+
241
+ },
242
+ ],
243
+ "@typescript-eslint/method-signature-style": [ERROR, "property"],
244
+ "@typescript-eslint/naming-convention": OFF,
245
+ "@typescript-eslint/no-array-delete": ERROR,
246
+ "@typescript-eslint/no-base-to-string": [
247
+ ERROR,
248
+ {
249
+ ignoredTypeNames: [
250
+ "Error",
251
+ "RegExp",
252
+ "URL",
253
+ "URLSearchParams",
254
+ ],
255
+ },
256
+ ],
257
+ "@typescript-eslint/no-confusing-non-null-assertion": ERROR,
258
+ "@typescript-eslint/no-confusing-void-expression": [
259
+ ERROR,
260
+ {
261
+ ignoreArrowShorthand: true,
262
+ ignoreVoidOperator: true,
263
+ },
264
+ ],
265
+ "@typescript-eslint/no-duplicate-enum-values": ERROR,
266
+ "@typescript-eslint/no-duplicate-type-constituents": [
267
+ ERROR,
268
+ {
269
+ ignoreIntersections: false,
270
+ ignoreUnions: false,
271
+ },
272
+ ],
273
+ "@typescript-eslint/no-dynamic-delete": ERROR,
274
+ "@typescript-eslint/no-empty-object-type": [
275
+ ERROR,
276
+ {
277
+ // allowWithName: /regex/,
278
+ allowInterfaces: Never,
279
+ allowObjectTypes: Never,
280
+ },
281
+ ],
282
+ "@typescript-eslint/no-explicit-any": [
283
+ ERROR,
284
+ {
285
+ fixToUnknown: true,
286
+ ignoreRestArgs: false,
287
+ },
288
+ ],
289
+ "@typescript-eslint/no-extra-non-null-assertion": ERROR,
290
+ "@typescript-eslint/no-extraneous-class": [
291
+ ERROR,
292
+ {
293
+ allowConstructorOnly: false,
294
+ allowEmpty: true,
295
+ allowStaticOnly: false,
296
+ allowWithDecorator: false,
297
+ },
298
+ ],
299
+ "@typescript-eslint/no-floating-promises": [
300
+ ERROR,
301
+ {
302
+ checkThenables: true,
303
+ ignoreVoid: true,
304
+ ignoreIIFE: false,
305
+ },
306
+ ],
307
+ "@typescript-eslint/no-for-in-array": ERROR,
308
+ "@typescript-eslint/no-import-type-side-effects": ERROR,
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
+ ],
329
+ "@typescript-eslint/no-misused-new": ERROR,
330
+ "@typescript-eslint/no-misused-promises": [
331
+ ERROR,
332
+ {
333
+ checksConditionals: true,
334
+ checksSpreads: true,
335
+ checksVoidReturn: {
336
+ arguments: true,
337
+ attributes: true,
338
+ properties: true,
339
+ returns: true,
340
+ variables: true,
341
+ },
342
+ },
343
+ ],
344
+ "@typescript-eslint/no-mixed-enums": ERROR,
345
+ "@typescript-eslint/no-namespace": OFF,
346
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": ERROR,
347
+ "@typescript-eslint/no-non-null-asserted-optional-chain": ERROR,
348
+ "@typescript-eslint/no-non-null-assertion": ERROR,
349
+ "@typescript-eslint/no-redundant-type-constituents": ERROR,
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
+ ],
378
+ "@typescript-eslint/no-unnecessary-qualifier": ERROR,
379
+ "@typescript-eslint/no-unnecessary-template-expression": ERROR,
380
+ "@typescript-eslint/no-unnecessary-type-arguments": ERROR,
381
+ "@typescript-eslint/no-unnecessary-type-assertion": [
382
+ ERROR,
383
+ {
384
+ typesToIgnore: [],
385
+ },
386
+ ],
387
+ "@typescript-eslint/no-unnecessary-type-constraint": ERROR,
388
+ "@typescript-eslint/no-unnecessary-type-parameters": ERROR,
389
+ "@typescript-eslint/no-unsafe-argument": ERROR,
390
+ "@typescript-eslint/no-unsafe-assignment": ERROR,
391
+ "@typescript-eslint/no-unsafe-call": ERROR,
392
+ "@typescript-eslint/no-unsafe-declaration-merging": ERROR,
393
+ "@typescript-eslint/no-unsafe-enum-comparison": ERROR,
394
+ "@typescript-eslint/no-unsafe-function-type": ERROR,
395
+ "@typescript-eslint/no-unsafe-member-access": ERROR,
396
+ "@typescript-eslint/no-unsafe-return": ERROR,
397
+ "@typescript-eslint/no-unsafe-unary-minus": ERROR,
398
+ "@typescript-eslint/no-useless-empty-export": ERROR,
399
+ "@typescript-eslint/no-wrapper-object-types": ERROR,
400
+ "@typescript-eslint/non-nullable-type-assertion-style": OFF,
401
+ "@typescript-eslint/parameter-properties": [
402
+ ERROR,
403
+ {
404
+ prefer: "parameter-property" /* "parameter-property" | "class-property" */,
405
+ },
406
+ ],
407
+ "@typescript-eslint/prefer-as-const": ERROR,
408
+ "@typescript-eslint/prefer-enum-initializers": ERROR,
409
+ "@typescript-eslint/prefer-find": ERROR,
410
+ "@typescript-eslint/prefer-for-of": ERROR,
411
+ "@typescript-eslint/prefer-function-type": ERROR,
412
+ "@typescript-eslint/prefer-includes": ERROR,
413
+ "@typescript-eslint/prefer-literal-enum-member": [
414
+ ERROR,
415
+ {
416
+ allowBitwiseExpressions: false,
417
+ },
418
+ ],
419
+ "@typescript-eslint/prefer-namespace-keyword": ERROR,
420
+ "@typescript-eslint/prefer-nullish-coalescing": [
421
+ ERROR,
422
+ {
423
+ allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
424
+ ignoreConditionalTests: false,
425
+ ignoreTernaryTests: false,
426
+ ignoreMixedLogicalExpressions: false,
427
+ ignorePrimitives: {
428
+ bigint: false,
429
+ "boolean": false,
430
+ number: false,
431
+ string: false,
432
+ },
433
+ },
434
+ ], /* requires tsconfig: strictNullChecks */
435
+ "@typescript-eslint/prefer-optional-chain": [
436
+ ERROR,
437
+ {
438
+ allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: false,
439
+ checkAny: true,
440
+ checkBigInt: true,
441
+ checkBoolean: true,
442
+ checkNumber: true,
443
+ checkString: true,
444
+ checkUnknown: true,
445
+ requireNullish: false,
446
+ },
447
+ ],
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 */,
455
+ "@typescript-eslint/prefer-reduce-type-parameter": ERROR,
456
+ "@typescript-eslint/prefer-regexp-exec": ERROR,
457
+ "@typescript-eslint/prefer-return-this-type": ERROR,
458
+ "@typescript-eslint/prefer-string-starts-ends-with": [
459
+ ERROR,
460
+ {
461
+ allowSingleElementEquality: Never,
462
+ },
463
+ ],
464
+ "@typescript-eslint/promise-function-async": [
465
+ ERROR,
466
+ {
467
+ allowAny: false,
468
+ allowedPromiseNames: [],
469
+ checkArrowFunctions: true,
470
+ checkFunctionDeclarations: true,
471
+ checkFunctionExpressions: true,
472
+ checkMethodDeclarations: true,
473
+ },
474
+ ],
475
+ "@typescript-eslint/require-array-sort-compare": [
476
+ ERROR,
477
+ {
478
+ ignoreStringArrays: true,
479
+ },
480
+ ],
481
+ "@typescript-eslint/restrict-plus-operands": [
482
+ ERROR,
483
+ {
484
+ allowAny: false,
485
+ allowBoolean: false,
486
+ allowNullish: false,
487
+ allowNumberAndString: false,
488
+ allowRegExp: false,
489
+ skipCompoundAssignments: false,
490
+ },
491
+ ],
492
+ "@typescript-eslint/restrict-template-expressions": [
493
+ ERROR,
494
+ {
495
+ allowAny: true,
496
+ allowArray: true,
497
+ allowBoolean: true,
498
+ allowNullish: false,
499
+ allowNumber: true,
500
+ allowNever: false,
501
+ allowRegExp: false,
502
+ }, /* investigate: make stricter */
503
+ ],
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 */,
505
+ "@typescript-eslint/strict-boolean-expressions": [
506
+ ERROR,
507
+ {
508
+ allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
509
+ allowAny: false,
510
+ allowNumber: true,
511
+ allowString: false,
512
+ allowNullableBoolean: false,
513
+ allowNullableEnum: false,
514
+ allowNullableNumber: false,
515
+ allowNullableObject: false,
516
+ allowNullableString: false,
517
+ },
518
+ ], /* requires tsconfig: strictNullChecks */
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
+ ],
547
+ "@typescript-eslint/use-unknown-in-catch-callback-variable": ERROR,
548
+ },
549
+ ] as const;