linted 16.3.2 → 16.3.3
Sign up to get free protection for your applications and to get access to all the features.
- package/.github/workflows/RELEASE.yml +35 -0
- package/.github/workflows/rc.yml +35 -0
- package/LICENSE +21 -21
- package/README.md +388 -388
- package/SECURITY.md +9 -9
- package/dist/imports/plugins/index.d.ts.map +1 -1
- package/eslint.config.js +3 -3
- package/package.json +99 -99
- package/src/declarations/markdownlint/index.d.ts +3 -3
- package/src/declarations/markdownlint/parser.d.ts +9 -9
- package/src/declarations/mocha/index.d.ts +8 -8
- package/src/imports/index.ts +4 -4
- package/src/imports/parsers/index.ts +16 -16
- package/src/imports/plugins/index.ts +20 -20
- package/src/index.ts +34 -34
- package/src/statics/files/html/index.ts +1 -1
- package/src/statics/files/index.ts +22 -22
- package/src/statics/files/js/index.ts +1 -1
- package/src/statics/files/json/index.ts +1 -1
- package/src/statics/files/jsonc/index.ts +4 -4
- package/src/statics/files/md/index.ts +1 -1
- package/src/statics/files/mocha/index.ts +1 -1
- package/src/statics/files/svelte/index.ts +1 -1
- package/src/statics/files/ts/index.ts +5 -5
- package/src/statics/files/yml/index.ts +5 -5
- package/src/statics/index.ts +4 -4
- package/src/statics/rules/index.ts +22 -22
- package/src/statics/rules/presets/Html.ts +5 -5
- package/src/statics/rules/presets/Js.ts +5 -5
- package/src/statics/rules/presets/Json.ts +5 -5
- package/src/statics/rules/presets/Jsonc.ts +5 -5
- package/src/statics/rules/presets/Md.ts +4 -4
- package/src/statics/rules/presets/Mocha.ts +5 -5
- package/src/statics/rules/presets/Svelte.ts +16 -16
- package/src/statics/rules/presets/Ts.ts +14 -14
- package/src/statics/rules/presets/Yml.ts +5 -5
- package/src/statics/rules/presets/html/Enable.ts +5 -5
- package/src/statics/rules/presets/html/Recommended.ts +7 -7
- package/src/statics/rules/presets/index.ts +10 -10
- package/src/statics/rules/presets/js/Enable.ts +288 -288
- package/src/statics/rules/presets/js/EnableStylistic.ts +288 -288
- package/src/statics/rules/presets/json/Enable.ts +33 -33
- package/src/statics/rules/presets/json/EnableX.ts +51 -51
- package/src/statics/rules/presets/jsonc/OverrideJson.ts +6 -6
- package/src/statics/rules/presets/md/Enable.ts +23 -23
- package/src/statics/rules/presets/mocha/Enable.ts +5 -5
- package/src/statics/rules/presets/mocha/Recommended.ts +7 -7
- package/src/statics/rules/presets/svelte/DisableJS.ts +7 -7
- package/src/statics/rules/presets/svelte/DisableTS.ts +5 -5
- package/src/statics/rules/presets/svelte/DisableX.ts +6 -6
- package/src/statics/rules/presets/svelte/Enable.ts +130 -130
- package/src/statics/rules/presets/svelte/EnableX.ts +6 -6
- package/src/statics/rules/presets/ts/DisableCompiler.ts +23 -23
- package/src/statics/rules/presets/ts/DisableX.ts +34 -34
- package/src/statics/rules/presets/ts/Enable.ts +407 -407
- package/src/statics/rules/presets/ts/EnableX.ts +87 -87
- package/src/statics/rules/presets/yml/Enable.ts +30 -30
- package/src/statics/rules/presets/yml/EnableX.ts +18 -18
- package/src/statics/rules/strings/id/index.ts +17 -17
- package/src/statics/rules/strings/index.ts +6 -6
- package/src/statics/rules/strings/level/index.ts +5 -5
- package/src/statics/rules/strings/state/index.ts +55 -55
- package/tsconfig.json +160 -160
@@ -1,407 +1,407 @@
|
|
1
|
-
import { Strings, type RuleEntry } from "../index.js";
|
2
|
-
|
3
|
-
const {
|
4
|
-
Id: { Enable },
|
5
|
-
Level: { ERROR, OFF },
|
6
|
-
State: { NEVER, EXPLICIT },
|
7
|
-
} = Strings;
|
8
|
-
|
9
|
-
export default [
|
10
|
-
Enable,
|
11
|
-
{
|
12
|
-
// https://typescript-eslint.io/rules/?=xextension-xdeprecated#rules ]
|
13
|
-
"@typescript-eslint/adjacent-overload-signatures": OFF,
|
14
|
-
"@typescript-eslint/array-type": [ERROR, { "default": "array", readonly: "array" }],
|
15
|
-
"@typescript-eslint/await-thenable": ERROR,
|
16
|
-
"@typescript-eslint/ban-ts-comment": [
|
17
|
-
ERROR,
|
18
|
-
{
|
19
|
-
"ts-check": false,
|
20
|
-
"ts-expect-error": { descriptionFormat: "^: BUG: .+$" },
|
21
|
-
"ts-ignore": true,
|
22
|
-
"ts-nocheck": true,
|
23
|
-
minimumDescriptionLength: 32,
|
24
|
-
},
|
25
|
-
],
|
26
|
-
"@typescript-eslint/ban-tslint-comment": ERROR,
|
27
|
-
"@typescript-eslint/class-literal-property-style": [ERROR, "fields"],
|
28
|
-
"@typescript-eslint/consistent-generic-constructors": [ERROR, "constructor"],
|
29
|
-
"@typescript-eslint/consistent-indexed-object-style": [ERROR, "record"],
|
30
|
-
"@typescript-eslint/consistent-type-assertions": [ERROR, { assertionStyle: "as", objectLiteralTypeAssertions: NEVER }],
|
31
|
-
"@typescript-eslint/consistent-type-definitions": OFF,
|
32
|
-
"@typescript-eslint/consistent-type-exports": [ERROR, { fixMixedExportsWithInlineTypeSpecifier: false }],
|
33
|
-
"@typescript-eslint/consistent-type-imports": [ERROR, { disallowTypeAnnotations: true, fixStyle: "separate-type-imports", prefer: "type-imports" }],
|
34
|
-
"@typescript-eslint/explicit-function-return-type": OFF,
|
35
|
-
"@typescript-eslint/explicit-member-accessibility": [
|
36
|
-
ERROR,
|
37
|
-
{
|
38
|
-
accessibility: EXPLICIT,
|
39
|
-
ignoredMethodNames: [],
|
40
|
-
overrides: {
|
41
|
-
properties: EXPLICIT,
|
42
|
-
constructors: "no-public",
|
43
|
-
accessors: EXPLICIT,
|
44
|
-
methods: EXPLICIT,
|
45
|
-
parameterProperties: EXPLICIT,
|
46
|
-
},
|
47
|
-
},
|
48
|
-
],
|
49
|
-
"@typescript-eslint/explicit-module-boundary-types": OFF,
|
50
|
-
"@typescript-eslint/member-ordering": [
|
51
|
-
ERROR,
|
52
|
-
{
|
53
|
-
"default": {
|
54
|
-
memberTypes: [
|
55
|
-
// Index signature
|
56
|
-
"signature",
|
57
|
-
"call-signature",
|
58
|
-
|
59
|
-
// Fields
|
60
|
-
"public-static-field",
|
61
|
-
"protected-static-field",
|
62
|
-
"private-static-field",
|
63
|
-
"#private-static-field",
|
64
|
-
|
65
|
-
"public-decorated-field",
|
66
|
-
"protected-decorated-field",
|
67
|
-
"private-decorated-field",
|
68
|
-
|
69
|
-
"public-instance-field",
|
70
|
-
"protected-instance-field",
|
71
|
-
"private-instance-field",
|
72
|
-
"#private-instance-field",
|
73
|
-
|
74
|
-
"public-abstract-field",
|
75
|
-
"protected-abstract-field",
|
76
|
-
|
77
|
-
"public-field",
|
78
|
-
"protected-field",
|
79
|
-
"private-field",
|
80
|
-
"#private-field",
|
81
|
-
|
82
|
-
"static-field",
|
83
|
-
"instance-field",
|
84
|
-
"abstract-field",
|
85
|
-
"decorated-field",
|
86
|
-
"field",
|
87
|
-
|
88
|
-
// Static initialization
|
89
|
-
"static-initialization",
|
90
|
-
|
91
|
-
// Constructors
|
92
|
-
"public-constructor",
|
93
|
-
"protected-constructor",
|
94
|
-
"private-constructor",
|
95
|
-
"constructor",
|
96
|
-
|
97
|
-
// Accessors
|
98
|
-
"public-static-accessor",
|
99
|
-
"protected-static-accessor",
|
100
|
-
"private-static-accessor",
|
101
|
-
"#private-static-accessor",
|
102
|
-
|
103
|
-
"public-decorated-accessor",
|
104
|
-
"protected-decorated-accessor",
|
105
|
-
"private-decorated-accessor",
|
106
|
-
|
107
|
-
"public-instance-accessor",
|
108
|
-
"protected-instance-accessor",
|
109
|
-
"private-instance-accessor",
|
110
|
-
"#private-instance-accessor",
|
111
|
-
|
112
|
-
"public-abstract-accessor",
|
113
|
-
"protected-abstract-accessor",
|
114
|
-
|
115
|
-
"public-accessor",
|
116
|
-
"protected-accessor",
|
117
|
-
"private-accessor",
|
118
|
-
"#private-accessor",
|
119
|
-
|
120
|
-
"static-accessor",
|
121
|
-
"instance-accessor",
|
122
|
-
"abstract-accessor",
|
123
|
-
"decorated-accessor",
|
124
|
-
"accessor",
|
125
|
-
|
126
|
-
// Getters
|
127
|
-
"public-static-get",
|
128
|
-
"protected-static-get",
|
129
|
-
"private-static-get",
|
130
|
-
"#private-static-get",
|
131
|
-
|
132
|
-
"public-decorated-get",
|
133
|
-
"protected-decorated-get",
|
134
|
-
"private-decorated-get",
|
135
|
-
|
136
|
-
"public-instance-get",
|
137
|
-
"protected-instance-get",
|
138
|
-
"private-instance-get",
|
139
|
-
"#private-instance-get",
|
140
|
-
|
141
|
-
"public-abstract-get",
|
142
|
-
"protected-abstract-get",
|
143
|
-
|
144
|
-
"public-get",
|
145
|
-
"protected-get",
|
146
|
-
"private-get",
|
147
|
-
"#private-get",
|
148
|
-
|
149
|
-
"static-get",
|
150
|
-
"instance-get",
|
151
|
-
"abstract-get",
|
152
|
-
"decorated-get",
|
153
|
-
"get",
|
154
|
-
|
155
|
-
// Setters
|
156
|
-
"public-static-set",
|
157
|
-
"protected-static-set",
|
158
|
-
"private-static-set",
|
159
|
-
"#private-static-set",
|
160
|
-
|
161
|
-
"public-decorated-set",
|
162
|
-
"protected-decorated-set",
|
163
|
-
"private-decorated-set",
|
164
|
-
|
165
|
-
"public-instance-set",
|
166
|
-
"protected-instance-set",
|
167
|
-
"private-instance-set",
|
168
|
-
"#private-instance-set",
|
169
|
-
|
170
|
-
"public-abstract-set",
|
171
|
-
"protected-abstract-set",
|
172
|
-
|
173
|
-
"public-set",
|
174
|
-
"protected-set",
|
175
|
-
"private-set",
|
176
|
-
"#private-set",
|
177
|
-
|
178
|
-
"static-set",
|
179
|
-
"instance-set",
|
180
|
-
"abstract-set",
|
181
|
-
"decorated-set",
|
182
|
-
"set",
|
183
|
-
|
184
|
-
// Methods
|
185
|
-
"public-static-method",
|
186
|
-
"protected-static-method",
|
187
|
-
"private-static-method",
|
188
|
-
"#private-static-method",
|
189
|
-
|
190
|
-
"public-decorated-method",
|
191
|
-
"protected-decorated-method",
|
192
|
-
"private-decorated-method",
|
193
|
-
|
194
|
-
"public-instance-method",
|
195
|
-
"protected-instance-method",
|
196
|
-
"private-instance-method",
|
197
|
-
"#private-instance-method",
|
198
|
-
|
199
|
-
"public-abstract-method",
|
200
|
-
"protected-abstract-method",
|
201
|
-
|
202
|
-
"public-method",
|
203
|
-
"protected-method",
|
204
|
-
"private-method",
|
205
|
-
"#private-method",
|
206
|
-
|
207
|
-
"static-method",
|
208
|
-
"instance-method",
|
209
|
-
"abstract-method",
|
210
|
-
"decorated-method",
|
211
|
-
"method",
|
212
|
-
],
|
213
|
-
optionalityOrder: "required-first",
|
214
|
-
order: "as-written",
|
215
|
-
},
|
216
|
-
|
217
|
-
},
|
218
|
-
],
|
219
|
-
"@typescript-eslint/method-signature-style": [ERROR, "property"],
|
220
|
-
"@typescript-eslint/naming-convention": OFF,
|
221
|
-
"@typescript-eslint/no-array-delete": ERROR,
|
222
|
-
"@typescript-eslint/no-base-to-string": [
|
223
|
-
ERROR,
|
224
|
-
{
|
225
|
-
ignoredTypeNames: [
|
226
|
-
"Error",
|
227
|
-
"RegExp",
|
228
|
-
"URL",
|
229
|
-
"URLSearchParams",
|
230
|
-
],
|
231
|
-
},
|
232
|
-
],
|
233
|
-
"@typescript-eslint/no-confusing-non-null-assertion": ERROR,
|
234
|
-
"@typescript-eslint/no-confusing-void-expression": [ERROR, { ignoreArrowShorthand: true, ignoreVoidOperator: true }],
|
235
|
-
"@typescript-eslint/no-duplicate-enum-values": ERROR,
|
236
|
-
"@typescript-eslint/no-duplicate-type-constituents": [ERROR, { ignoreIntersections: false, ignoreUnions: false }],
|
237
|
-
"@typescript-eslint/no-dynamic-delete": ERROR,
|
238
|
-
"@typescript-eslint/no-empty-object-type": [
|
239
|
-
ERROR,
|
240
|
-
{
|
241
|
-
// allowWithName: /regex/,
|
242
|
-
allowInterfaces: NEVER,
|
243
|
-
allowObjectTypes: NEVER,
|
244
|
-
},
|
245
|
-
],
|
246
|
-
"@typescript-eslint/no-explicit-any": [ERROR, { fixToUnknown: true, ignoreRestArgs: false }],
|
247
|
-
"@typescript-eslint/no-extra-non-null-assertion": ERROR,
|
248
|
-
"@typescript-eslint/no-extraneous-class": [
|
249
|
-
ERROR,
|
250
|
-
{
|
251
|
-
allowConstructorOnly: false,
|
252
|
-
allowEmpty: true,
|
253
|
-
allowStaticOnly: false,
|
254
|
-
allowWithDecorator: false,
|
255
|
-
},
|
256
|
-
],
|
257
|
-
"@typescript-eslint/no-floating-promises": [ERROR, { checkThenables: true, ignoreVoid: true, ignoreIIFE: false }],
|
258
|
-
"@typescript-eslint/no-for-in-array": ERROR,
|
259
|
-
"@typescript-eslint/no-import-type-side-effects": ERROR,
|
260
|
-
"@typescript-eslint/no-inferrable-types": [ERROR, { ignoreParameters: false, ignoreProperties: false }],
|
261
|
-
"@typescript-eslint/no-invalid-void-type": [ERROR, { allowInGenericTypeArguments: true, allowAsThisParameter: false }],
|
262
|
-
"@typescript-eslint/no-meaningless-void-operator": [ERROR, { checkNever: true }],
|
263
|
-
"@typescript-eslint/no-misused-new": ERROR,
|
264
|
-
"@typescript-eslint/no-misused-promises": [
|
265
|
-
ERROR,
|
266
|
-
{
|
267
|
-
checksConditionals: true,
|
268
|
-
checksSpreads: true,
|
269
|
-
checksVoidReturn: {
|
270
|
-
arguments: true,
|
271
|
-
attributes: true,
|
272
|
-
properties: true,
|
273
|
-
returns: true,
|
274
|
-
variables: true,
|
275
|
-
},
|
276
|
-
},
|
277
|
-
],
|
278
|
-
"@typescript-eslint/no-mixed-enums": ERROR,
|
279
|
-
"@typescript-eslint/no-namespace": OFF,
|
280
|
-
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": ERROR,
|
281
|
-
"@typescript-eslint/no-non-null-asserted-optional-chain": ERROR,
|
282
|
-
"@typescript-eslint/no-non-null-assertion": ERROR,
|
283
|
-
"@typescript-eslint/no-redundant-type-constituents": ERROR,
|
284
|
-
"@typescript-eslint/no-restricted-types": OFF, /* preference - no shared custom types across all projects that I wish to ban*/
|
285
|
-
"@typescript-eslint/no-require-imports": [ERROR, { allow: [] }],
|
286
|
-
"@typescript-eslint/no-this-alias": [ERROR, { allowDestructuring: true, allowedNames: [] }],
|
287
|
-
"@typescript-eslint/no-unnecessary-boolean-literal-compare": [ERROR, { allowComparingNullableBooleansToTrue: true, allowComparingNullableBooleansToFalse: true }],
|
288
|
-
"@typescript-eslint/no-unnecessary-condition": [ERROR, { allowConstantLoopConditions: false, allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false }],
|
289
|
-
"@typescript-eslint/no-unnecessary-qualifier": ERROR,
|
290
|
-
"@typescript-eslint/no-unnecessary-template-expression": ERROR,
|
291
|
-
"@typescript-eslint/no-unnecessary-type-arguments": ERROR,
|
292
|
-
"@typescript-eslint/no-unnecessary-type-assertion": [ERROR, { typesToIgnore: [] }],
|
293
|
-
"@typescript-eslint/no-unnecessary-type-constraint": ERROR,
|
294
|
-
"@typescript-eslint/no-unnecessary-type-parameters": ERROR,
|
295
|
-
"@typescript-eslint/no-unsafe-argument": ERROR,
|
296
|
-
"@typescript-eslint/no-unsafe-assignment": ERROR,
|
297
|
-
"@typescript-eslint/no-unsafe-call": ERROR,
|
298
|
-
"@typescript-eslint/no-unsafe-declaration-merging": ERROR,
|
299
|
-
"@typescript-eslint/no-unsafe-enum-comparison": ERROR,
|
300
|
-
"@typescript-eslint/no-unsafe-function-type": ERROR,
|
301
|
-
"@typescript-eslint/no-unsafe-member-access": ERROR,
|
302
|
-
"@typescript-eslint/no-unsafe-return": ERROR,
|
303
|
-
"@typescript-eslint/no-unsafe-unary-minus": ERROR,
|
304
|
-
"@typescript-eslint/no-useless-empty-export": ERROR,
|
305
|
-
"@typescript-eslint/no-wrapper-object-types": ERROR,
|
306
|
-
"@typescript-eslint/non-nullable-type-assertion-style": OFF,
|
307
|
-
"@typescript-eslint/parameter-properties": [ERROR, { prefer: "parameter-property" /* "parameter-property" | "class-property" */ }],
|
308
|
-
"@typescript-eslint/prefer-as-const": ERROR,
|
309
|
-
"@typescript-eslint/prefer-enum-initializers": ERROR,
|
310
|
-
"@typescript-eslint/prefer-find": ERROR,
|
311
|
-
"@typescript-eslint/prefer-for-of": ERROR,
|
312
|
-
"@typescript-eslint/prefer-function-type": ERROR,
|
313
|
-
"@typescript-eslint/prefer-includes": ERROR,
|
314
|
-
"@typescript-eslint/prefer-literal-enum-member": [ERROR, { allowBitwiseExpressions: false }],
|
315
|
-
"@typescript-eslint/prefer-namespace-keyword": ERROR,
|
316
|
-
"@typescript-eslint/prefer-nullish-coalescing": [
|
317
|
-
ERROR,
|
318
|
-
{
|
319
|
-
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
|
320
|
-
ignoreConditionalTests: false,
|
321
|
-
ignoreTernaryTests: false,
|
322
|
-
ignoreMixedLogicalExpressions: false,
|
323
|
-
ignorePrimitives: {
|
324
|
-
bigint: false,
|
325
|
-
"boolean": false,
|
326
|
-
number: false,
|
327
|
-
string: false,
|
328
|
-
},
|
329
|
-
},
|
330
|
-
], /* requires tsconfig: strictNullChecks */
|
331
|
-
"@typescript-eslint/prefer-optional-chain": [
|
332
|
-
ERROR,
|
333
|
-
{
|
334
|
-
allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: false,
|
335
|
-
checkAny: true,
|
336
|
-
checkBigInt: true,
|
337
|
-
checkBoolean: true,
|
338
|
-
checkNumber: true,
|
339
|
-
checkString: true,
|
340
|
-
checkUnknown: true,
|
341
|
-
requireNullish: false,
|
342
|
-
},
|
343
|
-
],
|
344
|
-
"@typescript-eslint/prefer-readonly": [ERROR, { onlyInlineLambdas: false }],
|
345
|
-
"@typescript-eslint/prefer-readonly-parameter-types": OFF, /* preference - WAY too restrictive */
|
346
|
-
"@typescript-eslint/prefer-reduce-type-parameter": ERROR,
|
347
|
-
"@typescript-eslint/prefer-regexp-exec": ERROR,
|
348
|
-
"@typescript-eslint/prefer-return-this-type": ERROR,
|
349
|
-
"@typescript-eslint/prefer-string-starts-ends-with": [ERROR, { allowSingleElementEquality: NEVER }],
|
350
|
-
"@typescript-eslint/promise-function-async": [
|
351
|
-
ERROR,
|
352
|
-
{
|
353
|
-
allowAny: false,
|
354
|
-
allowedPromiseNames: [],
|
355
|
-
checkArrowFunctions: true,
|
356
|
-
checkFunctionDeclarations: true,
|
357
|
-
checkFunctionExpressions: true,
|
358
|
-
checkMethodDeclarations: true,
|
359
|
-
},
|
360
|
-
],
|
361
|
-
"@typescript-eslint/require-array-sort-compare": [ERROR, { ignoreStringArrays: true }],
|
362
|
-
"@typescript-eslint/restrict-plus-operands": [
|
363
|
-
ERROR,
|
364
|
-
{
|
365
|
-
allowAny: false,
|
366
|
-
allowBoolean: false,
|
367
|
-
allowNullish: false,
|
368
|
-
allowNumberAndString: false,
|
369
|
-
allowRegExp: false,
|
370
|
-
skipCompoundAssignments: false,
|
371
|
-
},
|
372
|
-
],
|
373
|
-
"@typescript-eslint/restrict-template-expressions": [
|
374
|
-
ERROR,
|
375
|
-
{
|
376
|
-
allowAny: true,
|
377
|
-
allowArray: true,
|
378
|
-
allowBoolean: true,
|
379
|
-
allowNullish: false,
|
380
|
-
allowNumber: true,
|
381
|
-
allowNever: false,
|
382
|
-
allowRegExp: false,
|
383
|
-
}, /* investigate: make stricter */
|
384
|
-
],
|
385
|
-
"@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 */
|
386
|
-
"@typescript-eslint/strict-boolean-expressions": [
|
387
|
-
ERROR,
|
388
|
-
{
|
389
|
-
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
|
390
|
-
allowAny: false,
|
391
|
-
allowNumber: true,
|
392
|
-
allowString: false,
|
393
|
-
allowNullableBoolean: false,
|
394
|
-
allowNullableEnum: false,
|
395
|
-
allowNullableNumber: false,
|
396
|
-
allowNullableObject: false,
|
397
|
-
allowNullableString: false,
|
398
|
-
},
|
399
|
-
], /* requires tsconfig: strictNullChecks */
|
400
|
-
"@typescript-eslint/switch-exhaustiveness-check": [ERROR, { allowDefaultCaseForExhaustiveSwitch: false, requireDefaultForNonUnion: true }],
|
401
|
-
"@typescript-eslint/triple-slash-reference": [ERROR, { lib: NEVER /** always | never */, path: NEVER /** always | never */, types: NEVER /** always | never | prefer-import */ }],
|
402
|
-
"@typescript-eslint/typedef": OFF, /* tsconfig: { noImplicitAny, strictPropertyInitialization } */
|
403
|
-
"@typescript-eslint/unbound-method": [ERROR, { ignoreStatic: false }],
|
404
|
-
"@typescript-eslint/unified-signatures": [ERROR, { ignoreDifferentlyNamedParameters: false }],
|
405
|
-
"@typescript-eslint/use-unknown-in-catch-callback-variable": ERROR,
|
406
|
-
},
|
407
|
-
] as const satisfies RuleEntry;
|
1
|
+
import { Strings, type RuleEntry } from "../index.js";
|
2
|
+
|
3
|
+
const {
|
4
|
+
Id: { Enable },
|
5
|
+
Level: { ERROR, OFF },
|
6
|
+
State: { NEVER, EXPLICIT },
|
7
|
+
} = Strings;
|
8
|
+
|
9
|
+
export default [
|
10
|
+
Enable,
|
11
|
+
{
|
12
|
+
// https://typescript-eslint.io/rules/?=xextension-xdeprecated#rules ]
|
13
|
+
"@typescript-eslint/adjacent-overload-signatures": OFF,
|
14
|
+
"@typescript-eslint/array-type": [ERROR, { "default": "array", readonly: "array" }],
|
15
|
+
"@typescript-eslint/await-thenable": ERROR,
|
16
|
+
"@typescript-eslint/ban-ts-comment": [
|
17
|
+
ERROR,
|
18
|
+
{
|
19
|
+
"ts-check": false,
|
20
|
+
"ts-expect-error": { descriptionFormat: "^: BUG: .+$" },
|
21
|
+
"ts-ignore": true,
|
22
|
+
"ts-nocheck": true,
|
23
|
+
minimumDescriptionLength: 32,
|
24
|
+
},
|
25
|
+
],
|
26
|
+
"@typescript-eslint/ban-tslint-comment": ERROR,
|
27
|
+
"@typescript-eslint/class-literal-property-style": [ERROR, "fields"],
|
28
|
+
"@typescript-eslint/consistent-generic-constructors": [ERROR, "constructor"],
|
29
|
+
"@typescript-eslint/consistent-indexed-object-style": [ERROR, "record"],
|
30
|
+
"@typescript-eslint/consistent-type-assertions": [ERROR, { assertionStyle: "as", objectLiteralTypeAssertions: NEVER }],
|
31
|
+
"@typescript-eslint/consistent-type-definitions": OFF,
|
32
|
+
"@typescript-eslint/consistent-type-exports": [ERROR, { fixMixedExportsWithInlineTypeSpecifier: false }],
|
33
|
+
"@typescript-eslint/consistent-type-imports": [ERROR, { disallowTypeAnnotations: true, fixStyle: "separate-type-imports", prefer: "type-imports" }],
|
34
|
+
"@typescript-eslint/explicit-function-return-type": OFF,
|
35
|
+
"@typescript-eslint/explicit-member-accessibility": [
|
36
|
+
ERROR,
|
37
|
+
{
|
38
|
+
accessibility: EXPLICIT,
|
39
|
+
ignoredMethodNames: [],
|
40
|
+
overrides: {
|
41
|
+
properties: EXPLICIT,
|
42
|
+
constructors: "no-public",
|
43
|
+
accessors: EXPLICIT,
|
44
|
+
methods: EXPLICIT,
|
45
|
+
parameterProperties: EXPLICIT,
|
46
|
+
},
|
47
|
+
},
|
48
|
+
],
|
49
|
+
"@typescript-eslint/explicit-module-boundary-types": OFF,
|
50
|
+
"@typescript-eslint/member-ordering": [
|
51
|
+
ERROR,
|
52
|
+
{
|
53
|
+
"default": {
|
54
|
+
memberTypes: [
|
55
|
+
// Index signature
|
56
|
+
"signature",
|
57
|
+
"call-signature",
|
58
|
+
|
59
|
+
// Fields
|
60
|
+
"public-static-field",
|
61
|
+
"protected-static-field",
|
62
|
+
"private-static-field",
|
63
|
+
"#private-static-field",
|
64
|
+
|
65
|
+
"public-decorated-field",
|
66
|
+
"protected-decorated-field",
|
67
|
+
"private-decorated-field",
|
68
|
+
|
69
|
+
"public-instance-field",
|
70
|
+
"protected-instance-field",
|
71
|
+
"private-instance-field",
|
72
|
+
"#private-instance-field",
|
73
|
+
|
74
|
+
"public-abstract-field",
|
75
|
+
"protected-abstract-field",
|
76
|
+
|
77
|
+
"public-field",
|
78
|
+
"protected-field",
|
79
|
+
"private-field",
|
80
|
+
"#private-field",
|
81
|
+
|
82
|
+
"static-field",
|
83
|
+
"instance-field",
|
84
|
+
"abstract-field",
|
85
|
+
"decorated-field",
|
86
|
+
"field",
|
87
|
+
|
88
|
+
// Static initialization
|
89
|
+
"static-initialization",
|
90
|
+
|
91
|
+
// Constructors
|
92
|
+
"public-constructor",
|
93
|
+
"protected-constructor",
|
94
|
+
"private-constructor",
|
95
|
+
"constructor",
|
96
|
+
|
97
|
+
// Accessors
|
98
|
+
"public-static-accessor",
|
99
|
+
"protected-static-accessor",
|
100
|
+
"private-static-accessor",
|
101
|
+
"#private-static-accessor",
|
102
|
+
|
103
|
+
"public-decorated-accessor",
|
104
|
+
"protected-decorated-accessor",
|
105
|
+
"private-decorated-accessor",
|
106
|
+
|
107
|
+
"public-instance-accessor",
|
108
|
+
"protected-instance-accessor",
|
109
|
+
"private-instance-accessor",
|
110
|
+
"#private-instance-accessor",
|
111
|
+
|
112
|
+
"public-abstract-accessor",
|
113
|
+
"protected-abstract-accessor",
|
114
|
+
|
115
|
+
"public-accessor",
|
116
|
+
"protected-accessor",
|
117
|
+
"private-accessor",
|
118
|
+
"#private-accessor",
|
119
|
+
|
120
|
+
"static-accessor",
|
121
|
+
"instance-accessor",
|
122
|
+
"abstract-accessor",
|
123
|
+
"decorated-accessor",
|
124
|
+
"accessor",
|
125
|
+
|
126
|
+
// Getters
|
127
|
+
"public-static-get",
|
128
|
+
"protected-static-get",
|
129
|
+
"private-static-get",
|
130
|
+
"#private-static-get",
|
131
|
+
|
132
|
+
"public-decorated-get",
|
133
|
+
"protected-decorated-get",
|
134
|
+
"private-decorated-get",
|
135
|
+
|
136
|
+
"public-instance-get",
|
137
|
+
"protected-instance-get",
|
138
|
+
"private-instance-get",
|
139
|
+
"#private-instance-get",
|
140
|
+
|
141
|
+
"public-abstract-get",
|
142
|
+
"protected-abstract-get",
|
143
|
+
|
144
|
+
"public-get",
|
145
|
+
"protected-get",
|
146
|
+
"private-get",
|
147
|
+
"#private-get",
|
148
|
+
|
149
|
+
"static-get",
|
150
|
+
"instance-get",
|
151
|
+
"abstract-get",
|
152
|
+
"decorated-get",
|
153
|
+
"get",
|
154
|
+
|
155
|
+
// Setters
|
156
|
+
"public-static-set",
|
157
|
+
"protected-static-set",
|
158
|
+
"private-static-set",
|
159
|
+
"#private-static-set",
|
160
|
+
|
161
|
+
"public-decorated-set",
|
162
|
+
"protected-decorated-set",
|
163
|
+
"private-decorated-set",
|
164
|
+
|
165
|
+
"public-instance-set",
|
166
|
+
"protected-instance-set",
|
167
|
+
"private-instance-set",
|
168
|
+
"#private-instance-set",
|
169
|
+
|
170
|
+
"public-abstract-set",
|
171
|
+
"protected-abstract-set",
|
172
|
+
|
173
|
+
"public-set",
|
174
|
+
"protected-set",
|
175
|
+
"private-set",
|
176
|
+
"#private-set",
|
177
|
+
|
178
|
+
"static-set",
|
179
|
+
"instance-set",
|
180
|
+
"abstract-set",
|
181
|
+
"decorated-set",
|
182
|
+
"set",
|
183
|
+
|
184
|
+
// Methods
|
185
|
+
"public-static-method",
|
186
|
+
"protected-static-method",
|
187
|
+
"private-static-method",
|
188
|
+
"#private-static-method",
|
189
|
+
|
190
|
+
"public-decorated-method",
|
191
|
+
"protected-decorated-method",
|
192
|
+
"private-decorated-method",
|
193
|
+
|
194
|
+
"public-instance-method",
|
195
|
+
"protected-instance-method",
|
196
|
+
"private-instance-method",
|
197
|
+
"#private-instance-method",
|
198
|
+
|
199
|
+
"public-abstract-method",
|
200
|
+
"protected-abstract-method",
|
201
|
+
|
202
|
+
"public-method",
|
203
|
+
"protected-method",
|
204
|
+
"private-method",
|
205
|
+
"#private-method",
|
206
|
+
|
207
|
+
"static-method",
|
208
|
+
"instance-method",
|
209
|
+
"abstract-method",
|
210
|
+
"decorated-method",
|
211
|
+
"method",
|
212
|
+
],
|
213
|
+
optionalityOrder: "required-first",
|
214
|
+
order: "as-written",
|
215
|
+
},
|
216
|
+
|
217
|
+
},
|
218
|
+
],
|
219
|
+
"@typescript-eslint/method-signature-style": [ERROR, "property"],
|
220
|
+
"@typescript-eslint/naming-convention": OFF,
|
221
|
+
"@typescript-eslint/no-array-delete": ERROR,
|
222
|
+
"@typescript-eslint/no-base-to-string": [
|
223
|
+
ERROR,
|
224
|
+
{
|
225
|
+
ignoredTypeNames: [
|
226
|
+
"Error",
|
227
|
+
"RegExp",
|
228
|
+
"URL",
|
229
|
+
"URLSearchParams",
|
230
|
+
],
|
231
|
+
},
|
232
|
+
],
|
233
|
+
"@typescript-eslint/no-confusing-non-null-assertion": ERROR,
|
234
|
+
"@typescript-eslint/no-confusing-void-expression": [ERROR, { ignoreArrowShorthand: true, ignoreVoidOperator: true }],
|
235
|
+
"@typescript-eslint/no-duplicate-enum-values": ERROR,
|
236
|
+
"@typescript-eslint/no-duplicate-type-constituents": [ERROR, { ignoreIntersections: false, ignoreUnions: false }],
|
237
|
+
"@typescript-eslint/no-dynamic-delete": ERROR,
|
238
|
+
"@typescript-eslint/no-empty-object-type": [
|
239
|
+
ERROR,
|
240
|
+
{
|
241
|
+
// allowWithName: /regex/,
|
242
|
+
allowInterfaces: NEVER,
|
243
|
+
allowObjectTypes: NEVER,
|
244
|
+
},
|
245
|
+
],
|
246
|
+
"@typescript-eslint/no-explicit-any": [ERROR, { fixToUnknown: true, ignoreRestArgs: false }],
|
247
|
+
"@typescript-eslint/no-extra-non-null-assertion": ERROR,
|
248
|
+
"@typescript-eslint/no-extraneous-class": [
|
249
|
+
ERROR,
|
250
|
+
{
|
251
|
+
allowConstructorOnly: false,
|
252
|
+
allowEmpty: true,
|
253
|
+
allowStaticOnly: false,
|
254
|
+
allowWithDecorator: false,
|
255
|
+
},
|
256
|
+
],
|
257
|
+
"@typescript-eslint/no-floating-promises": [ERROR, { checkThenables: true, ignoreVoid: true, ignoreIIFE: false }],
|
258
|
+
"@typescript-eslint/no-for-in-array": ERROR,
|
259
|
+
"@typescript-eslint/no-import-type-side-effects": ERROR,
|
260
|
+
"@typescript-eslint/no-inferrable-types": [ERROR, { ignoreParameters: false, ignoreProperties: false }],
|
261
|
+
"@typescript-eslint/no-invalid-void-type": [ERROR, { allowInGenericTypeArguments: true, allowAsThisParameter: false }],
|
262
|
+
"@typescript-eslint/no-meaningless-void-operator": [ERROR, { checkNever: true }],
|
263
|
+
"@typescript-eslint/no-misused-new": ERROR,
|
264
|
+
"@typescript-eslint/no-misused-promises": [
|
265
|
+
ERROR,
|
266
|
+
{
|
267
|
+
checksConditionals: true,
|
268
|
+
checksSpreads: true,
|
269
|
+
checksVoidReturn: {
|
270
|
+
arguments: true,
|
271
|
+
attributes: true,
|
272
|
+
properties: true,
|
273
|
+
returns: true,
|
274
|
+
variables: true,
|
275
|
+
},
|
276
|
+
},
|
277
|
+
],
|
278
|
+
"@typescript-eslint/no-mixed-enums": ERROR,
|
279
|
+
"@typescript-eslint/no-namespace": OFF,
|
280
|
+
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": ERROR,
|
281
|
+
"@typescript-eslint/no-non-null-asserted-optional-chain": ERROR,
|
282
|
+
"@typescript-eslint/no-non-null-assertion": ERROR,
|
283
|
+
"@typescript-eslint/no-redundant-type-constituents": ERROR,
|
284
|
+
"@typescript-eslint/no-restricted-types": OFF, /* preference - no shared custom types across all projects that I wish to ban*/
|
285
|
+
"@typescript-eslint/no-require-imports": [ERROR, { allow: [] }],
|
286
|
+
"@typescript-eslint/no-this-alias": [ERROR, { allowDestructuring: true, allowedNames: [] }],
|
287
|
+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": [ERROR, { allowComparingNullableBooleansToTrue: true, allowComparingNullableBooleansToFalse: true }],
|
288
|
+
"@typescript-eslint/no-unnecessary-condition": [ERROR, { allowConstantLoopConditions: false, allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false }],
|
289
|
+
"@typescript-eslint/no-unnecessary-qualifier": ERROR,
|
290
|
+
"@typescript-eslint/no-unnecessary-template-expression": ERROR,
|
291
|
+
"@typescript-eslint/no-unnecessary-type-arguments": ERROR,
|
292
|
+
"@typescript-eslint/no-unnecessary-type-assertion": [ERROR, { typesToIgnore: [] }],
|
293
|
+
"@typescript-eslint/no-unnecessary-type-constraint": ERROR,
|
294
|
+
"@typescript-eslint/no-unnecessary-type-parameters": ERROR,
|
295
|
+
"@typescript-eslint/no-unsafe-argument": ERROR,
|
296
|
+
"@typescript-eslint/no-unsafe-assignment": ERROR,
|
297
|
+
"@typescript-eslint/no-unsafe-call": ERROR,
|
298
|
+
"@typescript-eslint/no-unsafe-declaration-merging": ERROR,
|
299
|
+
"@typescript-eslint/no-unsafe-enum-comparison": ERROR,
|
300
|
+
"@typescript-eslint/no-unsafe-function-type": ERROR,
|
301
|
+
"@typescript-eslint/no-unsafe-member-access": ERROR,
|
302
|
+
"@typescript-eslint/no-unsafe-return": ERROR,
|
303
|
+
"@typescript-eslint/no-unsafe-unary-minus": ERROR,
|
304
|
+
"@typescript-eslint/no-useless-empty-export": ERROR,
|
305
|
+
"@typescript-eslint/no-wrapper-object-types": ERROR,
|
306
|
+
"@typescript-eslint/non-nullable-type-assertion-style": OFF,
|
307
|
+
"@typescript-eslint/parameter-properties": [ERROR, { prefer: "parameter-property" /* "parameter-property" | "class-property" */ }],
|
308
|
+
"@typescript-eslint/prefer-as-const": ERROR,
|
309
|
+
"@typescript-eslint/prefer-enum-initializers": ERROR,
|
310
|
+
"@typescript-eslint/prefer-find": ERROR,
|
311
|
+
"@typescript-eslint/prefer-for-of": ERROR,
|
312
|
+
"@typescript-eslint/prefer-function-type": ERROR,
|
313
|
+
"@typescript-eslint/prefer-includes": ERROR,
|
314
|
+
"@typescript-eslint/prefer-literal-enum-member": [ERROR, { allowBitwiseExpressions: false }],
|
315
|
+
"@typescript-eslint/prefer-namespace-keyword": ERROR,
|
316
|
+
"@typescript-eslint/prefer-nullish-coalescing": [
|
317
|
+
ERROR,
|
318
|
+
{
|
319
|
+
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
|
320
|
+
ignoreConditionalTests: false,
|
321
|
+
ignoreTernaryTests: false,
|
322
|
+
ignoreMixedLogicalExpressions: false,
|
323
|
+
ignorePrimitives: {
|
324
|
+
bigint: false,
|
325
|
+
"boolean": false,
|
326
|
+
number: false,
|
327
|
+
string: false,
|
328
|
+
},
|
329
|
+
},
|
330
|
+
], /* requires tsconfig: strictNullChecks */
|
331
|
+
"@typescript-eslint/prefer-optional-chain": [
|
332
|
+
ERROR,
|
333
|
+
{
|
334
|
+
allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: false,
|
335
|
+
checkAny: true,
|
336
|
+
checkBigInt: true,
|
337
|
+
checkBoolean: true,
|
338
|
+
checkNumber: true,
|
339
|
+
checkString: true,
|
340
|
+
checkUnknown: true,
|
341
|
+
requireNullish: false,
|
342
|
+
},
|
343
|
+
],
|
344
|
+
"@typescript-eslint/prefer-readonly": [ERROR, { onlyInlineLambdas: false }],
|
345
|
+
"@typescript-eslint/prefer-readonly-parameter-types": OFF, /* preference - WAY too restrictive */
|
346
|
+
"@typescript-eslint/prefer-reduce-type-parameter": ERROR,
|
347
|
+
"@typescript-eslint/prefer-regexp-exec": ERROR,
|
348
|
+
"@typescript-eslint/prefer-return-this-type": ERROR,
|
349
|
+
"@typescript-eslint/prefer-string-starts-ends-with": [ERROR, { allowSingleElementEquality: NEVER }],
|
350
|
+
"@typescript-eslint/promise-function-async": [
|
351
|
+
ERROR,
|
352
|
+
{
|
353
|
+
allowAny: false,
|
354
|
+
allowedPromiseNames: [],
|
355
|
+
checkArrowFunctions: true,
|
356
|
+
checkFunctionDeclarations: true,
|
357
|
+
checkFunctionExpressions: true,
|
358
|
+
checkMethodDeclarations: true,
|
359
|
+
},
|
360
|
+
],
|
361
|
+
"@typescript-eslint/require-array-sort-compare": [ERROR, { ignoreStringArrays: true }],
|
362
|
+
"@typescript-eslint/restrict-plus-operands": [
|
363
|
+
ERROR,
|
364
|
+
{
|
365
|
+
allowAny: false,
|
366
|
+
allowBoolean: false,
|
367
|
+
allowNullish: false,
|
368
|
+
allowNumberAndString: false,
|
369
|
+
allowRegExp: false,
|
370
|
+
skipCompoundAssignments: false,
|
371
|
+
},
|
372
|
+
],
|
373
|
+
"@typescript-eslint/restrict-template-expressions": [
|
374
|
+
ERROR,
|
375
|
+
{
|
376
|
+
allowAny: true,
|
377
|
+
allowArray: true,
|
378
|
+
allowBoolean: true,
|
379
|
+
allowNullish: false,
|
380
|
+
allowNumber: true,
|
381
|
+
allowNever: false,
|
382
|
+
allowRegExp: false,
|
383
|
+
}, /* investigate: make stricter */
|
384
|
+
],
|
385
|
+
"@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 */
|
386
|
+
"@typescript-eslint/strict-boolean-expressions": [
|
387
|
+
ERROR,
|
388
|
+
{
|
389
|
+
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
|
390
|
+
allowAny: false,
|
391
|
+
allowNumber: true,
|
392
|
+
allowString: false,
|
393
|
+
allowNullableBoolean: false,
|
394
|
+
allowNullableEnum: false,
|
395
|
+
allowNullableNumber: false,
|
396
|
+
allowNullableObject: false,
|
397
|
+
allowNullableString: false,
|
398
|
+
},
|
399
|
+
], /* requires tsconfig: strictNullChecks */
|
400
|
+
"@typescript-eslint/switch-exhaustiveness-check": [ERROR, { allowDefaultCaseForExhaustiveSwitch: false, requireDefaultForNonUnion: true }],
|
401
|
+
"@typescript-eslint/triple-slash-reference": [ERROR, { lib: NEVER /** always | never */, path: NEVER /** always | never */, types: NEVER /** always | never | prefer-import */ }],
|
402
|
+
"@typescript-eslint/typedef": OFF, /* tsconfig: { noImplicitAny, strictPropertyInitialization } */
|
403
|
+
"@typescript-eslint/unbound-method": [ERROR, { ignoreStatic: false }],
|
404
|
+
"@typescript-eslint/unified-signatures": [ERROR, { ignoreDifferentlyNamedParameters: false }],
|
405
|
+
"@typescript-eslint/use-unknown-in-catch-callback-variable": ERROR,
|
406
|
+
},
|
407
|
+
] as const satisfies RuleEntry;
|