@prowise/eslint-config-linting-rules 2.4.7 → 3.0.0

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.
@@ -13,12 +13,13 @@ export default {
13
13
 
14
14
  files: ["**/*.ts", "**/*.tsx"],
15
15
 
16
- plugins: { "@typescript-eslint": typescriptPlugin.plugin },
16
+ plugins: { typescript: typescriptPlugin.plugin },
17
17
  languageOptions: {
18
18
  parser: typescriptPlugin.parser,
19
19
  parserOptions: {
20
20
  ecmaVersion: "latest",
21
21
  sourceType: "module",
22
+ projectService: true,
22
23
  },
23
24
  },
24
25
 
@@ -27,25 +28,25 @@ export default {
27
28
  * Require that member overloads be consecutive ✅
28
29
  * https://typescript-eslint.io/rules/adjacent-overload-signatures.
29
30
  */
30
- "@typescript-eslint/adjacent-overload-signatures": "error",
31
+ "typescript/adjacent-overload-signatures": "error",
31
32
 
32
33
  /**
33
34
  * Require using either T[] or Array<T> for arrays 🔒 🔧
34
35
  * https://typescript-eslint.io/rules/array-type.
35
36
  */
36
- "@typescript-eslint/array-type": ["error", { default: "array-simple" }],
37
+ "typescript/array-type": ["error", { default: "array-simple" }],
37
38
 
38
39
  /**
39
40
  * Disallow awaiting a value that is not a Thenable ✅ 💭
40
41
  * https://typescript-eslint.io/rules/await-thenable.
41
42
  */
42
- "@typescript-eslint/await-thenable": "error",
43
+ "typescript/await-thenable": "error",
43
44
 
44
45
  /**
45
46
  * Disallow @ts-<directive> comments or require descriptions after directive ✅
46
47
  * https://typescript-eslint.io/rules/ban-ts-comment.
47
48
  */
48
- "@typescript-eslint/ban-ts-comment": [
49
+ "typescript/ban-ts-comment": [
49
50
  "warn",
50
51
  {
51
52
  "ts-expect-error": "allow-with-description",
@@ -60,54 +61,46 @@ export default {
60
61
  * Disallow // tslint:<rule-flag> comments 🔒 🔧
61
62
  * https://typescript-eslint.io/rules/ban-tslint-comment.
62
63
  */
63
- "@typescript-eslint/ban-tslint-comment": "warn",
64
+ "typescript/ban-tslint-comment": "warn",
64
65
 
65
66
  /**
66
67
  * Enforce that literals on classes are exposed in a consistent style 🔒 🔧
67
68
  * https://typescript-eslint.io/rules/class-litiral-property-style.
68
69
  */
69
- "@typescript-eslint/class-literal-property-style": "warn",
70
+ "typescript/class-literal-property-style": "warn",
70
71
 
71
72
  /**
72
73
  * Enforce specifying generic type arguments on type annotation or constructor name of a constructor call 🔒 🔧
73
74
  * https://typescript-eslint.io/rules/consistent-generic-constructors.
74
75
  */
75
- "@typescript-eslint/consistent-generic-constructors": "warn",
76
+ "typescript/consistent-generic-constructors": "warn",
76
77
 
77
78
  /**
78
79
  * Require or disallow the Record type 🔒 🔧
79
80
  * https://typescript-eslint.io/rules/consistent-indexed-oject-style.
80
81
  */
81
- "@typescript-eslint/consistent-indexed-object-style": ["warn", "record"],
82
+ "typescript/consistent-indexed-object-style": ["warn", "record"],
82
83
 
83
84
  /**
84
85
  * Enforce consistent usage of type assertions 🔒
85
86
  * https://typescript-eslint.io/rules/consistent-type-assertions.
86
87
  */
87
- "@typescript-eslint/consistent-type-assertions": "error",
88
-
89
- /**
90
- * Enforce type definitions to consistently use either interface or type 🔒 🔧
91
- * https://typescript-eslint.io/rules/consistent-type-definitions.
92
- * Turned off => we want to keep difference between defining type and interface.
93
- */
94
- // "@typescript-eslint/consistent-type-definitions": "off",
88
+ "typescript/consistent-type-assertions": "error",
95
89
 
96
90
  /**
97
91
  * Enforce consistent usage of type exports 🔧 💭
98
92
  * https://typescript-eslint.io/rules/consistend-type-exports.
99
93
  */
100
- "@typescript-eslint/consistent-type-exports": "warn",
94
+ "typescript/consistent-type-exports": "warn",
101
95
 
102
96
  /**
103
97
  * Enforce consistent usage of type imports 🔧
104
98
  * https://typescript-eslint.io/rules/consistent-type-imports.
105
- * Turned off to allow us to use type import to prevent circular import warning.
106
99
  */
107
- "@typescript-eslint/consistent-type-imports": ["warn", {
100
+ "typescript/consistent-type-imports": ["warn", {
108
101
  prefer: "type-imports",
109
- fixStyle: "inline-type-imports",
110
- disallowTypeAnnotations: false,
102
+ fixStyle: "separate-type-imports",
103
+ disallowTypeAnnotations: true,
111
104
  }],
112
105
 
113
106
  /**
@@ -115,20 +108,20 @@ export default {
115
108
  * Https://typescript-eslint.io/rules/default-param-last.
116
109
  */
117
110
  "default-param-last": "off",
118
- "@typescript-eslint/default-param-last": baseRules.rules["default-param-last"],
111
+ "typescript/default-param-last": baseRules.rules["default-param-last"],
119
112
 
120
113
  /**
121
114
  * Enforce dot notation whenever possible.
122
115
  * Https://typescript-eslint.io/rules/dot-notation.
123
116
  */
124
117
  "dot-notation": "off",
125
- "@typescript-eslint/dot-notation": baseRules.rules["dot-notation"],
118
+ "typescript/dot-notation": baseRules.rules["dot-notation"],
126
119
 
127
120
  /**
128
121
  * Require explicit return types on functions and class methods.
129
122
  * Https://typescript-eslint.io/rules/explicit-function-return-type.
130
123
  */
131
- "@typescript-eslint/explicit-function-return-type": [
124
+ "typescript/explicit-function-return-type": [
132
125
  "warn",
133
126
  {
134
127
  allowExpressions: true,
@@ -145,7 +138,7 @@ export default {
145
138
  * Accessibility should be explicit to protect accidentally exposing properties
146
139
  * and functions by missing modifier and using default(public).
147
140
  */
148
- "@typescript-eslint/explicit-member-accessibility": [
141
+ "typescript/explicit-member-accessibility": [
149
142
  "error",
150
143
  {
151
144
  accessibility: "explicit",
@@ -156,33 +149,20 @@ export default {
156
149
  * Require explicit return and argument types on exported functions" and classes" public class methods
157
150
  * https://typescript-eslint.io/rules/explicit-module-boundary-types.
158
151
  */
159
- "@typescript-eslint/explicit-module-boundary-types": "warn",
160
-
161
- /**
162
- * Require or disallow initialization in variable declarations
163
- * https://typescript-eslint.io/rules/init-declarations.
164
- */
165
- // "init-declarations": "off",
166
- // "@typescript-eslint/init-declarations": baseRules.rules["init-declarations"],
167
-
168
- /**
169
- * Require a consistent member declaration order
170
- * https://typescript-eslint.io/rules/member-ordering.
171
- */
172
- // "@typescript-eslint/member-ordering": "off",
152
+ "typescript/explicit-module-boundary-types": "warn",
173
153
 
174
154
  /**
175
155
  * Enforce using a particular method signature syntax 🔧
176
156
  * https://typescript-eslint.io/rules/method-signature-style.
177
157
  */
178
- "@typescript-eslint/method-signature-style": "warn",
158
+ "typescript/method-signature-style": "warn",
179
159
 
180
160
  /**
181
161
  * Enforce naming conventions for everything across a codebase 💭
182
162
  * https://typescript-eslint.io/rules/naming-convention.
183
163
  */
184
- "camelcase": "off", // The `@typescript-eslint/naming-convention` rule allows `leadingUnderscore` and `trailingUnderscore` settings. However, the existing `no-underscore-dangle` rule already takes care of this.
185
- "@typescript-eslint/naming-convention": [
164
+ "camelcase": "off", // The `typescript/naming-convention` rule allows `leadingUnderscore` and `trailingUnderscore` settings. However, the existing `no-underscore-dangle` rule already takes care of this.
165
+ "typescript/naming-convention": [
186
166
  "error",
187
167
  // Allow camelCase variables (23.2), PascalCase variables (23.8), and UPPER_CASE variables (23.10)
188
168
  {
@@ -208,25 +188,25 @@ export default {
208
188
  * https://typescript-eslint.io/rules/no-array-constructor.
209
189
  */
210
190
  "no-array-constructor": "off",
211
- "@typescript-eslint/no-array-constructor": baseRules.rules["no-array-constructor"],
191
+ "typescript/no-array-constructor": baseRules.rules["no-array-constructor"],
212
192
 
213
193
  /**
214
194
  * Require .toString() to only be called on objects which provide useful information when stringified 🔒 💭
215
195
  * https://typescript-eslint.io/rules/no-base-to-string.
216
196
  */
217
- "@typescript-eslint/no-base-to-string": "warn",
197
+ "typescript/no-base-to-string": "warn",
218
198
 
219
199
  /**
220
200
  * Disallow non-null assertion in locations that may be confusing 🔒 🔧 💡
221
201
  * https://typescript-eslint.io/rules/no-confusing-non-null-assertion.
222
202
  */
223
- "@typescript-eslint/no-confusing-non-null-assertion": "warn",
203
+ "typescript/no-confusing-non-null-assertion": "warn",
224
204
 
225
205
  /**
226
206
  * Require expressions of type void to appear in statement position 🔧 💡 💭
227
207
  * https://typescript-eslint.io/rules/no-confusing-void-expression.
228
208
  */
229
- "@typescript-eslint/no-confusing-void-expression": [
209
+ "typescript/no-confusing-void-expression": [
230
210
  "warn",
231
211
  { ignoreArrowShorthand: true, ignoreVoidOperator: true, ignoreVoidReturningFunctions: true },
232
212
  ],
@@ -236,32 +216,32 @@ export default {
236
216
  * Https://typescript-eslint.io/rules/no-dupe-class-members.
237
217
  */
238
218
  "no-dupe-class-members": "off",
239
- "@typescript-eslint/no-dupe-class-members": baseRules.rules["no-dupe-class-members"],
219
+ "typescript/no-dupe-class-members": baseRules.rules["no-dupe-class-members"],
240
220
 
241
221
  /**
242
222
  * Disallow duplicate enum member values 🔒
243
223
  * https://typescript-eslint.io/rules/no-duplicate-enum-values.
244
224
  */
245
- "@typescript-eslint/no-duplicate-enum-values": "warn",
225
+ "typescript/no-duplicate-enum-values": "warn",
246
226
 
247
227
  /**
248
228
  * Disallow using the delete operator on computed key expressions 🔒 🔧
249
229
  * https://typescript-eslint.io/rules/no-dynamic-delete.
250
230
  */
251
- "@typescript-eslint/no-dynamic-delete": "warn",
231
+ "typescript/no-dynamic-delete": "warn",
252
232
 
253
233
  /**
254
234
  * Disallow the declaration of empty functions ✅
255
235
  * https://typescript-eslint.io/rules/no-empty-function.
256
236
  */
257
237
  "no-empty-function": "off",
258
- "@typescript-eslint/no-empty-function": baseRules.rules["no-empty-function"],
238
+ "typescript/no-empty-function": baseRules.rules["no-empty-function"],
259
239
 
260
240
  /**
261
241
  * Disallow accidentally using the "empty object" type ✅ 🔧 💡
262
242
  * https://typescript-eslint.io/rules/no-empty-object-type.
263
243
  */
264
- "@typescript-eslint/no-empty-object-type": ["error", {
244
+ "typescript/no-empty-object-type": ["error", {
265
245
  allowInterfaces: "always",
266
246
  allowObjectTypes: "always",
267
247
  }],
@@ -270,274 +250,221 @@ export default {
270
250
  * Disallow the any type ✅ 🔧 💡
271
251
  * https://typescript-eslint.io/rules/no-explicit-any.
272
252
  */
273
- "@typescript-eslint/no-explicit-any": "error",
253
+ "typescript/no-explicit-any": "error",
274
254
 
275
255
  /**
276
256
  * Disallow extra non-null assertion ✅ 🔧
277
257
  * https://typescript-eslint.io/rules/no-extra-non-null-assertion.
278
258
  */
279
- "@typescript-eslint/no-extra-non-null-assertion": "error",
280
-
281
- /**
282
- * Disallow classes used as namespaces 🔒
283
- * https://typescript-eslint.io/rules/no-extraneous-class.
284
- */
285
- // "@typescript-eslint/no-extraneous-class": "off",
259
+ "typescript/no-extra-non-null-assertion": "error",
286
260
 
287
261
  /**
288
262
  * Require Promise-like statements to be handled appropriately ✅ 💡 💭
289
263
  * https://typescript-eslint.io/rules/no-floating-promises.
290
264
  */
291
- "@typescript-eslint/no-floating-promises": "error",
265
+ "typescript/no-floating-promises": "error",
292
266
 
293
267
  /**
294
268
  * Disallow iterating over an array with a for-in loop ✅ 💭
295
269
  * https://typescript-eslint.io/rules/no-for-in-array.
296
270
  */
297
- "@typescript-eslint/no-for-in-array": "error",
271
+ "typescript/no-for-in-array": "error",
298
272
 
299
273
  /**
300
274
  * Disallow the use of eval()-like methods. ✅ 💭
301
275
  * https://typescript-eslint.io/rules/no-implied-eval.
302
276
  */
303
277
  "no-implied-eval": "off",
304
- "@typescript-eslint/no-implied-eval": baseRules.rules["no-implied-eval"],
278
+ "typescript/no-implied-eval": baseRules.rules["no-implied-eval"],
305
279
 
306
280
  /**
307
281
  * Disallow explicit type declarations for variables or parameters initialized to a number,
308
282
  * string, or boolean ✅ 🔧
309
283
  * https://typescript-eslint.io/rules/no-inferrable-types.
310
284
  */
311
- "@typescript-eslint/no-inferrable-types": ["error", { ignoreParameters: false, ignoreProperties: false }],
312
-
313
- /**
314
- * Disallow this keywords outside of classes or class-like objects.
315
- * Https://typescript-eslint.io/rules/no-invalid-this.
316
- */
317
- // "no-invalid-this": "off",
318
- // "@typescript-eslint/no-invalid-this": baseRules.rules["no-invalid-this"],
285
+ "typescript/no-inferrable-types": ["error", { ignoreParameters: false, ignoreProperties: false }],
319
286
 
320
287
  /**
321
- * Disallow void type outside of generic or return types 🔒
322
- * https://typescript-eslint.io/rules/no-invalid-void-type.
288
+ * Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers. 🔧
289
+ * https://typescript-eslint.io/rules/no-import-type-side-effects.
323
290
  */
324
- // "@typescript-eslint/no-invalid-void-type": "off",
291
+ "typescript/no-import-type-side-effects": "error",
325
292
 
326
293
  /**
327
294
  * Disallow function declarations that contain unsafe references inside loop statements.
328
295
  * Https://typescript-eslint.io/rules/no-loop-func.
329
296
  */
330
297
  "no-loop-func": "off",
331
- "@typescript-eslint/no-loop-func": baseRules.rules["no-loop-func"],
332
-
333
- /**
334
- * Disallow magic numbers.
335
- * Https://typescript-eslint.io/rules/no-magic-numbers.
336
- */
337
- // "no-magic-numbers": "off",
338
- // "@typescript-eslint/no-magic-numbers": baseRules.rules["no-magic-numbers"],
298
+ "typescript/no-loop-func": baseRules.rules["no-loop-func"],
339
299
 
340
300
  /**
341
301
  * Disallow the void operator except when used to discard a value 🔒 🔧 💡 💭
342
302
  * https://typescript-eslint.io/rules/no-meaningless-void-operator.
343
303
  */
344
- "@typescript-eslint/no-meaningless-void-operator": "warn",
304
+ "typescript/no-meaningless-void-operator": "warn",
345
305
 
346
306
  /**
347
307
  * Enforce valid definition of new and constructor ✅
348
308
  * https://typescript-eslint.io/rules/no-misused-new.
349
309
  */
350
- "@typescript-eslint/no-misused-new": "error",
310
+ "typescript/no-misused-new": "error",
351
311
 
352
312
  /**
353
313
  * Disallow Promises in places not designed to handle them ✅ 💭
354
314
  * https://typescript-eslint.io/rules/no-misused-promises.
355
315
  */
356
- "@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: false }],
316
+ "typescript/no-misused-promises": ["error", { checksVoidReturn: false }],
357
317
 
358
318
  /**
359
319
  * Disallow custom TypeScript modules and namespaces ✅
360
320
  * https://typescript-eslint.io/rules/no-namespace.
361
321
  */
362
- "@typescript-eslint/no-namespace": "error",
322
+ "typescript/no-namespace": "error",
363
323
 
364
324
  /**
365
325
  * Disallow non-null assertions in the left operand of a nullish coalescing operator 🔒 💡
366
326
  * https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing.
367
327
  */
368
- "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "warn",
328
+ "typescript/no-non-null-asserted-nullish-coalescing": "warn",
369
329
 
370
330
  /**
371
331
  * Disallow non-null assertions after an optional chain expression ✅ 💡
372
332
  * https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain.
373
333
  */
374
- "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
334
+ "typescript/no-non-null-asserted-optional-chain": "error",
375
335
 
376
336
  /**
377
337
  * Disallow non-null assertions using the ! Postfix operator ✅ 💡
378
338
  * https://typescript-eslint.io/rules/no-non-null-assertion.
379
339
  */
380
- "@typescript-eslint/no-non-null-assertion": "warn",
340
+ "typescript/no-non-null-assertion": "warn",
381
341
 
382
342
  /**
383
343
  * Disallow variable re-declaration.
384
344
  * Https://typescript-eslint.io/rules/no-redeclare.
385
345
  */
386
346
  "no-redeclare": "off",
387
- "@typescript-eslint/no-redeclare": baseRules.rules["no-redeclare"],
347
+ "typescript/no-redeclare": baseRules.rules["no-redeclare"],
388
348
 
389
349
  /**
390
350
  * Disallow members of unions and intersections that do nothing or override type information 💭
391
351
  * https://typescript-eslint.io/rules/no-redundant-type-constituents.
392
352
  */
393
- "@typescript-eslint/no-redundant-type-constituents": "warn",
353
+ "typescript/no-redundant-type-constituents": "warn",
394
354
 
395
355
  /**
396
356
  * Disallow invocation of require() ✅
397
357
  * https://typescript-eslint.io/rules/no-require-imports.
398
358
  */
399
- "@typescript-eslint/no-require-imports": "error",
359
+ "typescript/no-require-imports": "error",
400
360
 
401
361
  /**
402
362
  * Disallow unnecessary return await
403
363
  * https://typescript-eslint.io/rules/return-await.
404
364
  */
405
- "@typescript-eslint/return-await": "warn",
365
+ "typescript/return-await": "warn",
406
366
 
407
367
  /**
408
368
  * Disallow specified modules when loaded by import.
409
369
  * Https://typescript-eslint.io/rules/no-restricted-imports.
410
370
  */
411
371
  "no-restricted-imports": "off",
412
- "@typescript-eslint/no-restricted-imports": baseRules.rules["no-restricted-imports"],
372
+ "typescript/no-restricted-imports": baseRules.rules["no-restricted-imports"],
413
373
 
414
374
  /**
415
375
  * Disallow variable declarations from shadowing variables declared in the outer scope
416
376
  * https://typescript-eslint.io/rules/no-shadow.
417
377
  */
418
378
  "no-shadow": "off",
419
- "@typescript-eslint/no-shadow": baseRules.rules["no-shadow"],
379
+ "typescript/no-shadow": baseRules.rules["no-shadow"],
420
380
 
421
381
  /**
422
382
  * Disallow aliasing this ✅
423
383
  * https://typescript-eslint.io/rules/no-this-alias.
424
384
  */
425
- "@typescript-eslint/no-this-alias": "error",
385
+ "typescript/no-this-alias": "error",
426
386
 
427
387
  /**
428
388
  * Disallow unnecessary equality comparisons against boolean literals 🔒 🔧 💭
429
389
  * https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare.
430
390
  */
431
- "@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
432
-
433
- /**
434
- * Disallow conditionals where the type is always truthy or always falsy 🔒 🔧 💭
435
- * https://typescript-eslint.io/rules/no-unnecessary-condition.
436
- * Turned off for now: a lot of false positives which breaks code!!
437
- */
438
- // "@typescript-eslint/no-unnecessary-condition": "off",
391
+ "typescript/no-unnecessary-boolean-literal-compare": "warn",
439
392
 
440
393
  /**
441
394
  * Disallow unnecessary namespace qualifiers 🔧 💭
442
395
  * https://typescript-eslint.io/rules/no-unnecessary-qualifier.
443
396
  */
444
- "@typescript-eslint/no-unnecessary-qualifier": "warn",
397
+ "typescript/no-unnecessary-qualifier": "warn",
445
398
 
446
399
  /**
447
400
  * Disallow type arguments that are equal to the default 🔒 🔧 💭
448
401
  * https://typescript-eslint.io/rules/no-unnecessary-type-arguments.
449
402
  */
450
- "@typescript-eslint/no-unnecessary-type-arguments": "warn",
403
+ "typescript/no-unnecessary-type-arguments": "warn",
451
404
 
452
405
  /**
453
406
  * Disallow type assertions that do not change the type of an expression ✅ 🔧 💭
454
407
  * https://typescript-eslint.io/rules/no-unnecessary-type-assertion.
455
408
  */
456
- "@typescript-eslint/no-unnecessary-type-assertion": "error",
409
+ "typescript/no-unnecessary-type-assertion": "error",
457
410
 
458
411
  /**
459
412
  * Disallow unnecessary constraints on generic types ✅ 💡
460
413
  * https://typescript-eslint.io/rules/no-unnecessary-type-constraint.
461
414
  */
462
- "@typescript-eslint/no-unnecessary-type-constraint": "error",
415
+ "typescript/no-unnecessary-type-constraint": "error",
463
416
 
464
417
  /**
465
418
  * Disallow calling a function with a value with type any ✅ 💭
466
419
  * https://typescript-eslint.io/rules/no-unsafe-argument.
467
420
  */
468
- "@typescript-eslint/no-unsafe-argument": "error",
469
-
470
- /**
471
- * Disallow assigning a value with type any to variables and properties ✅ 💭
472
- * Off: catched by tsc
473
- * https://typescript-eslint.io/rules/no-unsafe-assignment.
474
- */
475
- // "@typescript-eslint/no-unsafe-assignment": "off",
476
-
477
- /**
478
- * Disallow calling a value with type any ✅ 💭
479
- * Off: gives too much false positive
480
- * https://typescript-eslint.io/rules/no-unsafe-call.
481
- */
482
- // "@typescript-eslint/no-unsafe-call": "off",
483
-
484
- /**
485
- * Disallow member access on a value with type any ✅ 💭
486
- * https://typescript-eslint.io/rules/no-unsafe-member-access.
487
- */
488
- // "@typescript-eslint/no-unsafe-member-access": "off",
421
+ "typescript/no-unsafe-argument": "error",
489
422
 
490
423
  /**
491
424
  * Disallow returning a value with type any from a function ✅ 💭
492
425
  * https://typescript-eslint.io/rules/no-unsafe-return.
493
426
  */
494
- "@typescript-eslint/no-unsafe-return": "error",
427
+ "typescript/no-unsafe-return": "error",
495
428
 
496
429
  /**
497
430
  * Disallow unused expressions
498
431
  * https://typescript-eslint.io/rules/no-unused-expressions.
499
432
  */
500
433
  "no-unused-expressions": "off",
501
- "@typescript-eslint/no-unused-expressions": baseRules.rules["no-unused-expressions"],
434
+ "typescript/no-unused-expressions": baseRules.rules["no-unused-expressions"],
502
435
 
503
436
  /**
504
437
  * Disallow unused variables
505
438
  * https://typescript-eslint.io/rules/no-unused-vars.
506
439
  */
507
440
  "no-unused-vars": "off",
508
- "@typescript-eslint/no-unused-vars": baseRules.rules["no-unused-vars"],
441
+ "typescript/no-unused-vars": baseRules.rules["no-unused-vars"],
509
442
 
510
443
  /**
511
444
  * Disallow the use of variables before they are defined
512
445
  * https://typescript-eslint.io/rules/no-use-before-define.
513
446
  */
514
447
  "no-use-before-define": "off",
515
- "@typescript-eslint/no-use-before-define": baseRules.rules["no-use-before-define"],
448
+ "typescript/no-use-before-define": baseRules.rules["no-use-before-define"],
516
449
 
517
450
  /**
518
451
  * Disallow unnecessary constructors
519
452
  * https://typescript-eslint.io/rules/no-useless-constructor.
520
453
  */
521
454
  "no-useless-constructor": "off",
522
- "@typescript-eslint/no-useless-constructor": baseRules.rules["no-useless-constructor"],
455
+ "typescript/no-useless-constructor": baseRules.rules["no-useless-constructor"],
523
456
 
524
457
  /**
525
458
  * Disallow empty exports that don"t change anything in a module file 🔧
526
459
  * https://typescript-eslint.io/rules/no-useless-empty-export.
527
460
  */
528
- "@typescript-eslint/no-useless-empty-export": "warn",
529
-
530
- /**
531
- * Enforce non-null assertions over explicit type casts 🔒 🔧 💭
532
- * https://typescript-eslint.io/rules/non-nullable-type-assertion-style.
533
- */
534
- // "@typescript-eslint/non-nullable-type-assertion-style": "off",
461
+ "typescript/no-useless-empty-export": "warn",
535
462
 
536
463
  /**
537
464
  * Require or disallow parameter properties in class constructors
538
465
  * https://typescript-eslint.io/rules/parameter-properties.
539
466
  */
540
- "@typescript-eslint/parameter-properties": [
467
+ "typescript/parameter-properties": [
541
468
  "warn",
542
469
  {
543
470
  allow: [],
@@ -549,142 +476,105 @@ export default {
549
476
  * Enforce the use of as const over literal type ✅ 🔧 💡
550
477
  * https://typescript-eslint.io/rules/.
551
478
  */
552
- "@typescript-eslint/prefer-as-const": "error",
553
-
554
- /**
555
- * Require each enum member value to be explicitly initialized 💡
556
- * https://typescript-eslint.io/rules/prefer-enum-initializers.
557
- */
558
- // "@typescript-eslint/prefer-enum-initializers": "off",
479
+ "typescript/prefer-as-const": "error",
559
480
 
560
481
  /**
561
482
  * Enforce the use of for-of loop over the standard for loop where possible 🔒
562
483
  * https://typescript-eslint.io/rules/.
563
484
  */
564
- "@typescript-eslint/prefer-for-of": "error",
485
+ "typescript/prefer-for-of": "error",
565
486
 
566
487
  /**
567
488
  * Enforce using function types instead of interfaces with call signatures 🔒 🔧
568
489
  * https://typescript-eslint.io/rules/prefer-function-type.
569
490
  */
570
- "@typescript-eslint/prefer-function-type": "error",
491
+ "typescript/prefer-function-type": "error",
571
492
 
572
493
  /**
573
494
  * Enforce includes method over indexOf method 🔒 🔧 💭
574
495
  * https://typescript-eslint.io/rules/prefer-includes.
575
496
  */
576
- "@typescript-eslint/prefer-includes": "warn",
497
+ "typescript/prefer-includes": "warn",
577
498
 
578
499
  /**
579
500
  * Require all enum members to be literal values 🔒
580
501
  * https://typescript-eslint.io/rules/prefer-literal-enum-member.
581
502
  */
582
- "@typescript-eslint/prefer-literal-enum-member": "warn",
503
+ "typescript/prefer-literal-enum-member": "warn",
583
504
 
584
505
  /**
585
506
  * Require using namespace keyword over module keyword to declare custom TypeScript modules ✅ 🔧
586
507
  * https://typescript-eslint.io/rules/prefer-namespace-keyword.
587
508
  */
588
- "@typescript-eslint/prefer-namespace-keyword": "error",
589
-
590
- /**
591
- * Enforce using the nullish coalescing operator instead of logical chaining 🔒 💡 💭
592
- * https://typescript-eslint.io/rules/prefer-nullish-coalescing.
593
- */
594
- // "@typescript-eslint/prefer-nullish-coalescing": "off",
509
+ "typescript/prefer-namespace-keyword": "error",
595
510
 
596
511
  /**
597
512
  * Enforce using concise optional chain expressions instead of chained logical ands 🔒 💡
598
513
  * https://typescript-eslint.io/rules/.
599
514
  */
600
- "@typescript-eslint/prefer-optional-chain": "warn",
515
+ "typescript/prefer-optional-chain": "warn",
601
516
 
602
517
  /**
603
518
  * Require private members to be marked as readonly if they"re never modified outside of the constructor 🔧 💭
604
519
  * https://typescript-eslint.io/rules/prefer-readonly.
605
520
  */
606
- "@typescript-eslint/prefer-readonly": "warn",
607
-
608
- /**
609
- * Require function parameters to be typed as readonly to prevent accidental mutation of inputs 💭
610
- * https://typescript-eslint.io/rules/prefer-readonly-parameter-types.
611
- */
612
- // "@typescript-eslint/prefer-readonly-parameter-types": "off",
521
+ "typescript/prefer-readonly": "warn",
613
522
 
614
523
  /**
615
524
  * Enforce using type parameter when calling Array#reduce instead of casting 🔒 🔧 💭
616
525
  * https://typescript-eslint.io/rules/prefer-reduce-type-parameter.
617
526
  */
618
- "@typescript-eslint/prefer-reduce-type-parameter": "warn",
527
+ "typescript/prefer-reduce-type-parameter": "warn",
619
528
 
620
529
  /**
621
530
  * Enforce RegExp#exec over String#match if no global flag is provided 🔧 💭
622
531
  * https://typescript-eslint.io/rules/prefer-regexp-exec.
623
532
  */
624
- "@typescript-eslint/prefer-regexp-exec": "warn",
533
+ "typescript/prefer-regexp-exec": "warn",
625
534
 
626
535
  /**
627
536
  * Enforce that this is used when only this type is returned 🔒 🔧 💭
628
537
  * https://typescript-eslint.io/rules/prefer-return-this-type.
629
538
  */
630
- "@typescript-eslint/prefer-return-this-type": "warn",
539
+ "typescript/prefer-return-this-type": "warn",
631
540
 
632
541
  /**
633
542
  * Enforce using String#startsWith and String#ends
634
543
  * With over other equivalent methods of checking substrings 🔒 🔧 💭
635
544
  * https://typescript-eslint.io/rules/prefer-string-starts-ends-with.
636
545
  */
637
- "@typescript-eslint/prefer-string-starts-ends-with": "warn",
546
+ "typescript/prefer-string-starts-ends-with": "warn",
638
547
 
639
548
  /**
640
549
  * Require any function or method that returns a Promise to be marked async 🔧 💭
641
550
  * https://typescript-eslint.io/rules/promise-function-async.
642
551
  */
643
- "@typescript-eslint/promise-function-async": "error",
552
+ "typescript/promise-function-async": "error",
644
553
 
645
554
  /**
646
555
  * Require Array#sort calls to always provide a compareFunction 💭
647
556
  * https://typescript-eslint.io/rules/require-array-sort-compare.
648
557
  */
649
- "@typescript-eslint/require-array-sort-compare": ["warn", { ignoreStringArrays: true }],
558
+ "typescript/require-array-sort-compare": ["warn", { ignoreStringArrays: true }],
650
559
 
651
560
  /**
652
561
  * Disallow async functions which have no await expression
653
562
  * https://typescript-eslint.io/rules/require-await.
654
563
  */
655
- // "require-await": "off",
656
- // "@typescript-eslint/require-await": baseRules.rules["require-await"],
657
-
658
- /**
659
- * Require both operands of addition to have type number or string ✅ 💭
660
- * Off: not really needed
661
- * https://typescript-eslint.io/rules/restrict-plus-operands.
662
- */
663
- // "@typescript-eslint/restrict-plus-operands": "off",
564
+ "require-await": "off",
565
+ "typescript/require-await": baseRules.rules["require-await"],
664
566
 
665
567
  /**
666
568
  * Enforce template literal expressions to be of string type ✅ 💭
667
569
  * https://typescript-eslint.io/rules/.
668
570
  */
669
- "@typescript-eslint/restrict-template-expressions": "error",
670
-
671
- /**
672
- * Enforce members of a type union/intersection to be sorted alphabetically 🔧 💡
673
- * https://typescript-eslint.io/rules/sort-type-union-intersection-members.
674
- */
675
- // "@typescript-eslint/sort-type-union-intersection-members": "off",
676
-
677
- /**
678
- * Disallow certain types in boolean expressions 🔧 💡 💭
679
- * https://typescript-eslint.io/rules/strict-boolean-expressions.
680
- */
681
- // "@typescript-eslint/strict-boolean-expressions": "off",
571
+ "typescript/restrict-template-expressions": "error",
682
572
 
683
573
  /**
684
574
  * Require switch-case statements to be exhaustive with union type 💡 💭
685
575
  * https://typescript-eslint.io/rules/switch-exhaustiveness-check.
686
576
  */
687
- "@typescript-eslint/switch-exhaustiveness-check": [
577
+ "typescript/switch-exhaustiveness-check": [
688
578
  "error",
689
579
  {
690
580
  allowDefaultCaseForExhaustiveSwitch: true,
@@ -697,7 +587,7 @@ export default {
697
587
  * Disallow certain triple slash directives in favor of ES6-style import declarations ✅
698
588
  * https://typescript-eslint.io/rules/triple-slash-reference.
699
589
  */
700
- "@typescript-eslint/triple-slash-reference": [
590
+ "typescript/triple-slash-reference": [
701
591
  "error",
702
592
  {
703
593
  path: "always",
@@ -711,13 +601,13 @@ export default {
711
601
  * While this rule should be enabled, it gives to many problems with external libraries
712
602
  * https://typescript-eslint.io/rules/unbound-method.
713
603
  */
714
- // "@typescript-eslint/unbound-method": "off",
604
+ // "typescript/unbound-method": "off",
715
605
 
716
606
  /**
717
607
  * Disallow two overloads that could be unified into one with a union or an optional/rest parameter
718
608
  * https://typescript-eslint.io/rules/unified-signatures.
719
609
  */
720
- "@typescript-eslint/unified-signatures": "error",
610
+ "typescript/unified-signatures": "error",
721
611
 
722
612
  /**
723
613
  * See https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/named.md# why it is turned off