@storm-software/eslint 0.78.4 → 0.78.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.
package/dist/preset.d.mts CHANGED
@@ -37,6 +37,686 @@ interface RuleOptions {
37
37
  * @see https://tsdoc.org/pages/packages/eslint-plugin-tsdoc
38
38
  */
39
39
  'tsdoc/syntax'?: Linter.RuleEntry<[]>
40
+ /**
41
+ * Improve regexes by making them shorter, consistent, and safer.
42
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/better-regex.md
43
+ */
44
+ 'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
45
+ /**
46
+ * Enforce a specific parameter name in catch clauses.
47
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/catch-error-name.md
48
+ */
49
+ 'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
50
+ /**
51
+ * Use destructured variables over properties.
52
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-destructuring.md
53
+ */
54
+ 'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
55
+ /**
56
+ * Prefer consistent types when spreading a ternary in an array literal.
57
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-empty-array-spread.md
58
+ */
59
+ 'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
60
+ /**
61
+ * Move function definitions to the highest possible scope.
62
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-function-scoping.md
63
+ */
64
+ 'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
65
+ /**
66
+ * Enforce correct `Error` subclassing.
67
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/custom-error-definition.md
68
+ */
69
+ 'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
70
+ /**
71
+ * Enforce no spaces between braces.
72
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/empty-brace-spaces.md
73
+ */
74
+ 'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
75
+ /**
76
+ * Enforce passing a `message` value when creating a built-in error.
77
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/error-message.md
78
+ */
79
+ 'unicorn/error-message'?: Linter.RuleEntry<[]>
80
+ /**
81
+ * Require escape sequences to use uppercase values.
82
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/escape-case.md
83
+ */
84
+ 'unicorn/escape-case'?: Linter.RuleEntry<[]>
85
+ /**
86
+ * Add expiration conditions to TODO comments.
87
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/expiring-todo-comments.md
88
+ */
89
+ 'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
90
+ /**
91
+ * Enforce explicitly comparing the `length` or `size` property of a value.
92
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/explicit-length-check.md
93
+ */
94
+ 'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
95
+ /**
96
+ * Enforce a case style for filenames.
97
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/filename-case.md
98
+ */
99
+ 'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
100
+ /**
101
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#import-index
102
+ * @deprecated
103
+ */
104
+ 'unicorn/import-index'?: Linter.RuleEntry<[]>
105
+ /**
106
+ * Enforce specific import styles per module.
107
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/import-style.md
108
+ */
109
+ 'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
110
+ /**
111
+ * Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
112
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/new-for-builtins.md
113
+ */
114
+ 'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
115
+ /**
116
+ * Enforce specifying rules to disable in `eslint-disable` comments.
117
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-abusive-eslint-disable.md
118
+ */
119
+ 'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
120
+ /**
121
+ * Disallow anonymous functions and classes as the default export.
122
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-anonymous-default-export.md
123
+ */
124
+ 'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
125
+ /**
126
+ * Prevent passing a function reference directly to iterator methods.
127
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-callback-reference.md
128
+ */
129
+ 'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
130
+ /**
131
+ * Prefer `for…of` over the `forEach` method.
132
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-for-each.md
133
+ */
134
+ 'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
135
+ /**
136
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-array-instanceof
137
+ * @deprecated
138
+ */
139
+ 'unicorn/no-array-instanceof'?: Linter.RuleEntry<[]>
140
+ /**
141
+ * Disallow using the `this` argument in array methods.
142
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-method-this-argument.md
143
+ */
144
+ 'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
145
+ /**
146
+ * Enforce combining multiple `Array#push()` into one call.
147
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-push-push.md
148
+ */
149
+ 'unicorn/no-array-push-push'?: Linter.RuleEntry<UnicornNoArrayPushPush>
150
+ /**
151
+ * Disallow `Array#reduce()` and `Array#reduceRight()`.
152
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-reduce.md
153
+ */
154
+ 'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
155
+ /**
156
+ * Disallow member access from await expression.
157
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-await-expression-member.md
158
+ */
159
+ 'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
160
+ /**
161
+ * Disallow using `await` in `Promise` method parameters.
162
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-await-in-promise-methods.md
163
+ */
164
+ 'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
165
+ /**
166
+ * Do not use leading/trailing space between `console.log` parameters.
167
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-console-spaces.md
168
+ */
169
+ 'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
170
+ /**
171
+ * Do not use `document.cookie` directly.
172
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-document-cookie.md
173
+ */
174
+ 'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
175
+ /**
176
+ * Disallow empty files.
177
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-empty-file.md
178
+ */
179
+ 'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
180
+ /**
181
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-fn-reference-in-iterator
182
+ * @deprecated
183
+ */
184
+ 'unicorn/no-fn-reference-in-iterator'?: Linter.RuleEntry<[]>
185
+ /**
186
+ * Do not use a `for` loop that can be replaced with a `for-of` loop.
187
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-for-loop.md
188
+ */
189
+ 'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
190
+ /**
191
+ * Enforce the use of Unicode escapes instead of hexadecimal escapes.
192
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-hex-escape.md
193
+ */
194
+ 'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
195
+ /**
196
+ * Require `Array.isArray()` instead of `instanceof Array`.
197
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-instanceof-array.md
198
+ */
199
+ 'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
200
+ /**
201
+ * Disallow invalid options in `fetch()` and `new Request()`.
202
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-invalid-fetch-options.md
203
+ */
204
+ 'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
205
+ /**
206
+ * Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
207
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-invalid-remove-event-listener.md
208
+ */
209
+ 'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
210
+ /**
211
+ * Disallow identifiers starting with `new` or `class`.
212
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-keyword-prefix.md
213
+ */
214
+ 'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
215
+ /**
216
+ * Disallow `if` statements as the only statement in `if` blocks without `else`.
217
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-lonely-if.md
218
+ */
219
+ 'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
220
+ /**
221
+ * Disallow a magic number as the `depth` argument in `Array#flat(…).`
222
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-magic-array-flat-depth.md
223
+ */
224
+ 'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
225
+ /**
226
+ * Disallow negated conditions.
227
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-negated-condition.md
228
+ */
229
+ 'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
230
+ /**
231
+ * Disallow negated expression in equality check.
232
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-negation-in-equality-check.md
233
+ */
234
+ 'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
235
+ /**
236
+ * Disallow nested ternary expressions.
237
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-nested-ternary.md
238
+ */
239
+ 'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
240
+ /**
241
+ * Disallow `new Array()`.
242
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-new-array.md
243
+ */
244
+ 'unicorn/no-new-array'?: Linter.RuleEntry<[]>
245
+ /**
246
+ * Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
247
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-new-buffer.md
248
+ */
249
+ 'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
250
+ /**
251
+ * Disallow the use of the `null` literal.
252
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-null.md
253
+ */
254
+ 'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
255
+ /**
256
+ * Disallow the use of objects as default parameters.
257
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-object-as-default-parameter.md
258
+ */
259
+ 'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
260
+ /**
261
+ * Disallow `process.exit()`.
262
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-process-exit.md
263
+ */
264
+ 'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
265
+ /**
266
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-reduce
267
+ * @deprecated
268
+ */
269
+ 'unicorn/no-reduce'?: Linter.RuleEntry<[]>
270
+ /**
271
+ * Disallow passing single-element arrays to `Promise` methods.
272
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-single-promise-in-promise-methods.md
273
+ */
274
+ 'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
275
+ /**
276
+ * Disallow classes that only have static members.
277
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-static-only-class.md
278
+ */
279
+ 'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
280
+ /**
281
+ * Disallow `then` property.
282
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-thenable.md
283
+ */
284
+ 'unicorn/no-thenable'?: Linter.RuleEntry<[]>
285
+ /**
286
+ * Disallow assigning `this` to a variable.
287
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-this-assignment.md
288
+ */
289
+ 'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
290
+ /**
291
+ * Disallow comparing `undefined` using `typeof`.
292
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-typeof-undefined.md
293
+ */
294
+ 'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
295
+ /**
296
+ * Disallow awaiting non-promise values.
297
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unnecessary-await.md
298
+ */
299
+ 'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
300
+ /**
301
+ * Enforce the use of built-in methods instead of unnecessary polyfills.
302
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unnecessary-polyfills.md
303
+ */
304
+ 'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
305
+ /**
306
+ * Disallow unreadable array destructuring.
307
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unreadable-array-destructuring.md
308
+ */
309
+ 'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
310
+ /**
311
+ * Disallow unreadable IIFEs.
312
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unreadable-iife.md
313
+ */
314
+ 'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
315
+ /**
316
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-unsafe-regex
317
+ * @deprecated
318
+ */
319
+ 'unicorn/no-unsafe-regex'?: Linter.RuleEntry<[]>
320
+ /**
321
+ * Disallow unused object properties.
322
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unused-properties.md
323
+ */
324
+ 'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
325
+ /**
326
+ * Disallow useless fallback when spreading in object literals.
327
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-fallback-in-spread.md
328
+ */
329
+ 'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
330
+ /**
331
+ * Disallow useless array length check.
332
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-length-check.md
333
+ */
334
+ 'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
335
+ /**
336
+ * Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
337
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-promise-resolve-reject.md
338
+ */
339
+ 'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
340
+ /**
341
+ * Disallow unnecessary spread.
342
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-spread.md
343
+ */
344
+ 'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
345
+ /**
346
+ * Disallow useless case in switch statements.
347
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-switch-case.md
348
+ */
349
+ 'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
350
+ /**
351
+ * Disallow useless `undefined`.
352
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-undefined.md
353
+ */
354
+ 'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
355
+ /**
356
+ * Disallow number literals with zero fractions or dangling dots.
357
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-zero-fractions.md
358
+ */
359
+ 'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
360
+ /**
361
+ * Enforce proper case for numeric literals.
362
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/number-literal-case.md
363
+ */
364
+ 'unicorn/number-literal-case'?: Linter.RuleEntry<[]>
365
+ /**
366
+ * Enforce the style of numeric separators by correctly grouping digits.
367
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/numeric-separators-style.md
368
+ */
369
+ 'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
370
+ /**
371
+ * Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
372
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-add-event-listener.md
373
+ */
374
+ 'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
375
+ /**
376
+ * Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
377
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-find.md
378
+ */
379
+ 'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
380
+ /**
381
+ * Prefer `Array#flat()` over legacy techniques to flatten arrays.
382
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-flat.md
383
+ */
384
+ 'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
385
+ /**
386
+ * Prefer `.flatMap(…)` over `.map(…).flat()`.
387
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-flat-map.md
388
+ */
389
+ 'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
390
+ /**
391
+ * Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
392
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-index-of.md
393
+ */
394
+ 'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
395
+ /**
396
+ * Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
397
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-some.md
398
+ */
399
+ 'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
400
+ /**
401
+ * Prefer `.at()` method for index access and `String#charAt()`.
402
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-at.md
403
+ */
404
+ 'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
405
+ /**
406
+ * Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
407
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-blob-reading-methods.md
408
+ */
409
+ 'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
410
+ /**
411
+ * Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
412
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-code-point.md
413
+ */
414
+ 'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
415
+ /**
416
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-dataset
417
+ * @deprecated
418
+ */
419
+ 'unicorn/prefer-dataset'?: Linter.RuleEntry<[]>
420
+ /**
421
+ * Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
422
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-date-now.md
423
+ */
424
+ 'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
425
+ /**
426
+ * Prefer default parameters over reassignment.
427
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-default-parameters.md
428
+ */
429
+ 'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
430
+ /**
431
+ * Prefer `Node#append()` over `Node#appendChild()`.
432
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-append.md
433
+ */
434
+ 'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
435
+ /**
436
+ * Prefer using `.dataset` on DOM elements over calling attribute methods.
437
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-dataset.md
438
+ */
439
+ 'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
440
+ /**
441
+ * Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
442
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-remove.md
443
+ */
444
+ 'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
445
+ /**
446
+ * Prefer `.textContent` over `.innerText`.
447
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-text-content.md
448
+ */
449
+ 'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
450
+ /**
451
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-event-key
452
+ * @deprecated
453
+ */
454
+ 'unicorn/prefer-event-key'?: Linter.RuleEntry<[]>
455
+ /**
456
+ * Prefer `EventTarget` over `EventEmitter`.
457
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-event-target.md
458
+ */
459
+ 'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
460
+ /**
461
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-exponentiation-operator
462
+ * @deprecated
463
+ */
464
+ 'unicorn/prefer-exponentiation-operator'?: Linter.RuleEntry<[]>
465
+ /**
466
+ * Prefer `export…from` when re-exporting.
467
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-export-from.md
468
+ */
469
+ 'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
470
+ /**
471
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-flat-map
472
+ * @deprecated
473
+ */
474
+ 'unicorn/prefer-flat-map'?: Linter.RuleEntry<[]>
475
+ /**
476
+ * Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
477
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-includes.md
478
+ */
479
+ 'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
480
+ /**
481
+ * Prefer reading a JSON file as a buffer.
482
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-json-parse-buffer.md
483
+ */
484
+ 'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
485
+ /**
486
+ * Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
487
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-keyboard-event-key.md
488
+ */
489
+ 'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
490
+ /**
491
+ * Prefer using a logical operator over a ternary.
492
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-logical-operator-over-ternary.md
493
+ */
494
+ 'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
495
+ /**
496
+ * Enforce the use of `Math.trunc` instead of bitwise operators.
497
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-math-trunc.md
498
+ */
499
+ 'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
500
+ /**
501
+ * Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
502
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-modern-dom-apis.md
503
+ */
504
+ 'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
505
+ /**
506
+ * Prefer modern `Math` APIs over legacy patterns.
507
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-modern-math-apis.md
508
+ */
509
+ 'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
510
+ /**
511
+ * Prefer JavaScript modules (ESM) over CommonJS.
512
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-module.md
513
+ */
514
+ 'unicorn/prefer-module'?: Linter.RuleEntry<[]>
515
+ /**
516
+ * Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
517
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-native-coercion-functions.md
518
+ */
519
+ 'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
520
+ /**
521
+ * Prefer negative index over `.length - index` when possible.
522
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-negative-index.md
523
+ */
524
+ 'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
525
+ /**
526
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-node-append
527
+ * @deprecated
528
+ */
529
+ 'unicorn/prefer-node-append'?: Linter.RuleEntry<[]>
530
+ /**
531
+ * Prefer using the `node:` protocol when importing Node.js builtin modules.
532
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-node-protocol.md
533
+ */
534
+ 'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
535
+ /**
536
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-node-remove
537
+ * @deprecated
538
+ */
539
+ 'unicorn/prefer-node-remove'?: Linter.RuleEntry<[]>
540
+ /**
541
+ * Prefer `Number` static properties over global ones.
542
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-number-properties.md
543
+ */
544
+ 'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
545
+ /**
546
+ * Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
547
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-object-from-entries.md
548
+ */
549
+ 'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
550
+ /**
551
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-object-has-own
552
+ * @deprecated
553
+ */
554
+ 'unicorn/prefer-object-has-own'?: Linter.RuleEntry<[]>
555
+ /**
556
+ * Prefer omitting the `catch` binding parameter.
557
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-optional-catch-binding.md
558
+ */
559
+ 'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
560
+ /**
561
+ * Prefer borrowing methods from the prototype instead of the instance.
562
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-prototype-methods.md
563
+ */
564
+ 'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
565
+ /**
566
+ * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()`.
567
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-query-selector.md
568
+ */
569
+ 'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
570
+ /**
571
+ * Prefer `Reflect.apply()` over `Function#apply()`.
572
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-reflect-apply.md
573
+ */
574
+ 'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
575
+ /**
576
+ * Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
577
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-regexp-test.md
578
+ */
579
+ 'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
580
+ /**
581
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-replace-all
582
+ * @deprecated
583
+ */
584
+ 'unicorn/prefer-replace-all'?: Linter.RuleEntry<[]>
585
+ /**
586
+ * Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
587
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-set-has.md
588
+ */
589
+ 'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
590
+ /**
591
+ * Prefer using `Set#size` instead of `Array#length`.
592
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-set-size.md
593
+ */
594
+ 'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
595
+ /**
596
+ * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
597
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-spread.md
598
+ */
599
+ 'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
600
+ /**
601
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-starts-ends-with
602
+ * @deprecated
603
+ */
604
+ 'unicorn/prefer-starts-ends-with'?: Linter.RuleEntry<[]>
605
+ /**
606
+ * Prefer using the `String.raw` tag to avoid escaping `\`.
607
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-raw.md
608
+ */
609
+ 'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
610
+ /**
611
+ * Prefer `String#replaceAll()` over regex searches with the global flag.
612
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-replace-all.md
613
+ */
614
+ 'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
615
+ /**
616
+ * Prefer `String#slice()` over `String#substr()` and `String#substring()`.
617
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-slice.md
618
+ */
619
+ 'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
620
+ /**
621
+ * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
622
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-starts-ends-with.md
623
+ */
624
+ 'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
625
+ /**
626
+ * Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
627
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-trim-start-end.md
628
+ */
629
+ 'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
630
+ /**
631
+ * Prefer using `structuredClone` to create a deep clone.
632
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-structured-clone.md
633
+ */
634
+ 'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
635
+ /**
636
+ * Prefer `switch` over multiple `else-if`.
637
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-switch.md
638
+ */
639
+ 'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
640
+ /**
641
+ * Prefer ternary expressions over simple `if-else` statements.
642
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-ternary.md
643
+ */
644
+ 'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
645
+ /**
646
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-text-content
647
+ * @deprecated
648
+ */
649
+ 'unicorn/prefer-text-content'?: Linter.RuleEntry<[]>
650
+ /**
651
+ * Prefer top-level await over top-level promises and async function calls.
652
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-top-level-await.md
653
+ */
654
+ 'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
655
+ /**
656
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-trim-start-end
657
+ * @deprecated
658
+ */
659
+ 'unicorn/prefer-trim-start-end'?: Linter.RuleEntry<[]>
660
+ /**
661
+ * Enforce throwing `TypeError` in type checking conditions.
662
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-type-error.md
663
+ */
664
+ 'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
665
+ /**
666
+ * Prevent abbreviations.
667
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prevent-abbreviations.md
668
+ */
669
+ 'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
670
+ /**
671
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#regex-shorthand
672
+ * @deprecated
673
+ */
674
+ 'unicorn/regex-shorthand'?: Linter.RuleEntry<[]>
675
+ /**
676
+ * Enforce consistent relative URL style.
677
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/relative-url-style.md
678
+ */
679
+ 'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
680
+ /**
681
+ * Enforce using the separator argument with `Array#join()`.
682
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-array-join-separator.md
683
+ */
684
+ 'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
685
+ /**
686
+ * Enforce using the digits argument with `Number#toFixed()`.
687
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-number-to-fixed-digits-argument.md
688
+ */
689
+ 'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
690
+ /**
691
+ * Enforce using the `targetOrigin` argument with `window.postMessage()`.
692
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-post-message-target-origin.md
693
+ */
694
+ 'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
695
+ /**
696
+ * Enforce better string content.
697
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/string-content.md
698
+ */
699
+ 'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
700
+ /**
701
+ * Enforce consistent brace style for `case` clauses.
702
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/switch-case-braces.md
703
+ */
704
+ 'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
705
+ /**
706
+ * Fix whitespace-insensitive template indentation.
707
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/template-indent.md
708
+ */
709
+ 'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
710
+ /**
711
+ * Enforce consistent case for text encoding identifiers.
712
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/text-encoding-identifier-case.md
713
+ */
714
+ 'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>
715
+ /**
716
+ * Require `new` when creating an error.
717
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/throw-new-error.md
718
+ */
719
+ 'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
40
720
  /**
41
721
  * require or disallow block style mappings.
42
722
  * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping.html
@@ -326,6 +1006,204 @@ type PrettierPrettier = []|[{
326
1006
  }
327
1007
  [k: string]: unknown | undefined
328
1008
  }]
1009
+ // ----- unicorn/better-regex -----
1010
+ type UnicornBetterRegex = []|[{
1011
+ sortCharacterClasses?: boolean
1012
+ }]
1013
+ // ----- unicorn/catch-error-name -----
1014
+ type UnicornCatchErrorName = []|[{
1015
+ name?: string
1016
+ ignore?: unknown[]
1017
+ }]
1018
+ // ----- unicorn/consistent-function-scoping -----
1019
+ type UnicornConsistentFunctionScoping = []|[{
1020
+ checkArrowFunctions?: boolean
1021
+ }]
1022
+ // ----- unicorn/expiring-todo-comments -----
1023
+ type UnicornExpiringTodoComments = []|[{
1024
+ terms?: string[]
1025
+ ignore?: unknown[]
1026
+ ignoreDatesOnPullRequests?: boolean
1027
+ allowWarningComments?: boolean
1028
+ date?: string
1029
+ }]
1030
+ // ----- unicorn/explicit-length-check -----
1031
+ type UnicornExplicitLengthCheck = []|[{
1032
+ "non-zero"?: ("greater-than" | "not-equal")
1033
+ }]
1034
+ // ----- unicorn/filename-case -----
1035
+ type UnicornFilenameCase = []|[({
1036
+ case?: ("camelCase" | "snakeCase" | "kebabCase" | "pascalCase")
1037
+ ignore?: unknown[]
1038
+ multipleFileExtensions?: boolean
1039
+ } | {
1040
+ cases?: {
1041
+ camelCase?: boolean
1042
+ snakeCase?: boolean
1043
+ kebabCase?: boolean
1044
+ pascalCase?: boolean
1045
+ }
1046
+ ignore?: unknown[]
1047
+ multipleFileExtensions?: boolean
1048
+ })]
1049
+ // ----- unicorn/import-style -----
1050
+ type UnicornImportStyle = []|[{
1051
+ checkImport?: boolean
1052
+ checkDynamicImport?: boolean
1053
+ checkExportFrom?: boolean
1054
+ checkRequire?: boolean
1055
+ extendDefaultStyles?: boolean
1056
+ styles?: _UnicornImportStyle_ModuleStyles
1057
+ }]
1058
+ type _UnicornImportStyleStyles = (false | _UnicornImportStyle_BooleanObject) | undefined
1059
+ interface _UnicornImportStyle_ModuleStyles {
1060
+ [k: string]: _UnicornImportStyleStyles | undefined
1061
+ }
1062
+ interface _UnicornImportStyle_BooleanObject {
1063
+ [k: string]: boolean | undefined
1064
+ }
1065
+ // ----- unicorn/no-array-push-push -----
1066
+ type UnicornNoArrayPushPush = []|[{
1067
+ ignore?: unknown[]
1068
+ }]
1069
+ // ----- unicorn/no-array-reduce -----
1070
+ type UnicornNoArrayReduce = []|[{
1071
+ allowSimpleOperations?: boolean
1072
+ }]
1073
+ // ----- unicorn/no-keyword-prefix -----
1074
+ type UnicornNoKeywordPrefix = []|[{
1075
+
1076
+ disallowedPrefixes?: []|[string]
1077
+ checkProperties?: boolean
1078
+ onlyCamelCase?: boolean
1079
+ }]
1080
+ // ----- unicorn/no-null -----
1081
+ type UnicornNoNull = []|[{
1082
+ checkStrictEquality?: boolean
1083
+ }]
1084
+ // ----- unicorn/no-typeof-undefined -----
1085
+ type UnicornNoTypeofUndefined = []|[{
1086
+ checkGlobalVariables?: boolean
1087
+ }]
1088
+ // ----- unicorn/no-unnecessary-polyfills -----
1089
+ type UnicornNoUnnecessaryPolyfills = []|[{
1090
+ targets: (string | unknown[] | {
1091
+ [k: string]: unknown | undefined
1092
+ })
1093
+ }]
1094
+ // ----- unicorn/no-useless-undefined -----
1095
+ type UnicornNoUselessUndefined = []|[{
1096
+ checkArguments?: boolean
1097
+ checkArrowFunctionBody?: boolean
1098
+ }]
1099
+ // ----- unicorn/numeric-separators-style -----
1100
+ type UnicornNumericSeparatorsStyle = []|[{
1101
+ binary?: {
1102
+ onlyIfContainsSeparator?: boolean
1103
+ minimumDigits?: number
1104
+ groupLength?: number
1105
+ }
1106
+ octal?: {
1107
+ onlyIfContainsSeparator?: boolean
1108
+ minimumDigits?: number
1109
+ groupLength?: number
1110
+ }
1111
+ hexadecimal?: {
1112
+ onlyIfContainsSeparator?: boolean
1113
+ minimumDigits?: number
1114
+ groupLength?: number
1115
+ }
1116
+ number?: {
1117
+ onlyIfContainsSeparator?: boolean
1118
+ minimumDigits?: number
1119
+ groupLength?: number
1120
+ }
1121
+ onlyIfContainsSeparator?: boolean
1122
+ }]
1123
+ // ----- unicorn/prefer-add-event-listener -----
1124
+ type UnicornPreferAddEventListener = []|[{
1125
+ excludedPackages?: string[]
1126
+ }]
1127
+ // ----- unicorn/prefer-array-find -----
1128
+ type UnicornPreferArrayFind = []|[{
1129
+ checkFromLast?: boolean
1130
+ }]
1131
+ // ----- unicorn/prefer-array-flat -----
1132
+ type UnicornPreferArrayFlat = []|[{
1133
+ functions?: unknown[]
1134
+ }]
1135
+ // ----- unicorn/prefer-at -----
1136
+ type UnicornPreferAt = []|[{
1137
+ getLastElementFunctions?: unknown[]
1138
+ checkAllIndexAccess?: boolean
1139
+ }]
1140
+ // ----- unicorn/prefer-export-from -----
1141
+ type UnicornPreferExportFrom = []|[{
1142
+ ignoreUsedVariables?: boolean
1143
+ }]
1144
+ // ----- unicorn/prefer-number-properties -----
1145
+ type UnicornPreferNumberProperties = []|[{
1146
+ checkInfinity?: boolean
1147
+ checkNaN?: boolean
1148
+ }]
1149
+ // ----- unicorn/prefer-object-from-entries -----
1150
+ type UnicornPreferObjectFromEntries = []|[{
1151
+ functions?: unknown[]
1152
+ }]
1153
+ // ----- unicorn/prefer-structured-clone -----
1154
+ type UnicornPreferStructuredClone = []|[{
1155
+ functions?: unknown[]
1156
+ }]
1157
+ // ----- unicorn/prefer-switch -----
1158
+ type UnicornPreferSwitch = []|[{
1159
+ minimumCases?: number
1160
+ emptyDefaultCase?: ("no-default-comment" | "do-nothing-comment" | "no-default-case")
1161
+ }]
1162
+ // ----- unicorn/prefer-ternary -----
1163
+ type UnicornPreferTernary = []|[("always" | "only-single-line")]
1164
+ // ----- unicorn/prevent-abbreviations -----
1165
+ type UnicornPreventAbbreviations = []|[{
1166
+ checkProperties?: boolean
1167
+ checkVariables?: boolean
1168
+ checkDefaultAndNamespaceImports?: (boolean | string)
1169
+ checkShorthandImports?: (boolean | string)
1170
+ checkShorthandProperties?: boolean
1171
+ checkFilenames?: boolean
1172
+ extendDefaultReplacements?: boolean
1173
+ replacements?: _UnicornPreventAbbreviations_Abbreviations
1174
+ extendDefaultAllowList?: boolean
1175
+ allowList?: _UnicornPreventAbbreviations_BooleanObject
1176
+ ignore?: unknown[]
1177
+ }]
1178
+ type _UnicornPreventAbbreviationsReplacements = (false | _UnicornPreventAbbreviations_BooleanObject) | undefined
1179
+ interface _UnicornPreventAbbreviations_Abbreviations {
1180
+ [k: string]: _UnicornPreventAbbreviationsReplacements | undefined
1181
+ }
1182
+ interface _UnicornPreventAbbreviations_BooleanObject {
1183
+ [k: string]: boolean | undefined
1184
+ }
1185
+ // ----- unicorn/relative-url-style -----
1186
+ type UnicornRelativeUrlStyle = []|[("never" | "always")]
1187
+ // ----- unicorn/string-content -----
1188
+ type UnicornStringContent = []|[{
1189
+ patterns?: {
1190
+ [k: string]: (string | {
1191
+ suggest: string
1192
+ fix?: boolean
1193
+ message?: string
1194
+ }) | undefined
1195
+ }
1196
+ }]
1197
+ // ----- unicorn/switch-case-braces -----
1198
+ type UnicornSwitchCaseBraces = []|[("always" | "avoid")]
1199
+ // ----- unicorn/template-indent -----
1200
+ type UnicornTemplateIndent = []|[{
1201
+ indent?: (string | number)
1202
+ tags?: string[]
1203
+ functions?: string[]
1204
+ selectors?: string[]
1205
+ comments?: string[]
1206
+ }]
329
1207
  // ----- yml/block-mapping -----
330
1208
  type YmlBlockMapping = []|[(("always" | "never") | {
331
1209
  singleline?: ("always" | "never" | "ignore")