@eslinted/defaults 12.11.1 → 12.11.2

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 (89) 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/eslint.config.js +3 -3
  8. package/package.json +56 -56
  9. package/src/files/_factory/index.ts +76 -76
  10. package/src/files/_factory/project/index.ts +2 -2
  11. package/src/files/_factory/project/roots.ts +4 -4
  12. package/src/files/_factory/project/subroots.ts +8 -8
  13. package/src/files/index.ts +23 -23
  14. package/src/files/scopes/css.ts +5 -5
  15. package/src/files/scopes/html.ts +5 -5
  16. package/src/files/scopes/js.ts +5 -5
  17. package/src/files/scopes/json.ts +5 -5
  18. package/src/files/scopes/jsonc.ts +5 -5
  19. package/src/files/scopes/jsoncc.ts +9 -9
  20. package/src/files/scopes/mocha.ts +5 -5
  21. package/src/files/scopes/svelte.ts +5 -5
  22. package/src/files/scopes/ts.ts +5 -5
  23. package/src/files/scopes/yml.ts +8 -8
  24. package/src/ignores/global.ts +5 -5
  25. package/src/ignores/index.ts +25 -25
  26. package/src/ignores/scopes/css.ts +1 -1
  27. package/src/ignores/scopes/html.ts +1 -1
  28. package/src/ignores/scopes/js.ts +1 -1
  29. package/src/ignores/scopes/json.ts +1 -1
  30. package/src/ignores/scopes/jsonc.ts +1 -1
  31. package/src/ignores/scopes/jsoncc.ts +1 -1
  32. package/src/ignores/scopes/mocha.ts +1 -1
  33. package/src/ignores/scopes/svelte.ts +1 -1
  34. package/src/ignores/scopes/ts.ts +1 -1
  35. package/src/ignores/scopes/yml.ts +1 -1
  36. package/src/index.ts +10 -10
  37. package/src/rules/_strings/id.ts +21 -21
  38. package/src/rules/_strings/index.ts +3 -3
  39. package/src/rules/_strings/option.ts +30 -30
  40. package/src/rules/_strings/state.spec.ts +64 -64
  41. package/src/rules/_strings/state.ts +4 -4
  42. package/src/rules/index.ts +23 -23
  43. package/src/rules/scopes/css/enable.ts +31 -31
  44. package/src/rules/scopes/css/index.ts +3 -3
  45. package/src/rules/scopes/enable.style.ts +507 -507
  46. package/src/rules/scopes/enable.ts +390 -390
  47. package/src/rules/scopes/html/index.ts +3 -3
  48. package/src/rules/scopes/html/plugin/index.ts +113 -113
  49. package/src/rules/scopes/index.ts +7 -7
  50. package/src/rules/scopes/json/enable.ts +18 -18
  51. package/src/rules/scopes/json/index.ts +9 -9
  52. package/src/rules/scopes/json/plugin/extension.ts +60 -60
  53. package/src/rules/scopes/json/plugin/index.ts +35 -35
  54. package/src/rules/scopes/jsonc/index.ts +3 -3
  55. package/src/rules/scopes/jsonc/plugin/index.ts +12 -12
  56. package/src/rules/scopes/jsoncc/index.ts +3 -3
  57. package/src/rules/scopes/jsoncc/plugin/index.ts +16 -16
  58. package/src/rules/scopes/mocha/chai/expect.ts +16 -16
  59. package/src/rules/scopes/mocha/chai/index.ts +18 -18
  60. package/src/rules/scopes/mocha/disable.ts +13 -13
  61. package/src/rules/scopes/mocha/enable.ts +36 -36
  62. package/src/rules/scopes/mocha/index.ts +11 -11
  63. package/src/rules/scopes/svelte/disable.ts +19 -19
  64. package/src/rules/scopes/svelte/enable.ts +157 -157
  65. package/src/rules/scopes/svelte/extension/disable.ts +14 -14
  66. package/src/rules/scopes/svelte/extension/index.ts +17 -17
  67. package/src/rules/scopes/svelte/index.ts +11 -11
  68. package/src/rules/scopes/ts/disable.ts +30 -30
  69. package/src/rules/scopes/ts/enable.ts +188 -188
  70. package/src/rules/scopes/ts/extension/disable.ts +35 -35
  71. package/src/rules/scopes/ts/extension/index.ts +62 -62
  72. package/src/rules/scopes/ts/index.ts +11 -11
  73. package/src/rules/scopes/yml/index.ts +7 -7
  74. package/src/rules/scopes/yml/plugin/extension.ts +55 -55
  75. package/src/rules/scopes/yml/plugin/index.ts +38 -38
  76. package/src/settings/global/index.ts +6 -6
  77. package/src/settings/index.ts +7 -7
  78. package/src/settings/registry/index.ts +23 -23
  79. package/src/settings/registry/manifests/css.ts +9 -9
  80. package/src/settings/registry/manifests/html.ts +10 -10
  81. package/src/settings/registry/manifests/js.ts +8 -8
  82. package/src/settings/registry/manifests/json.ts +7 -7
  83. package/src/settings/registry/manifests/jsonc.ts +9 -9
  84. package/src/settings/registry/manifests/jsoncc.ts +9 -9
  85. package/src/settings/registry/manifests/mocha.ts +8 -8
  86. package/src/settings/registry/manifests/svelte.ts +10 -10
  87. package/src/settings/registry/manifests/ts.ts +30 -30
  88. package/src/settings/registry/manifests/yml.ts +9 -9
  89. package/tsconfig.json +75 -75
