eslint-config-isaacscript 4.19.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,11 +245,15 @@ 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
|
+
*/
|
|
248
252
|
"@typescript-eslint/switch-exhaustiveness-check": [
|
|
249
253
|
"error",
|
|
250
254
|
{
|
|
251
255
|
allowDefaultCaseForExhaustiveSwitch: false,
|
|
256
|
+
requireDefaultForNonUnion: true,
|
|
252
257
|
},
|
|
253
258
|
],
|
|
254
259
|
|
|
@@ -318,6 +323,7 @@ const EXTENSION_RULES = {
|
|
|
318
323
|
],
|
|
319
324
|
|
|
320
325
|
"@typescript-eslint/no-array-constructor": "error",
|
|
326
|
+
"@typescript-eslint/no-array-delete": "error",
|
|
321
327
|
|
|
322
328
|
/**
|
|
323
329
|
* Disabled since it is superfluous when using TypeScript according to [the ESLint
|
|
@@ -445,6 +451,14 @@ const EXTENSION_RULES = {
|
|
|
445
451
|
*/
|
|
446
452
|
"@typescript-eslint/padding-line-between-statements": "off",
|
|
447
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
|
+
|
|
448
462
|
/**
|
|
449
463
|
* We forbid unnecessary backticks by using the options specified in [the `eslint-config-prettier`
|
|
450
464
|
* documentation](https://github.com/prettier/eslint-config-prettier#enforce-backticks).
|