@w5s/eslint-config 3.5.3 → 3.5.6

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,730 +11,750 @@ declare module 'eslint' {
11
11
  export interface RuleOptions {
12
12
  /**
13
13
  * Improve regexes by making them shorter, consistent, and safer.
14
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/better-regex.md
14
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/better-regex.md
15
15
  */
16
16
  'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
17
17
  /**
18
18
  * Enforce a specific parameter name in catch clauses.
19
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/catch-error-name.md
19
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/catch-error-name.md
20
20
  */
21
21
  'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
22
22
  /**
23
23
  * Enforce consistent assertion style with `node:assert`.
24
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-assert.md
24
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-assert.md
25
25
  */
26
26
  'unicorn/consistent-assert'?: Linter.RuleEntry<[]>
27
27
  /**
28
28
  * Prefer passing `Date` directly to the constructor when cloning.
29
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-date-clone.md
29
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-date-clone.md
30
30
  */
31
31
  'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>
32
32
  /**
33
33
  * Use destructured variables over properties.
34
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-destructuring.md
34
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-destructuring.md
35
35
  */
36
36
  'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
37
37
  /**
38
38
  * Prefer consistent types when spreading a ternary in an array literal.
39
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-empty-array-spread.md
39
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-empty-array-spread.md
40
40
  */
41
41
  'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
42
42
  /**
43
43
  * Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
44
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-existence-index-check.md
44
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-existence-index-check.md
45
45
  */
46
46
  'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>
47
47
  /**
48
48
  * Move function definitions to the highest possible scope.
49
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-function-scoping.md
49
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-function-scoping.md
50
50
  */
51
51
  'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
52
+ /**
53
+ * Enforce consistent style for escaping `${` in template literals.
54
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-template-literal-escape.md
55
+ */
56
+ 'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>
52
57
  /**
53
58
  * Enforce correct `Error` subclassing.
54
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/custom-error-definition.md
59
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/custom-error-definition.md
55
60
  */
56
61
  'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
57
62
  /**
58
63
  * Enforce no spaces between braces.
59
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/empty-brace-spaces.md
64
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/empty-brace-spaces.md
60
65
  */
61
66
  'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
62
67
  /**
63
68
  * Enforce passing a `message` value when creating a built-in error.
64
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/error-message.md
69
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/error-message.md
65
70
  */
66
71
  'unicorn/error-message'?: Linter.RuleEntry<[]>
67
72
  /**
68
73
  * Require escape sequences to use uppercase or lowercase values.
69
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/escape-case.md
74
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/escape-case.md
70
75
  */
71
76
  'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>
72
77
  /**
73
78
  * Add expiration conditions to TODO comments.
74
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/expiring-todo-comments.md
79
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/expiring-todo-comments.md
75
80
  */
76
81
  'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
77
82
  /**
78
83
  * Enforce explicitly comparing the `length` or `size` property of a value.
79
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/explicit-length-check.md
84
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/explicit-length-check.md
80
85
  */
81
86
  'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
82
87
  /**
83
88
  * Enforce a case style for filenames.
84
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/filename-case.md
89
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/filename-case.md
85
90
  */
86
91
  'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
87
92
  /**
88
93
  * Enforce specific import styles per module.
89
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/import-style.md
94
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/import-style.md
90
95
  */
91
96
  'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
92
97
  /**
93
98
  * Prevent usage of variables from outside the scope of isolated functions.
94
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/isolated-functions.md
99
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/isolated-functions.md
95
100
  */
96
101
  'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>
97
102
  /**
98
103
  * Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
99
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/new-for-builtins.md
104
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/new-for-builtins.md
100
105
  */
101
106
  'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
102
107
  /**
103
108
  * Enforce specifying rules to disable in `eslint-disable` comments.
104
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-abusive-eslint-disable.md
109
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-abusive-eslint-disable.md
105
110
  */
106
111
  'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
107
112
  /**
108
113
  * Disallow recursive access to `this` within getters and setters.
109
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-accessor-recursion.md
114
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-accessor-recursion.md
110
115
  */
111
116
  'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>
112
117
  /**
113
118
  * Disallow anonymous functions and classes as the default export.
114
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-anonymous-default-export.md
119
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-anonymous-default-export.md
115
120
  */
116
121
  'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
117
122
  /**
118
123
  * Prevent passing a function reference directly to iterator methods.
119
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-callback-reference.md
124
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-callback-reference.md
120
125
  */
121
126
  'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
122
127
  /**
123
128
  * Prefer `for…of` over the `forEach` method.
124
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-for-each.md
129
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-for-each.md
125
130
  */
126
131
  'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
127
132
  /**
128
133
  * Disallow using the `this` argument in array methods.
129
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-method-this-argument.md
134
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-method-this-argument.md
130
135
  */
131
136
  'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
132
137
  /**
133
138
  * Replaced by `unicorn/prefer-single-call` which covers more cases.
134
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
139
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
135
140
  * @deprecated
136
141
  */
137
142
  'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>
138
143
  /**
139
144
  * Disallow `Array#reduce()` and `Array#reduceRight()`.
140
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reduce.md
145
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-reduce.md
141
146
  */
142
147
  'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
143
148
  /**
144
149
  * Prefer `Array#toReversed()` over `Array#reverse()`.
145
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reverse.md
150
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-reverse.md
146
151
  */
147
152
  'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>
148
153
  /**
149
154
  * Prefer `Array#toSorted()` over `Array#sort()`.
150
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-sort.md
155
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-sort.md
151
156
  */
152
157
  'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>
153
158
  /**
154
159
  * Disallow member access from await expression.
155
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-expression-member.md
160
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-await-expression-member.md
156
161
  */
157
162
  'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
158
163
  /**
159
164
  * Disallow using `await` in `Promise` method parameters.
160
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-in-promise-methods.md
165
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-await-in-promise-methods.md
161
166
  */
162
167
  'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
163
168
  /**
164
169
  * Do not use leading/trailing space between `console.log` parameters.
165
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-console-spaces.md
170
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-console-spaces.md
166
171
  */
167
172
  'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
168
173
  /**
169
174
  * Do not use `document.cookie` directly.
170
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-document-cookie.md
175
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-document-cookie.md
171
176
  */
172
177
  'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
173
178
  /**
174
179
  * Disallow empty files.
175
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-empty-file.md
180
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-empty-file.md
176
181
  */
177
182
  'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
178
183
  /**
179
184
  * Do not use a `for` loop that can be replaced with a `for-of` loop.
180
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-for-loop.md
185
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-for-loop.md
181
186
  */
182
187
  'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
183
188
  /**
184
189
  * Enforce the use of Unicode escapes instead of hexadecimal escapes.
185
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-hex-escape.md
190
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-hex-escape.md
186
191
  */
187
192
  'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
188
193
  /**
189
194
  * Disallow immediate mutation after variable assignment.
190
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-immediate-mutation.md
195
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-immediate-mutation.md
191
196
  */
192
197
  'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>
193
198
  /**
194
199
  * Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
195
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
200
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
196
201
  * @deprecated
197
202
  */
198
203
  'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
199
204
  /**
200
205
  * Disallow `instanceof` with built-in objects
201
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-instanceof-builtins.md
206
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-instanceof-builtins.md
202
207
  */
203
208
  'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>
204
209
  /**
205
210
  * Disallow invalid options in `fetch()` and `new Request()`.
206
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-fetch-options.md
211
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-invalid-fetch-options.md
207
212
  */
208
213
  'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
209
214
  /**
210
215
  * Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
211
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-remove-event-listener.md
216
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-invalid-remove-event-listener.md
212
217
  */
213
218
  'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
214
219
  /**
215
220
  * Disallow identifiers starting with `new` or `class`.
216
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-keyword-prefix.md
221
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-keyword-prefix.md
217
222
  */
218
223
  'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
219
224
  /**
220
225
  * Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
221
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
226
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
222
227
  * @deprecated
223
228
  */
224
229
  'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>
225
230
  /**
226
231
  * Disallow `if` statements as the only statement in `if` blocks without `else`.
227
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-lonely-if.md
232
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-lonely-if.md
228
233
  */
229
234
  'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
230
235
  /**
231
236
  * Disallow a magic number as the `depth` argument in `Array#flat(…).`
232
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-magic-array-flat-depth.md
237
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-magic-array-flat-depth.md
233
238
  */
234
239
  'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
235
240
  /**
236
241
  * Disallow named usage of default import and export.
237
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-named-default.md
242
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-named-default.md
238
243
  */
239
244
  'unicorn/no-named-default'?: Linter.RuleEntry<[]>
240
245
  /**
241
246
  * Disallow negated conditions.
242
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negated-condition.md
247
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-negated-condition.md
243
248
  */
244
249
  'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
245
250
  /**
246
251
  * Disallow negated expression in equality check.
247
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negation-in-equality-check.md
252
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-negation-in-equality-check.md
248
253
  */
249
254
  'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
250
255
  /**
251
256
  * Disallow nested ternary expressions.
252
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-nested-ternary.md
257
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-nested-ternary.md
253
258
  */
254
259
  'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
255
260
  /**
256
261
  * Disallow `new Array()`.
257
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-array.md
262
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-new-array.md
258
263
  */
259
264
  'unicorn/no-new-array'?: Linter.RuleEntry<[]>
260
265
  /**
261
266
  * Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
262
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-buffer.md
267
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-new-buffer.md
263
268
  */
264
269
  'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
265
270
  /**
266
271
  * Disallow the use of the `null` literal.
267
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-null.md
272
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-null.md
268
273
  */
269
274
  'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
270
275
  /**
271
276
  * Disallow the use of objects as default parameters.
272
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-object-as-default-parameter.md
277
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-object-as-default-parameter.md
273
278
  */
274
279
  'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
275
280
  /**
276
281
  * Disallow `process.exit()`.
277
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-process-exit.md
282
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-process-exit.md
278
283
  */
279
284
  'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
280
285
  /**
281
286
  * Disallow passing single-element arrays to `Promise` methods.
282
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-single-promise-in-promise-methods.md
287
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-single-promise-in-promise-methods.md
283
288
  */
284
289
  'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
285
290
  /**
286
291
  * Disallow classes that only have static members.
287
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-static-only-class.md
292
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-static-only-class.md
288
293
  */
289
294
  'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
290
295
  /**
291
296
  * Disallow `then` property.
292
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-thenable.md
297
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-thenable.md
293
298
  */
294
299
  'unicorn/no-thenable'?: Linter.RuleEntry<[]>
295
300
  /**
296
301
  * Disallow assigning `this` to a variable.
297
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-this-assignment.md
302
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-this-assignment.md
298
303
  */
299
304
  'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
300
305
  /**
301
306
  * Disallow comparing `undefined` using `typeof`.
302
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-typeof-undefined.md
307
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-typeof-undefined.md
303
308
  */
304
309
  'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
305
310
  /**
306
311
  * Disallow using `1` as the `depth` argument of `Array#flat()`.
307
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-flat-depth.md
312
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-array-flat-depth.md
308
313
  */
309
314
  'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>
310
315
  /**
311
316
  * Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
312
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-splice-count.md
317
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-array-splice-count.md
313
318
  */
314
319
  'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>
315
320
  /**
316
321
  * Disallow awaiting non-promise values.
317
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-await.md
322
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-await.md
318
323
  */
319
324
  'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
320
325
  /**
321
326
  * Enforce the use of built-in methods instead of unnecessary polyfills.
322
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-polyfills.md
327
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-polyfills.md
323
328
  */
324
329
  'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
325
330
  /**
326
331
  * Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
327
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-slice-end.md
332
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-slice-end.md
328
333
  */
329
334
  'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>
330
335
  /**
331
336
  * Disallow unreadable array destructuring.
332
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-array-destructuring.md
337
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unreadable-array-destructuring.md
333
338
  */
334
339
  'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
335
340
  /**
336
341
  * Disallow unreadable IIFEs.
337
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-iife.md
342
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unreadable-iife.md
338
343
  */
339
344
  'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
340
345
  /**
341
346
  * Disallow unused object properties.
342
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unused-properties.md
347
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unused-properties.md
343
348
  */
344
349
  'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
345
350
  /**
346
351
  * Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
347
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-collection-argument.md
352
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-collection-argument.md
348
353
  */
349
354
  'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>
350
355
  /**
351
356
  * Disallow unnecessary `Error.captureStackTrace(…)`.
352
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-error-capture-stack-trace.md
357
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-error-capture-stack-trace.md
353
358
  */
354
359
  'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>
355
360
  /**
356
361
  * Disallow useless fallback when spreading in object literals.
357
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-fallback-in-spread.md
362
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-fallback-in-spread.md
358
363
  */
359
364
  'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
365
+ /**
366
+ * Disallow unnecessary `.toArray()` on iterators.
367
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-iterator-to-array.md
368
+ */
369
+ 'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>
360
370
  /**
361
371
  * Disallow useless array length check.
362
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-length-check.md
372
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-length-check.md
363
373
  */
364
374
  'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
365
375
  /**
366
376
  * Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
367
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-promise-resolve-reject.md
377
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-promise-resolve-reject.md
368
378
  */
369
379
  'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
370
380
  /**
371
381
  * Disallow unnecessary spread.
372
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-spread.md
382
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-spread.md
373
383
  */
374
384
  'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
375
385
  /**
376
386
  * Disallow useless case in switch statements.
377
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-switch-case.md
387
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-switch-case.md
378
388
  */
379
389
  'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
380
390
  /**
381
391
  * Disallow useless `undefined`.
382
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-undefined.md
392
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-undefined.md
383
393
  */
384
394
  'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
385
395
  /**
386
396
  * Disallow number literals with zero fractions or dangling dots.
387
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-zero-fractions.md
397
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-zero-fractions.md
388
398
  */
389
399
  'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
390
400
  /**
391
401
  * Enforce proper case for numeric literals.
392
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/number-literal-case.md
402
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/number-literal-case.md
393
403
  */
394
404
  'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>
395
405
  /**
396
406
  * Enforce the style of numeric separators by correctly grouping digits.
397
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/numeric-separators-style.md
407
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/numeric-separators-style.md
398
408
  */
399
409
  'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
400
410
  /**
401
411
  * Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
402
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-add-event-listener.md
412
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-add-event-listener.md
403
413
  */
404
414
  'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
405
415
  /**
406
416
  * Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
407
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-find.md
417
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-find.md
408
418
  */
409
419
  'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
410
420
  /**
411
421
  * Prefer `Array#flat()` over legacy techniques to flatten arrays.
412
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat.md
422
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-flat.md
413
423
  */
414
424
  'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
415
425
  /**
416
426
  * Prefer `.flatMap(…)` over `.map(…).flat()`.
417
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat-map.md
427
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-flat-map.md
418
428
  */
419
429
  'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
420
430
  /**
421
431
  * Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
422
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-index-of.md
432
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-index-of.md
423
433
  */
424
434
  'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
425
435
  /**
426
436
  * Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
427
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-some.md
437
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-some.md
428
438
  */
429
439
  'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
430
440
  /**
431
441
  * Prefer `.at()` method for index access and `String#charAt()`.
432
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-at.md
442
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-at.md
433
443
  */
434
444
  'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
435
445
  /**
436
446
  * Prefer `BigInt` literals over the constructor.
437
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-bigint-literals.md
447
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-bigint-literals.md
438
448
  */
439
449
  'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>
440
450
  /**
441
451
  * Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
442
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-blob-reading-methods.md
452
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-blob-reading-methods.md
443
453
  */
444
454
  'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
445
455
  /**
446
456
  * Prefer class field declarations over `this` assignments in constructors.
447
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-class-fields.md
457
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-class-fields.md
448
458
  */
449
459
  'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>
450
460
  /**
451
461
  * Prefer using `Element#classList.toggle()` to toggle class names.
452
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-classlist-toggle.md
462
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-classlist-toggle.md
453
463
  */
454
464
  'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>
455
465
  /**
456
466
  * Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
457
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-code-point.md
467
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-code-point.md
458
468
  */
459
469
  'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
460
470
  /**
461
471
  * Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
462
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-date-now.md
472
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-date-now.md
463
473
  */
464
474
  'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
465
475
  /**
466
476
  * Prefer default parameters over reassignment.
467
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-default-parameters.md
477
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-default-parameters.md
468
478
  */
469
479
  'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
470
480
  /**
471
481
  * Prefer `Node#append()` over `Node#appendChild()`.
472
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-append.md
482
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-append.md
473
483
  */
474
484
  'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
475
485
  /**
476
486
  * Prefer using `.dataset` on DOM elements over calling attribute methods.
477
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-dataset.md
487
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-dataset.md
478
488
  */
479
489
  'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
480
490
  /**
481
491
  * Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
482
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-remove.md
492
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-remove.md
483
493
  */
484
494
  'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
485
495
  /**
486
496
  * Prefer `.textContent` over `.innerText`.
487
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-text-content.md
497
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-text-content.md
488
498
  */
489
499
  'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
490
500
  /**
491
501
  * Prefer `EventTarget` over `EventEmitter`.
492
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-event-target.md
502
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-event-target.md
493
503
  */
494
504
  'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
495
505
  /**
496
506
  * Prefer `export…from` when re-exporting.
497
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-export-from.md
507
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-export-from.md
498
508
  */
499
509
  'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
500
510
  /**
501
511
  * Prefer `globalThis` over `window`, `self`, and `global`.
502
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-global-this.md
512
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-global-this.md
503
513
  */
504
514
  'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>
505
515
  /**
506
516
  * Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
507
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-import-meta-properties.md
517
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-import-meta-properties.md
508
518
  */
509
519
  'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>
510
520
  /**
511
521
  * Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
512
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-includes.md
522
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-includes.md
513
523
  */
514
524
  'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
515
525
  /**
516
526
  * Prefer reading a JSON file as a buffer.
517
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-json-parse-buffer.md
527
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-json-parse-buffer.md
518
528
  */
519
529
  'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
520
530
  /**
521
531
  * Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
522
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-keyboard-event-key.md
532
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-keyboard-event-key.md
523
533
  */
524
534
  'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
525
535
  /**
526
536
  * Prefer using a logical operator over a ternary.
527
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-logical-operator-over-ternary.md
537
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-logical-operator-over-ternary.md
528
538
  */
529
539
  'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
530
540
  /**
531
541
  * Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
532
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-min-max.md
542
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-math-min-max.md
533
543
  */
534
544
  'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>
535
545
  /**
536
546
  * Enforce the use of `Math.trunc` instead of bitwise operators.
537
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-trunc.md
547
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-math-trunc.md
538
548
  */
539
549
  'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
540
550
  /**
541
551
  * Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
542
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-dom-apis.md
552
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-modern-dom-apis.md
543
553
  */
544
554
  'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
545
555
  /**
546
556
  * Prefer modern `Math` APIs over legacy patterns.
547
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-math-apis.md
557
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-modern-math-apis.md
548
558
  */
549
559
  'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
550
560
  /**
551
561
  * Prefer JavaScript modules (ESM) over CommonJS.
552
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-module.md
562
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-module.md
553
563
  */
554
564
  'unicorn/prefer-module'?: Linter.RuleEntry<[]>
555
565
  /**
556
566
  * Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
557
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-native-coercion-functions.md
567
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-native-coercion-functions.md
558
568
  */
559
569
  'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
560
570
  /**
561
571
  * Prefer negative index over `.length - index` when possible.
562
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-negative-index.md
572
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-negative-index.md
563
573
  */
564
574
  'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
565
575
  /**
566
576
  * Prefer using the `node:` protocol when importing Node.js builtin modules.
567
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-node-protocol.md
577
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-node-protocol.md
568
578
  */
569
579
  'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
570
580
  /**
571
581
  * Prefer `Number` static properties over global ones.
572
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-number-properties.md
582
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-number-properties.md
573
583
  */
574
584
  'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
575
585
  /**
576
586
  * Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
577
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-object-from-entries.md
587
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-object-from-entries.md
578
588
  */
579
589
  'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
580
590
  /**
581
591
  * Prefer omitting the `catch` binding parameter.
582
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-optional-catch-binding.md
592
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-optional-catch-binding.md
583
593
  */
584
594
  'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
585
595
  /**
586
596
  * Prefer borrowing methods from the prototype instead of the instance.
587
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-prototype-methods.md
597
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-prototype-methods.md
588
598
  */
589
599
  'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
590
600
  /**
591
601
  * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
592
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-query-selector.md
602
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-query-selector.md
593
603
  */
594
604
  'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
595
605
  /**
596
606
  * Prefer `Reflect.apply()` over `Function#apply()`.
597
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-reflect-apply.md
607
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-reflect-apply.md
598
608
  */
599
609
  'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
600
610
  /**
601
611
  * Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
602
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-regexp-test.md
612
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-regexp-test.md
603
613
  */
604
614
  'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
605
615
  /**
606
616
  * Prefer `Response.json()` over `new Response(JSON.stringify())`.
607
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-response-static-json.md
617
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-response-static-json.md
608
618
  */
609
619
  'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>
610
620
  /**
611
621
  * Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
612
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-has.md
622
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-set-has.md
613
623
  */
614
624
  'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
615
625
  /**
616
626
  * Prefer using `Set#size` instead of `Array#length`.
617
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-size.md
627
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-set-size.md
618
628
  */
619
629
  'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
630
+ /**
631
+ * Prefer simple conditions first in logical expressions.
632
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-simple-condition-first.md
633
+ */
634
+ 'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>
620
635
  /**
621
636
  * Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
622
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-single-call.md
637
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-single-call.md
623
638
  */
624
639
  'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>
625
640
  /**
626
641
  * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
627
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-spread.md
642
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-spread.md
628
643
  */
629
644
  'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
630
645
  /**
631
646
  * Prefer using the `String.raw` tag to avoid escaping `\`.
632
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-raw.md
647
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-raw.md
633
648
  */
634
649
  'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
635
650
  /**
636
651
  * Prefer `String#replaceAll()` over regex searches with the global flag.
637
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-replace-all.md
652
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-replace-all.md
638
653
  */
639
654
  'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
640
655
  /**
641
656
  * Prefer `String#slice()` over `String#substr()` and `String#substring()`.
642
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-slice.md
657
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-slice.md
643
658
  */
644
659
  'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
645
660
  /**
646
661
  * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
647
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-starts-ends-with.md
662
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-starts-ends-with.md
648
663
  */
649
664
  'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
650
665
  /**
651
666
  * Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
652
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-trim-start-end.md
667
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-trim-start-end.md
653
668
  */
654
669
  'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
655
670
  /**
656
671
  * Prefer using `structuredClone` to create a deep clone.
657
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-structured-clone.md
672
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-structured-clone.md
658
673
  */
659
674
  'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
660
675
  /**
661
676
  * Prefer `switch` over multiple `else-if`.
662
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-switch.md
677
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-switch.md
663
678
  */
664
679
  'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
665
680
  /**
666
681
  * Prefer ternary expressions over simple `if-else` statements.
667
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-ternary.md
682
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-ternary.md
668
683
  */
669
684
  'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
670
685
  /**
671
686
  * Prefer top-level await over top-level promises and async function calls.
672
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-top-level-await.md
687
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-top-level-await.md
673
688
  */
674
689
  'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
675
690
  /**
676
691
  * Enforce throwing `TypeError` in type checking conditions.
677
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-type-error.md
692
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-type-error.md
678
693
  */
679
694
  'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
680
695
  /**
681
696
  * Prevent abbreviations.
682
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prevent-abbreviations.md
697
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prevent-abbreviations.md
683
698
  */
684
699
  'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
685
700
  /**
686
701
  * Enforce consistent relative URL style.
687
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/relative-url-style.md
702
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/relative-url-style.md
688
703
  */
689
704
  'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
690
705
  /**
691
706
  * Enforce using the separator argument with `Array#join()`.
692
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-array-join-separator.md
707
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-array-join-separator.md
693
708
  */
694
709
  'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
695
710
  /**
696
711
  * Require non-empty module attributes for imports and exports
697
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-attributes.md
712
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-module-attributes.md
698
713
  */
699
714
  'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>
700
715
  /**
701
716
  * Require non-empty specifier list in import and export statements.
702
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-specifiers.md
717
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-module-specifiers.md
703
718
  */
704
719
  'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>
705
720
  /**
706
721
  * Enforce using the digits argument with `Number#toFixed()`.
707
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-number-to-fixed-digits-argument.md
722
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-number-to-fixed-digits-argument.md
708
723
  */
709
724
  'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
710
725
  /**
711
726
  * Enforce using the `targetOrigin` argument with `window.postMessage()`.
712
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-post-message-target-origin.md
727
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-post-message-target-origin.md
713
728
  */
714
729
  'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
715
730
  /**
716
731
  * Enforce better string content.
717
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/string-content.md
732
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/string-content.md
718
733
  */
719
734
  'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
720
735
  /**
721
736
  * Enforce consistent brace style for `case` clauses.
722
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/switch-case-braces.md
737
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/switch-case-braces.md
723
738
  */
724
739
  'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
740
+ /**
741
+ * Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
742
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/switch-case-break-position.md
743
+ */
744
+ 'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>
725
745
  /**
726
746
  * Fix whitespace-insensitive template indentation.
727
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/template-indent.md
747
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/template-indent.md
728
748
  */
729
749
  'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
730
750
  /**
731
751
  * Enforce consistent case for text encoding identifiers.
732
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/text-encoding-identifier-case.md
752
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/text-encoding-identifier-case.md
733
753
  */
734
754
  'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>
735
755
  /**
736
756
  * Require `new` when creating an error.
737
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/throw-new-error.md
757
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/throw-new-error.md
738
758
  */
739
759
  'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
740
760
  }
@@ -742,25 +762,36 @@ export interface RuleOptions {
742
762
  /* ======= Declarations ======= */
743
763
  // ----- unicorn/better-regex -----
744
764
  type UnicornBetterRegex = []|[{
765
+
745
766
  sortCharacterClasses?: boolean
746
767
  }]
747
768
  // ----- unicorn/catch-error-name -----
748
769
  type UnicornCatchErrorName = []|[{
770
+
749
771
  name?: string
772
+
750
773
  ignore?: unknown[]
751
774
  }]
752
775
  // ----- unicorn/consistent-function-scoping -----
753
776
  type UnicornConsistentFunctionScoping = []|[{
777
+
754
778
  checkArrowFunctions?: boolean
755
779
  }]
756
780
  // ----- unicorn/escape-case -----
757
781
  type UnicornEscapeCase = []|[("uppercase" | "lowercase")]
758
782
  // ----- unicorn/expiring-todo-comments -----
759
783
  type UnicornExpiringTodoComments = []|[{
784
+
760
785
  terms?: string[]
786
+
761
787
  ignore?: unknown[]
788
+
789
+ ignoreDates?: boolean
790
+
762
791
  ignoreDatesOnPullRequests?: boolean
792
+
763
793
  allowWarningComments?: boolean
794
+
764
795
  date?: string
765
796
  }]
766
797
  // ----- unicorn/explicit-length-check -----
@@ -769,25 +800,40 @@ type UnicornExplicitLengthCheck = []|[{
769
800
  }]
770
801
  // ----- unicorn/filename-case -----
771
802
  type UnicornFilenameCase = []|[({
803
+
772
804
  case?: ("camelCase" | "snakeCase" | "kebabCase" | "pascalCase")
805
+
773
806
  ignore?: unknown[]
807
+
774
808
  multipleFileExtensions?: boolean
775
809
  } | {
810
+
776
811
  cases?: {
812
+
777
813
  camelCase?: boolean
814
+
778
815
  snakeCase?: boolean
816
+
779
817
  kebabCase?: boolean
818
+
780
819
  pascalCase?: boolean
781
820
  }
821
+
782
822
  ignore?: unknown[]
823
+
783
824
  multipleFileExtensions?: boolean
784
825
  })]
785
826
  // ----- unicorn/import-style -----
786
827
  type UnicornImportStyle = []|[{
828
+
787
829
  checkImport?: boolean
830
+
788
831
  checkDynamicImport?: boolean
832
+
789
833
  checkExportFrom?: boolean
834
+
790
835
  checkRequire?: boolean
836
+
791
837
  extendDefaultStyles?: boolean
792
838
  styles?: _UnicornImportStyle_ModuleStyles
793
839
  }]
@@ -800,15 +846,20 @@ interface _UnicornImportStyle_BooleanObject {
800
846
  }
801
847
  // ----- unicorn/isolated-functions -----
802
848
  type UnicornIsolatedFunctions = []|[{
849
+
803
850
  overrideGlobals?: {
804
851
  [k: string]: (boolean | ("readonly" | "writable" | "writeable" | "off")) | undefined
805
852
  }
853
+
806
854
  functions?: string[]
855
+
807
856
  selectors?: string[]
857
+
808
858
  comments?: string[]
809
859
  }]
810
860
  // ----- unicorn/no-array-reduce -----
811
861
  type UnicornNoArrayReduce = []|[{
862
+
812
863
  allowSimpleOperations?: boolean
813
864
  }]
814
865
  // ----- unicorn/no-array-reverse -----
@@ -830,26 +881,33 @@ type UnicornNoInstanceofBuiltins = []|[{
830
881
  type UnicornNoKeywordPrefix = []|[{
831
882
 
832
883
  disallowedPrefixes?: []|[string]
884
+
833
885
  checkProperties?: boolean
886
+
834
887
  onlyCamelCase?: boolean
835
888
  }]
836
889
  // ----- unicorn/no-null -----
837
890
  type UnicornNoNull = []|[{
891
+
838
892
  checkStrictEquality?: boolean
839
893
  }]
840
894
  // ----- unicorn/no-typeof-undefined -----
841
895
  type UnicornNoTypeofUndefined = []|[{
896
+
842
897
  checkGlobalVariables?: boolean
843
898
  }]
844
899
  // ----- unicorn/no-unnecessary-polyfills -----
845
900
  type UnicornNoUnnecessaryPolyfills = []|[{
901
+
846
902
  targets: (string | unknown[] | {
847
903
  [k: string]: unknown | undefined
848
904
  })
849
905
  }]
850
906
  // ----- unicorn/no-useless-undefined -----
851
907
  type UnicornNoUselessUndefined = []|[{
908
+
852
909
  checkArguments?: boolean
910
+
853
911
  checkArrowFunctionBody?: boolean
854
912
  }]
855
913
  // ----- unicorn/number-literal-case -----
@@ -859,84 +917,119 @@ type UnicornNumberLiteralCase = []|[{
859
917
  // ----- unicorn/numeric-separators-style -----
860
918
  type UnicornNumericSeparatorsStyle = []|[{
861
919
  binary?: {
920
+
862
921
  onlyIfContainsSeparator?: boolean
922
+
863
923
  minimumDigits?: number
924
+
864
925
  groupLength?: number
865
926
  }
866
927
  octal?: {
928
+
867
929
  onlyIfContainsSeparator?: boolean
930
+
868
931
  minimumDigits?: number
932
+
869
933
  groupLength?: number
870
934
  }
871
935
  hexadecimal?: {
936
+
872
937
  onlyIfContainsSeparator?: boolean
938
+
873
939
  minimumDigits?: number
940
+
874
941
  groupLength?: number
875
942
  }
876
943
  number?: {
944
+
877
945
  onlyIfContainsSeparator?: boolean
946
+
878
947
  minimumDigits?: number
948
+
879
949
  groupLength?: number
880
950
  }
951
+
881
952
  onlyIfContainsSeparator?: boolean
882
953
  }]
883
954
  // ----- unicorn/prefer-add-event-listener -----
884
955
  type UnicornPreferAddEventListener = []|[{
956
+
885
957
  excludedPackages?: string[]
886
958
  }]
887
959
  // ----- unicorn/prefer-array-find -----
888
960
  type UnicornPreferArrayFind = []|[{
961
+
889
962
  checkFromLast?: boolean
890
963
  }]
891
964
  // ----- unicorn/prefer-array-flat -----
892
965
  type UnicornPreferArrayFlat = []|[{
966
+
893
967
  functions?: unknown[]
894
968
  }]
895
969
  // ----- unicorn/prefer-at -----
896
970
  type UnicornPreferAt = []|[{
971
+
897
972
  getLastElementFunctions?: unknown[]
973
+
898
974
  checkAllIndexAccess?: boolean
899
975
  }]
900
976
  // ----- unicorn/prefer-export-from -----
901
977
  type UnicornPreferExportFrom = []|[{
978
+
902
979
  ignoreUsedVariables?: boolean
903
980
  }]
904
981
  // ----- unicorn/prefer-number-properties -----
905
982
  type UnicornPreferNumberProperties = []|[{
983
+
906
984
  checkInfinity?: boolean
985
+
907
986
  checkNaN?: boolean
908
987
  }]
909
988
  // ----- unicorn/prefer-object-from-entries -----
910
989
  type UnicornPreferObjectFromEntries = []|[{
990
+
911
991
  functions?: unknown[]
912
992
  }]
913
993
  // ----- unicorn/prefer-single-call -----
914
994
  type UnicornPreferSingleCall = []|[{
995
+
915
996
  ignore?: unknown[]
916
997
  }]
917
998
  // ----- unicorn/prefer-structured-clone -----
918
999
  type UnicornPreferStructuredClone = []|[{
1000
+
919
1001
  functions?: unknown[]
920
1002
  }]
921
1003
  // ----- unicorn/prefer-switch -----
922
1004
  type UnicornPreferSwitch = []|[{
1005
+
923
1006
  minimumCases?: number
1007
+
924
1008
  emptyDefaultCase?: ("no-default-comment" | "do-nothing-comment" | "no-default-case")
925
1009
  }]
926
1010
  // ----- unicorn/prefer-ternary -----
927
1011
  type UnicornPreferTernary = []|[("always" | "only-single-line")]
928
1012
  // ----- unicorn/prevent-abbreviations -----
929
1013
  type UnicornPreventAbbreviations = []|[{
1014
+
930
1015
  checkProperties?: boolean
1016
+
931
1017
  checkVariables?: boolean
1018
+
932
1019
  checkDefaultAndNamespaceImports?: (boolean | string)
1020
+
933
1021
  checkShorthandImports?: (boolean | string)
1022
+
934
1023
  checkShorthandProperties?: boolean
1024
+
935
1025
  checkFilenames?: boolean
1026
+
936
1027
  extendDefaultReplacements?: boolean
937
1028
  replacements?: _UnicornPreventAbbreviations_Abbreviations
1029
+
938
1030
  extendDefaultAllowList?: boolean
939
1031
  allowList?: _UnicornPreventAbbreviations_BooleanObject
1032
+
940
1033
  ignore?: unknown[]
941
1034
  }]
942
1035
  type _UnicornPreventAbbreviationsReplacements = (false | _UnicornPreventAbbreviations_BooleanObject) | undefined
@@ -946,10 +1039,14 @@ interface _UnicornPreventAbbreviations_Abbreviations {
946
1039
  interface _UnicornPreventAbbreviations_BooleanObject {
947
1040
  [k: string]: boolean | undefined
948
1041
  }
1042
+ interface _UnicornPreventAbbreviations_BooleanObject {
1043
+ [k: string]: boolean | undefined
1044
+ }
949
1045
  // ----- unicorn/relative-url-style -----
950
1046
  type UnicornRelativeUrlStyle = []|[("never" | "always")]
951
1047
  // ----- unicorn/string-content -----
952
1048
  type UnicornStringContent = []|[{
1049
+
953
1050
  patterns?: {
954
1051
  [k: string]: (string | {
955
1052
  suggest: string
@@ -962,13 +1059,19 @@ type UnicornStringContent = []|[{
962
1059
  type UnicornSwitchCaseBraces = []|[("always" | "avoid")]
963
1060
  // ----- unicorn/template-indent -----
964
1061
  type UnicornTemplateIndent = []|[{
1062
+
965
1063
  indent?: (string | number)
1064
+
966
1065
  tags?: string[]
1066
+
967
1067
  functions?: string[]
1068
+
968
1069
  selectors?: string[]
1070
+
969
1071
  comments?: string[]
970
1072
  }]
971
1073
  // ----- unicorn/text-encoding-identifier-case -----
972
1074
  type UnicornTextEncodingIdentifierCase = []|[{
1075
+
973
1076
  withDash?: boolean
974
1077
  }]