@w5s/eslint-config 2.4.5 → 3.0.0

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