@@ -1,390 +1,390 @@
1
- import {
2
- ID,
3
- // OFF,
4
- ON,
5
- always,
6
- as_needed,
7
- consecutive,
8
- all,
9
- multi,
10
- both,
11
- } from "../_strings";
12
-
13
- export const Enable = {
14
- id: ID.Enable.Enable,
15
- rules: {
16
- // #region PROBLEMS
17
- // DOC: https://eslint.org/docs/latest/rules/#possible-problems
18
- "array-callback-return": [
19
- ON,
20
- {
21
- // allowImplicit: false /* @default: false */,
22
- checkForEach: true /* @default: false */,
23
- allowVoid: true /* only works if checkForEach | @default: false */,
24
- },
25
- ],
26
- "constructor-super": ON /* tsc */,
27
- "for-direction": ON,
28
- "getter-return": ON /* tsc */,
29
- "no-async-promise-executor": ON,
30
- "no-await-in-loop": ON,
31
- "no-class-assign": ON,
32
- "no-compare-neg-zero": ON,
33
- "no-cond-assign": ON,
34
- "no-const-assign": ON /* tsc */,
35
- "no-constant-binary-expression": ON,
36
- "no-constant-condition": [
37
- ON,
38
- {
39
- checkLoops: all /* none === false | all === true | @default: allExceptWhileTrue */,
40
- },
41
- ] /* BUG: incorrect option description (claims "all" is ok): https://eslint.org/docs/latest/rules/no-constant-condition */,
42
- "no-constructor-return": ON,
43
- "no-control-regex": ON,
44
- "no-debugger": ON,
45
- "no-dupe-args": ON /* tsc */,
46
- "no-dupe-class-members": ON /* TS-capable BUT tsc */,
47
- "no-dupe-else-if": ON,
48
- "no-dupe-keys": ON /* tsc */,
49
- "no-duplicate-case": ON,
50
- "no-duplicate-imports": [
51
- ON,
52
- {
53
- includeExports: true /* @default false */,
54
- allowSeparateTypeImports: true /* @default false */,
55
- },
56
- ],
57
- "no-empty-character-class": ON,
58
- "no-empty-pattern": ON,
59
- "no-ex-assign": ON,
60
- "no-fallthrough": ON,
61
- "no-func-assign": ON /* tsc */,
62
- "no-import-assign": ON /* tsc (except Object.assign()) */,
63
- "no-inner-declarations": [
64
- ON,
65
- both /* both (function & var) | @default functions */,
66
- ],
67
- "no-invalid-regexp": ON,
68
- "no-irregular-whitespace": ON,
69
- "no-loss-of-precision": ON /* TS-capable, originally had TSLint rule but was deprecated */,
70
- "no-misleading-character-class": ON,
71
- "no-new-native-nonconstructor": ON,
72
- "no-obj-calls": ON /* tsc */,
73
- "no-promise-executor-return": [
74
- ON,
75
- {
76
- allowVoid: true /* @default false */,
77
- },
78
- ],
79
- "no-prototype-builtins": ON,
80
- "no-self-assign": ON,
81
- "no-self-compare": ON,
82
- "no-setter-return": ON /* tsc */,
83
- "no-sparse-arrays": ON,
84
- "no-template-curly-in-string": ON,
85
- "no-this-before-super": ON /* tsc */,
86
- "no-unassigned-vars": ON,
87
- "no-undef": ON /* tsc */,
88
- "no-unexpected-multiline": ON,
89
- "no-unmodified-loop-condition": ON,
90
- "no-unreachable": ON /* tsc */,
91
- "no-unreachable-loop": ON,
92
- "no-unsafe-finally": ON,
93
- "no-unsafe-negation": [
94
- ON,
95
- {
96
- enforceForOrderingRelations: true /* @default false */,
97
- },
98
- ] /* tsc */,
99
- "no-unsafe-optional-chaining": [
100
- ON,
101
- {
102
- disallowArithmeticOperators: true /* @default false */,
103
- },
104
- ],
105
- "no-unused-private-class-members": ON,
106
- "no-unused-vars": ON /* TSLint */,
107
- "no-use-before-define": [
108
- ON,
109
- {
110
- // functions: true,
111
- // classes: true,
112
- // variables: true,
113
- // allowNamedExports: false,
114
- // enums: true,
115
- typedefs: false /* changed 14.2.2 (still questionable) */,
116
- // ignoreTypeReferences: true,
117
- },
118
- ] /* TS-capable */,
119
- "no-useless-assignment": ON,
120
- "no-useless-backreference": ON,
121
- "require-atomic-updates": ON,
122
- "use-isnan": [
123
- ON,
124
- {
125
- // enforceForSwitchCase: true,
126
- enforceForIndexOf: true /* @default false */,
127
- },
128
- ],
129
- "valid-typeof": [
130
- ON,
131
- {
132
- requireStringLiterals: true /* @default false */,
133
- },
134
- ],
135
- // #endregion
136
-
137
- // #region SUGGESTIONS
138
- // [ https://eslint.org/docs/latest/rules/#suggestions ]
139
- "accessor-pairs": [
140
- ON,
141
- {
142
- // setWithoutGet: true,
143
- // getWithoutSet: false,
144
- // enforceForClassMembers: true,
145
- enforceForTSTypes: true /* @default false */,
146
- },
147
- ],
148
- "arrow-body-style": ON,
149
- "block-scoped-var": ON,
150
- // camelcase: OFF /* preference */,
151
- // "capitalized-comments": OFF /* preference */,
152
- // "class-methods-use-this": OFF /* TS-capable; (preference) */,
153
- // complexity: OFF /* preference */,
154
- "consistent-return": ON /* tsc -- TSLint:OFF: tsconfig: noImplicitReturns */,
155
- "consistent-this": ON,
156
- curly: [
157
- ON,
158
- multi /* multi | multi-line | multi-or-nest | consistent | @default all */,
159
- ],
160
- // "default-case": OFF /* preference: don't care */,
161
- "default-case-last": ON,
162
- "default-param-last": ON /* TS-capable */,
163
- "dot-notation": ON /* TSLint */,
164
- eqeqeq: ON,
165
- // "func-name-matching": OFF /* preference */,
166
- // "func-names": OFF /* preference */,
167
- // "func-style": OFF /* TS-capable BUT preference */,
168
- // "grouped-accessor-pairs": OFF /* preference -- BUG: requires adjacency, not as described in documentation */,
169
- // "guard-for-in": OFF /* preference - not helpful because using for-in on non-literal objects is bad practice and this rule doesn't guard against that anyway, while adding a pointless check to known object literals */,
170
- // "id-denylist": OFF /* preference */,
171
- // "id-length": OFF /* preference */,
172
- // "id-match": OFF /* preference */,
173
- "init-declarations": ON /* TS-capable */,
174
- "logical-assignment-operators": [
175
- ON,
176
- always /* never | @default always */,
177
- {
178
- enforceForIfStatements: true /* @default false */,
179
- },
180
- ],
181
- // "max-classes-per-file": OFF /* preference */,
182
- // "max-depth": OFF /* preference */,
183
- // "max-lines": OFF /* preference */,
184
- // "max-lines-per-function": OFF /* preference */,
185
- // "max-nested-callbacks": OFF /* preference */,
186
- // "max-params": OFF /* TS-capable BUT preference -- TSLint:OFF: preference */,
187
- // "max-statements": OFF /* preference */,
188
- // "multiline-comment-style": OFF /* preference */,
189
- // "new-cap": OFF /* preference -- breaks Scriptable */,
190
- "no-alert": ON,
191
- "no-array-constructor": ON /* TS-capable */,
192
- "no-bitwise": ON,
193
- "no-caller": ON,
194
- "no-case-declarations": ON,
195
- // "no-console": OFF /* preference -- breaks Node.js console applications and Scriptable, and otherwise unnecessarily hampers browser test code */,
196
- "no-continue": ON,
197
- "no-delete-var": ON,
198
- "no-div-regex": ON,
199
- // "no-else-return": OFF /* preference */,
200
- "no-empty": ON,
201
- "no-empty-function": [
202
- ON,
203
- {
204
- allow: [
205
- "constructors",
206
- "privateConstructors",
207
- "protectedConstructors",
208
- "decoratedFunctions",
209
- "overrideMethods",
210
- ] /* (functions | `${arrow|generator|async|TS:decorated}Functions` | methods | `${generator|async|TS:override}Methods` | `${g|s}etters` | constructors | TS:`${private|protected}Constructors`)[] | @default [] */,
211
- },
212
- ] /* TS-capable */,
213
- "no-empty-static-block": ON,
214
- "no-eq-null": ON,
215
- "no-eval": ON,
216
- "no-extend-native": ON,
217
- "no-extra-bind": ON,
218
- "no-extra-boolean-cast": [
219
- ON,
220
- {
221
- enforceForLogicalOperands: true /* @default false */,
222
- },
223
- ],
224
- "no-extra-label": ON,
225
- "no-global-assign": ON,
226
- "no-implicit-coercion": [
227
- ON,
228
- {
229
- // "boolean": true,
230
- // number: true,
231
- // string: true,
232
- disallowTemplateShorthand: true,
233
- // allow: [],
234
- },
235
- ],
236
- // "no-implicit-globals": OFF /* investigate (breaks Scriptable? breaks Sveltekit?) */,
237
- "no-implied-eval": ON /* TSLint */,
238
- // "no-inline-comments": OFF /* preference */,
239
- "no-invalid-this": [
240
- ON,
241
- {
242
- capIsConstructor: false /* @default true */,
243
- },
244
- ] /* TS-capable BUT tsc: TSLint:OFF: tsconfig: { strict, noImplicitThis } */,
245
- "no-iterator": ON,
246
- "no-label-var": ON,
247
- "no-lone-blocks": ON,
248
- // "no-lonely-if": OFF /* preference */,
249
- "no-loop-func": ON /* TS-capable */,
250
- // "no-magic-numbers": OFF /* TS-capable BUT preference - breaks TypeScript number literals, even with most liberal exceptions */,
251
- "no-multi-assign": ON,
252
- "no-multi-str": ON,
253
- // "no-negated-condition": OFF /* preference */,
254
- // "no-nested-ternary": OFF /* preference */,
255
- "no-new": ON,
256
- "no-new-func": ON,
257
- "no-new-wrappers": ON,
258
- "no-nonoctal-decimal-escape": ON,
259
- "no-object-constructor": ON,
260
- "no-octal": ON,
261
- "no-octal-escape": ON,
262
- "no-param-reassign": [
263
- ON,
264
- {
265
- props: true /* @default false */,
266
- // ignorePropertyModificationsFor: [],
267
- // ignorePropertyModificationsForRegex: [],
268
- },
269
- ],
270
- "no-plusplus": [
271
- ON,
272
- {
273
- allowForLoopAfterthoughts: true /* @default false */,
274
- },
275
- ],
276
- "no-proto": ON,
277
- // "no-redeclare": OFF /* tsc -- TSLint:OFF: tsc (let, const, -var) */,
278
- // "no-regex-spaces": OFF /* preference */,
279
- // "no-restricted-exports": OFF /* preference */,
280
- // "no-restricted-globals": OFF /* TS-capable BUT preference */,
281
- // "no-restricted-imports": OFF /* preference -- TSLint:OFF */,
282
- // "no-restricted-properties": OFF /* preference */,
283
- // "no-restricted-syntax": OFF /* preference */,
284
- // "no-return-assign": OFF /* "always" | "except-parens" (disallow assignments unless enclosed in parens) */,
285
- "no-script-url": ON,
286
- "no-sequences": ON,
287
- // "no-shadow": OFF /* TS-capable BUT investigate */,
288
- "no-shadow-restricted-names": ON,
289
- // "no-ternary": OFF /* preference */,
290
- "no-throw-literal": ON /* TSLint */,
291
- "no-undef-init": ON,
292
- // "no-undefined": OFF /* investigate (breaks Scriptable? breaks Sveltekit?) */,
293
- // "no-underscore-dangle": OFF /* preference */,
294
- "no-unneeded-ternary": ON,
295
- "no-unused-expressions": [
296
- ON,
297
- {
298
- allowShortCircuit: true /* @default false */,
299
- allowTernary: true /* @default false */,
300
- },
301
- ] /* TS-capable */,
302
- "no-unused-labels": ON,
303
- "no-useless-call": ON,
304
- "no-useless-catch": ON,
305
- "no-useless-computed-key": ON,
306
- "no-useless-concat": ON,
307
- "no-useless-constructor": ON /* TS-capable */,
308
- "no-useless-escape": [
309
- ON,
310
- {
311
- allowRegexCharacters: ["-"] /* why isn't this the default behavior? */,
312
- },
313
- ],
314
- "no-useless-rename": ON,
315
- "no-useless-return": ON,
316
- "no-var": ON /* TS-capable */,
317
- "no-void": [
318
- ON,
319
- {
320
- allowAsStatement: true /* @default false */,
321
- },
322
- ],
323
- // "no-warning-comments": OFF /* preference */,
324
- "no-with": ON,
325
- "object-shorthand": ON,
326
- "one-var": [
327
- ON,
328
- {
329
- "var": consecutive,
330
- let: consecutive,
331
- "const": consecutive,
332
- using: consecutive,
333
- awaitUsing: consecutive,
334
- separateRequires: true,
335
- },
336
- ],
337
- "operator-assignment": ON,
338
- "prefer-arrow-callback": ON /* TS-capable */,
339
- "prefer-const": [
340
- ON,
341
- {
342
- destructuring: all /* any | @default all */,
343
- },
344
- ],
345
- "prefer-destructuring": [
346
- ON,
347
- {
348
- AssignmentExpression: {
349
- array: false /* @default true */,
350
- object: false /* @default true */,
351
- },
352
- },
353
- ] /* TSLint */,
354
- "prefer-exponentiation-operator": ON,
355
- // "prefer-named-capture-group": OFF,
356
- "prefer-numeric-literals": ON,
357
- "prefer-object-has-own": ON,
358
- "prefer-object-spread": ON,
359
- "prefer-promise-reject-errors": ON,
360
- "prefer-regex-literals": [
361
- ON,
362
- {
363
- disallowRedundantWrapping: true /* @default false */,
364
- },
365
- ] /* TSLint */,
366
- "prefer-rest-params": ON,
367
- "prefer-spread": ON,
368
- // "prefer-template": OFF /* preference: performance */,
369
- radix: [
370
- ON,
371
- as_needed /* as-needed | @default always */,
372
- ],
373
- "require-await": ON /* TSLint */,
374
- "require-unicode-regexp": ON,
375
- "require-yield": ON,
376
- // "sort-imports": OFF /* preference */,
377
- // "sort-keys": OFF /* preference */,
378
- // "sort-vars": OFF /* preference */,
379
- // strict: OFF /* preference */,
380
- // "symbol-description": OFF /* preference */,
381
- "vars-on-top": ON,
382
- yoda: ON,
383
- // #endregion
384
-
385
- // #region FORMATTING
386
- // [ https://eslint.org/docs/latest/rules/#layout--formatting ]
387
- // "unicode-bom": OFF /* preference: don't care */,
388
- // #endregion
389
- } as const,
390
- };
1
+ import {
2
+ ID,
3
+ // OFF,
4
+ ON,
5
+ always,
6
+ as_needed,
7
+ consecutive,
8
+ all,
9
+ multi,
10
+ both,
11
+ } from "../_strings";
12
+
13
+ export const Enable = {
14
+ id: ID.Enable.Enable,
15
+ rules: {
16
+ // #region PROBLEMS
17
+ // DOC: https://eslint.org/docs/latest/rules/#possible-problems
18
+ "array-callback-return": [
19
+ ON,
20
+ {
21
+ // allowImplicit: false /* @default: false */,
22
+ checkForEach: true /* @default: false */,
23
+ allowVoid: true /* only works if checkForEach | @default: false */,
24
+ },
25
+ ],
26
+ "constructor-super": ON /* tsc */,
27
+ "for-direction": ON,
28
+ "getter-return": ON /* tsc */,
29
+ "no-async-promise-executor": ON,
30
+ "no-await-in-loop": ON,
31
+ "no-class-assign": ON,
32
+ "no-compare-neg-zero": ON,
33
+ "no-cond-assign": ON,
34
+ "no-const-assign": ON /* tsc */,
35
+ "no-constant-binary-expression": ON,
36
+ "no-constant-condition": [
37
+ ON,
38
+ {
39
+ checkLoops: all /* none === false | all === true | @default: allExceptWhileTrue */,
40
+ },
41
+ ] /* BUG: incorrect option description (claims "all" is ok): https://eslint.org/docs/latest/rules/no-constant-condition */,
42
+ "no-constructor-return": ON,
43
+ "no-control-regex": ON,
44
+ "no-debugger": ON,
45
+ "no-dupe-args": ON /* tsc */,
46
+ "no-dupe-class-members": ON /* TS-capable BUT tsc */,
47
+ "no-dupe-else-if": ON,
48
+ "no-dupe-keys": ON /* tsc */,
49
+ "no-duplicate-case": ON,
50
+ "no-duplicate-imports": [
51
+ ON,
52
+ {
53
+ includeExports: true /* @default false */,
54
+ allowSeparateTypeImports: true /* @default false */,
55
+ },
56
+ ],
57
+ "no-empty-character-class": ON,
58
+ "no-empty-pattern": ON,
59
+ "no-ex-assign": ON,
60
+ "no-fallthrough": ON,
61
+ "no-func-assign": ON /* tsc */,
62
+ "no-import-assign": ON /* tsc (except Object.assign()) */,
63
+ "no-inner-declarations": [
64
+ ON,
65
+ both /* both (function & var) | @default functions */,
66
+ ],
67
+ "no-invalid-regexp": ON,
68
+ "no-irregular-whitespace": ON,
69
+ "no-loss-of-precision": ON /* TS-capable, originally had TSLint rule but was deprecated */,
70
+ "no-misleading-character-class": ON,
71
+ "no-new-native-nonconstructor": ON,
72
+ "no-obj-calls": ON /* tsc */,
73
+ "no-promise-executor-return": [
74
+ ON,
75
+ {
76
+ allowVoid: true /* @default false */,
77
+ },
78
+ ],
79
+ "no-prototype-builtins": ON,
80
+ "no-self-assign": ON,
81
+ "no-self-compare": ON,
82
+ "no-setter-return": ON /* tsc */,
83
+ "no-sparse-arrays": ON,
84
+ "no-template-curly-in-string": ON,
85
+ "no-this-before-super": ON /* tsc */,
86
+ "no-unassigned-vars": ON,
87
+ "no-undef": ON /* tsc */,
88
+ "no-unexpected-multiline": ON,
89
+ "no-unmodified-loop-condition": ON,
90
+ "no-unreachable": ON /* tsc */,
91
+ "no-unreachable-loop": ON,
92
+ "no-unsafe-finally": ON,
93
+ "no-unsafe-negation": [
94
+ ON,
95
+ {
96
+ enforceForOrderingRelations: true /* @default false */,
97
+ },
98
+ ] /* tsc */,
99
+ "no-unsafe-optional-chaining": [
100
+ ON,
101
+ {
102
+ disallowArithmeticOperators: true /* @default false */,
103
+ },
104
+ ],
105
+ "no-unused-private-class-members": ON,
106
+ "no-unused-vars": ON /* TSLint */,
107
+ "no-use-before-define": [
108
+ ON,
109
+ {
110
+ // functions: true,
111
+ // classes: true,
112
+ // variables: true,
113
+ // allowNamedExports: false,
114
+ // enums: true,
115
+ typedefs: false /* changed 14.2.2 (still questionable) */,
116
+ // ignoreTypeReferences: true,
117
+ },
118
+ ] /* TS-capable */,
119
+ "no-useless-assignment": ON,
120
+ "no-useless-backreference": ON,
121
+ "require-atomic-updates": ON,
122
+ "use-isnan": [
123
+ ON,
124
+ {
125
+ // enforceForSwitchCase: true,
126
+ enforceForIndexOf: true /* @default false */,
127
+ },
128
+ ],
129
+ "valid-typeof": [
130
+ ON,
131
+ {
132
+ requireStringLiterals: true /* @default false */,
133
+ },
134
+ ],
135
+ // #endregion
136
+
137
+ // #region SUGGESTIONS
138
+ // [ https://eslint.org/docs/latest/rules/#suggestions ]
139
+ "accessor-pairs": [
140
+ ON,
141
+ {
142
+ // setWithoutGet: true,
143
+ // getWithoutSet: false,
144
+ // enforceForClassMembers: true,
145
+ enforceForTSTypes: true /* @default false */,
146
+ },
147
+ ],
148
+ "arrow-body-style": ON,
149
+ "block-scoped-var": ON,
150
+ // camelcase: OFF /* preference */,
151
+ // "capitalized-comments": OFF /* preference */,
152
+ // "class-methods-use-this": OFF /* TS-capable; (preference) */,
153
+ // complexity: OFF /* preference */,
154
+ "consistent-return": ON /* tsc -- TSLint:OFF: tsconfig: noImplicitReturns */,
155
+ "consistent-this": ON,
156
+ curly: [
157
+ ON,
158
+ multi /* multi | multi-line | multi-or-nest | consistent | @default all */,
159
+ ],
160
+ // "default-case": OFF /* preference: don't care */,
161
+ "default-case-last": ON,
162
+ "default-param-last": ON /* TS-capable */,
163
+ "dot-notation": ON /* TSLint */,
164
+ eqeqeq: ON,
165
+ // "func-name-matching": OFF /* preference */,
166
+ // "func-names": OFF /* preference */,
167
+ // "func-style": OFF /* TS-capable BUT preference */,
168
+ // "grouped-accessor-pairs": OFF /* preference -- BUG: requires adjacency, not as described in documentation */,
169
+ // "guard-for-in": OFF /* preference - not helpful because using for-in on non-literal objects is bad practice and this rule doesn't guard against that anyway, while adding a pointless check to known object literals */,
170
+ // "id-denylist": OFF /* preference */,
171
+ // "id-length": OFF /* preference */,
172
+ // "id-match": OFF /* preference */,
173
+ "init-declarations": ON /* TS-capable */,
174
+ "logical-assignment-operators": [
175
+ ON,
176
+ always /* never | @default always */,
177
+ {
178
+ enforceForIfStatements: true /* @default false */,
179
+ },
180
+ ],
181
+ // "max-classes-per-file": OFF /* preference */,
182
+ // "max-depth": OFF /* preference */,
183
+ // "max-lines": OFF /* preference */,
184
+ // "max-lines-per-function": OFF /* preference */,
185
+ // "max-nested-callbacks": OFF /* preference */,
186
+ // "max-params": OFF /* TS-capable BUT preference -- TSLint:OFF: preference */,
187
+ // "max-statements": OFF /* preference */,
188
+ // "multiline-comment-style": OFF /* preference */,
189
+ // "new-cap": OFF /* preference -- breaks Scriptable */,
190
+ "no-alert": ON,
191
+ "no-array-constructor": ON /* TS-capable */,
192
+ "no-bitwise": ON,
193
+ "no-caller": ON,
194
+ "no-case-declarations": ON,
195
+ // "no-console": OFF /* preference -- breaks Node.js console applications and Scriptable, and otherwise unnecessarily hampers browser test code */,
196
+ "no-continue": ON,
197
+ "no-delete-var": ON,
198
+ "no-div-regex": ON,
199
+ // "no-else-return": OFF /* preference */,
200
+ "no-empty": ON,
201
+ "no-empty-function": [
202
+ ON,
203
+ {
204
+ allow: [
205
+ "constructors",
206
+ "privateConstructors",
207
+ "protectedConstructors",
208
+ "decoratedFunctions",
209
+ "overrideMethods",
210
+ ] /* (functions | `${arrow|generator|async|TS:decorated}Functions` | methods | `${generator|async|TS:override}Methods` | `${g|s}etters` | constructors | TS:`${private|protected}Constructors`)[] | @default [] */,
211
+ },
212
+ ] /* TS-capable */,
213
+ "no-empty-static-block": ON,
214
+ "no-eq-null": ON,
215
+ "no-eval": ON,
216
+ "no-extend-native": ON,
217
+ "no-extra-bind": ON,
218
+ "no-extra-boolean-cast": [
219
+ ON,
220
+ {
221
+ enforceForLogicalOperands: true /* @default false */,
222
+ },
223
+ ],
224
+ "no-extra-label": ON,
225
+ "no-global-assign": ON,
226
+ "no-implicit-coercion": [
227
+ ON,
228
+ {
229
+ // "boolean": true,
230
+ // number: true,
231
+ // string: true,
232
+ disallowTemplateShorthand: true,
233
+ // allow: [],
234
+ },
235
+ ],
236
+ // "no-implicit-globals": OFF /* investigate (breaks Scriptable? breaks Sveltekit?) */,
237
+ "no-implied-eval": ON /* TSLint */,
238
+ // "no-inline-comments": OFF /* preference */,
239
+ "no-invalid-this": [
240
+ ON,
241
+ {
242
+ capIsConstructor: false /* @default true */,
243
+ },
244
+ ] /* TS-capable BUT tsc: TSLint:OFF: tsconfig: { strict, noImplicitThis } */,
245
+ "no-iterator": ON,
246
+ "no-label-var": ON,
247
+ "no-lone-blocks": ON,
248
+ // "no-lonely-if": OFF /* preference */,
249
+ "no-loop-func": ON /* TS-capable */,
250
+ // "no-magic-numbers": OFF /* TS-capable BUT preference - breaks TypeScript number literals, even with most liberal exceptions */,
251
+ "no-multi-assign": ON,
252
+ "no-multi-str": ON,
253
+ // "no-negated-condition": OFF /* preference */,
254
+ // "no-nested-ternary": OFF /* preference */,
255
+ "no-new": ON,
256
+ "no-new-func": ON,
257
+ "no-new-wrappers": ON,
258
+ "no-nonoctal-decimal-escape": ON,
259
+ "no-object-constructor": ON,
260
+ "no-octal": ON,
261
+ "no-octal-escape": ON,
262
+ "no-param-reassign": [
263
+ ON,
264
+ {
265
+ props: true /* @default false */,
266
+ // ignorePropertyModificationsFor: [],
267
+ // ignorePropertyModificationsForRegex: [],
268
+ },
269
+ ],
270
+ "no-plusplus": [
271
+ ON,
272
+ {
273
+ allowForLoopAfterthoughts: true /* @default false */,
274
+ },
275
+ ],
276
+ "no-proto": ON,
277
+ // "no-redeclare": OFF /* tsc -- TSLint:OFF: tsc (let, const, -var) */,
278
+ // "no-regex-spaces": OFF /* preference */,
279
+ // "no-restricted-exports": OFF /* preference */,
280
+ // "no-restricted-globals": OFF /* TS-capable BUT preference */,
281
+ // "no-restricted-imports": OFF /* preference -- TSLint:OFF */,
282
+ // "no-restricted-properties": OFF /* preference */,
283
+ // "no-restricted-syntax": OFF /* preference */,
284
+ // "no-return-assign": OFF /* "always" | "except-parens" (disallow assignments unless enclosed in parens) */,
285
+ "no-script-url": ON,
286
+ "no-sequences": ON,
287
+ // "no-shadow": OFF /* TS-capable BUT investigate */,
288
+ "no-shadow-restricted-names": ON,
289
+ // "no-ternary": OFF /* preference */,
290
+ "no-throw-literal": ON /* TSLint */,
291
+ "no-undef-init": ON,
292
+ // "no-undefined": OFF /* investigate (breaks Scriptable? breaks Sveltekit?) */,
293
+ // "no-underscore-dangle": OFF /* preference */,
294
+ "no-unneeded-ternary": ON,
295
+ "no-unused-expressions": [
296
+ ON,
297
+ {
298
+ allowShortCircuit: true /* @default false */,
299
+ allowTernary: true /* @default false */,
300
+ },
301
+ ] /* TS-capable */,
302
+ "no-unused-labels": ON,
303
+ "no-useless-call": ON,
304
+ "no-useless-catch": ON,
305
+ "no-useless-computed-key": ON,
306
+ "no-useless-concat": ON,
307
+ "no-useless-constructor": ON /* TS-capable */,
308
+ "no-useless-escape": [
309
+ ON,
310
+ {
311
+ allowRegexCharacters: ["-"] /* why isn't this the default behavior? */,
312
+ },
313
+ ],
314
+ "no-useless-rename": ON,
315
+ "no-useless-return": ON,
316
+ "no-var": ON /* TS-capable */,
317
+ "no-void": [
318
+ ON,
319
+ {
320
+ allowAsStatement: true /* @default false */,
321
+ },
322
+ ],
323
+ // "no-warning-comments": OFF /* preference */,
324
+ "no-with": ON,
325
+ "object-shorthand": ON,
326
+ "one-var": [
327
+ ON,
328
+ {
329
+ "var": consecutive,
330
+ let: consecutive,
331
+ "const": consecutive,
332
+ using: consecutive,
333
+ awaitUsing: consecutive,
334
+ separateRequires: true,
335
+ },
336
+ ],
337
+ "operator-assignment": ON,
338
+ "prefer-arrow-callback": ON /* TS-capable */,
339
+ "prefer-const": [
340
+ ON,
341
+ {
342
+ destructuring: all /* any | @default all */,
343
+ },
344
+ ],
345
+ "prefer-destructuring": [
346
+ ON,
347
+ {
348
+ AssignmentExpression: {
349
+ array: false /* @default true */,
350
+ object: false /* @default true */,
351
+ },
352
+ },
353
+ ] /* TSLint */,
354
+ "prefer-exponentiation-operator": ON,
355
+ // "prefer-named-capture-group": OFF,
356
+ "prefer-numeric-literals": ON,
357
+ "prefer-object-has-own": ON,
358
+ "prefer-object-spread": ON,
359
+ "prefer-promise-reject-errors": ON,
360
+ "prefer-regex-literals": [
361
+ ON,
362
+ {
363
+ disallowRedundantWrapping: true /* @default false */,
364
+ },
365
+ ] /* TSLint */,
366
+ "prefer-rest-params": ON,
367
+ "prefer-spread": ON,
368
+ // "prefer-template": OFF /* preference: performance */,
369
+ radix: [
370
+ ON,
371
+ as_needed /* as-needed | @default always */,
372
+ ],
373
+ "require-await": ON /* TSLint */,
374
+ "require-unicode-regexp": ON,
375
+ "require-yield": ON,
376
+ // "sort-imports": OFF /* preference */,
377
+ // "sort-keys": OFF /* preference */,
378
+ // "sort-vars": OFF /* preference */,
379
+ // strict: OFF /* preference */,
380
+ // "symbol-description": OFF /* preference */,
381
+ "vars-on-top": ON,
382
+ yoda: ON,
383
+ // #endregion
384
+
385
+ // #region FORMATTING
386
+ // [ https://eslint.org/docs/latest/rules/#layout--formatting ]
387
+ // "unicode-bom": OFF /* preference: don't care */,
388
+ // #endregion
389
+ } as const,
390
+ };