eslint-config-complete 3.2.4 → 4.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.
@@ -11,46 +11,46 @@ export const baseComplete = defineConfig({
11
11
  complete: ESLintPluginComplete,
12
12
  },
13
13
  rules: {
14
- "complete/complete-sentences-jsdoc": "warn",
15
- "complete/complete-sentences-line-comments": "warn",
16
- "complete/consistent-enum-values": "warn",
17
- "complete/consistent-named-tuples": "warn",
18
- "complete/eqeqeq-fix": "warn",
19
- "complete/format-jsdoc-comments": "warn",
20
- "complete/format-line-comments": "warn",
21
- "complete/jsdoc-code-block-language": "warn",
22
- "complete/newline-between-switch-case": "warn",
23
- "complete/no-confusing-set-methods": "warn",
24
- "complete/no-empty-jsdoc": "warn",
25
- "complete/no-empty-line-comments": "warn",
26
- "complete/no-explicit-array-loops": "warn",
27
- "complete/no-explicit-map-set-loops": "warn",
28
- "complete/no-for-in": "warn",
29
- "complete/no-let-any": "warn",
30
- "complete/no-mutable-return": "warn",
31
- "complete/no-number-enums": "warn",
32
- "complete/no-object-any": "warn",
33
- "complete/no-object-methods-with-map-set": "warn",
34
- "complete/no-string-length-0": "warn",
35
- "complete/no-template-curly-in-string-fix": "warn",
36
- "complete/no-undefined-return-type": "warn",
37
- "complete/no-unnecessary-assignment": "warn",
38
- "complete/no-unsafe-plusplus": "warn",
39
- "complete/no-useless-return": "warn",
40
- "complete/no-void-return-type": "warn",
41
- "complete/prefer-const": "warn",
42
- "complete/prefer-plusplus": "warn",
43
- "complete/prefer-postfix-plusplus": "warn",
44
- "complete/prefer-readonly-parameter-types": "warn",
45
- "complete/require-break": "warn",
46
- "complete/require-capital-const-assertions": "warn",
47
- "complete/require-capital-read-only": "warn",
48
- "complete/require-unannotated-const-assertions": "warn",
49
- "complete/require-variadic-function-argument": "warn",
50
- "complete/strict-array-methods": "warn",
51
- "complete/strict-enums": "warn",
52
- "complete/strict-undefined-functions": "warn",
53
- "complete/strict-void-functions": "warn",
14
+ "complete/complete-sentences-jsdoc": "error",
15
+ "complete/complete-sentences-line-comments": "error",
16
+ "complete/consistent-enum-values": "error",
17
+ "complete/consistent-named-tuples": "error",
18
+ "complete/eqeqeq-fix": "error",
19
+ "complete/format-jsdoc-comments": "error",
20
+ "complete/format-line-comments": "error",
21
+ "complete/jsdoc-code-block-language": "error",
22
+ "complete/newline-between-switch-case": "error",
23
+ "complete/no-confusing-set-methods": "error",
24
+ "complete/no-empty-jsdoc": "error",
25
+ "complete/no-empty-line-comments": "error",
26
+ "complete/no-explicit-array-loops": "error",
27
+ "complete/no-explicit-map-set-loops": "error",
28
+ "complete/no-for-in": "error",
29
+ "complete/no-let-any": "error",
30
+ "complete/no-mutable-return": "error",
31
+ "complete/no-number-enums": "error",
32
+ "complete/no-object-any": "error",
33
+ "complete/no-object-methods-with-map-set": "error",
34
+ "complete/no-string-length-0": "error",
35
+ "complete/no-template-curly-in-string-fix": "error",
36
+ "complete/no-undefined-return-type": "error",
37
+ "complete/no-unnecessary-assignment": "error",
38
+ "complete/no-unsafe-plusplus": "error",
39
+ "complete/no-useless-return": "error",
40
+ "complete/no-void-return-type": "error",
41
+ "complete/prefer-const": "error",
42
+ "complete/prefer-plusplus": "error",
43
+ "complete/prefer-postfix-plusplus": "error",
44
+ "complete/prefer-readonly-parameter-types": "error",
45
+ "complete/require-break": "error",
46
+ "complete/require-capital-const-assertions": "error",
47
+ "complete/require-capital-read-only": "error",
48
+ "complete/require-unannotated-const-assertions": "error",
49
+ "complete/require-variadic-function-argument": "error",
50
+ "complete/strict-array-methods": "error",
51
+ "complete/strict-enums": "error",
52
+ "complete/strict-undefined-functions": "error",
53
+ "complete/strict-void-functions": "error",
54
54
  },
55
55
  // Rules that require type information will throw an error on ".json" files. (This is needed
56
56
  // when using `eslint-plugin-package-json`. Even though this config does not currently use the
@@ -7,86 +7,86 @@ import { defineConfig } from "eslint/config";
7
7
  const POSSIBLE_PROBLEMS = {
8
8
  /** The `checkForEach` option is enabled to make the rule stricter. */
9
9
  "array-callback-return": [
10
- "warn",
10
+ "error",
11
11
  {
12
12
  checkForEach: true,
13
13
  },
14
14
  ],
15
15
  "constructor-super": "off", // @typescript-eslint/eslint-recommended
16
- "for-direction": "warn",
16
+ "for-direction": "error",
17
17
  "getter-return": "off", // @typescript-eslint/eslint-recommended
18
- "no-async-promise-executor": "warn",
19
- "no-await-in-loop": "warn",
20
- "no-class-assign": "warn",
21
- "no-compare-neg-zero": "warn",
22
- "no-cond-assign": "warn",
18
+ "no-async-promise-executor": "error",
19
+ "no-await-in-loop": "error",
20
+ "no-class-assign": "error",
21
+ "no-compare-neg-zero": "error",
22
+ "no-cond-assign": "error",
23
23
  "no-const-assign": "off", // @typescript-eslint/eslint-recommended
24
- "no-constant-binary-expression": "warn",
25
- "no-constant-condition": "warn",
26
- "no-constructor-return": "warn",
27
- "no-control-regex": "warn",
28
- "no-debugger": "warn",
24
+ "no-constant-binary-expression": "error",
25
+ "no-constant-condition": "error",
26
+ "no-constructor-return": "error",
27
+ "no-control-regex": "error",
28
+ "no-debugger": "error",
29
29
  "no-dupe-args": "off", // @typescript-eslint/eslint-recommended
30
30
  "no-dupe-class-members": "off", // @typescript-eslint/eslint-recommended
31
- "no-dupe-else-if": "warn",
31
+ "no-dupe-else-if": "error",
32
32
  "no-dupe-keys": "off", // @typescript-eslint/eslint-recommended
33
- "no-duplicate-case": "warn",
33
+ "no-duplicate-case": "error",
34
34
  /** Superseded by the `import-x/no-duplicates` rule. */
35
35
  "no-duplicate-imports": "off",
36
- "no-empty-character-class": "warn",
37
- "no-empty-pattern": "warn",
38
- "no-ex-assign": "warn",
39
- "no-fallthrough": "warn",
36
+ "no-empty-character-class": "error",
37
+ "no-empty-pattern": "error",
38
+ "no-ex-assign": "error",
39
+ "no-fallthrough": "error",
40
40
  "no-func-assign": "off", // @typescript-eslint/eslint-recommended
41
41
  "no-import-assign": "off", // @typescript-eslint/eslint-recommended
42
- "no-inner-declarations": "warn",
43
- "no-invalid-regexp": "warn",
44
- "no-irregular-whitespace": "warn",
42
+ "no-inner-declarations": "error",
43
+ "no-invalid-regexp": "error",
44
+ "no-irregular-whitespace": "error",
45
45
  /** Superseded by the `@typescript-eslint/no-loss-of-precision` rule. */
46
46
  "no-loss-of-precision": "off",
47
- "no-misleading-character-class": "warn",
48
- "no-new-native-nonconstructor": "warn",
47
+ "no-misleading-character-class": "error",
48
+ "no-new-native-nonconstructor": "error",
49
49
  "no-obj-calls": "off", // @typescript-eslint/eslint-recommended`
50
- "no-promise-executor-return": "warn",
51
- "no-prototype-builtins": "warn",
52
- "no-self-assign": "warn",
53
- "no-self-compare": "warn",
50
+ "no-promise-executor-return": "error",
51
+ "no-prototype-builtins": "error",
52
+ "no-self-assign": "error",
53
+ "no-self-compare": "error",
54
54
  "no-setter-return": "off", // @typescript-eslint/eslint-recommended
55
- "no-sparse-arrays": "warn",
55
+ "no-sparse-arrays": "error",
56
56
  /** Superseded by the `complete/eqeqeq-fix` rule (since we want auto-fix to work properly). */
57
57
  "no-template-curly-in-string": "off",
58
58
  "no-this-before-super": "off", // @typescript-eslint/eslint-recommended`
59
- "no-unassigned-vars": "warn",
59
+ "no-unassigned-vars": "error",
60
60
  "no-undef": "off", // @typescript-eslint/eslint-recommended
61
61
  "no-unexpected-multiline": "off", // eslint-config-prettier
62
- "no-unmodified-loop-condition": "warn",
62
+ "no-unmodified-loop-condition": "error",
63
63
  "no-unreachable": "off", // @typescript-eslint/eslint-recommended
64
- "no-unreachable-loop": "warn",
65
- "no-unsafe-finally": "warn",
64
+ "no-unreachable-loop": "error",
65
+ "no-unsafe-finally": "error",
66
66
  "no-unsafe-negation": "off", // @typescript-eslint/eslint-recommended
67
- "no-unsafe-optional-chaining": "warn",
68
- "no-unused-private-class-members": "warn",
67
+ "no-unsafe-optional-chaining": "error",
68
+ "no-unused-private-class-members": "error",
69
69
  /** Superseded by the `@typescript-eslint/no-unused-vars` rule. */
70
70
  "no-unused-vars": "off",
71
71
  /** Superseded by the `@typescript-eslint/no-use-before-define` rule. */
72
72
  "no-use-before-define": "off",
73
- "no-useless-backreference": "warn",
73
+ "no-useless-backreference": "error",
74
74
  /**
75
75
  * Disabled since [Airbnb reports that the rule is "very
76
76
  * buggy"](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/errors.js).
77
77
  */
78
78
  "require-atomic-updates": "off",
79
- "use-isnan": "warn",
80
- "valid-typeof": "warn",
79
+ "use-isnan": "error",
80
+ "valid-typeof": "error",
81
81
  };
82
82
  /**
83
83
  * @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
84
84
  * @see https://eslint.org/docs/latest/rules/#suggestions
85
85
  */
86
86
  const SUGGESTIONS = {
87
- "accessor-pairs": "warn",
88
- "arrow-body-style": "warn",
89
- "block-scoped-var": "warn",
87
+ "accessor-pairs": "error",
88
+ "arrow-body-style": "error",
89
+ "block-scoped-var": "error",
90
90
  /**
91
91
  * Superseded by the `@typescript-eslint/naming-convention` rule. (`camelcase` is used to enforce
92
92
  * naming conventions.)
@@ -106,34 +106,34 @@ const SUGGESTIONS = {
106
106
  complexity: "off",
107
107
  /** Superseded by the `@typescript-eslint/consistent-return` rule. */
108
108
  "consistent-return": "off",
109
- "consistent-this": "warn",
109
+ "consistent-this": "error",
110
110
  /**
111
111
  * Always requiring curly braces can partially ward against [Apple-style if statement
112
112
  * bugs](https://www.imperialviolet.org/2014/02/22/applebug.html). Additionally, this rule needs
113
113
  * to be set to "all" to [work properly with
114
114
  * Prettier](https://github.com/prettier/eslint-config-prettier#curly).
115
115
  */
116
- curly: ["warn", "all"],
116
+ curly: ["error", "all"],
117
117
  /**
118
118
  * Disabled since it would cause the `@typescript-eslint/switch-exhaustiveness-check` rule to not
119
119
  * work properly.
120
120
  */
121
121
  "default-case": "off",
122
- "default-case-last": "warn",
122
+ "default-case-last": "error",
123
123
  /** Superseded by the `@typescript-eslint/default-param-last` rule. */
124
124
  "default-param-last": "off",
125
125
  /** Superseded by the `@typescript-eslint/dot-notation` rule. */
126
126
  "dot-notation": "off",
127
127
  /** Superseded by the `complete/eqeqeq-fix` rule (since we want auto-fix to work properly). */
128
128
  eqeqeq: "off",
129
- "func-name-matching": "warn",
130
- "func-names": "warn",
129
+ "func-name-matching": "error",
130
+ "func-names": "error",
131
131
  /**
132
132
  * Disabled since it is common in the TypeScript ecosystem to use both function forms, depending
133
133
  * on the situation.
134
134
  */
135
135
  "func-style": "off",
136
- "grouped-accessor-pairs": "warn",
136
+ "grouped-accessor-pairs": "error",
137
137
  /** Superseded by the `complete/no-for-in` rule. */
138
138
  "guard-for-in": "off",
139
139
  /** Disabled since it is expected to be configured with project-specific keywords. */
@@ -149,13 +149,13 @@ const SUGGESTIONS = {
149
149
  "init-declarations": "off",
150
150
  /** The `enforceForIfStatements` option is enabled to make the rule stricter. */
151
151
  "logical-assignment-operators": [
152
- "warn",
152
+ "error",
153
153
  "always",
154
154
  {
155
155
  enforceForIfStatements: true,
156
156
  },
157
157
  ],
158
- "max-classes-per-file": "warn",
158
+ "max-classes-per-file": "error",
159
159
  /** Disabled since this rule is too prescriptive for general-purpose use. */
160
160
  "max-depth": "off",
161
161
  /**
@@ -168,7 +168,7 @@ const SUGGESTIONS = {
168
168
  * provide much value.
169
169
  */
170
170
  "max-lines-per-function": "off",
171
- "max-nested-callbacks": "warn",
171
+ "max-nested-callbacks": "error",
172
172
  /** Superseded by the `@typescript-eslint/max-params` rule. */
173
173
  "max-params": "off",
174
174
  /**
@@ -176,13 +176,13 @@ const SUGGESTIONS = {
176
176
  * does not provide much value.
177
177
  */
178
178
  "max-statements": "off",
179
- "new-cap": "warn",
180
- "no-alert": "warn",
179
+ "new-cap": "error",
180
+ "no-alert": "error",
181
181
  /** Superseded by the `@typescript-eslint/no-array-constructor` rule. */
182
182
  "no-array-constructor": "off",
183
- "no-bitwise": "warn",
184
- "no-caller": "warn",
185
- "no-case-declarations": "warn",
183
+ "no-bitwise": "error",
184
+ "no-caller": "error",
185
+ "no-case-declarations": "error",
186
186
  /**
187
187
  * Disabled because command-line programs written in TypeScript commonly write to standard out and
188
188
  * standard error.
@@ -194,65 +194,65 @@ const SUGGESTIONS = {
194
194
  * pattern](https://medium.com/swlh/return-early-pattern-3d18a41bba8).
195
195
  */
196
196
  "no-continue": "off",
197
- "no-delete-var": "warn",
197
+ "no-delete-var": "error",
198
198
  /** Disabled since it is incompatible with the `unicorn/better-regex` rule. */
199
199
  "no-div-regex": "off",
200
200
  /** The `allowElseIf` option is disabled to make the rule stricter. */
201
201
  "no-else-return": [
202
- "warn",
202
+ "error",
203
203
  {
204
204
  allowElseIf: false,
205
205
  },
206
206
  ],
207
- "no-empty": "warn",
207
+ "no-empty": "error",
208
208
  /** Superseded by the `@typescript-eslint/no-empty-function` rule. */
209
209
  "no-empty-function": "off",
210
- "no-empty-static-block": "warn",
211
- "no-eq-null": "warn",
212
- "no-eval": "warn",
213
- "no-extend-native": "warn",
214
- "no-extra-bind": "warn",
215
- "no-extra-boolean-cast": "warn",
216
- "no-extra-label": "warn",
217
- "no-global-assign": "warn",
218
- "no-implicit-coercion": "warn",
219
- "no-implicit-globals": "warn",
210
+ "no-empty-static-block": "error",
211
+ "no-eq-null": "error",
212
+ "no-eval": "error",
213
+ "no-extend-native": "error",
214
+ "no-extra-bind": "error",
215
+ "no-extra-boolean-cast": "error",
216
+ "no-extra-label": "error",
217
+ "no-global-assign": "error",
218
+ "no-implicit-coercion": "error",
219
+ "no-implicit-globals": "error",
220
220
  /** Superseded by the `@typescript-eslint/no-implied-eval` rule. */
221
221
  "no-implied-eval": "off",
222
222
  /** Disabled because inline comments are common in the TypeScript ecosystem. */
223
223
  "no-inline-comments": "off",
224
224
  /** Superseded by the `@typescript-eslint/no-invalid-this` rule. */
225
225
  "no-invalid-this": "off",
226
- "no-iterator": "warn",
227
- "no-label-var": "warn",
228
- "no-labels": "warn",
229
- "no-lone-blocks": "warn",
230
- "no-lonely-if": "warn",
226
+ "no-iterator": "error",
227
+ "no-label-var": "error",
228
+ "no-labels": "error",
229
+ "no-lone-blocks": "error",
230
+ "no-lonely-if": "error",
231
231
  /** Superseded by the `@typescript-eslint/no-loop-func` rule. */
232
232
  "no-loop-func": "off",
233
233
  /** Superseded by the `@typescript-eslint/no-magic-numbers` rule. */
234
234
  "no-magic-numbers": "off",
235
- "no-multi-assign": "warn",
236
- "no-multi-str": "warn",
235
+ "no-multi-assign": "error",
236
+ "no-multi-str": "error",
237
237
  /** Superseded by the `unicorn/no-negated-condition` rule. */
238
238
  "no-negated-condition": "off",
239
239
  /**
240
240
  * `unicorn/no-nested-ternary` is a modified version of this rule but that version is less strict.
241
241
  */
242
- "no-nested-ternary": "warn",
243
- "no-new": "warn",
244
- "no-new-func": "warn",
245
- "no-new-wrappers": "warn",
246
- "no-nonoctal-decimal-escape": "warn",
247
- "no-object-constructor": "warn",
248
- "no-octal": "warn",
249
- "no-octal-escape": "warn",
242
+ "no-nested-ternary": "error",
243
+ "no-new": "error",
244
+ "no-new-func": "error",
245
+ "no-new-wrappers": "error",
246
+ "no-nonoctal-decimal-escape": "error",
247
+ "no-object-constructor": "error",
248
+ "no-octal": "error",
249
+ "no-octal-escape": "error",
250
250
  /**
251
251
  * The options are [copied from
252
252
  * Airbnb](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/best-practices.js).
253
253
  */
254
254
  "no-param-reassign": [
255
- "warn",
255
+ "error",
256
256
  {
257
257
  props: true,
258
258
  ignorePropertyModificationsFor: [
@@ -275,16 +275,16 @@ const SUGGESTIONS = {
275
275
  * errors with minified code, but Prettier adds semicolons automatically.)
276
276
  */
277
277
  "no-plusplus": "off",
278
- "no-proto": "warn",
278
+ "no-proto": "error",
279
279
  /** Superseded by the `@typescript-eslint/block-spacing` rule. */
280
280
  "no-redeclare": "off",
281
- "no-regex-spaces": "warn",
281
+ "no-regex-spaces": "error",
282
282
  /**
283
283
  * The options are [copied from
284
284
  * Airbnb](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/es6.js).
285
285
  */
286
286
  "no-restricted-exports": [
287
- "warn",
287
+ "error",
288
288
  {
289
289
  restrictedNamedExports: [
290
290
  "default", // use `export default` to provide a default export
@@ -297,7 +297,7 @@ const SUGGESTIONS = {
297
297
  * Airbnb](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/variables.js).
298
298
  */
299
299
  "no-restricted-globals": [
300
- "warn",
300
+ "error",
301
301
  {
302
302
  name: "isFinite",
303
303
  message: "Use Number.isFinite instead: https://github.com/airbnb/javascript#standard-library--isfinite",
@@ -315,7 +315,7 @@ const SUGGESTIONS = {
315
315
  * Airbnb](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/best-practices.js).
316
316
  */
317
317
  "no-restricted-properties": [
318
- "warn",
318
+ "error",
319
319
  {
320
320
  object: "arguments",
321
321
  property: "callee",
@@ -368,8 +368,8 @@ const SUGGESTIONS = {
368
368
  /** Disabled because it is intended for disallowing specific language features per-project. */
369
369
  "no-restricted-syntax": "off",
370
370
  /** The `always` option is provided to make the rule stricter. */
371
- "no-return-assign": ["warn", "always"],
372
- "no-script-url": "warn",
371
+ "no-return-assign": ["error", "always"],
372
+ "no-script-url": "error",
373
373
  /**
374
374
  * Disabled because [it can conflict with
375
375
  * Prettier](https://github.com/prettier/eslint-config-prettier/tree/main#no-sequences).
@@ -377,7 +377,7 @@ const SUGGESTIONS = {
377
377
  "no-sequences": "off",
378
378
  /** Superseded by the `@typescript-eslint/no-shadow` rule. */
379
379
  "no-shadow": "off",
380
- "no-shadow-restricted-names": "warn",
380
+ "no-shadow-restricted-names": "error",
381
381
  /**
382
382
  * Disabled because ternaries are common in the TypeScript ecosystem and can often lead to concise
383
383
  * code that is easy to read.
@@ -385,7 +385,7 @@ const SUGGESTIONS = {
385
385
  "no-ternary": "off",
386
386
  /** Superseded by the `@typescript-eslint/no-throw-literal` rule. */
387
387
  "no-throw-literal": "off",
388
- "no-undef-init": "warn",
388
+ "no-undef-init": "error",
389
389
  /**
390
390
  * Disabled because in TypeScript, it is common to explicitly check for undefined for the purposes
391
391
  * of type narrowing.
@@ -398,41 +398,41 @@ const SUGGESTIONS = {
398
398
  "no-underscore-dangle": "off",
399
399
  /** The `defaultAssignment` option is disabled to make the rule stricter. */
400
400
  "no-unneeded-ternary": [
401
- "warn",
401
+ "error",
402
402
  {
403
403
  defaultAssignment: false,
404
404
  },
405
405
  ],
406
406
  /** Superseded by the `@typescript-eslint/no-unused-expressions` rule. */
407
407
  "no-unused-expressions": "off",
408
- "no-unused-labels": "warn",
409
- "no-useless-assignment": "warn",
410
- "no-useless-call": "warn",
411
- "no-useless-catch": "warn",
408
+ "no-unused-labels": "error",
409
+ "no-useless-assignment": "error",
410
+ "no-useless-call": "error",
411
+ "no-useless-catch": "error",
412
412
  /** The `enforceForClassMembers` option is enabled to make the rule stricter. */
413
413
  "no-useless-computed-key": [
414
- "warn",
414
+ "error",
415
415
  {
416
416
  enforceForClassMembers: true,
417
417
  },
418
418
  ],
419
- "no-useless-concat": "warn",
419
+ "no-useless-concat": "error",
420
420
  /** Superseded by the `@typescript-eslint/no-useless-constructor` rule. */
421
421
  "no-useless-constructor": "off",
422
- "no-useless-escape": "warn",
423
- "no-useless-rename": "warn",
422
+ "no-useless-escape": "error",
423
+ "no-useless-rename": "error",
424
424
  /**
425
425
  * Superseded by the `complete/no-useless-return` rule (since the auto-fix is usually unwanted).
426
426
  */
427
427
  "no-useless-return": "off",
428
- "no-var": "warn",
429
- "no-void": "warn",
428
+ "no-var": "error",
429
+ "no-void": "error",
430
430
  /** Superseded by the `unicorn/expiring-todo-comments` rule. */
431
431
  "no-warning-comments": "off",
432
- "no-with": "warn",
432
+ "no-with": "error",
433
433
  /** The `ignoreConstructors` option is disabled to make the rule stricter. */
434
434
  "object-shorthand": [
435
- "warn",
435
+ "error",
436
436
  "always",
437
437
  {
438
438
  ignoreConstructors: false,
@@ -442,36 +442,36 @@ const SUGGESTIONS = {
442
442
  * The `never` option is provided to disallow multi-variable declarations (since they can be
443
443
  * confusing).
444
444
  */
445
- "one-var": ["warn", "never"],
446
- "operator-assignment": "warn",
447
- "prefer-arrow-callback": "warn",
445
+ "one-var": ["error", "never"],
446
+ "operator-assignment": "error",
447
+ "prefer-arrow-callback": "error",
448
448
  /** Superseded by the `complete/prefer-const` rule (since the auto-fix is usually unwanted). */
449
449
  "prefer-const": "off",
450
450
  /** Superseded by the `@typescript-eslint/prefer-destructuring` rule. */
451
451
  "prefer-destructuring": "off",
452
- "prefer-exponentiation-operator": "warn",
452
+ "prefer-exponentiation-operator": "error",
453
453
  /**
454
454
  * Disabled because it is common to have a regex with only a single match, in which case a named
455
455
  * capture group can be needlessly verbose (and cause extra type narrowing).
456
456
  */
457
457
  "prefer-named-capture-group": "off",
458
- "prefer-numeric-literals": "warn",
459
- "prefer-object-has-own": "warn",
460
- "prefer-object-spread": "warn",
458
+ "prefer-numeric-literals": "error",
459
+ "prefer-object-has-own": "error",
460
+ "prefer-object-spread": "error",
461
461
  /** Superseded by the `@typescript-eslint/prefer-promise-reject-errors` rule. */
462
462
  "prefer-promise-reject-errors": "off",
463
463
  /** The `disallowRedundantWrapping` option is enabled to make the rule stricter. */
464
464
  "prefer-regex-literals": [
465
- "warn",
465
+ "error",
466
466
  {
467
467
  disallowRedundantWrapping: true,
468
468
  },
469
469
  ],
470
- "prefer-rest-params": "warn",
471
- "prefer-spread": "warn",
472
- "prefer-template": "warn",
473
- "preserve-caught-error": "warn",
474
- radix: "warn",
470
+ "prefer-rest-params": "error",
471
+ "prefer-spread": "error",
472
+ "prefer-template": "error",
473
+ "preserve-caught-error": "error",
474
+ radix: "error",
475
475
  /** Superseded by the `@typescript-eslint/require-await` rule. */
476
476
  "require-await": "off",
477
477
  /**
@@ -480,7 +480,7 @@ const SUGGESTIONS = {
480
480
  * the verbosity.)
481
481
  */
482
482
  "require-unicode-regexp": "off",
483
- "require-yield": "warn",
483
+ "require-yield": "error",
484
484
  /** Disabled since this is automatically handled by `prettier-plugin-organize-imports`. */
485
485
  "sort-imports": "off",
486
486
  /** Disabled because object keys are often not meant to be sorted in alphabetical order. */
@@ -490,17 +490,17 @@ const SUGGESTIONS = {
490
490
  */
491
491
  "sort-vars": "off",
492
492
  /** The `never` option is provided to make the rule stricter. */
493
- strict: ["warn", "never"],
494
- "symbol-description": "warn",
495
- "vars-on-top": "warn",
496
- yoda: "warn",
493
+ strict: ["error", "never"],
494
+ "symbol-description": "error",
495
+ "vars-on-top": "error",
496
+ yoda: "error",
497
497
  };
498
498
  /**
499
499
  * @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
500
500
  * @see https://eslint.org/docs/latest/rules/#suggestions
501
501
  */
502
502
  const LAYOUT_AND_FORMATTING = {
503
- "unicode-bom": "warn",
503
+ "unicode-bom": "error",
504
504
  };
505
505
  /**
506
506
  * This ESLint config only contains built-in rules from ESLint itself: