eslint-config-isaacscript 4.18.0 → 4.20.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.
package/configs/base-eslint.js
CHANGED
|
@@ -574,13 +574,8 @@ const SUGGESTIONS = {
|
|
|
574
574
|
"prefer-object-has-own": "error",
|
|
575
575
|
"prefer-object-spread": "error",
|
|
576
576
|
|
|
577
|
-
/**
|
|
578
|
-
"prefer-promise-reject-errors":
|
|
579
|
-
"error",
|
|
580
|
-
{
|
|
581
|
-
allowEmptyReject: true,
|
|
582
|
-
},
|
|
583
|
-
],
|
|
577
|
+
/** Superseded by the `@typescript-eslint/prefer-promise-reject-errors` rule. */
|
|
578
|
+
"prefer-promise-reject-errors": "off",
|
|
584
579
|
|
|
585
580
|
/** The `disallowRedundantWrapping` option is enabled to make the rule stricter. */
|
|
586
581
|
"prefer-regex-literals": [
|
|
@@ -192,6 +192,7 @@ const SUPPORTED_RULES = {
|
|
|
192
192
|
],
|
|
193
193
|
|
|
194
194
|
"@typescript-eslint/prefer-enum-initializers": "error",
|
|
195
|
+
"@typescript-eslint/prefer-find": "error",
|
|
195
196
|
"@typescript-eslint/prefer-for-of": "error",
|
|
196
197
|
"@typescript-eslint/prefer-function-type": "error",
|
|
197
198
|
"@typescript-eslint/prefer-includes": "error",
|
|
@@ -244,7 +245,18 @@ const SUPPORTED_RULES = {
|
|
|
244
245
|
},
|
|
245
246
|
],
|
|
246
247
|
|
|
247
|
-
|
|
248
|
+
/**
|
|
249
|
+
* The `allowDefaultCaseForExhaustiveSwitch` option is disabled and the
|
|
250
|
+
* `requireDefaultForNonUnion` option is enabled to make the rule stricter.
|
|
251
|
+
*/
|
|
252
|
+
"@typescript-eslint/switch-exhaustiveness-check": [
|
|
253
|
+
"error",
|
|
254
|
+
{
|
|
255
|
+
allowDefaultCaseForExhaustiveSwitch: false,
|
|
256
|
+
requireDefaultForNonUnion: true,
|
|
257
|
+
},
|
|
258
|
+
],
|
|
259
|
+
|
|
248
260
|
"@typescript-eslint/triple-slash-reference": "error",
|
|
249
261
|
"@typescript-eslint/type-annotation-spacing": "off", // eslint-config-prettier
|
|
250
262
|
|
|
@@ -311,6 +323,7 @@ const EXTENSION_RULES = {
|
|
|
311
323
|
],
|
|
312
324
|
|
|
313
325
|
"@typescript-eslint/no-array-constructor": "error",
|
|
326
|
+
"@typescript-eslint/no-array-delete": "error",
|
|
314
327
|
|
|
315
328
|
/**
|
|
316
329
|
* Disabled since it is superfluous when using TypeScript according to [the ESLint
|
|
@@ -438,6 +451,14 @@ const EXTENSION_RULES = {
|
|
|
438
451
|
*/
|
|
439
452
|
"@typescript-eslint/padding-line-between-statements": "off",
|
|
440
453
|
|
|
454
|
+
/** The `allowEmptyReject` option is enabled since this is a common pattern. */
|
|
455
|
+
"@typescript-eslint/prefer-promise-reject-errors": [
|
|
456
|
+
"error",
|
|
457
|
+
{
|
|
458
|
+
allowEmptyReject: true,
|
|
459
|
+
},
|
|
460
|
+
],
|
|
461
|
+
|
|
441
462
|
/**
|
|
442
463
|
* We forbid unnecessary backticks by using the options specified in [the `eslint-config-prettier`
|
|
443
464
|
* documentation](https://github.com/prettier/eslint-config-prettier#enforce-backticks).
|