@eslinted/defaults 12.10.0 → 12.11.1

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.
Files changed (149) hide show
  1. package/.github/workflows/RELEASE.yml +36 -36
  2. package/.github/workflows/rc.yml +36 -36
  3. package/.markdownlint.jsonc +97 -97
  4. package/.mocharc.yml +15 -15
  5. package/LICENSE +20 -20
  6. package/README.md +4 -4
  7. package/dist/index.d.ts +99 -912
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/rules/index.d.ts +99 -492
  10. package/dist/rules/index.d.ts.map +1 -1
  11. package/dist/rules/scopes/enable.d.ts +0 -2
  12. package/dist/rules/scopes/enable.d.ts.map +1 -1
  13. package/dist/rules/scopes/enable.js +0 -3
  14. package/dist/rules/scopes/enable.js.map +1 -1
  15. package/dist/rules/scopes/enable.style.d.ts +24 -134
  16. package/dist/rules/scopes/enable.style.d.ts.map +1 -1
  17. package/dist/rules/scopes/enable.style.js +22 -192
  18. package/dist/rules/scopes/enable.style.js.map +1 -1
  19. package/dist/rules/scopes/index.d.ts +24 -136
  20. package/dist/rules/scopes/index.d.ts.map +1 -1
  21. package/dist/rules/scopes/json/index.d.ts +7 -20
  22. package/dist/rules/scopes/json/index.d.ts.map +1 -1
  23. package/dist/rules/scopes/json/plugin/extension.d.ts +7 -20
  24. package/dist/rules/scopes/json/plugin/extension.d.ts.map +1 -1
  25. package/dist/rules/scopes/json/plugin/extension.js +7 -41
  26. package/dist/rules/scopes/json/plugin/extension.js.map +1 -1
  27. package/dist/rules/scopes/mocha/chai/index.d.ts +0 -2
  28. package/dist/rules/scopes/mocha/chai/index.d.ts.map +1 -1
  29. package/dist/rules/scopes/mocha/chai/index.js +0 -2
  30. package/dist/rules/scopes/mocha/chai/index.js.map +1 -1
  31. package/dist/rules/scopes/mocha/enable.d.ts +3 -10
  32. package/dist/rules/scopes/mocha/enable.d.ts.map +1 -1
  33. package/dist/rules/scopes/mocha/enable.js +3 -19
  34. package/dist/rules/scopes/mocha/enable.js.map +1 -1
  35. package/dist/rules/scopes/mocha/index.d.ts +3 -12
  36. package/dist/rules/scopes/mocha/index.d.ts.map +1 -1
  37. package/dist/rules/scopes/svelte/enable.d.ts +19 -91
  38. package/dist/rules/scopes/svelte/enable.d.ts.map +1 -1
  39. package/dist/rules/scopes/svelte/enable.js +20 -153
  40. package/dist/rules/scopes/svelte/enable.js.map +1 -1
  41. package/dist/rules/scopes/svelte/extension/index.d.ts +2 -7
  42. package/dist/rules/scopes/svelte/extension/index.d.ts.map +1 -1
  43. package/dist/rules/scopes/svelte/extension/index.js +2 -11
  44. package/dist/rules/scopes/svelte/extension/index.js.map +1 -1
  45. package/dist/rules/scopes/svelte/index.d.ts +21 -98
  46. package/dist/rules/scopes/svelte/index.d.ts.map +1 -1
  47. package/dist/rules/scopes/ts/enable.d.ts +31 -163
  48. package/dist/rules/scopes/ts/enable.d.ts.map +1 -1
  49. package/dist/rules/scopes/ts/enable.js +32 -380
  50. package/dist/rules/scopes/ts/enable.js.map +1 -1
  51. package/dist/rules/scopes/ts/extension/index.d.ts +1 -20
  52. package/dist/rules/scopes/ts/extension/index.d.ts.map +1 -1
  53. package/dist/rules/scopes/ts/extension/index.js +2 -25
  54. package/dist/rules/scopes/ts/extension/index.js.map +1 -1
  55. package/dist/rules/scopes/ts/index.d.ts +32 -183
  56. package/dist/rules/scopes/ts/index.d.ts.map +1 -1
  57. package/dist/rules/scopes/yml/index.d.ts +12 -43
  58. package/dist/rules/scopes/yml/index.d.ts.map +1 -1
  59. package/dist/rules/scopes/yml/plugin/extension.d.ts +5 -22
  60. package/dist/rules/scopes/yml/plugin/extension.d.ts.map +1 -1
  61. package/dist/rules/scopes/yml/plugin/extension.js +5 -36
  62. package/dist/rules/scopes/yml/plugin/extension.js.map +1 -1
  63. package/dist/rules/scopes/yml/plugin/index.d.ts +7 -21
  64. package/dist/rules/scopes/yml/plugin/index.d.ts.map +1 -1
  65. package/dist/rules/scopes/yml/plugin/index.js +8 -44
  66. package/dist/rules/scopes/yml/plugin/index.js.map +1 -1
  67. package/eslint.config.js +3 -3
  68. package/package.json +56 -56
  69. package/src/files/_factory/index.ts +76 -76
  70. package/src/files/_factory/project/index.ts +2 -2
  71. package/src/files/_factory/project/roots.ts +4 -4
  72. package/src/files/_factory/project/subroots.ts +8 -8
  73. package/src/files/index.ts +23 -23
  74. package/src/files/scopes/css.ts +5 -5
  75. package/src/files/scopes/html.ts +5 -5
  76. package/src/files/scopes/js.ts +5 -5
  77. package/src/files/scopes/json.ts +5 -5
  78. package/src/files/scopes/jsonc.ts +5 -5
  79. package/src/files/scopes/jsoncc.ts +9 -9
  80. package/src/files/scopes/mocha.ts +5 -5
  81. package/src/files/scopes/svelte.ts +5 -5
  82. package/src/files/scopes/ts.ts +5 -5
  83. package/src/files/scopes/yml.ts +8 -8
  84. package/src/ignores/global.ts +5 -5
  85. package/src/ignores/index.ts +25 -25
  86. package/src/ignores/scopes/css.ts +1 -1
  87. package/src/ignores/scopes/html.ts +1 -1
  88. package/src/ignores/scopes/js.ts +1 -1
  89. package/src/ignores/scopes/json.ts +1 -1
  90. package/src/ignores/scopes/jsonc.ts +1 -1
  91. package/src/ignores/scopes/jsoncc.ts +1 -1
  92. package/src/ignores/scopes/mocha.ts +1 -1
  93. package/src/ignores/scopes/svelte.ts +1 -1
  94. package/src/ignores/scopes/ts.ts +1 -1
  95. package/src/ignores/scopes/yml.ts +1 -1
  96. package/src/index.ts +10 -10
  97. package/src/rules/_strings/id.ts +21 -21
  98. package/src/rules/_strings/index.ts +3 -3
  99. package/src/rules/_strings/option.ts +30 -30
  100. package/src/rules/_strings/state.spec.ts +64 -64
  101. package/src/rules/_strings/state.ts +4 -4
  102. package/src/rules/index.ts +23 -23
  103. package/src/rules/scopes/css/enable.ts +31 -31
  104. package/src/rules/scopes/css/index.ts +3 -3
  105. package/src/rules/scopes/enable.style.ts +507 -705
  106. package/src/rules/scopes/enable.ts +390 -401
  107. package/src/rules/scopes/html/index.ts +3 -3
  108. package/src/rules/scopes/html/plugin/index.ts +113 -113
  109. package/src/rules/scopes/index.ts +7 -7
  110. package/src/rules/scopes/json/enable.ts +18 -18
  111. package/src/rules/scopes/json/index.ts +9 -9
  112. package/src/rules/scopes/json/plugin/extension.ts +60 -98
  113. package/src/rules/scopes/json/plugin/index.ts +35 -35
  114. package/src/rules/scopes/jsonc/index.ts +3 -3
  115. package/src/rules/scopes/jsonc/plugin/index.ts +12 -12
  116. package/src/rules/scopes/jsoncc/index.ts +3 -3
  117. package/src/rules/scopes/jsoncc/plugin/index.ts +16 -16
  118. package/src/rules/scopes/mocha/chai/expect.ts +16 -16
  119. package/src/rules/scopes/mocha/chai/index.ts +18 -20
  120. package/src/rules/scopes/mocha/disable.ts +13 -13
  121. package/src/rules/scopes/mocha/enable.ts +36 -52
  122. package/src/rules/scopes/mocha/index.ts +11 -11
  123. package/src/rules/scopes/svelte/disable.ts +19 -19
  124. package/src/rules/scopes/svelte/enable.ts +157 -292
  125. package/src/rules/scopes/svelte/extension/disable.ts +14 -14
  126. package/src/rules/scopes/svelte/extension/index.ts +17 -27
  127. package/src/rules/scopes/svelte/index.ts +11 -11
  128. package/src/rules/scopes/ts/disable.ts +30 -30
  129. package/src/rules/scopes/ts/enable.ts +188 -578
  130. package/src/rules/scopes/ts/extension/disable.ts +35 -35
  131. package/src/rules/scopes/ts/extension/index.ts +62 -87
  132. package/src/rules/scopes/ts/index.ts +11 -11
  133. package/src/rules/scopes/yml/index.ts +7 -7
  134. package/src/rules/scopes/yml/plugin/extension.ts +55 -88
  135. package/src/rules/scopes/yml/plugin/index.ts +38 -88
  136. package/src/settings/global/index.ts +6 -6
  137. package/src/settings/index.ts +7 -7
  138. package/src/settings/registry/index.ts +23 -23
  139. package/src/settings/registry/manifests/css.ts +9 -9
  140. package/src/settings/registry/manifests/html.ts +10 -10
  141. package/src/settings/registry/manifests/js.ts +8 -8
  142. package/src/settings/registry/manifests/json.ts +7 -7
  143. package/src/settings/registry/manifests/jsonc.ts +9 -9
  144. package/src/settings/registry/manifests/jsoncc.ts +9 -9
  145. package/src/settings/registry/manifests/mocha.ts +8 -8
  146. package/src/settings/registry/manifests/svelte.ts +10 -10
  147. package/src/settings/registry/manifests/ts.ts +30 -30
  148. package/src/settings/registry/manifests/yml.ts +9 -9
  149. package/tsconfig.json +75 -156
