@storm-software/eslint 0.78.6 → 0.78.7

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 DELETED
@@ -1,1450 +0,0 @@
1
- import { Linter } from 'eslint';
2
-
3
- /* eslint-disable */
4
- /* prettier-ignore */
5
-
6
-
7
- interface RuleOptions {
8
- /**
9
- * CSpell spellchecker
10
- */
11
- '@cspell/spellchecker'?: Linter.RuleEntry<CspellSpellchecker>
12
- /**
13
- * Checks dependencies in project's package.json for version mismatches
14
- * @see https://github.com/nrwl/nx/blob/19.6.4/docs/generated/packages/eslint-plugin/documents/dependency-checks.md
15
- */
16
- '@nx/dependency-checks'?: Linter.RuleEntry<NxDependencyChecks>
17
- /**
18
- * Ensure that module boundaries are respected within the monorepo
19
- * @see https://github.com/nrwl/nx/blob/19.6.4/docs/generated/packages/eslint-plugin/documents/enforce-module-boundaries.md
20
- */
21
- '@nx/enforce-module-boundaries'?: Linter.RuleEntry<NxEnforceModuleBoundaries>
22
- /**
23
- * Checks common nx-plugin configuration files for validity
24
- */
25
- '@nx/nx-plugin-checks'?: Linter.RuleEntry<NxNxPluginChecks>
26
- /**
27
- * Ensures the file has a Storm Software banner
28
- * @see https://docs.stormsoftware.com/eslint/rules/banner
29
- */
30
- 'banner/banner'?: Linter.RuleEntry<BannerBanner>
31
- /**
32
- * @see https://github.com/prettier/eslint-plugin-prettier#options
33
- */
34
- 'prettier/prettier'?: Linter.RuleEntry<PrettierPrettier>
35
- /**
36
- * Validates that TypeScript documentation comments conform to the TSDoc standard
37
- * @see https://tsdoc.org/pages/packages/eslint-plugin-tsdoc
38
- */
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<[]>
720
- /**
721
- * require or disallow block style mappings.
722
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping.html
723
- */
724
- 'yml/block-mapping'?: Linter.RuleEntry<YmlBlockMapping>
725
- /**
726
- * enforce consistent line breaks after `:` indicator
727
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-colon-indicator-newline.html
728
- */
729
- 'yml/block-mapping-colon-indicator-newline'?: Linter.RuleEntry<YmlBlockMappingColonIndicatorNewline>
730
- /**
731
- * enforce consistent line breaks after `?` indicator
732
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-question-indicator-newline.html
733
- */
734
- 'yml/block-mapping-question-indicator-newline'?: Linter.RuleEntry<YmlBlockMappingQuestionIndicatorNewline>
735
- /**
736
- * require or disallow block style sequences.
737
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence.html
738
- */
739
- 'yml/block-sequence'?: Linter.RuleEntry<YmlBlockSequence>
740
- /**
741
- * enforce consistent line breaks after `-` indicator
742
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence-hyphen-indicator-newline.html
743
- */
744
- 'yml/block-sequence-hyphen-indicator-newline'?: Linter.RuleEntry<YmlBlockSequenceHyphenIndicatorNewline>
745
- /**
746
- * enforce YAML file extension
747
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/file-extension.html
748
- */
749
- 'yml/file-extension'?: Linter.RuleEntry<YmlFileExtension>
750
- /**
751
- * enforce consistent line breaks inside braces
752
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-newline.html
753
- */
754
- 'yml/flow-mapping-curly-newline'?: Linter.RuleEntry<YmlFlowMappingCurlyNewline>
755
- /**
756
- * enforce consistent spacing inside braces
757
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-spacing.html
758
- */
759
- 'yml/flow-mapping-curly-spacing'?: Linter.RuleEntry<YmlFlowMappingCurlySpacing>
760
- /**
761
- * enforce linebreaks after opening and before closing flow sequence brackets
762
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-newline.html
763
- */
764
- 'yml/flow-sequence-bracket-newline'?: Linter.RuleEntry<YmlFlowSequenceBracketNewline>
765
- /**
766
- * enforce consistent spacing inside flow sequence brackets
767
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-spacing.html
768
- */
769
- 'yml/flow-sequence-bracket-spacing'?: Linter.RuleEntry<YmlFlowSequenceBracketSpacing>
770
- /**
771
- * enforce consistent indentation
772
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/indent.html
773
- */
774
- 'yml/indent'?: Linter.RuleEntry<YmlIndent>
775
- /**
776
- * enforce naming convention to key names
777
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-name-casing.html
778
- */
779
- 'yml/key-name-casing'?: Linter.RuleEntry<YmlKeyNameCasing>
780
- /**
781
- * enforce consistent spacing between keys and values in mapping pairs
782
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-spacing.html
783
- */
784
- 'yml/key-spacing'?: Linter.RuleEntry<YmlKeySpacing>
785
- /**
786
- * disallow empty document
787
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-document.html
788
- */
789
- 'yml/no-empty-document'?: Linter.RuleEntry<[]>
790
- /**
791
- * disallow empty mapping keys
792
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-key.html
793
- */
794
- 'yml/no-empty-key'?: Linter.RuleEntry<[]>
795
- /**
796
- * disallow empty mapping values
797
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-mapping-value.html
798
- */
799
- 'yml/no-empty-mapping-value'?: Linter.RuleEntry<[]>
800
- /**
801
- * disallow empty sequence entries
802
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-sequence-entry.html
803
- */
804
- 'yml/no-empty-sequence-entry'?: Linter.RuleEntry<[]>
805
- /**
806
- * disallow irregular whitespace
807
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-irregular-whitespace.html
808
- */
809
- 'yml/no-irregular-whitespace'?: Linter.RuleEntry<YmlNoIrregularWhitespace>
810
- /**
811
- * disallow multiple empty lines
812
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-multiple-empty-lines.html
813
- */
814
- 'yml/no-multiple-empty-lines'?: Linter.RuleEntry<YmlNoMultipleEmptyLines>
815
- /**
816
- * disallow tabs for indentation.
817
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-tab-indent.html
818
- */
819
- 'yml/no-tab-indent'?: Linter.RuleEntry<[]>
820
- /**
821
- * disallow trailing zeros for floats
822
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-trailing-zeros.html
823
- */
824
- 'yml/no-trailing-zeros'?: Linter.RuleEntry<[]>
825
- /**
826
- * require or disallow plain style scalar.
827
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/plain-scalar.html
828
- */
829
- 'yml/plain-scalar'?: Linter.RuleEntry<YmlPlainScalar>
830
- /**
831
- * enforce the consistent use of either double, or single quotes
832
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/quotes.html
833
- */
834
- 'yml/quotes'?: Linter.RuleEntry<YmlQuotes>
835
- /**
836
- * disallow mapping keys other than strings
837
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/require-string-key.html
838
- */
839
- 'yml/require-string-key'?: Linter.RuleEntry<[]>
840
- /**
841
- * require mapping keys to be sorted
842
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-keys.html
843
- */
844
- 'yml/sort-keys'?: Linter.RuleEntry<YmlSortKeys>
845
- /**
846
- * require sequence values to be sorted
847
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-sequence-values.html
848
- */
849
- 'yml/sort-sequence-values'?: Linter.RuleEntry<YmlSortSequenceValues>
850
- /**
851
- * enforce consistent spacing after the `#` in a comment
852
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/spaced-comment.html
853
- */
854
- 'yml/spaced-comment'?: Linter.RuleEntry<YmlSpacedComment>
855
- /**
856
- * disallow parsing errors in Vue custom blocks
857
- * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/vue-custom-block/no-parsing-error.html
858
- */
859
- 'yml/vue-custom-block/no-parsing-error'?: Linter.RuleEntry<[]>
860
- }
861
-
862
- /* ======= Declarations ======= */
863
- // ----- @cspell/spellchecker -----
864
- type CspellSpellchecker = []|[{
865
-
866
- autoFix: boolean
867
-
868
- checkComments?: boolean
869
-
870
- checkIdentifiers?: boolean
871
-
872
- checkJSXText?: boolean
873
-
874
- checkScope?: [string, boolean][]
875
-
876
- checkStringTemplates?: boolean
877
-
878
- checkStrings?: boolean
879
-
880
- configFile?: string
881
-
882
- cspell?: {
883
-
884
- allowCompoundWords?: boolean
885
-
886
- dictionaries?: (string | string)[]
887
- dictionaryDefinitions?: {
888
-
889
- description?: string
890
-
891
- name: string
892
-
893
- noSuggest?: boolean
894
-
895
- path: string
896
-
897
- repMap?: [string, string][]
898
-
899
- type?: ("S" | "W" | "C" | "T")
900
-
901
- useCompounds?: boolean
902
- }[]
903
-
904
- enabled?: boolean
905
-
906
- flagWords?: string[]
907
-
908
- ignoreRegExpList?: (string | string | ("Base64" | "Base64MultiLine" | "Base64SingleLine" | "CStyleComment" | "CStyleHexValue" | "CSSHexValue" | "CommitHash" | "CommitHashLink" | "Email" | "EscapeCharacters" | "HexValues" | "href" | "PhpHereDoc" | "PublicKey" | "RsaCert" | "SshRsa" | "SHA" | "HashStrings" | "SpellCheckerDisable" | "SpellCheckerDisableBlock" | "SpellCheckerDisableLine" | "SpellCheckerDisableNext" | "SpellCheckerIgnoreInDocSetting" | "string" | "UnicodeRef" | "Urls" | "UUID" | "Everything"))[]
909
-
910
- ignoreWords?: string[]
911
-
912
- import?: (string | string[])
913
-
914
- includeRegExpList?: (string | string | ("Base64" | "Base64MultiLine" | "Base64SingleLine" | "CStyleComment" | "CStyleHexValue" | "CSSHexValue" | "CommitHash" | "CommitHashLink" | "Email" | "EscapeCharacters" | "HexValues" | "href" | "PhpHereDoc" | "PublicKey" | "RsaCert" | "SshRsa" | "SHA" | "HashStrings" | "SpellCheckerDisable" | "SpellCheckerDisableBlock" | "SpellCheckerDisableLine" | "SpellCheckerDisableNext" | "SpellCheckerIgnoreInDocSetting" | "string" | "UnicodeRef" | "Urls" | "UUID" | "Everything"))[]
915
-
916
- language?: string
917
-
918
- words?: string[]
919
- }
920
-
921
- cspellOptionsRoot?: (string | string)
922
-
923
- customWordListFile?: (string | {
924
-
925
- path: string
926
- })
927
-
928
- debugMode?: boolean
929
-
930
- generateSuggestions: boolean
931
-
932
- ignoreImportProperties?: boolean
933
-
934
- ignoreImports?: boolean
935
-
936
- numSuggestions: number
937
- }]
938
- // ----- @nx/dependency-checks -----
939
- type NxDependencyChecks = []|[{
940
- buildTargets?: string[]
941
- ignoredDependencies?: string[]
942
- ignoredFiles?: string[]
943
- checkMissingDependencies?: boolean
944
- checkObsoleteDependencies?: boolean
945
- checkVersionMismatches?: boolean
946
- includeTransitiveDependencies?: boolean
947
- useLocalPathsForWorkspaceDependencies?: boolean
948
- }]
949
- // ----- @nx/enforce-module-boundaries -----
950
- type NxEnforceModuleBoundaries = []|[{
951
- enforceBuildableLibDependency?: boolean
952
- allowCircularSelfDependency?: boolean
953
- checkDynamicDependenciesExceptions?: string[]
954
- banTransitiveDependencies?: boolean
955
- checkNestedExternalImports?: boolean
956
- allow?: string[]
957
- buildTargets?: string[]
958
- depConstraints?: ({
959
- sourceTag?: string
960
- onlyDependOnLibsWithTags?: string[]
961
- allowedExternalImports?: string[]
962
- bannedExternalImports?: string[]
963
- notDependOnLibsWithTags?: string[]
964
- } | {
965
-
966
- allSourceTags?: [string, string, ...(string)[]]
967
- onlyDependOnLibsWithTags?: string[]
968
- allowedExternalImports?: string[]
969
- bannedExternalImports?: string[]
970
- notDependOnLibsWithTags?: string[]
971
- })[]
972
- }]
973
- // ----- @nx/nx-plugin-checks -----
974
- type NxNxPluginChecks = []|[{
975
-
976
- generatorsJson?: string
977
-
978
- executorsJson?: string
979
-
980
- migrationsJson?: string
981
-
982
- packageJson?: string
983
-
984
- allowedVersionStrings?: string[]
985
- }]
986
- // ----- banner/banner -----
987
- type BannerBanner = []|[{
988
-
989
- banner?: string
990
-
991
- repositoryName?: string
992
-
993
- commentType?: string
994
-
995
- numNewlines?: number
996
- }]
997
- // ----- prettier/prettier -----
998
- type PrettierPrettier = []|[{
999
- [k: string]: unknown | undefined
1000
- }]|[{
1001
- [k: string]: unknown | undefined
1002
- }, {
1003
- usePrettierrc?: boolean
1004
- fileInfoOptions?: {
1005
- [k: string]: unknown | undefined
1006
- }
1007
- [k: string]: unknown | undefined
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
- }]
1207
- // ----- yml/block-mapping -----
1208
- type YmlBlockMapping = []|[(("always" | "never") | {
1209
- singleline?: ("always" | "never" | "ignore")
1210
- multiline?: ("always" | "never" | "ignore")
1211
- })]
1212
- // ----- yml/block-mapping-colon-indicator-newline -----
1213
- type YmlBlockMappingColonIndicatorNewline = []|[("always" | "never")]
1214
- // ----- yml/block-mapping-question-indicator-newline -----
1215
- type YmlBlockMappingQuestionIndicatorNewline = []|[("always" | "never")]
1216
- // ----- yml/block-sequence -----
1217
- type YmlBlockSequence = []|[(("always" | "never") | {
1218
- singleline?: ("always" | "never" | "ignore")
1219
- multiline?: ("always" | "never" | "ignore")
1220
- })]
1221
- // ----- yml/block-sequence-hyphen-indicator-newline -----
1222
- type YmlBlockSequenceHyphenIndicatorNewline = []|[("always" | "never")]|[("always" | "never"), {
1223
- nestedHyphen?: ("always" | "never")
1224
- blockMapping?: ("always" | "never")
1225
- }]
1226
- // ----- yml/file-extension -----
1227
- type YmlFileExtension = []|[{
1228
- extension?: ("yaml" | "yml")
1229
- caseSensitive?: boolean
1230
- }]
1231
- // ----- yml/flow-mapping-curly-newline -----
1232
- type YmlFlowMappingCurlyNewline = []|[(("always" | "never") | {
1233
- multiline?: boolean
1234
- minProperties?: number
1235
- consistent?: boolean
1236
- })]
1237
- // ----- yml/flow-mapping-curly-spacing -----
1238
- type YmlFlowMappingCurlySpacing = []|[("always" | "never")]|[("always" | "never"), {
1239
- arraysInObjects?: boolean
1240
- objectsInObjects?: boolean
1241
- }]
1242
- // ----- yml/flow-sequence-bracket-newline -----
1243
- type YmlFlowSequenceBracketNewline = []|[(("always" | "never" | "consistent") | {
1244
- multiline?: boolean
1245
- minItems?: (number | null)
1246
- })]
1247
- // ----- yml/flow-sequence-bracket-spacing -----
1248
- type YmlFlowSequenceBracketSpacing = []|[("always" | "never")]|[("always" | "never"), {
1249
- singleValue?: boolean
1250
- objectsInArrays?: boolean
1251
- arraysInArrays?: boolean
1252
- }]
1253
- // ----- yml/indent -----
1254
- type YmlIndent = []|[number]|[number, {
1255
- indentBlockSequences?: boolean
1256
- indicatorValueIndent?: number
1257
- }]
1258
- // ----- yml/key-name-casing -----
1259
- type YmlKeyNameCasing = []|[{
1260
- camelCase?: boolean
1261
- PascalCase?: boolean
1262
- SCREAMING_SNAKE_CASE?: boolean
1263
- "kebab-case"?: boolean
1264
- snake_case?: boolean
1265
- ignores?: string[]
1266
- }]
1267
- // ----- yml/key-spacing -----
1268
- type YmlKeySpacing = []|[({
1269
- align?: (("colon" | "value") | {
1270
- on?: ("colon" | "value")
1271
- mode?: ("strict" | "minimum")
1272
- beforeColon?: boolean
1273
- afterColon?: boolean
1274
- })
1275
- mode?: ("strict" | "minimum")
1276
- beforeColon?: boolean
1277
- afterColon?: boolean
1278
- } | {
1279
- singleLine?: {
1280
- mode?: ("strict" | "minimum")
1281
- beforeColon?: boolean
1282
- afterColon?: boolean
1283
- }
1284
- multiLine?: {
1285
- align?: (("colon" | "value") | {
1286
- on?: ("colon" | "value")
1287
- mode?: ("strict" | "minimum")
1288
- beforeColon?: boolean
1289
- afterColon?: boolean
1290
- })
1291
- mode?: ("strict" | "minimum")
1292
- beforeColon?: boolean
1293
- afterColon?: boolean
1294
- }
1295
- } | {
1296
- singleLine?: {
1297
- mode?: ("strict" | "minimum")
1298
- beforeColon?: boolean
1299
- afterColon?: boolean
1300
- }
1301
- multiLine?: {
1302
- mode?: ("strict" | "minimum")
1303
- beforeColon?: boolean
1304
- afterColon?: boolean
1305
- }
1306
- align?: {
1307
- on?: ("colon" | "value")
1308
- mode?: ("strict" | "minimum")
1309
- beforeColon?: boolean
1310
- afterColon?: boolean
1311
- }
1312
- })]
1313
- // ----- yml/no-irregular-whitespace -----
1314
- type YmlNoIrregularWhitespace = []|[{
1315
- skipComments?: boolean
1316
- skipQuotedScalars?: boolean
1317
- }]
1318
- // ----- yml/no-multiple-empty-lines -----
1319
- type YmlNoMultipleEmptyLines = []|[{
1320
- max: number
1321
- maxEOF?: number
1322
- maxBOF?: number
1323
- }]
1324
- // ----- yml/plain-scalar -----
1325
- type YmlPlainScalar = []|[("always" | "never")]|[("always" | "never"), {
1326
- ignorePatterns?: string[]
1327
- }]
1328
- // ----- yml/quotes -----
1329
- type YmlQuotes = []|[{
1330
- prefer?: ("double" | "single")
1331
- avoidEscape?: boolean
1332
- }]
1333
- // ----- yml/sort-keys -----
1334
- type YmlSortKeys = ([{
1335
- pathPattern: string
1336
- hasProperties?: string[]
1337
- order: ((string | {
1338
- keyPattern?: string
1339
- order?: {
1340
- type?: ("asc" | "desc")
1341
- caseSensitive?: boolean
1342
- natural?: boolean
1343
- }
1344
- })[] | {
1345
- type?: ("asc" | "desc")
1346
- caseSensitive?: boolean
1347
- natural?: boolean
1348
- })
1349
- minKeys?: number
1350
- allowLineSeparatedGroups?: boolean
1351
- }, ...({
1352
- pathPattern: string
1353
- hasProperties?: string[]
1354
- order: ((string | {
1355
- keyPattern?: string
1356
- order?: {
1357
- type?: ("asc" | "desc")
1358
- caseSensitive?: boolean
1359
- natural?: boolean
1360
- }
1361
- })[] | {
1362
- type?: ("asc" | "desc")
1363
- caseSensitive?: boolean
1364
- natural?: boolean
1365
- })
1366
- minKeys?: number
1367
- allowLineSeparatedGroups?: boolean
1368
- })[]] | []|[("asc" | "desc")]|[("asc" | "desc"), {
1369
- caseSensitive?: boolean
1370
- natural?: boolean
1371
- minKeys?: number
1372
- allowLineSeparatedGroups?: boolean
1373
- }])
1374
- // ----- yml/sort-sequence-values -----
1375
- type YmlSortSequenceValues = [{
1376
- pathPattern: string
1377
- order: ((string | {
1378
- valuePattern?: string
1379
- order?: {
1380
- type?: ("asc" | "desc")
1381
- caseSensitive?: boolean
1382
- natural?: boolean
1383
- }
1384
- })[] | {
1385
- type?: ("asc" | "desc")
1386
- caseSensitive?: boolean
1387
- natural?: boolean
1388
- })
1389
- minValues?: number
1390
- }, ...({
1391
- pathPattern: string
1392
- order: ((string | {
1393
- valuePattern?: string
1394
- order?: {
1395
- type?: ("asc" | "desc")
1396
- caseSensitive?: boolean
1397
- natural?: boolean
1398
- }
1399
- })[] | {
1400
- type?: ("asc" | "desc")
1401
- caseSensitive?: boolean
1402
- natural?: boolean
1403
- })
1404
- minValues?: number
1405
- })[]]
1406
- // ----- yml/spaced-comment -----
1407
- type YmlSpacedComment = []|[("always" | "never")]|[("always" | "never"), {
1408
- exceptions?: string[]
1409
- markers?: string[]
1410
- }]
1411
-
1412
- /**
1413
- * The module boundary dependency constraints.
1414
- */
1415
- type PresetModuleBoundaryDepConstraints = {
1416
- sourceTag: string;
1417
- onlyDependOnLibsWithTags: string[];
1418
- };
1419
- /**
1420
- * The module boundary options.
1421
- */
1422
- type PresetModuleBoundary = {
1423
- enforceBuildableLibDependency: boolean;
1424
- allow: any[];
1425
- depConstraints: PresetModuleBoundaryDepConstraints[];
1426
- };
1427
- /**
1428
- * The ESLint preset options.
1429
- */
1430
- interface PresetOptions {
1431
- name?: string;
1432
- banner?: string;
1433
- rules?: RuleOptions;
1434
- ignores?: string[];
1435
- tsconfig?: string;
1436
- parserOptions?: Linter.ParserOptions;
1437
- markdown?: false | Linter.RulesRecord;
1438
- react?: false | Linter.RulesRecord;
1439
- useReactCompiler?: boolean;
1440
- nextFiles?: string[];
1441
- }
1442
- /**
1443
- * Get the ESLint configuration for a Storm workspace.
1444
- *
1445
- * @param options - The preset options.
1446
- * @param userConfigs - Additional ESLint configurations.
1447
- */
1448
- declare function getStormConfig(options?: PresetOptions, ...userConfigs: Linter.FlatConfig[]): Linter.FlatConfig[];
1449
-
1450
- export { type PresetModuleBoundary, type PresetModuleBoundaryDepConstraints, type PresetOptions, getStormConfig };