@@ -1,578 +1,188 @@
1
- import {
2
- ID,
3
- // OFF,
4
- ON,
5
- never,
6
- explicit,
7
- } from "../../_strings";
8
-
9
- export const TsEnable = {
10
- id: ID.Enable.Enable,
11
- rules: {
12
- // DOC: https://typescript-eslint.io/rules/?=xextension-xdeprecated#rules
13
- // "@typescript-eslint/adjacent-overload-signatures": OFF,
14
- // "@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
- "@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
- ],
28
- "@typescript-eslint/ban-tslint-comment": ON,
29
- "@typescript-eslint/class-literal-property-style": [
30
- ON,
31
- "fields",
32
- ],
33
- "@typescript-eslint/consistent-generic-constructors": [
34
- ON,
35
- "constructor",
36
- ],
37
- "@typescript-eslint/consistent-indexed-object-style": [
38
- ON,
39
- "record",
40
- ],
41
- "@typescript-eslint/consistent-type-assertions": [
42
- ON,
43
- {
44
- assertionStyle: "as",
45
- arrayLiteralTypeAssertions: never,
46
- objectLiteralTypeAssertions: never,
47
- },
48
- ],
49
- // "@typescript-eslint/consistent-type-definitions": OFF,
50
- "@typescript-eslint/consistent-type-exports": [
51
- ON,
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
- ],
64
- // "@typescript-eslint/explicit-function-return-type": OFF,
65
- "@typescript-eslint/explicit-member-accessibility": [
66
- ON,
67
- {
68
- accessibility: explicit,
69
- ignoredMethodNames: [],
70
- overrides: {
71
- properties: explicit,
72
- constructors: "no-public",
73
- accessors: explicit,
74
- methods: explicit,
75
- parameterProperties: explicit,
76
- },
77
- },
78
- ],
79
- // "@typescript-eslint/explicit-module-boundary-types": OFF,
80
- "@typescript-eslint/member-ordering": [
81
- ON,
82
- {
83
- "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
- optionalityOrder: "required-first",
244
- order: "as-written",
245
- },
246
-
247
- },
248
- ],
249
- "@typescript-eslint/method-signature-style": [
250
- ON,
251
- "property",
252
- ],
253
- // "@typescript-eslint/naming-convention": OFF,
254
- "@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
- ],
267
- "@typescript-eslint/no-confusing-non-null-assertion": ON,
268
- "@typescript-eslint/no-confusing-void-expression": [
269
- ON,
270
- {
271
- ignoreArrowShorthand: true,
272
- ignoreVoidOperator: true,
273
- ignoreVoidReturningFunctions: true,
274
- },
275
- ],
276
- // "@typescript-eslint/no-deprecated": OFF /* incompatible: Cannot be used with jsDocParsingMode: "none" */,
277
- "@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
- ],
285
- "@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
- ],
294
- "@typescript-eslint/no-explicit-any": [
295
- ON,
296
- {
297
- fixToUnknown: true,
298
- ignoreRestArgs: false,
299
- },
300
- ],
301
- "@typescript-eslint/no-extra-non-null-assertion": ON,
302
- "@typescript-eslint/no-extraneous-class": [
303
- ON,
304
- {
305
- allowConstructorOnly: false,
306
- allowEmpty: true,
307
- allowStaticOnly: false,
308
- allowWithDecorator: false,
309
- },
310
- ],
311
- "@typescript-eslint/no-floating-promises": [
312
- ON,
313
- {
314
- checkThenables: true,
315
- ignoreVoid: true,
316
- ignoreIIFE: false,
317
- },
318
- ],
319
- "@typescript-eslint/no-for-in-array": ON,
320
- "@typescript-eslint/no-import-type-side-effects": ON,
321
- "@typescript-eslint/no-inferrable-types": [
322
- ON,
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
- ],
335
- "@typescript-eslint/no-meaningless-void-operator": [
336
- ON,
337
- {
338
- checkNever: true,
339
- },
340
- ],
341
- "@typescript-eslint/no-misused-new": ON,
342
- "@typescript-eslint/no-misused-promises": [
343
- ON,
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
- ],
362
- "@typescript-eslint/no-mixed-enums": ON,
363
- // "@typescript-eslint/no-namespace": OFF,
364
- "@typescript-eslint/no-non-null-asserted-nullish-coalescing": ON,
365
- "@typescript-eslint/no-non-null-asserted-optional-chain": ON,
366
- // "@typescript-eslint/no-non-null-assertion": OFF /* preference */,
367
- "@typescript-eslint/no-redundant-type-constituents": ON,
368
- // "@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
- ON,
371
- {
372
- allow: [],
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
- ],
396
- "@typescript-eslint/no-unnecessary-parameter-property-assignment": ON,
397
- "@typescript-eslint/no-unnecessary-qualifier": ON,
398
- "@typescript-eslint/no-unnecessary-template-expression": ON,
399
- "@typescript-eslint/no-unnecessary-type-arguments": ON,
400
- "@typescript-eslint/no-unnecessary-type-assertion": [
401
- ON,
402
- {
403
- checkLiteralConstAssertions: false,
404
- typesToIgnore: [],
405
- },
406
- ],
407
- "@typescript-eslint/no-unnecessary-type-constraint": ON,
408
- "@typescript-eslint/no-unnecessary-type-conversion": ON,
409
- "@typescript-eslint/no-unnecessary-type-parameters": ON,
410
- "@typescript-eslint/no-unsafe-argument": ON,
411
- "@typescript-eslint/no-unsafe-assignment": ON,
412
- "@typescript-eslint/no-unsafe-call": ON,
413
- "@typescript-eslint/no-unsafe-declaration-merging": ON,
414
- "@typescript-eslint/no-unsafe-enum-comparison": ON,
415
- "@typescript-eslint/no-unsafe-function-type": ON,
416
- "@typescript-eslint/no-unsafe-member-access": ON,
417
- "@typescript-eslint/no-unsafe-return": ON,
418
- // "@typescript-eslint/no-unsafe-type-assertion": OFF,
419
- "@typescript-eslint/no-unsafe-unary-minus": ON,
420
- "@typescript-eslint/no-useless-empty-export": ON,
421
- "@typescript-eslint/no-wrapper-object-types": ON,
422
- // "@typescript-eslint/non-nullable-type-assertion-style": OFF /* preference */,
423
- "@typescript-eslint/parameter-properties": [
424
- ON,
425
- {
426
- prefer: "parameter-property" /* "parameter-property" | "class-property" */,
427
- },
428
- ],
429
- "@typescript-eslint/prefer-as-const": ON,
430
- "@typescript-eslint/prefer-enum-initializers": ON,
431
- "@typescript-eslint/prefer-find": ON,
432
- "@typescript-eslint/prefer-for-of": ON,
433
- "@typescript-eslint/prefer-function-type": ON,
434
- "@typescript-eslint/prefer-includes": ON,
435
- "@typescript-eslint/prefer-literal-enum-member": [
436
- ON,
437
- {
438
- allowBitwiseExpressions: false,
439
- },
440
- ],
441
- "@typescript-eslint/prefer-namespace-keyword": ON,
442
- "@typescript-eslint/prefer-nullish-coalescing": [
443
- ON,
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
- ],
478
- // "@typescript-eslint/prefer-readonly-parameter-types": OFF /* preference - WAY too restrictive */,
479
- "@typescript-eslint/prefer-reduce-type-parameter": ON,
480
- "@typescript-eslint/prefer-regexp-exec": ON,
481
- "@typescript-eslint/prefer-return-this-type": ON,
482
- "@typescript-eslint/prefer-string-starts-ends-with": [
483
- ON,
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
- ],
499
- "@typescript-eslint/related-getter-setter-pairs": ON,
500
- "@typescript-eslint/require-array-sort-compare": [
501
- ON,
502
- {
503
- ignoreStringArrays: true,
504
- },
505
- ],
506
- "@typescript-eslint/restrict-plus-operands": [
507
- ON,
508
- {
509
- allowAny: false,
510
- allowBoolean: false,
511
- allowNullish: false,
512
- allowNumberAndString: false,
513
- allowRegExp: false,
514
- skipCompoundAssignments: false,
515
- },
516
- ],
517
- "@typescript-eslint/restrict-template-expressions": [
518
- ON,
519
- {
520
- allowAny: true,
521
- allowArray: true,
522
- allowBoolean: true,
523
- allowNullish: false,
524
- allowNumber: true,
525
- allowNever: false,
526
- allowRegExp: false,
527
- }, /* investigate: make stricter */
528
- ],
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 */,
533
- "@typescript-eslint/strict-boolean-expressions": [
534
- ON,
535
- {
536
- allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
537
- allowAny: false,
538
- allowNumber: true,
539
- allowString: false,
540
- allowNullableBoolean: false,
541
- allowNullableEnum: false,
542
- allowNullableNumber: false,
543
- allowNullableObject: false,
544
- allowNullableString: false,
545
- },
546
- ], /* requires tsconfig: strictNullChecks */
547
- "@typescript-eslint/switch-exhaustiveness-check": [
548
- ON,
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
- ],
563
- // "@typescript-eslint/typedef": OFF /* tsconfig: { noImplicitAny, strictPropertyInitialization } */,
564
- "@typescript-eslint/unbound-method": [
565
- ON,
566
- {
567
- ignoreStatic: false,
568
- },
569
- ],
570
- "@typescript-eslint/unified-signatures": [
571
- ON,
572
- {
573
- ignoreDifferentlyNamedParameters: false,
574
- },
575
- ],
576
- "@typescript-eslint/use-unknown-in-catch-callback-variable": ON,
577
- } as const,
578
- };
1
+ import {
2
+ ID,
3
+ // OFF,
4
+ ON,
5
+ never,
6
+ } from "../../_strings";
7
+
8
+ export const TsEnable = {
9
+ id: ID.Enable.Enable,
10
+ rules: {
11
+ // DOC: https://typescript-eslint.io/rules/?=xextension-xdeprecated#rules
12
+ // "@typescript-eslint/adjacent-overload-signatures": OFF,
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 */,
14
+ "@typescript-eslint/await-thenable": ON,
15
+ "@typescript-eslint/ban-ts-comment": ON,
16
+ "@typescript-eslint/ban-tslint-comment": ON,
17
+ "@typescript-eslint/class-literal-property-style": ON,
18
+ "@typescript-eslint/consistent-generic-constructors": ON,
19
+ "@typescript-eslint/consistent-indexed-object-style": ON,
20
+ "@typescript-eslint/consistent-type-assertions": [
21
+ ON,
22
+ {
23
+ arrayLiteralTypeAssertions: never,
24
+ objectLiteralTypeAssertions: never,
25
+ },
26
+ ],
27
+ // "@typescript-eslint/consistent-type-definitions": OFF,
28
+ "@typescript-eslint/consistent-type-exports": ON,
29
+ "@typescript-eslint/consistent-type-imports": ON,
30
+ // "@typescript-eslint/explicit-function-return-type": OFF,
31
+ "@typescript-eslint/explicit-member-accessibility": [
32
+ ON,
33
+ {
34
+ overrides: {
35
+ constructors: "no-public",
36
+ },
37
+ },
38
+ ],
39
+ // "@typescript-eslint/explicit-module-boundary-types": OFF,
40
+ "@typescript-eslint/member-ordering": [
41
+ ON,
42
+ {
43
+ "default": {
44
+ optionalityOrder: "required-first",
45
+ },
46
+ },
47
+ ],
48
+ "@typescript-eslint/method-signature-style": ON,
49
+ // "@typescript-eslint/naming-convention": OFF,
50
+ "@typescript-eslint/no-array-delete": ON,
51
+ "@typescript-eslint/no-base-to-string": ON,
52
+ "@typescript-eslint/no-confusing-non-null-assertion": ON,
53
+ "@typescript-eslint/no-confusing-void-expression": [
54
+ ON,
55
+ {
56
+ ignoreArrowShorthand: true,
57
+ ignoreVoidOperator: true,
58
+ ignoreVoidReturningFunctions: true,
59
+ },
60
+ ],
61
+ // "@typescript-eslint/no-deprecated": OFF /* incompatible: Cannot be used with jsDocParsingMode: "none" */,
62
+ "@typescript-eslint/no-duplicate-enum-values": ON,
63
+ "@typescript-eslint/no-duplicate-type-constituents": ON,
64
+ "@typescript-eslint/no-dynamic-delete": ON,
65
+ "@typescript-eslint/no-empty-object-type": ON,
66
+ "@typescript-eslint/no-explicit-any": [
67
+ ON,
68
+ {
69
+ fixToUnknown: true,
70
+ },
71
+ ],
72
+ "@typescript-eslint/no-extra-non-null-assertion": ON,
73
+ "@typescript-eslint/no-extraneous-class": [
74
+ ON,
75
+ {
76
+ allowEmpty: true,
77
+ },
78
+ ],
79
+ "@typescript-eslint/no-floating-promises": [
80
+ ON,
81
+ {
82
+ checkThenables: true,
83
+ },
84
+ ],
85
+ "@typescript-eslint/no-for-in-array": ON,
86
+ "@typescript-eslint/no-import-type-side-effects": ON,
87
+ "@typescript-eslint/no-inferrable-types": ON,
88
+ "@typescript-eslint/no-invalid-void-type": ON,
89
+ "@typescript-eslint/no-meaningless-void-operator": [
90
+ ON,
91
+ {
92
+ checkNever: true,
93
+ },
94
+ ],
95
+ "@typescript-eslint/no-misused-new": ON,
96
+ "@typescript-eslint/no-misused-promises": ON,
97
+ "@typescript-eslint/no-misused-spread": ON,
98
+ "@typescript-eslint/no-mixed-enums": ON,
99
+ // "@typescript-eslint/no-namespace": OFF,
100
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": ON,
101
+ "@typescript-eslint/no-non-null-asserted-optional-chain": ON,
102
+ // "@typescript-eslint/no-non-null-assertion": OFF /* preference */,
103
+ "@typescript-eslint/no-redundant-type-constituents": ON,
104
+ // "@typescript-eslint/no-restricted-types": OFF /* preference - no shared custom types across all projects that I wish to ban */,
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,
109
+ "@typescript-eslint/no-unnecessary-parameter-property-assignment": ON,
110
+ "@typescript-eslint/no-unnecessary-qualifier": ON,
111
+ "@typescript-eslint/no-unnecessary-template-expression": ON,
112
+ "@typescript-eslint/no-unnecessary-type-arguments": ON,
113
+ "@typescript-eslint/no-unnecessary-type-assertion": ON,
114
+ "@typescript-eslint/no-unnecessary-type-constraint": ON,
115
+ "@typescript-eslint/no-unnecessary-type-conversion": ON,
116
+ "@typescript-eslint/no-unnecessary-type-parameters": ON,
117
+ "@typescript-eslint/no-unsafe-argument": ON,
118
+ "@typescript-eslint/no-unsafe-assignment": ON,
119
+ "@typescript-eslint/no-unsafe-call": ON,
120
+ "@typescript-eslint/no-unsafe-declaration-merging": ON,
121
+ "@typescript-eslint/no-unsafe-enum-comparison": ON,
122
+ "@typescript-eslint/no-unsafe-function-type": ON,
123
+ "@typescript-eslint/no-unsafe-member-access": ON,
124
+ "@typescript-eslint/no-unsafe-return": ON,
125
+ // "@typescript-eslint/no-unsafe-type-assertion": OFF,
126
+ "@typescript-eslint/no-unsafe-unary-minus": ON,
127
+ "@typescript-eslint/no-useless-empty-export": ON,
128
+ "@typescript-eslint/no-wrapper-object-types": ON,
129
+ // "@typescript-eslint/non-nullable-type-assertion-style": OFF /* preference */,
130
+ "@typescript-eslint/parameter-properties": [
131
+ ON,
132
+ {
133
+ prefer: "parameter-property" /* parameter-property | @default class-property */,
134
+ },
135
+ ],
136
+ "@typescript-eslint/prefer-as-const": ON,
137
+ "@typescript-eslint/prefer-enum-initializers": ON,
138
+ "@typescript-eslint/prefer-find": ON,
139
+ "@typescript-eslint/prefer-for-of": ON,
140
+ "@typescript-eslint/prefer-function-type": ON,
141
+ "@typescript-eslint/prefer-includes": ON,
142
+ "@typescript-eslint/prefer-literal-enum-member": ON,
143
+ "@typescript-eslint/prefer-namespace-keyword": ON,
144
+ "@typescript-eslint/prefer-nullish-coalescing": ON /* requires tsconfig: strictNullChecks */,
145
+ "@typescript-eslint/prefer-optional-chain": ON,
146
+ "@typescript-eslint/prefer-readonly": ON,
147
+ // "@typescript-eslint/prefer-readonly-parameter-types": OFF /* preference - WAY too restrictive */,
148
+ "@typescript-eslint/prefer-reduce-type-parameter": ON,
149
+ "@typescript-eslint/prefer-regexp-exec": ON,
150
+ "@typescript-eslint/prefer-return-this-type": ON,
151
+ "@typescript-eslint/prefer-string-starts-ends-with": ON,
152
+ "@typescript-eslint/promise-function-async": ON,
153
+ "@typescript-eslint/related-getter-setter-pairs": ON,
154
+ "@typescript-eslint/require-array-sort-compare": ON,
155
+ "@typescript-eslint/restrict-plus-operands": [
156
+ ON,
157
+ {
158
+ allowAny: false,
159
+ allowBoolean: false,
160
+ allowNullish: false,
161
+ allowNumberAndString: false,
162
+ allowRegExp: false,
163
+ },
164
+ ],
165
+ "@typescript-eslint/restrict-template-expressions": [
166
+ ON,
167
+ {
168
+ allowNullish: false,
169
+ allowNever: false,
170
+ allowRegExp: false,
171
+ },
172
+ ],
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 */,
174
+ "@typescript-eslint/strict-boolean-expressions": [
175
+ ON,
176
+ {
177
+ allowNullableObject: false,
178
+ allowString: false,
179
+ },
180
+ ], /* requires tsconfig: strictNullChecks */
181
+ "@typescript-eslint/switch-exhaustiveness-check": ON,
182
+ // "@typescript-eslint/triple-slash-reference": OFF /* preference - who gives a fuck */,
183
+ // "@typescript-eslint/typedef": OFF /* tsconfig: { noImplicitAny, strictPropertyInitialization } */,
184
+ "@typescript-eslint/unbound-method": ON,
185
+ "@typescript-eslint/unified-signatures": ON,
186
+ "@typescript-eslint/use-unknown-in-catch-callback-variable": ON,
187
+ } as const,
188
+ };