@kazupon/eslint-config 0.34.0 → 0.36.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.
- package/README.md +3 -0
- package/dist/index.d.ts +615 -165
- package/dist/index.js +40 -4
- package/package.json +37 -32
package/dist/index.d.ts
CHANGED
|
@@ -99,6 +99,11 @@ interface CommentsRules {
|
|
|
99
99
|
*/
|
|
100
100
|
"@kazupon/no-tag-comments"?: Linter.RuleEntry<KazuponNoTagComments>;
|
|
101
101
|
/**
|
|
102
|
+
* enforce the use of inline code for specific words on comments
|
|
103
|
+
* @see https://eslint-plugin.kazupon.dev/rules/prefer-inline-code-words-comments
|
|
104
|
+
*/
|
|
105
|
+
"@kazupon/prefer-inline-code-words-comments"?: Linter.RuleEntry<KazuponPreferInlineCodeWordsComments>;
|
|
106
|
+
/**
|
|
102
107
|
* enforce adding a scope to tag comments
|
|
103
108
|
* @see https://eslint-plugin.kazupon.dev/rules/prefer-scope-on-tag-comment
|
|
104
109
|
*/
|
|
@@ -123,6 +128,10 @@ type EslintCommunityEslintCommentsRequireDescription = [] | [{
|
|
|
123
128
|
type KazuponNoTagComments = [] | [{
|
|
124
129
|
tags?: [string, ...(string)[]];
|
|
125
130
|
}];
|
|
131
|
+
// ----- @kazupon/prefer-inline-code-words-comments -----
|
|
132
|
+
type KazuponPreferInlineCodeWordsComments = [] | [{
|
|
133
|
+
words: string[];
|
|
134
|
+
}];
|
|
126
135
|
// ----- @kazupon/prefer-scope-on-tag-comment -----
|
|
127
136
|
type KazuponPreferScopeOnTagComment = [] | [{
|
|
128
137
|
tags?: [string, ...(string)[]];
|
|
@@ -199,6 +208,131 @@ type CssUseLayers = [] | [{
|
|
|
199
208
|
layerNamePattern?: string;
|
|
200
209
|
}];
|
|
201
210
|
//#endregion
|
|
211
|
+
//#region src/types/gens/deps.d.ts
|
|
212
|
+
interface DepsRules {
|
|
213
|
+
/**
|
|
214
|
+
* avoid-barrel-files
|
|
215
|
+
* @see ../../docs/rules/avoid-barrel-files.md
|
|
216
|
+
*/
|
|
217
|
+
"barrel-files/avoid-barrel-files"?: Linter.RuleEntry<BarrelFilesAvoidBarrelFiles>;
|
|
218
|
+
/**
|
|
219
|
+
* Avoid importing barrel files
|
|
220
|
+
* @see ../../docs/rules/avoid-importing-barrel-files.md
|
|
221
|
+
*/
|
|
222
|
+
"barrel-files/avoid-importing-barrel-files"?: Linter.RuleEntry<BarrelFilesAvoidImportingBarrelFiles>;
|
|
223
|
+
/**
|
|
224
|
+
* avoid-namespace-import
|
|
225
|
+
* @see ../../docs/rules/avoid-namespace-import.md
|
|
226
|
+
*/
|
|
227
|
+
"barrel-files/avoid-namespace-import"?: Linter.RuleEntry<BarrelFilesAvoidNamespaceImport>;
|
|
228
|
+
/**
|
|
229
|
+
* avoid-re-export-all
|
|
230
|
+
* @see ../../docs/rules/avoid-re-export-all.md
|
|
231
|
+
*/
|
|
232
|
+
"barrel-files/avoid-re-export-all"?: Linter.RuleEntry<[]>;
|
|
233
|
+
}
|
|
234
|
+
/* ======= Declarations ======= */
|
|
235
|
+
// ----- barrel-files/avoid-barrel-files -----
|
|
236
|
+
type BarrelFilesAvoidBarrelFiles = [] | [{
|
|
237
|
+
[k: string]: unknown | undefined;
|
|
238
|
+
}];
|
|
239
|
+
// ----- barrel-files/avoid-importing-barrel-files -----
|
|
240
|
+
type BarrelFilesAvoidImportingBarrelFiles = [] | [{
|
|
241
|
+
[k: string]: unknown | undefined;
|
|
242
|
+
}] | [{
|
|
243
|
+
[k: string]: unknown | undefined;
|
|
244
|
+
}, {
|
|
245
|
+
[k: string]: unknown | undefined;
|
|
246
|
+
}] | [{
|
|
247
|
+
[k: string]: unknown | undefined;
|
|
248
|
+
}, {
|
|
249
|
+
[k: string]: unknown | undefined;
|
|
250
|
+
}, {
|
|
251
|
+
[k: string]: unknown | undefined;
|
|
252
|
+
}] | [{
|
|
253
|
+
[k: string]: unknown | undefined;
|
|
254
|
+
}, {
|
|
255
|
+
[k: string]: unknown | undefined;
|
|
256
|
+
}, {
|
|
257
|
+
[k: string]: unknown | undefined;
|
|
258
|
+
}, {
|
|
259
|
+
[k: string]: unknown | undefined;
|
|
260
|
+
}] | [{
|
|
261
|
+
[k: string]: unknown | undefined;
|
|
262
|
+
}, {
|
|
263
|
+
[k: string]: unknown | undefined;
|
|
264
|
+
}, {
|
|
265
|
+
[k: string]: unknown | undefined;
|
|
266
|
+
}, {
|
|
267
|
+
[k: string]: unknown | undefined;
|
|
268
|
+
}, {
|
|
269
|
+
[k: string]: unknown | undefined;
|
|
270
|
+
}] | [{
|
|
271
|
+
[k: string]: unknown | undefined;
|
|
272
|
+
}, {
|
|
273
|
+
[k: string]: unknown | undefined;
|
|
274
|
+
}, {
|
|
275
|
+
[k: string]: unknown | undefined;
|
|
276
|
+
}, {
|
|
277
|
+
[k: string]: unknown | undefined;
|
|
278
|
+
}, {
|
|
279
|
+
[k: string]: unknown | undefined;
|
|
280
|
+
}, {
|
|
281
|
+
[k: string]: unknown | undefined;
|
|
282
|
+
}] | [{
|
|
283
|
+
[k: string]: unknown | undefined;
|
|
284
|
+
}, {
|
|
285
|
+
[k: string]: unknown | undefined;
|
|
286
|
+
}, {
|
|
287
|
+
[k: string]: unknown | undefined;
|
|
288
|
+
}, {
|
|
289
|
+
[k: string]: unknown | undefined;
|
|
290
|
+
}, {
|
|
291
|
+
[k: string]: unknown | undefined;
|
|
292
|
+
}, {
|
|
293
|
+
[k: string]: unknown | undefined;
|
|
294
|
+
}, {
|
|
295
|
+
[k: string]: unknown | undefined;
|
|
296
|
+
}] | [{
|
|
297
|
+
[k: string]: unknown | undefined;
|
|
298
|
+
}, {
|
|
299
|
+
[k: string]: unknown | undefined;
|
|
300
|
+
}, {
|
|
301
|
+
[k: string]: unknown | undefined;
|
|
302
|
+
}, {
|
|
303
|
+
[k: string]: unknown | undefined;
|
|
304
|
+
}, {
|
|
305
|
+
[k: string]: unknown | undefined;
|
|
306
|
+
}, {
|
|
307
|
+
[k: string]: unknown | undefined;
|
|
308
|
+
}, {
|
|
309
|
+
[k: string]: unknown | undefined;
|
|
310
|
+
}, {
|
|
311
|
+
[k: string]: unknown | undefined;
|
|
312
|
+
}] | [{
|
|
313
|
+
[k: string]: unknown | undefined;
|
|
314
|
+
}, {
|
|
315
|
+
[k: string]: unknown | undefined;
|
|
316
|
+
}, {
|
|
317
|
+
[k: string]: unknown | undefined;
|
|
318
|
+
}, {
|
|
319
|
+
[k: string]: unknown | undefined;
|
|
320
|
+
}, {
|
|
321
|
+
[k: string]: unknown | undefined;
|
|
322
|
+
}, {
|
|
323
|
+
[k: string]: unknown | undefined;
|
|
324
|
+
}, {
|
|
325
|
+
[k: string]: unknown | undefined;
|
|
326
|
+
}, {
|
|
327
|
+
[k: string]: unknown | undefined;
|
|
328
|
+
}, {
|
|
329
|
+
[k: string]: unknown | undefined;
|
|
330
|
+
}];
|
|
331
|
+
// ----- barrel-files/avoid-namespace-import -----
|
|
332
|
+
type BarrelFilesAvoidNamespaceImport = [] | [{
|
|
333
|
+
[k: string]: unknown | undefined;
|
|
334
|
+
}];
|
|
335
|
+
//#endregion
|
|
202
336
|
//#region src/types/gens/html.d.ts
|
|
203
337
|
interface HtmlRules {
|
|
204
338
|
/**
|
|
@@ -212,7 +346,7 @@ interface HtmlRules {
|
|
|
212
346
|
*/
|
|
213
347
|
"@html-eslint/element-newline"?: Linter.RuleEntry<HtmlEslintElementNewline>;
|
|
214
348
|
/**
|
|
215
|
-
* Enforce consistent naming id attributes
|
|
349
|
+
* Enforce consistent naming of id attributes
|
|
216
350
|
* @see https://html-eslint.org/docs/rules/id-naming-convention
|
|
217
351
|
*/
|
|
218
352
|
"@html-eslint/id-naming-convention"?: Linter.RuleEntry<HtmlEslintIdNamingConvention>;
|
|
@@ -221,27 +355,27 @@ interface HtmlRules {
|
|
|
221
355
|
*/
|
|
222
356
|
"@html-eslint/indent"?: Linter.RuleEntry<HtmlEslintIndent>;
|
|
223
357
|
/**
|
|
224
|
-
* Enforce
|
|
358
|
+
* Enforce use of lowercase for tag and attribute names.
|
|
225
359
|
* @see https://html-eslint.org/docs/rules/lowercase
|
|
226
360
|
*/
|
|
227
361
|
"@html-eslint/lowercase"?: Linter.RuleEntry<[]>;
|
|
228
362
|
/**
|
|
229
|
-
* Enforce element
|
|
363
|
+
* Enforce maximum element depth
|
|
230
364
|
* @see https://html-eslint.org/docs/rules/max-element-depth
|
|
231
365
|
*/
|
|
232
366
|
"@html-eslint/max-element-depth"?: Linter.RuleEntry<HtmlEslintMaxElementDepth>;
|
|
233
367
|
/**
|
|
234
|
-
* Disallow
|
|
368
|
+
* Disallow use of abstract roles
|
|
235
369
|
* @see https://html-eslint.org/docs/rules/no-abstract-roles
|
|
236
370
|
*/
|
|
237
371
|
"@html-eslint/no-abstract-roles"?: Linter.RuleEntry<[]>;
|
|
238
372
|
/**
|
|
239
|
-
* Disallow
|
|
373
|
+
* Disallow use of accesskey attribute
|
|
240
374
|
* @see https://html-eslint.org/docs/rules/no-accesskey-attrs
|
|
241
375
|
*/
|
|
242
376
|
"@html-eslint/no-accesskey-attrs"?: Linter.RuleEntry<[]>;
|
|
243
377
|
/**
|
|
244
|
-
* Disallow
|
|
378
|
+
* Disallow use of aria-hidden attributes on the `body` element.
|
|
245
379
|
* @see https://html-eslint.org/docs/rules/no-aria-hidden-body
|
|
246
380
|
*/
|
|
247
381
|
"@html-eslint/no-aria-hidden-body"?: Linter.RuleEntry<[]>;
|
|
@@ -251,17 +385,17 @@ interface HtmlRules {
|
|
|
251
385
|
*/
|
|
252
386
|
"@html-eslint/no-aria-hidden-on-focusable"?: Linter.RuleEntry<[]>;
|
|
253
387
|
/**
|
|
254
|
-
* Disallow
|
|
388
|
+
* Disallow duplicate attributes
|
|
255
389
|
* @see https://html-eslint.org/docs/rules/no-duplicate-attrs
|
|
256
390
|
*/
|
|
257
391
|
"@html-eslint/no-duplicate-attrs"?: Linter.RuleEntry<[]>;
|
|
258
392
|
/**
|
|
259
|
-
* Disallow
|
|
393
|
+
* Disallow duplicate class names
|
|
260
394
|
* @see https://html-eslint.org/docs/rules/no-duplicate-class
|
|
261
395
|
*/
|
|
262
396
|
"@html-eslint/no-duplicate-class"?: Linter.RuleEntry<[]>;
|
|
263
397
|
/**
|
|
264
|
-
* Disallow
|
|
398
|
+
* Disallow duplicate id attributes
|
|
265
399
|
* @see https://html-eslint.org/docs/rules/no-duplicate-id
|
|
266
400
|
*/
|
|
267
401
|
"@html-eslint/no-duplicate-id"?: Linter.RuleEntry<[]>;
|
|
@@ -276,7 +410,7 @@ interface HtmlRules {
|
|
|
276
410
|
*/
|
|
277
411
|
"@html-eslint/no-empty-headings"?: Linter.RuleEntry<[]>;
|
|
278
412
|
/**
|
|
279
|
-
* Disallow
|
|
413
|
+
* Disallow extra spacing around attributes
|
|
280
414
|
* @see https://html-eslint.org/docs/rules/no-extra-spacing-attrs
|
|
281
415
|
*/
|
|
282
416
|
"@html-eslint/no-extra-spacing-attrs"?: Linter.RuleEntry<HtmlEslintNoExtraSpacingAttrs>;
|
|
@@ -291,6 +425,10 @@ interface HtmlRules {
|
|
|
291
425
|
*/
|
|
292
426
|
"@html-eslint/no-heading-inside-button"?: Linter.RuleEntry<[]>;
|
|
293
427
|
/**
|
|
428
|
+
* Disallow HTML attributes that have no effect in their context
|
|
429
|
+
*/
|
|
430
|
+
"@html-eslint/no-ineffective-attrs"?: Linter.RuleEntry<[]>;
|
|
431
|
+
/**
|
|
294
432
|
* Disallow using inline style
|
|
295
433
|
* @see https://html-eslint.org/docs/rules/no-inline-styles
|
|
296
434
|
*/
|
|
@@ -326,7 +464,7 @@ interface HtmlRules {
|
|
|
326
464
|
*/
|
|
327
465
|
"@html-eslint/no-non-scalable-viewport"?: Linter.RuleEntry<[]>;
|
|
328
466
|
/**
|
|
329
|
-
* Disallow
|
|
467
|
+
* Disallow use of obsolete elements in HTML5
|
|
330
468
|
* @see https://html-eslint.org/docs/rules/no-obsolete-tags
|
|
331
469
|
*/
|
|
332
470
|
"@html-eslint/no-obsolete-tags"?: Linter.RuleEntry<[]>;
|
|
@@ -381,7 +519,7 @@ interface HtmlRules {
|
|
|
381
519
|
*/
|
|
382
520
|
"@html-eslint/require-attrs"?: Linter.RuleEntry<HtmlEslintRequireAttrs>;
|
|
383
521
|
/**
|
|
384
|
-
* Require use of button element with a valid type attribute.
|
|
522
|
+
* Require use of the button element with a valid type attribute.
|
|
385
523
|
* @see https://html-eslint.org/docs/rules/require-button-type
|
|
386
524
|
*/
|
|
387
525
|
"@html-eslint/require-button-type"?: Linter.RuleEntry<[]>;
|
|
@@ -391,7 +529,7 @@ interface HtmlRules {
|
|
|
391
529
|
*/
|
|
392
530
|
"@html-eslint/require-closing-tags"?: Linter.RuleEntry<HtmlEslintRequireClosingTags>;
|
|
393
531
|
/**
|
|
394
|
-
* Require `<!DOCTYPE HTML>` in
|
|
532
|
+
* Require `<!DOCTYPE HTML>` in HTML
|
|
395
533
|
* @see https://html-eslint.org/docs/rules/require-doctype
|
|
396
534
|
*/
|
|
397
535
|
"@html-eslint/require-doctype"?: Linter.RuleEntry<[]>;
|
|
@@ -411,7 +549,7 @@ interface HtmlRules {
|
|
|
411
549
|
*/
|
|
412
550
|
"@html-eslint/require-frame-title"?: Linter.RuleEntry<[]>;
|
|
413
551
|
/**
|
|
414
|
-
* Require `alt` attribute
|
|
552
|
+
* Require `alt` attribute on `<img>` tag
|
|
415
553
|
* @see https://html-eslint.org/docs/rules/require-img-alt
|
|
416
554
|
*/
|
|
417
555
|
"@html-eslint/require-img-alt"?: Linter.RuleEntry<HtmlEslintRequireImgAlt>;
|
|
@@ -421,17 +559,17 @@ interface HtmlRules {
|
|
|
421
559
|
*/
|
|
422
560
|
"@html-eslint/require-input-label"?: Linter.RuleEntry<[]>;
|
|
423
561
|
/**
|
|
424
|
-
* Require `lang` attribute
|
|
562
|
+
* Require `lang` attribute on `<html>` tag
|
|
425
563
|
* @see https://html-eslint.org/docs/rules/require-lang
|
|
426
564
|
*/
|
|
427
565
|
"@html-eslint/require-lang"?: Linter.RuleEntry<[]>;
|
|
428
566
|
/**
|
|
429
|
-
* Enforce `<li>` to be in
|
|
567
|
+
* Enforce `<li>` to be in `<ul>`, `<ol>` or `<menu>`.
|
|
430
568
|
* @see https://html-eslint.org/docs/rules/require-li-container
|
|
431
569
|
*/
|
|
432
570
|
"@html-eslint/require-li-container"?: Linter.RuleEntry<[]>;
|
|
433
571
|
/**
|
|
434
|
-
* Enforce
|
|
572
|
+
* Enforce use of `<meta charset="...">` in `<head>`
|
|
435
573
|
* @see https://html-eslint.org/docs/rules/require-meta-charset
|
|
436
574
|
*/
|
|
437
575
|
"@html-eslint/require-meta-charset"?: Linter.RuleEntry<[]>;
|
|
@@ -441,17 +579,17 @@ interface HtmlRules {
|
|
|
441
579
|
*/
|
|
442
580
|
"@html-eslint/require-meta-description"?: Linter.RuleEntry<[]>;
|
|
443
581
|
/**
|
|
444
|
-
* Enforce
|
|
582
|
+
* Enforce use of `<meta name="viewport">` in `<head>`
|
|
445
583
|
* @see https://html-eslint.org/docs/rules/require-meta-viewport
|
|
446
584
|
*/
|
|
447
585
|
"@html-eslint/require-meta-viewport"?: Linter.RuleEntry<[]>;
|
|
448
586
|
/**
|
|
449
|
-
* Enforce
|
|
587
|
+
* Enforce use of specified meta tags for open graph protocol.
|
|
450
588
|
* @see https://html-eslint.org/docs/rules/require-open-graph-protocol
|
|
451
589
|
*/
|
|
452
590
|
"@html-eslint/require-open-graph-protocol"?: Linter.RuleEntry<HtmlEslintRequireOpenGraphProtocol>;
|
|
453
591
|
/**
|
|
454
|
-
* Require `<title
|
|
592
|
+
* Require `<title>` in the `<head>`
|
|
455
593
|
* @see https://html-eslint.org/docs/rules/require-title
|
|
456
594
|
*/
|
|
457
595
|
"@html-eslint/require-title"?: Linter.RuleEntry<[]>;
|
|
@@ -529,6 +667,7 @@ type HtmlEslintRequireAttrs = {
|
|
|
529
667
|
tag: string;
|
|
530
668
|
attr: string;
|
|
531
669
|
value?: string;
|
|
670
|
+
message?: string;
|
|
532
671
|
}[];
|
|
533
672
|
// ----- @html-eslint/require-closing-tags -----
|
|
534
673
|
type HtmlEslintRequireClosingTags = [] | [{
|
|
@@ -548,7 +687,9 @@ type HtmlEslintRequireImgAlt = [] | [{
|
|
|
548
687
|
type HtmlEslintRequireOpenGraphProtocol = [] | [string[]];
|
|
549
688
|
// ----- @html-eslint/sort-attrs -----
|
|
550
689
|
type HtmlEslintSortAttrs = [] | [{
|
|
551
|
-
priority?: string
|
|
690
|
+
priority?: (string | {
|
|
691
|
+
pattern: string;
|
|
692
|
+
})[];
|
|
552
693
|
}];
|
|
553
694
|
// ----- @html-eslint/use-baseline -----
|
|
554
695
|
type HtmlEslintUseBaseline = [] | [{
|
|
@@ -2447,6 +2588,11 @@ interface JavascriptRules {
|
|
|
2447
2588
|
*/
|
|
2448
2589
|
"prefer-template"?: Linter.RuleEntry<[]>;
|
|
2449
2590
|
/**
|
|
2591
|
+
* Disallow losing originally caught error when re-throwing custom errors
|
|
2592
|
+
* @see https://eslint.org/docs/latest/rules/preserve-caught-error
|
|
2593
|
+
*/
|
|
2594
|
+
"preserve-caught-error"?: Linter.RuleEntry<PreserveCaughtError>;
|
|
2595
|
+
/**
|
|
2450
2596
|
* Require quotes around object literal property names
|
|
2451
2597
|
* @see https://eslint.org/docs/latest/rules/quote-props
|
|
2452
2598
|
* @deprecated
|
|
@@ -3648,10 +3794,17 @@ type NoRestrictedExports = [] | [({
|
|
|
3648
3794
|
};
|
|
3649
3795
|
})];
|
|
3650
3796
|
// ----- no-restricted-globals -----
|
|
3651
|
-
type NoRestrictedGlobals = (string | {
|
|
3797
|
+
type NoRestrictedGlobals = ((string | {
|
|
3652
3798
|
name: string;
|
|
3653
3799
|
message?: string;
|
|
3654
|
-
})[]
|
|
3800
|
+
})[] | [] | [{
|
|
3801
|
+
globals: (string | {
|
|
3802
|
+
name: string;
|
|
3803
|
+
message?: string;
|
|
3804
|
+
})[];
|
|
3805
|
+
checkGlobalObject?: boolean;
|
|
3806
|
+
globalObjects?: string[];
|
|
3807
|
+
}]);
|
|
3655
3808
|
// ----- no-restricted-imports -----
|
|
3656
3809
|
type NoRestrictedImports = ((string | {
|
|
3657
3810
|
name: string;
|
|
@@ -3879,6 +4032,8 @@ type OneVar = [] | [(("always" | "never" | "consecutive") | {
|
|
|
3879
4032
|
var?: ("always" | "never" | "consecutive");
|
|
3880
4033
|
let?: ("always" | "never" | "consecutive");
|
|
3881
4034
|
const?: ("always" | "never" | "consecutive");
|
|
4035
|
+
using?: ("always" | "never" | "consecutive");
|
|
4036
|
+
awaitUsing?: ("always" | "never" | "consecutive");
|
|
3882
4037
|
} | {
|
|
3883
4038
|
initialized?: ("always" | "never" | "consecutive");
|
|
3884
4039
|
uninitialized?: ("always" | "never" | "consecutive");
|
|
@@ -3963,6 +4118,10 @@ type PreferReflect = [] | [{
|
|
|
3963
4118
|
type PreferRegexLiterals = [] | [{
|
|
3964
4119
|
disallowRedundantWrapping?: boolean;
|
|
3965
4120
|
}];
|
|
4121
|
+
// ----- preserve-caught-error -----
|
|
4122
|
+
type PreserveCaughtError = [] | [{
|
|
4123
|
+
requireCatchParameter?: boolean;
|
|
4124
|
+
}];
|
|
3966
4125
|
// ----- quote-props -----
|
|
3967
4126
|
type QuoteProps = ([] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
|
|
3968
4127
|
keywords?: boolean;
|
|
@@ -4110,7 +4269,7 @@ interface JsdocRules {
|
|
|
4110
4269
|
* Reports invalid alignment of JSDoc block asterisks.
|
|
4111
4270
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-alignment.md#repos-sticky-header
|
|
4112
4271
|
*/
|
|
4113
|
-
"jsdoc/check-alignment"?: Linter.RuleEntry<
|
|
4272
|
+
"jsdoc/check-alignment"?: Linter.RuleEntry<JsdocCheckAlignment>;
|
|
4114
4273
|
/**
|
|
4115
4274
|
* Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules.
|
|
4116
4275
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-examples.md#repos-sticky-header
|
|
@@ -4252,6 +4411,16 @@ interface JsdocRules {
|
|
|
4252
4411
|
*/
|
|
4253
4412
|
"jsdoc/no-undefined-types"?: Linter.RuleEntry<JsdocNoUndefinedTypes>;
|
|
4254
4413
|
/**
|
|
4414
|
+
* Reports use of `any` or `*` type
|
|
4415
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/reject-any-type.md#repos-sticky-header
|
|
4416
|
+
*/
|
|
4417
|
+
"jsdoc/reject-any-type"?: Linter.RuleEntry<[]>;
|
|
4418
|
+
/**
|
|
4419
|
+
* Reports use of `Function` type
|
|
4420
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/reject-function-type.md#repos-sticky-header
|
|
4421
|
+
*/
|
|
4422
|
+
"jsdoc/reject-function-type"?: Linter.RuleEntry<[]>;
|
|
4423
|
+
/**
|
|
4255
4424
|
* Requires that each JSDoc line starts with an `*`.
|
|
4256
4425
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-asterisk-prefix.md#repos-sticky-header
|
|
4257
4426
|
*/
|
|
@@ -4287,6 +4456,11 @@ interface JsdocRules {
|
|
|
4287
4456
|
*/
|
|
4288
4457
|
"jsdoc/require-jsdoc"?: Linter.RuleEntry<JsdocRequireJsdoc>;
|
|
4289
4458
|
/**
|
|
4459
|
+
* Requires a type for `@next` tags
|
|
4460
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-next-type.md#repos-sticky-header
|
|
4461
|
+
*/
|
|
4462
|
+
"jsdoc/require-next-type"?: Linter.RuleEntry<[]>;
|
|
4463
|
+
/**
|
|
4290
4464
|
* Requires that all function parameters are documented.
|
|
4291
4465
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param.md#repos-sticky-header
|
|
4292
4466
|
*/
|
|
@@ -4357,6 +4531,11 @@ interface JsdocRules {
|
|
|
4357
4531
|
*/
|
|
4358
4532
|
"jsdoc/require-throws"?: Linter.RuleEntry<JsdocRequireThrows>;
|
|
4359
4533
|
/**
|
|
4534
|
+
* Requires a type for `@throws` tags
|
|
4535
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws-type.md#repos-sticky-header
|
|
4536
|
+
*/
|
|
4537
|
+
"jsdoc/require-throws-type"?: Linter.RuleEntry<[]>;
|
|
4538
|
+
/**
|
|
4360
4539
|
* Requires yields are documented.
|
|
4361
4540
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields.md#repos-sticky-header
|
|
4362
4541
|
*/
|
|
@@ -4367,6 +4546,11 @@ interface JsdocRules {
|
|
|
4367
4546
|
*/
|
|
4368
4547
|
"jsdoc/require-yields-check"?: Linter.RuleEntry<JsdocRequireYieldsCheck>;
|
|
4369
4548
|
/**
|
|
4549
|
+
* Requires a type for `@yields` tags
|
|
4550
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-type.md#repos-sticky-header
|
|
4551
|
+
*/
|
|
4552
|
+
"jsdoc/require-yields-type"?: Linter.RuleEntry<[]>;
|
|
4553
|
+
/**
|
|
4370
4554
|
* Sorts tags by a specified sequence according to tag name.
|
|
4371
4555
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/sort-tags.md#repos-sticky-header
|
|
4372
4556
|
*/
|
|
@@ -4382,12 +4566,21 @@ interface JsdocRules {
|
|
|
4382
4566
|
*/
|
|
4383
4567
|
"jsdoc/text-escaping"?: Linter.RuleEntry<JsdocTextEscaping>;
|
|
4384
4568
|
/**
|
|
4569
|
+
* Formats JSDoc type values.
|
|
4570
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/type-formatting.md#repos-sticky-header
|
|
4571
|
+
*/
|
|
4572
|
+
"jsdoc/type-formatting"?: Linter.RuleEntry<JsdocTypeFormatting>;
|
|
4573
|
+
/**
|
|
4385
4574
|
* Requires all types to be valid JSDoc or Closure compiler types without syntax errors.
|
|
4386
4575
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/valid-types.md#repos-sticky-header
|
|
4387
4576
|
*/
|
|
4388
4577
|
"jsdoc/valid-types"?: Linter.RuleEntry<JsdocValidTypes>;
|
|
4389
4578
|
}
|
|
4390
4579
|
/* ======= Declarations ======= */
|
|
4580
|
+
// ----- jsdoc/check-alignment -----
|
|
4581
|
+
type JsdocCheckAlignment = [] | [{
|
|
4582
|
+
innerIndent?: number;
|
|
4583
|
+
}];
|
|
4391
4584
|
// ----- jsdoc/check-examples -----
|
|
4392
4585
|
type JsdocCheckExamples = [] | [{
|
|
4393
4586
|
allowInlineConfig?: boolean;
|
|
@@ -4677,6 +4870,7 @@ type JsdocRequireJsdoc = [] | [{
|
|
|
4677
4870
|
enableFixer?: boolean;
|
|
4678
4871
|
exemptEmptyConstructors?: boolean;
|
|
4679
4872
|
exemptEmptyFunctions?: boolean;
|
|
4873
|
+
exemptOverloadedImplementations?: boolean;
|
|
4680
4874
|
fixerMessage?: string;
|
|
4681
4875
|
minLineCount?: number;
|
|
4682
4876
|
publicOnly?: (boolean | {
|
|
@@ -4693,6 +4887,7 @@ type JsdocRequireJsdoc = [] | [{
|
|
|
4693
4887
|
FunctionExpression?: boolean;
|
|
4694
4888
|
MethodDefinition?: boolean;
|
|
4695
4889
|
};
|
|
4890
|
+
skipInterveningOverloadedDeclarations?: boolean;
|
|
4696
4891
|
}];
|
|
4697
4892
|
// ----- jsdoc/require-param -----
|
|
4698
4893
|
type JsdocRequireParam = [] | [{
|
|
@@ -4713,6 +4908,7 @@ type JsdocRequireParam = [] | [{
|
|
|
4713
4908
|
enableRootFixer?: boolean;
|
|
4714
4909
|
exemptedBy?: string[];
|
|
4715
4910
|
ignoreWhenAllParamsMissing?: boolean;
|
|
4911
|
+
interfaceExemptsParamsCheck?: boolean;
|
|
4716
4912
|
unnamedRootBase?: string[];
|
|
4717
4913
|
useDefaultObjectProperties?: boolean;
|
|
4718
4914
|
}];
|
|
@@ -4783,6 +4979,7 @@ type JsdocRequireReturnsType = [] | [{
|
|
|
4783
4979
|
}];
|
|
4784
4980
|
// ----- jsdoc/require-template -----
|
|
4785
4981
|
type JsdocRequireTemplate = [] | [{
|
|
4982
|
+
exemptedBy?: string[];
|
|
4786
4983
|
requireSeparateTemplates?: boolean;
|
|
4787
4984
|
}];
|
|
4788
4985
|
// ----- jsdoc/require-throws -----
|
|
@@ -4844,6 +5041,21 @@ type JsdocTextEscaping = [] | [{
|
|
|
4844
5041
|
escapeHTML?: boolean;
|
|
4845
5042
|
escapeMarkdown?: boolean;
|
|
4846
5043
|
}];
|
|
5044
|
+
// ----- jsdoc/type-formatting -----
|
|
5045
|
+
type JsdocTypeFormatting = [] | [{
|
|
5046
|
+
arrayBrackets?: ("angle" | "square");
|
|
5047
|
+
enableFixer?: boolean;
|
|
5048
|
+
genericDot?: boolean;
|
|
5049
|
+
objectFieldIndent?: string;
|
|
5050
|
+
objectFieldQuote?: ("double" | "single" | null);
|
|
5051
|
+
objectFieldSeparator?: ("comma" | "comma-and-linebreak" | "linebreak" | "semicolon" | "semicolon-and-linebreak");
|
|
5052
|
+
objectFieldSeparatorOptionalLinebreak?: boolean;
|
|
5053
|
+
objectFieldSeparatorTrailingPunctuation?: boolean;
|
|
5054
|
+
separatorForSingleObjectField?: boolean;
|
|
5055
|
+
stringQuotes?: ("double" | "single");
|
|
5056
|
+
typeBracketSpacing?: string;
|
|
5057
|
+
unionSpacing?: string;
|
|
5058
|
+
}];
|
|
4847
5059
|
// ----- jsdoc/valid-types -----
|
|
4848
5060
|
type JsdocValidTypes = [] | [{
|
|
4849
5061
|
allowEmptyNamepaths?: boolean;
|
|
@@ -5341,18 +5553,43 @@ type JsoncSpaceUnaryOps = [] | [{
|
|
|
5341
5553
|
//#endregion
|
|
5342
5554
|
//#region src/types/gens/markdown.d.ts
|
|
5343
5555
|
interface MarkdownRules {
|
|
5556
|
+
/**
|
|
5557
|
+
* enforce canonical language names in code blocks
|
|
5558
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/canonical-code-block-language.html
|
|
5559
|
+
*/
|
|
5560
|
+
"markdown-preferences/canonical-code-block-language"?: Linter.RuleEntry<MarkdownPreferencesCanonicalCodeBlockLanguage>;
|
|
5561
|
+
/**
|
|
5562
|
+
* require link definitions and footnote definitions to be placed at the end of the document
|
|
5563
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/definitions-last.html
|
|
5564
|
+
*/
|
|
5565
|
+
"markdown-preferences/definitions-last"?: Linter.RuleEntry<[]>;
|
|
5344
5566
|
/**
|
|
5345
5567
|
* enforce consistent hard linebreak style.
|
|
5346
5568
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/hard-linebreak-style.html
|
|
5347
5569
|
*/
|
|
5348
5570
|
"markdown-preferences/hard-linebreak-style"?: Linter.RuleEntry<MarkdownPreferencesHardLinebreakStyle>;
|
|
5349
5571
|
/**
|
|
5572
|
+
* enforce consistent casing in headings.
|
|
5573
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/heading-casing.html
|
|
5574
|
+
*/
|
|
5575
|
+
"markdown-preferences/heading-casing"?: Linter.RuleEntry<MarkdownPreferencesHeadingCasing>;
|
|
5576
|
+
/**
|
|
5577
|
+
* disallow laziness in blockquotes
|
|
5578
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-laziness-blockquotes.html
|
|
5579
|
+
*/
|
|
5580
|
+
"markdown-preferences/no-laziness-blockquotes"?: Linter.RuleEntry<[]>;
|
|
5581
|
+
/**
|
|
5582
|
+
* disallow multiple empty lines in Markdown files.
|
|
5583
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-multiple-empty-lines.html
|
|
5584
|
+
*/
|
|
5585
|
+
"markdown-preferences/no-multiple-empty-lines"?: Linter.RuleEntry<MarkdownPreferencesNoMultipleEmptyLines>;
|
|
5586
|
+
/**
|
|
5350
5587
|
* disallow text backslash at the end of a line.
|
|
5351
5588
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-text-backslash-linebreak.html
|
|
5352
5589
|
*/
|
|
5353
5590
|
"markdown-preferences/no-text-backslash-linebreak"?: Linter.RuleEntry<[]>;
|
|
5354
5591
|
/**
|
|
5355
|
-
* trailing whitespace at the end of lines in Markdown files.
|
|
5592
|
+
* disallow trailing whitespace at the end of lines in Markdown files.
|
|
5356
5593
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-trailing-spaces.html
|
|
5357
5594
|
*/
|
|
5358
5595
|
"markdown-preferences/no-trailing-spaces"?: Linter.RuleEntry<MarkdownPreferencesNoTrailingSpaces>;
|
|
@@ -5362,11 +5599,21 @@ interface MarkdownRules {
|
|
|
5362
5599
|
*/
|
|
5363
5600
|
"markdown-preferences/prefer-inline-code-words"?: Linter.RuleEntry<MarkdownPreferencesPreferInlineCodeWords>;
|
|
5364
5601
|
/**
|
|
5602
|
+
* enforce using link reference definitions instead of inline links
|
|
5603
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-link-reference-definitions.html
|
|
5604
|
+
*/
|
|
5605
|
+
"markdown-preferences/prefer-link-reference-definitions"?: Linter.RuleEntry<MarkdownPreferencesPreferLinkReferenceDefinitions>;
|
|
5606
|
+
/**
|
|
5365
5607
|
* enforce the specified word to be a link.
|
|
5366
5608
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-linked-words.html
|
|
5367
5609
|
*/
|
|
5368
5610
|
"markdown-preferences/prefer-linked-words"?: Linter.RuleEntry<MarkdownPreferencesPreferLinkedWords>;
|
|
5369
5611
|
/**
|
|
5612
|
+
* enforce a specific order for link definitions and footnote definitions
|
|
5613
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/sort-definitions.html
|
|
5614
|
+
*/
|
|
5615
|
+
"markdown-preferences/sort-definitions"?: Linter.RuleEntry<MarkdownPreferencesSortDefinitions>;
|
|
5616
|
+
/**
|
|
5370
5617
|
* Require languages for fenced code blocks
|
|
5371
5618
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/fenced-code-language.md
|
|
5372
5619
|
*/
|
|
@@ -5375,7 +5622,7 @@ interface MarkdownRules {
|
|
|
5375
5622
|
* Enforce heading levels increment by one
|
|
5376
5623
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/heading-increment.md
|
|
5377
5624
|
*/
|
|
5378
|
-
"markdown/heading-increment"?: Linter.RuleEntry<
|
|
5625
|
+
"markdown/heading-increment"?: Linter.RuleEntry<MarkdownHeadingIncrement>;
|
|
5379
5626
|
/**
|
|
5380
5627
|
* Disallow bare URLs
|
|
5381
5628
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-bare-urls.md
|
|
@@ -5420,12 +5667,12 @@ interface MarkdownRules {
|
|
|
5420
5667
|
* Disallow headings without a space after the hash characters
|
|
5421
5668
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-atx-heading-space.md
|
|
5422
5669
|
*/
|
|
5423
|
-
"markdown/no-missing-atx-heading-space"?: Linter.RuleEntry<
|
|
5670
|
+
"markdown/no-missing-atx-heading-space"?: Linter.RuleEntry<MarkdownNoMissingAtxHeadingSpace>;
|
|
5424
5671
|
/**
|
|
5425
5672
|
* Disallow missing label references
|
|
5426
5673
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-label-refs.md
|
|
5427
5674
|
*/
|
|
5428
|
-
"markdown/no-missing-label-refs"?: Linter.RuleEntry<
|
|
5675
|
+
"markdown/no-missing-label-refs"?: Linter.RuleEntry<MarkdownNoMissingLabelRefs>;
|
|
5429
5676
|
/**
|
|
5430
5677
|
* Disallow link fragments that do not reference valid headings
|
|
5431
5678
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-link-fragments.md
|
|
@@ -5437,11 +5684,21 @@ interface MarkdownRules {
|
|
|
5437
5684
|
*/
|
|
5438
5685
|
"markdown/no-multiple-h1"?: Linter.RuleEntry<MarkdownNoMultipleH1>;
|
|
5439
5686
|
/**
|
|
5687
|
+
* Disallow URLs that match defined reference identifiers
|
|
5688
|
+
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-reference-like-urls.md
|
|
5689
|
+
*/
|
|
5690
|
+
"markdown/no-reference-like-urls"?: Linter.RuleEntry<[]>;
|
|
5691
|
+
/**
|
|
5440
5692
|
* Disallow reversed link and image syntax
|
|
5441
5693
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-reversed-media-syntax.md
|
|
5442
5694
|
*/
|
|
5443
5695
|
"markdown/no-reversed-media-syntax"?: Linter.RuleEntry<[]>;
|
|
5444
5696
|
/**
|
|
5697
|
+
* Disallow spaces around emphasis markers
|
|
5698
|
+
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-space-in-emphasis.md
|
|
5699
|
+
*/
|
|
5700
|
+
"markdown/no-space-in-emphasis"?: Linter.RuleEntry<MarkdownNoSpaceInEmphasis>;
|
|
5701
|
+
/**
|
|
5445
5702
|
* Disallow unused definitions
|
|
5446
5703
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-unused-definitions.md
|
|
5447
5704
|
*/
|
|
@@ -5458,10 +5715,29 @@ interface MarkdownRules {
|
|
|
5458
5715
|
"markdown/table-column-count"?: Linter.RuleEntry<MarkdownTableColumnCount>;
|
|
5459
5716
|
}
|
|
5460
5717
|
/* ======= Declarations ======= */
|
|
5718
|
+
// ----- markdown-preferences/canonical-code-block-language -----
|
|
5719
|
+
type MarkdownPreferencesCanonicalCodeBlockLanguage = [] | [{
|
|
5720
|
+
languages?: {
|
|
5721
|
+
[k: string]: string;
|
|
5722
|
+
};
|
|
5723
|
+
}];
|
|
5461
5724
|
// ----- markdown-preferences/hard-linebreak-style -----
|
|
5462
5725
|
type MarkdownPreferencesHardLinebreakStyle = [] | [{
|
|
5463
5726
|
style?: ("backslash" | "spaces");
|
|
5464
5727
|
}];
|
|
5728
|
+
// ----- markdown-preferences/heading-casing -----
|
|
5729
|
+
type MarkdownPreferencesHeadingCasing = [] | [{
|
|
5730
|
+
style?: ("Title Case" | "Sentence case");
|
|
5731
|
+
preserveWords?: string[];
|
|
5732
|
+
ignorePatterns?: string[];
|
|
5733
|
+
minorWords?: string[];
|
|
5734
|
+
}];
|
|
5735
|
+
// ----- markdown-preferences/no-multiple-empty-lines -----
|
|
5736
|
+
type MarkdownPreferencesNoMultipleEmptyLines = [] | [{
|
|
5737
|
+
max?: number;
|
|
5738
|
+
maxEOF?: number;
|
|
5739
|
+
maxBOF?: number;
|
|
5740
|
+
}];
|
|
5465
5741
|
// ----- markdown-preferences/no-trailing-spaces -----
|
|
5466
5742
|
type MarkdownPreferencesNoTrailingSpaces = [] | [{
|
|
5467
5743
|
skipBlankLines?: boolean;
|
|
@@ -5470,19 +5746,49 @@ type MarkdownPreferencesNoTrailingSpaces = [] | [{
|
|
|
5470
5746
|
// ----- markdown-preferences/prefer-inline-code-words -----
|
|
5471
5747
|
type MarkdownPreferencesPreferInlineCodeWords = [] | [{
|
|
5472
5748
|
words: string[];
|
|
5749
|
+
ignores?: {
|
|
5750
|
+
words?: (string | string[]);
|
|
5751
|
+
node?: {
|
|
5752
|
+
[k: string]: unknown | undefined;
|
|
5753
|
+
};
|
|
5754
|
+
[k: string]: unknown | undefined;
|
|
5755
|
+
}[];
|
|
5473
5756
|
[k: string]: unknown | undefined;
|
|
5474
5757
|
}];
|
|
5758
|
+
// ----- markdown-preferences/prefer-link-reference-definitions -----
|
|
5759
|
+
type MarkdownPreferencesPreferLinkReferenceDefinitions = [] | [{
|
|
5760
|
+
minLinks?: number;
|
|
5761
|
+
}];
|
|
5475
5762
|
// ----- markdown-preferences/prefer-linked-words -----
|
|
5476
5763
|
type MarkdownPreferencesPreferLinkedWords = [] | [{
|
|
5477
5764
|
words: ({
|
|
5478
5765
|
[k: string]: (string | null);
|
|
5479
5766
|
} | string[]);
|
|
5767
|
+
ignores?: {
|
|
5768
|
+
words?: (string | string[]);
|
|
5769
|
+
node?: {
|
|
5770
|
+
[k: string]: unknown | undefined;
|
|
5771
|
+
};
|
|
5772
|
+
[k: string]: unknown | undefined;
|
|
5773
|
+
}[];
|
|
5480
5774
|
[k: string]: unknown | undefined;
|
|
5481
5775
|
}];
|
|
5776
|
+
// ----- markdown-preferences/sort-definitions -----
|
|
5777
|
+
type MarkdownPreferencesSortDefinitions = [] | [{
|
|
5778
|
+
order?: (string | [string, ...(string)[]] | {
|
|
5779
|
+
match: (string | [string, ...(string)[]]);
|
|
5780
|
+
sort: ("alphabetical" | "ignore");
|
|
5781
|
+
})[];
|
|
5782
|
+
alphabetical?: boolean;
|
|
5783
|
+
}];
|
|
5482
5784
|
// ----- markdown/fenced-code-language -----
|
|
5483
5785
|
type MarkdownFencedCodeLanguage = [] | [{
|
|
5484
5786
|
required?: string[];
|
|
5485
5787
|
}];
|
|
5788
|
+
// ----- markdown/heading-increment -----
|
|
5789
|
+
type MarkdownHeadingIncrement = [] | [{
|
|
5790
|
+
frontmatterTitle?: string;
|
|
5791
|
+
}];
|
|
5486
5792
|
// ----- markdown/no-duplicate-definitions -----
|
|
5487
5793
|
type MarkdownNoDuplicateDefinitions = [] | [{
|
|
5488
5794
|
allowDefinitions?: string[];
|
|
@@ -5501,6 +5807,15 @@ type MarkdownNoEmptyDefinitions = [] | [{
|
|
|
5501
5807
|
// ----- markdown/no-html -----
|
|
5502
5808
|
type MarkdownNoHtml = [] | [{
|
|
5503
5809
|
allowed?: string[];
|
|
5810
|
+
allowedIgnoreCase?: boolean;
|
|
5811
|
+
}];
|
|
5812
|
+
// ----- markdown/no-missing-atx-heading-space -----
|
|
5813
|
+
type MarkdownNoMissingAtxHeadingSpace = [] | [{
|
|
5814
|
+
checkClosedHeadings?: boolean;
|
|
5815
|
+
}];
|
|
5816
|
+
// ----- markdown/no-missing-label-refs -----
|
|
5817
|
+
type MarkdownNoMissingLabelRefs = [] | [{
|
|
5818
|
+
allowLabels?: string[];
|
|
5504
5819
|
}];
|
|
5505
5820
|
// ----- markdown/no-missing-link-fragments -----
|
|
5506
5821
|
type MarkdownNoMissingLinkFragments = [] | [{
|
|
@@ -5511,6 +5826,10 @@ type MarkdownNoMissingLinkFragments = [] | [{
|
|
|
5511
5826
|
type MarkdownNoMultipleH1 = [] | [{
|
|
5512
5827
|
frontmatterTitle?: string;
|
|
5513
5828
|
}];
|
|
5829
|
+
// ----- markdown/no-space-in-emphasis -----
|
|
5830
|
+
type MarkdownNoSpaceInEmphasis = [] | [{
|
|
5831
|
+
checkStrikethrough?: boolean;
|
|
5832
|
+
}];
|
|
5514
5833
|
// ----- markdown/no-unused-definitions -----
|
|
5515
5834
|
type MarkdownNoUnusedDefinitions = [] | [{
|
|
5516
5835
|
allowDefinitions?: string[];
|
|
@@ -11167,670 +11486,710 @@ type TypescriptEslintUnifiedSignatures = [] | [{
|
|
|
11167
11486
|
interface UnicornRules {
|
|
11168
11487
|
/**
|
|
11169
11488
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
11170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/better-regex.md
|
|
11171
11490
|
*/
|
|
11172
11491
|
"unicorn/better-regex"?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
11173
11492
|
/**
|
|
11174
11493
|
* Enforce a specific parameter name in catch clauses.
|
|
11175
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/catch-error-name.md
|
|
11176
11495
|
*/
|
|
11177
11496
|
"unicorn/catch-error-name"?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
11178
11497
|
/**
|
|
11179
11498
|
* Enforce consistent assertion style with `node:assert`.
|
|
11180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-assert.md
|
|
11181
11500
|
*/
|
|
11182
11501
|
"unicorn/consistent-assert"?: Linter.RuleEntry<[]>;
|
|
11183
11502
|
/**
|
|
11184
11503
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
11185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-date-clone.md
|
|
11186
11505
|
*/
|
|
11187
11506
|
"unicorn/consistent-date-clone"?: Linter.RuleEntry<[]>;
|
|
11188
11507
|
/**
|
|
11189
11508
|
* Use destructured variables over properties.
|
|
11190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-destructuring.md
|
|
11191
11510
|
*/
|
|
11192
11511
|
"unicorn/consistent-destructuring"?: Linter.RuleEntry<[]>;
|
|
11193
11512
|
/**
|
|
11194
11513
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
11195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-empty-array-spread.md
|
|
11196
11515
|
*/
|
|
11197
11516
|
"unicorn/consistent-empty-array-spread"?: Linter.RuleEntry<[]>;
|
|
11198
11517
|
/**
|
|
11199
11518
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
11200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-existence-index-check.md
|
|
11201
11520
|
*/
|
|
11202
11521
|
"unicorn/consistent-existence-index-check"?: Linter.RuleEntry<[]>;
|
|
11203
11522
|
/**
|
|
11204
11523
|
* Move function definitions to the highest possible scope.
|
|
11205
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-function-scoping.md
|
|
11206
11525
|
*/
|
|
11207
11526
|
"unicorn/consistent-function-scoping"?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
11208
11527
|
/**
|
|
11209
11528
|
* Enforce correct `Error` subclassing.
|
|
11210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/custom-error-definition.md
|
|
11211
11530
|
*/
|
|
11212
11531
|
"unicorn/custom-error-definition"?: Linter.RuleEntry<[]>;
|
|
11213
11532
|
/**
|
|
11214
11533
|
* Enforce no spaces between braces.
|
|
11215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/empty-brace-spaces.md
|
|
11216
11535
|
*/
|
|
11217
11536
|
"unicorn/empty-brace-spaces"?: Linter.RuleEntry<[]>;
|
|
11218
11537
|
/**
|
|
11219
11538
|
* Enforce passing a `message` value when creating a built-in error.
|
|
11220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/error-message.md
|
|
11221
11540
|
*/
|
|
11222
11541
|
"unicorn/error-message"?: Linter.RuleEntry<[]>;
|
|
11223
11542
|
/**
|
|
11224
11543
|
* Require escape sequences to use uppercase or lowercase values.
|
|
11225
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/escape-case.md
|
|
11226
11545
|
*/
|
|
11227
11546
|
"unicorn/escape-case"?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
11228
11547
|
/**
|
|
11229
11548
|
* Add expiration conditions to TODO comments.
|
|
11230
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/expiring-todo-comments.md
|
|
11231
11550
|
*/
|
|
11232
11551
|
"unicorn/expiring-todo-comments"?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
11233
11552
|
/**
|
|
11234
11553
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
11235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/explicit-length-check.md
|
|
11236
11555
|
*/
|
|
11237
11556
|
"unicorn/explicit-length-check"?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
11238
11557
|
/**
|
|
11239
11558
|
* Enforce a case style for filenames.
|
|
11240
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/filename-case.md
|
|
11241
11560
|
*/
|
|
11242
11561
|
"unicorn/filename-case"?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
11243
11562
|
/**
|
|
11244
11563
|
* Enforce specific import styles per module.
|
|
11245
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/import-style.md
|
|
11246
11565
|
*/
|
|
11247
11566
|
"unicorn/import-style"?: Linter.RuleEntry<UnicornImportStyle>;
|
|
11248
11567
|
/**
|
|
11249
11568
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
11250
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/new-for-builtins.md
|
|
11251
11570
|
*/
|
|
11252
11571
|
"unicorn/new-for-builtins"?: Linter.RuleEntry<[]>;
|
|
11253
11572
|
/**
|
|
11254
11573
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
11255
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-abusive-eslint-disable.md
|
|
11256
11575
|
*/
|
|
11257
11576
|
"unicorn/no-abusive-eslint-disable"?: Linter.RuleEntry<[]>;
|
|
11258
11577
|
/**
|
|
11259
11578
|
* Disallow recursive access to `this` within getters and setters.
|
|
11260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-accessor-recursion.md
|
|
11261
11580
|
*/
|
|
11262
11581
|
"unicorn/no-accessor-recursion"?: Linter.RuleEntry<[]>;
|
|
11263
11582
|
/**
|
|
11264
11583
|
* Disallow anonymous functions and classes as the default export.
|
|
11265
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-anonymous-default-export.md
|
|
11266
11585
|
*/
|
|
11267
11586
|
"unicorn/no-anonymous-default-export"?: Linter.RuleEntry<[]>;
|
|
11268
11587
|
/**
|
|
11269
11588
|
* Prevent passing a function reference directly to iterator methods.
|
|
11270
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-callback-reference.md
|
|
11271
11590
|
*/
|
|
11272
11591
|
"unicorn/no-array-callback-reference"?: Linter.RuleEntry<[]>;
|
|
11273
11592
|
/**
|
|
11274
11593
|
* Prefer `for…of` over the `forEach` method.
|
|
11275
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-for-each.md
|
|
11276
11595
|
*/
|
|
11277
11596
|
"unicorn/no-array-for-each"?: Linter.RuleEntry<[]>;
|
|
11278
11597
|
/**
|
|
11279
11598
|
* Disallow using the `this` argument in array methods.
|
|
11280
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-method-this-argument.md
|
|
11281
11600
|
*/
|
|
11282
11601
|
"unicorn/no-array-method-this-argument"?: Linter.RuleEntry<[]>;
|
|
11283
11602
|
/**
|
|
11284
11603
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
11285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-array-push-push
|
|
11286
11605
|
* @deprecated
|
|
11287
11606
|
*/
|
|
11288
11607
|
"unicorn/no-array-push-push"?: Linter.RuleEntry<[]>;
|
|
11289
11608
|
/**
|
|
11290
11609
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
11291
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reduce.md
|
|
11292
11611
|
*/
|
|
11293
11612
|
"unicorn/no-array-reduce"?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
11294
11613
|
/**
|
|
11614
|
+
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
11615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reverse.md
|
|
11616
|
+
*/
|
|
11617
|
+
"unicorn/no-array-reverse"?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
11618
|
+
/**
|
|
11619
|
+
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
11620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-sort.md
|
|
11621
|
+
*/
|
|
11622
|
+
"unicorn/no-array-sort"?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
11623
|
+
/**
|
|
11295
11624
|
* Disallow member access from await expression.
|
|
11296
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-expression-member.md
|
|
11297
11626
|
*/
|
|
11298
11627
|
"unicorn/no-await-expression-member"?: Linter.RuleEntry<[]>;
|
|
11299
11628
|
/**
|
|
11300
11629
|
* Disallow using `await` in `Promise` method parameters.
|
|
11301
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-in-promise-methods.md
|
|
11302
11631
|
*/
|
|
11303
11632
|
"unicorn/no-await-in-promise-methods"?: Linter.RuleEntry<[]>;
|
|
11304
11633
|
/**
|
|
11305
11634
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
11306
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-console-spaces.md
|
|
11307
11636
|
*/
|
|
11308
11637
|
"unicorn/no-console-spaces"?: Linter.RuleEntry<[]>;
|
|
11309
11638
|
/**
|
|
11310
11639
|
* Do not use `document.cookie` directly.
|
|
11311
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11640
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-document-cookie.md
|
|
11312
11641
|
*/
|
|
11313
11642
|
"unicorn/no-document-cookie"?: Linter.RuleEntry<[]>;
|
|
11314
11643
|
/**
|
|
11315
11644
|
* Disallow empty files.
|
|
11316
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11645
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-empty-file.md
|
|
11317
11646
|
*/
|
|
11318
11647
|
"unicorn/no-empty-file"?: Linter.RuleEntry<[]>;
|
|
11319
11648
|
/**
|
|
11320
11649
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
11321
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-for-loop.md
|
|
11322
11651
|
*/
|
|
11323
11652
|
"unicorn/no-for-loop"?: Linter.RuleEntry<[]>;
|
|
11324
11653
|
/**
|
|
11325
11654
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
11326
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-hex-escape.md
|
|
11327
11656
|
*/
|
|
11328
11657
|
"unicorn/no-hex-escape"?: Linter.RuleEntry<[]>;
|
|
11329
11658
|
/**
|
|
11330
11659
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
11331
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-instanceof-array
|
|
11332
11661
|
* @deprecated
|
|
11333
11662
|
*/
|
|
11334
11663
|
"unicorn/no-instanceof-array"?: Linter.RuleEntry<[]>;
|
|
11335
11664
|
/**
|
|
11336
11665
|
* Disallow `instanceof` with built-in objects
|
|
11337
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-instanceof-builtins.md
|
|
11338
11667
|
*/
|
|
11339
11668
|
"unicorn/no-instanceof-builtins"?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
11340
11669
|
/**
|
|
11341
11670
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
11342
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-fetch-options.md
|
|
11343
11672
|
*/
|
|
11344
11673
|
"unicorn/no-invalid-fetch-options"?: Linter.RuleEntry<[]>;
|
|
11345
11674
|
/**
|
|
11346
11675
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
11347
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-remove-event-listener.md
|
|
11348
11677
|
*/
|
|
11349
11678
|
"unicorn/no-invalid-remove-event-listener"?: Linter.RuleEntry<[]>;
|
|
11350
11679
|
/**
|
|
11351
11680
|
* Disallow identifiers starting with `new` or `class`.
|
|
11352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-keyword-prefix.md
|
|
11353
11682
|
*/
|
|
11354
11683
|
"unicorn/no-keyword-prefix"?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
11355
11684
|
/**
|
|
11356
11685
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
11357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-length-as-slice-end
|
|
11358
11687
|
* @deprecated
|
|
11359
11688
|
*/
|
|
11360
11689
|
"unicorn/no-length-as-slice-end"?: Linter.RuleEntry<[]>;
|
|
11361
11690
|
/**
|
|
11362
11691
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
11363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-lonely-if.md
|
|
11364
11693
|
*/
|
|
11365
11694
|
"unicorn/no-lonely-if"?: Linter.RuleEntry<[]>;
|
|
11366
11695
|
/**
|
|
11367
11696
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
11368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-magic-array-flat-depth.md
|
|
11369
11698
|
*/
|
|
11370
11699
|
"unicorn/no-magic-array-flat-depth"?: Linter.RuleEntry<[]>;
|
|
11371
11700
|
/**
|
|
11372
11701
|
* Disallow named usage of default import and export.
|
|
11373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-named-default.md
|
|
11374
11703
|
*/
|
|
11375
11704
|
"unicorn/no-named-default"?: Linter.RuleEntry<[]>;
|
|
11376
11705
|
/**
|
|
11377
11706
|
* Disallow negated conditions.
|
|
11378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11707
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negated-condition.md
|
|
11379
11708
|
*/
|
|
11380
11709
|
"unicorn/no-negated-condition"?: Linter.RuleEntry<[]>;
|
|
11381
11710
|
/**
|
|
11382
11711
|
* Disallow negated expression in equality check.
|
|
11383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negation-in-equality-check.md
|
|
11384
11713
|
*/
|
|
11385
11714
|
"unicorn/no-negation-in-equality-check"?: Linter.RuleEntry<[]>;
|
|
11386
11715
|
/**
|
|
11387
11716
|
* Disallow nested ternary expressions.
|
|
11388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-nested-ternary.md
|
|
11389
11718
|
*/
|
|
11390
11719
|
"unicorn/no-nested-ternary"?: Linter.RuleEntry<[]>;
|
|
11391
11720
|
/**
|
|
11392
11721
|
* Disallow `new Array()`.
|
|
11393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-array.md
|
|
11394
11723
|
*/
|
|
11395
11724
|
"unicorn/no-new-array"?: Linter.RuleEntry<[]>;
|
|
11396
11725
|
/**
|
|
11397
11726
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
11398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-buffer.md
|
|
11399
11728
|
*/
|
|
11400
11729
|
"unicorn/no-new-buffer"?: Linter.RuleEntry<[]>;
|
|
11401
11730
|
/**
|
|
11402
11731
|
* Disallow the use of the `null` literal.
|
|
11403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-null.md
|
|
11404
11733
|
*/
|
|
11405
11734
|
"unicorn/no-null"?: Linter.RuleEntry<UnicornNoNull>;
|
|
11406
11735
|
/**
|
|
11407
11736
|
* Disallow the use of objects as default parameters.
|
|
11408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-object-as-default-parameter.md
|
|
11409
11738
|
*/
|
|
11410
11739
|
"unicorn/no-object-as-default-parameter"?: Linter.RuleEntry<[]>;
|
|
11411
11740
|
/**
|
|
11412
11741
|
* Disallow `process.exit()`.
|
|
11413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-process-exit.md
|
|
11414
11743
|
*/
|
|
11415
11744
|
"unicorn/no-process-exit"?: Linter.RuleEntry<[]>;
|
|
11416
11745
|
/**
|
|
11417
11746
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
11418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-single-promise-in-promise-methods.md
|
|
11419
11748
|
*/
|
|
11420
11749
|
"unicorn/no-single-promise-in-promise-methods"?: Linter.RuleEntry<[]>;
|
|
11421
11750
|
/**
|
|
11422
11751
|
* Disallow classes that only have static members.
|
|
11423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-static-only-class.md
|
|
11424
11753
|
*/
|
|
11425
11754
|
"unicorn/no-static-only-class"?: Linter.RuleEntry<[]>;
|
|
11426
11755
|
/**
|
|
11427
11756
|
* Disallow `then` property.
|
|
11428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-thenable.md
|
|
11429
11758
|
*/
|
|
11430
11759
|
"unicorn/no-thenable"?: Linter.RuleEntry<[]>;
|
|
11431
11760
|
/**
|
|
11432
11761
|
* Disallow assigning `this` to a variable.
|
|
11433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-this-assignment.md
|
|
11434
11763
|
*/
|
|
11435
11764
|
"unicorn/no-this-assignment"?: Linter.RuleEntry<[]>;
|
|
11436
11765
|
/**
|
|
11437
11766
|
* Disallow comparing `undefined` using `typeof`.
|
|
11438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-typeof-undefined.md
|
|
11439
11768
|
*/
|
|
11440
11769
|
"unicorn/no-typeof-undefined"?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
11441
11770
|
/**
|
|
11442
11771
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
11443
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-flat-depth.md
|
|
11444
11773
|
*/
|
|
11445
11774
|
"unicorn/no-unnecessary-array-flat-depth"?: Linter.RuleEntry<[]>;
|
|
11446
11775
|
/**
|
|
11447
11776
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
11448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-splice-count.md
|
|
11449
11778
|
*/
|
|
11450
11779
|
"unicorn/no-unnecessary-array-splice-count"?: Linter.RuleEntry<[]>;
|
|
11451
11780
|
/**
|
|
11452
11781
|
* Disallow awaiting non-promise values.
|
|
11453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-await.md
|
|
11454
11783
|
*/
|
|
11455
11784
|
"unicorn/no-unnecessary-await"?: Linter.RuleEntry<[]>;
|
|
11456
11785
|
/**
|
|
11457
11786
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
11458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-polyfills.md
|
|
11459
11788
|
*/
|
|
11460
11789
|
"unicorn/no-unnecessary-polyfills"?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
11461
11790
|
/**
|
|
11462
11791
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
11463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-slice-end.md
|
|
11464
11793
|
*/
|
|
11465
11794
|
"unicorn/no-unnecessary-slice-end"?: Linter.RuleEntry<[]>;
|
|
11466
11795
|
/**
|
|
11467
11796
|
* Disallow unreadable array destructuring.
|
|
11468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-array-destructuring.md
|
|
11469
11798
|
*/
|
|
11470
11799
|
"unicorn/no-unreadable-array-destructuring"?: Linter.RuleEntry<[]>;
|
|
11471
11800
|
/**
|
|
11472
11801
|
* Disallow unreadable IIFEs.
|
|
11473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-iife.md
|
|
11474
11803
|
*/
|
|
11475
11804
|
"unicorn/no-unreadable-iife"?: Linter.RuleEntry<[]>;
|
|
11476
11805
|
/**
|
|
11477
11806
|
* Disallow unused object properties.
|
|
11478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unused-properties.md
|
|
11479
11808
|
*/
|
|
11480
11809
|
"unicorn/no-unused-properties"?: Linter.RuleEntry<[]>;
|
|
11481
11810
|
/**
|
|
11811
|
+
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
11812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-error-capture-stack-trace.md
|
|
11813
|
+
*/
|
|
11814
|
+
"unicorn/no-useless-error-capture-stack-trace"?: Linter.RuleEntry<[]>;
|
|
11815
|
+
/**
|
|
11482
11816
|
* Disallow useless fallback when spreading in object literals.
|
|
11483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-fallback-in-spread.md
|
|
11484
11818
|
*/
|
|
11485
11819
|
"unicorn/no-useless-fallback-in-spread"?: Linter.RuleEntry<[]>;
|
|
11486
11820
|
/**
|
|
11487
11821
|
* Disallow useless array length check.
|
|
11488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-length-check.md
|
|
11489
11823
|
*/
|
|
11490
11824
|
"unicorn/no-useless-length-check"?: Linter.RuleEntry<[]>;
|
|
11491
11825
|
/**
|
|
11492
11826
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
11493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-promise-resolve-reject.md
|
|
11494
11828
|
*/
|
|
11495
11829
|
"unicorn/no-useless-promise-resolve-reject"?: Linter.RuleEntry<[]>;
|
|
11496
11830
|
/**
|
|
11497
11831
|
* Disallow unnecessary spread.
|
|
11498
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11832
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-spread.md
|
|
11499
11833
|
*/
|
|
11500
11834
|
"unicorn/no-useless-spread"?: Linter.RuleEntry<[]>;
|
|
11501
11835
|
/**
|
|
11502
11836
|
* Disallow useless case in switch statements.
|
|
11503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-switch-case.md
|
|
11504
11838
|
*/
|
|
11505
11839
|
"unicorn/no-useless-switch-case"?: Linter.RuleEntry<[]>;
|
|
11506
11840
|
/**
|
|
11507
11841
|
* Disallow useless `undefined`.
|
|
11508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-undefined.md
|
|
11509
11843
|
*/
|
|
11510
11844
|
"unicorn/no-useless-undefined"?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
11511
11845
|
/**
|
|
11512
11846
|
* Disallow number literals with zero fractions or dangling dots.
|
|
11513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-zero-fractions.md
|
|
11514
11848
|
*/
|
|
11515
11849
|
"unicorn/no-zero-fractions"?: Linter.RuleEntry<[]>;
|
|
11516
11850
|
/**
|
|
11517
11851
|
* Enforce proper case for numeric literals.
|
|
11518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11852
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/number-literal-case.md
|
|
11519
11853
|
*/
|
|
11520
11854
|
"unicorn/number-literal-case"?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
11521
11855
|
/**
|
|
11522
11856
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
11523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11857
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/numeric-separators-style.md
|
|
11524
11858
|
*/
|
|
11525
11859
|
"unicorn/numeric-separators-style"?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
11526
11860
|
/**
|
|
11527
11861
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
11528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-add-event-listener.md
|
|
11529
11863
|
*/
|
|
11530
11864
|
"unicorn/prefer-add-event-listener"?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
11531
11865
|
/**
|
|
11532
11866
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
11533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-find.md
|
|
11534
11868
|
*/
|
|
11535
11869
|
"unicorn/prefer-array-find"?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
11536
11870
|
/**
|
|
11537
11871
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
11538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat.md
|
|
11539
11873
|
*/
|
|
11540
11874
|
"unicorn/prefer-array-flat"?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
11541
11875
|
/**
|
|
11542
11876
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
11543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat-map.md
|
|
11544
11878
|
*/
|
|
11545
11879
|
"unicorn/prefer-array-flat-map"?: Linter.RuleEntry<[]>;
|
|
11546
11880
|
/**
|
|
11547
11881
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
11548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-index-of.md
|
|
11549
11883
|
*/
|
|
11550
11884
|
"unicorn/prefer-array-index-of"?: Linter.RuleEntry<[]>;
|
|
11551
11885
|
/**
|
|
11552
11886
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
11553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-some.md
|
|
11554
11888
|
*/
|
|
11555
11889
|
"unicorn/prefer-array-some"?: Linter.RuleEntry<[]>;
|
|
11556
11890
|
/**
|
|
11557
11891
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
11558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-at.md
|
|
11559
11893
|
*/
|
|
11560
11894
|
"unicorn/prefer-at"?: Linter.RuleEntry<UnicornPreferAt>;
|
|
11561
11895
|
/**
|
|
11896
|
+
* Prefer `BigInt` literals over the constructor.
|
|
11897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-bigint-literals.md
|
|
11898
|
+
*/
|
|
11899
|
+
"unicorn/prefer-bigint-literals"?: Linter.RuleEntry<[]>;
|
|
11900
|
+
/**
|
|
11562
11901
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
11563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-blob-reading-methods.md
|
|
11564
11903
|
*/
|
|
11565
11904
|
"unicorn/prefer-blob-reading-methods"?: Linter.RuleEntry<[]>;
|
|
11566
11905
|
/**
|
|
11906
|
+
* Prefer class field declarations over `this` assignments in constructors.
|
|
11907
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-class-fields.md
|
|
11908
|
+
*/
|
|
11909
|
+
"unicorn/prefer-class-fields"?: Linter.RuleEntry<[]>;
|
|
11910
|
+
/**
|
|
11911
|
+
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
11912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-classlist-toggle.md
|
|
11913
|
+
*/
|
|
11914
|
+
"unicorn/prefer-classlist-toggle"?: Linter.RuleEntry<[]>;
|
|
11915
|
+
/**
|
|
11567
11916
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
11568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11917
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-code-point.md
|
|
11569
11918
|
*/
|
|
11570
11919
|
"unicorn/prefer-code-point"?: Linter.RuleEntry<[]>;
|
|
11571
11920
|
/**
|
|
11572
11921
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
11573
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-date-now.md
|
|
11574
11923
|
*/
|
|
11575
11924
|
"unicorn/prefer-date-now"?: Linter.RuleEntry<[]>;
|
|
11576
11925
|
/**
|
|
11577
11926
|
* Prefer default parameters over reassignment.
|
|
11578
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-default-parameters.md
|
|
11579
11928
|
*/
|
|
11580
11929
|
"unicorn/prefer-default-parameters"?: Linter.RuleEntry<[]>;
|
|
11581
11930
|
/**
|
|
11582
11931
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
11583
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11932
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-append.md
|
|
11584
11933
|
*/
|
|
11585
11934
|
"unicorn/prefer-dom-node-append"?: Linter.RuleEntry<[]>;
|
|
11586
11935
|
/**
|
|
11587
11936
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
11588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11937
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-dataset.md
|
|
11589
11938
|
*/
|
|
11590
11939
|
"unicorn/prefer-dom-node-dataset"?: Linter.RuleEntry<[]>;
|
|
11591
11940
|
/**
|
|
11592
11941
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
11593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11942
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-remove.md
|
|
11594
11943
|
*/
|
|
11595
11944
|
"unicorn/prefer-dom-node-remove"?: Linter.RuleEntry<[]>;
|
|
11596
11945
|
/**
|
|
11597
11946
|
* Prefer `.textContent` over `.innerText`.
|
|
11598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11947
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-text-content.md
|
|
11599
11948
|
*/
|
|
11600
11949
|
"unicorn/prefer-dom-node-text-content"?: Linter.RuleEntry<[]>;
|
|
11601
11950
|
/**
|
|
11602
11951
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
11603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-event-target.md
|
|
11604
11953
|
*/
|
|
11605
11954
|
"unicorn/prefer-event-target"?: Linter.RuleEntry<[]>;
|
|
11606
11955
|
/**
|
|
11607
11956
|
* Prefer `export…from` when re-exporting.
|
|
11608
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11957
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-export-from.md
|
|
11609
11958
|
*/
|
|
11610
11959
|
"unicorn/prefer-export-from"?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
11611
11960
|
/**
|
|
11612
11961
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
11613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-global-this.md
|
|
11614
11963
|
*/
|
|
11615
11964
|
"unicorn/prefer-global-this"?: Linter.RuleEntry<[]>;
|
|
11616
11965
|
/**
|
|
11617
11966
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
11618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-import-meta-properties.md
|
|
11619
11968
|
*/
|
|
11620
11969
|
"unicorn/prefer-import-meta-properties"?: Linter.RuleEntry<[]>;
|
|
11621
11970
|
/**
|
|
11622
11971
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
11623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-includes.md
|
|
11624
11973
|
*/
|
|
11625
11974
|
"unicorn/prefer-includes"?: Linter.RuleEntry<[]>;
|
|
11626
11975
|
/**
|
|
11627
11976
|
* Prefer reading a JSON file as a buffer.
|
|
11628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-json-parse-buffer.md
|
|
11629
11978
|
*/
|
|
11630
11979
|
"unicorn/prefer-json-parse-buffer"?: Linter.RuleEntry<[]>;
|
|
11631
11980
|
/**
|
|
11632
11981
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
11633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-keyboard-event-key.md
|
|
11634
11983
|
*/
|
|
11635
11984
|
"unicorn/prefer-keyboard-event-key"?: Linter.RuleEntry<[]>;
|
|
11636
11985
|
/**
|
|
11637
11986
|
* Prefer using a logical operator over a ternary.
|
|
11638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-logical-operator-over-ternary.md
|
|
11639
11988
|
*/
|
|
11640
11989
|
"unicorn/prefer-logical-operator-over-ternary"?: Linter.RuleEntry<[]>;
|
|
11641
11990
|
/**
|
|
11642
11991
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
11643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-min-max.md
|
|
11644
11993
|
*/
|
|
11645
11994
|
"unicorn/prefer-math-min-max"?: Linter.RuleEntry<[]>;
|
|
11646
11995
|
/**
|
|
11647
11996
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
11648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-trunc.md
|
|
11649
11998
|
*/
|
|
11650
11999
|
"unicorn/prefer-math-trunc"?: Linter.RuleEntry<[]>;
|
|
11651
12000
|
/**
|
|
11652
12001
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
11653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-dom-apis.md
|
|
11654
12003
|
*/
|
|
11655
12004
|
"unicorn/prefer-modern-dom-apis"?: Linter.RuleEntry<[]>;
|
|
11656
12005
|
/**
|
|
11657
12006
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
11658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-math-apis.md
|
|
11659
12008
|
*/
|
|
11660
12009
|
"unicorn/prefer-modern-math-apis"?: Linter.RuleEntry<[]>;
|
|
11661
12010
|
/**
|
|
11662
12011
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
11663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-module.md
|
|
11664
12013
|
*/
|
|
11665
12014
|
"unicorn/prefer-module"?: Linter.RuleEntry<[]>;
|
|
11666
12015
|
/**
|
|
11667
12016
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
11668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12017
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-native-coercion-functions.md
|
|
11669
12018
|
*/
|
|
11670
12019
|
"unicorn/prefer-native-coercion-functions"?: Linter.RuleEntry<[]>;
|
|
11671
12020
|
/**
|
|
11672
12021
|
* Prefer negative index over `.length - index` when possible.
|
|
11673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-negative-index.md
|
|
11674
12023
|
*/
|
|
11675
12024
|
"unicorn/prefer-negative-index"?: Linter.RuleEntry<[]>;
|
|
11676
12025
|
/**
|
|
11677
12026
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
11678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-node-protocol.md
|
|
11679
12028
|
*/
|
|
11680
12029
|
"unicorn/prefer-node-protocol"?: Linter.RuleEntry<[]>;
|
|
11681
12030
|
/**
|
|
11682
12031
|
* Prefer `Number` static properties over global ones.
|
|
11683
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-number-properties.md
|
|
11684
12033
|
*/
|
|
11685
12034
|
"unicorn/prefer-number-properties"?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
11686
12035
|
/**
|
|
11687
12036
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
11688
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-object-from-entries.md
|
|
11689
12038
|
*/
|
|
11690
12039
|
"unicorn/prefer-object-from-entries"?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
11691
12040
|
/**
|
|
11692
12041
|
* Prefer omitting the `catch` binding parameter.
|
|
11693
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-optional-catch-binding.md
|
|
11694
12043
|
*/
|
|
11695
12044
|
"unicorn/prefer-optional-catch-binding"?: Linter.RuleEntry<[]>;
|
|
11696
12045
|
/**
|
|
11697
12046
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
11698
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-prototype-methods.md
|
|
11699
12048
|
*/
|
|
11700
12049
|
"unicorn/prefer-prototype-methods"?: Linter.RuleEntry<[]>;
|
|
11701
12050
|
/**
|
|
11702
12051
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
11703
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-query-selector.md
|
|
11704
12053
|
*/
|
|
11705
12054
|
"unicorn/prefer-query-selector"?: Linter.RuleEntry<[]>;
|
|
11706
12055
|
/**
|
|
11707
12056
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
11708
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-reflect-apply.md
|
|
11709
12058
|
*/
|
|
11710
12059
|
"unicorn/prefer-reflect-apply"?: Linter.RuleEntry<[]>;
|
|
11711
12060
|
/**
|
|
11712
12061
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
11713
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-regexp-test.md
|
|
11714
12063
|
*/
|
|
11715
12064
|
"unicorn/prefer-regexp-test"?: Linter.RuleEntry<[]>;
|
|
11716
12065
|
/**
|
|
11717
12066
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
11718
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-has.md
|
|
11719
12068
|
*/
|
|
11720
12069
|
"unicorn/prefer-set-has"?: Linter.RuleEntry<[]>;
|
|
11721
12070
|
/**
|
|
11722
12071
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
11723
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12072
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-size.md
|
|
11724
12073
|
*/
|
|
11725
12074
|
"unicorn/prefer-set-size"?: Linter.RuleEntry<[]>;
|
|
11726
12075
|
/**
|
|
11727
12076
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
11728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-single-call.md
|
|
11729
12078
|
*/
|
|
11730
12079
|
"unicorn/prefer-single-call"?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
11731
12080
|
/**
|
|
11732
12081
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
11733
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-spread.md
|
|
11734
12083
|
*/
|
|
11735
12084
|
"unicorn/prefer-spread"?: Linter.RuleEntry<[]>;
|
|
11736
12085
|
/**
|
|
11737
12086
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
11738
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-raw.md
|
|
11739
12088
|
*/
|
|
11740
12089
|
"unicorn/prefer-string-raw"?: Linter.RuleEntry<[]>;
|
|
11741
12090
|
/**
|
|
11742
12091
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
11743
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-replace-all.md
|
|
11744
12093
|
*/
|
|
11745
12094
|
"unicorn/prefer-string-replace-all"?: Linter.RuleEntry<[]>;
|
|
11746
12095
|
/**
|
|
11747
12096
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
11748
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-slice.md
|
|
11749
12098
|
*/
|
|
11750
12099
|
"unicorn/prefer-string-slice"?: Linter.RuleEntry<[]>;
|
|
11751
12100
|
/**
|
|
11752
12101
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
11753
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-starts-ends-with.md
|
|
11754
12103
|
*/
|
|
11755
12104
|
"unicorn/prefer-string-starts-ends-with"?: Linter.RuleEntry<[]>;
|
|
11756
12105
|
/**
|
|
11757
12106
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
11758
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-trim-start-end.md
|
|
11759
12108
|
*/
|
|
11760
12109
|
"unicorn/prefer-string-trim-start-end"?: Linter.RuleEntry<[]>;
|
|
11761
12110
|
/**
|
|
11762
12111
|
* Prefer using `structuredClone` to create a deep clone.
|
|
11763
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-structured-clone.md
|
|
11764
12113
|
*/
|
|
11765
12114
|
"unicorn/prefer-structured-clone"?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
11766
12115
|
/**
|
|
11767
12116
|
* Prefer `switch` over multiple `else-if`.
|
|
11768
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12117
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-switch.md
|
|
11769
12118
|
*/
|
|
11770
12119
|
"unicorn/prefer-switch"?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
11771
12120
|
/**
|
|
11772
12121
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
11773
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-ternary.md
|
|
11774
12123
|
*/
|
|
11775
12124
|
"unicorn/prefer-ternary"?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
11776
12125
|
/**
|
|
11777
12126
|
* Prefer top-level await over top-level promises and async function calls.
|
|
11778
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-top-level-await.md
|
|
11779
12128
|
*/
|
|
11780
12129
|
"unicorn/prefer-top-level-await"?: Linter.RuleEntry<[]>;
|
|
11781
12130
|
/**
|
|
11782
12131
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
11783
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-type-error.md
|
|
11784
12133
|
*/
|
|
11785
12134
|
"unicorn/prefer-type-error"?: Linter.RuleEntry<[]>;
|
|
11786
12135
|
/**
|
|
11787
12136
|
* Prevent abbreviations.
|
|
11788
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prevent-abbreviations.md
|
|
11789
12138
|
*/
|
|
11790
12139
|
"unicorn/prevent-abbreviations"?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
11791
12140
|
/**
|
|
11792
12141
|
* Enforce consistent relative URL style.
|
|
11793
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/relative-url-style.md
|
|
11794
12143
|
*/
|
|
11795
12144
|
"unicorn/relative-url-style"?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
11796
12145
|
/**
|
|
11797
12146
|
* Enforce using the separator argument with `Array#join()`.
|
|
11798
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12147
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-array-join-separator.md
|
|
11799
12148
|
*/
|
|
11800
12149
|
"unicorn/require-array-join-separator"?: Linter.RuleEntry<[]>;
|
|
11801
12150
|
/**
|
|
12151
|
+
* Require non-empty module attributes for imports and exports
|
|
12152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-attributes.md
|
|
12153
|
+
*/
|
|
12154
|
+
"unicorn/require-module-attributes"?: Linter.RuleEntry<[]>;
|
|
12155
|
+
/**
|
|
12156
|
+
* Require non-empty specifier list in import and export statements.
|
|
12157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-specifiers.md
|
|
12158
|
+
*/
|
|
12159
|
+
"unicorn/require-module-specifiers"?: Linter.RuleEntry<[]>;
|
|
12160
|
+
/**
|
|
11802
12161
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
11803
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12162
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-number-to-fixed-digits-argument.md
|
|
11804
12163
|
*/
|
|
11805
12164
|
"unicorn/require-number-to-fixed-digits-argument"?: Linter.RuleEntry<[]>;
|
|
11806
12165
|
/**
|
|
11807
12166
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
11808
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-post-message-target-origin.md
|
|
11809
12168
|
*/
|
|
11810
12169
|
"unicorn/require-post-message-target-origin"?: Linter.RuleEntry<[]>;
|
|
11811
12170
|
/**
|
|
11812
12171
|
* Enforce better string content.
|
|
11813
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/string-content.md
|
|
11814
12173
|
*/
|
|
11815
12174
|
"unicorn/string-content"?: Linter.RuleEntry<UnicornStringContent>;
|
|
11816
12175
|
/**
|
|
11817
12176
|
* Enforce consistent brace style for `case` clauses.
|
|
11818
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12177
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/switch-case-braces.md
|
|
11819
12178
|
*/
|
|
11820
12179
|
"unicorn/switch-case-braces"?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
11821
12180
|
/**
|
|
11822
12181
|
* Fix whitespace-insensitive template indentation.
|
|
11823
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/template-indent.md
|
|
11824
12183
|
*/
|
|
11825
12184
|
"unicorn/template-indent"?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
11826
12185
|
/**
|
|
11827
12186
|
* Enforce consistent case for text encoding identifiers.
|
|
11828
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12187
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/text-encoding-identifier-case.md
|
|
11829
12188
|
*/
|
|
11830
12189
|
"unicorn/text-encoding-identifier-case"?: Linter.RuleEntry<[]>;
|
|
11831
12190
|
/**
|
|
11832
12191
|
* Require `new` when creating an error.
|
|
11833
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12192
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/throw-new-error.md
|
|
11834
12193
|
*/
|
|
11835
12194
|
"unicorn/throw-new-error"?: Linter.RuleEntry<[]>;
|
|
11836
12195
|
}
|
|
@@ -11897,6 +12256,14 @@ interface _UnicornImportStyle_BooleanObject {
|
|
|
11897
12256
|
type UnicornNoArrayReduce = [] | [{
|
|
11898
12257
|
allowSimpleOperations?: boolean;
|
|
11899
12258
|
}];
|
|
12259
|
+
// ----- unicorn/no-array-reverse -----
|
|
12260
|
+
type UnicornNoArrayReverse = [] | [{
|
|
12261
|
+
allowExpressionStatement?: boolean;
|
|
12262
|
+
}];
|
|
12263
|
+
// ----- unicorn/no-array-sort -----
|
|
12264
|
+
type UnicornNoArraySort = [] | [{
|
|
12265
|
+
allowExpressionStatement?: boolean;
|
|
12266
|
+
}];
|
|
11900
12267
|
// ----- unicorn/no-instanceof-builtins -----
|
|
11901
12268
|
type UnicornNoInstanceofBuiltins = [] | [{
|
|
11902
12269
|
useErrorIsError?: boolean;
|
|
@@ -12069,6 +12436,11 @@ interface VitestRules {
|
|
|
12069
12436
|
*/
|
|
12070
12437
|
"vitest/expect-expect"?: Linter.RuleEntry<VitestExpectExpect>;
|
|
12071
12438
|
/**
|
|
12439
|
+
* enforce hoisted APIs to be on top of the file
|
|
12440
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/hoisted-apis-on-top.md
|
|
12441
|
+
*/
|
|
12442
|
+
"vitest/hoisted-apis-on-top"?: Linter.RuleEntry<[]>;
|
|
12443
|
+
/**
|
|
12072
12444
|
* enforce a maximum number of expect per test
|
|
12073
12445
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/max-expects.md
|
|
12074
12446
|
*/
|
|
@@ -12270,6 +12642,11 @@ interface VitestRules {
|
|
|
12270
12642
|
*/
|
|
12271
12643
|
"vitest/prefer-expect-resolves"?: Linter.RuleEntry<[]>;
|
|
12272
12644
|
/**
|
|
12645
|
+
* enforce using `expectTypeOf` instead of `expect(typeof ...)`
|
|
12646
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-type-of.md
|
|
12647
|
+
*/
|
|
12648
|
+
"vitest/prefer-expect-type-of"?: Linter.RuleEntry<[]>;
|
|
12649
|
+
/**
|
|
12273
12650
|
* enforce having hooks in consistent order
|
|
12274
12651
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-in-order.md
|
|
12275
12652
|
*/
|
|
@@ -12984,7 +13361,7 @@ interface VueRules {
|
|
|
12984
13361
|
* disallow asynchronous actions in computed properties
|
|
12985
13362
|
* @see https://eslint.vuejs.org/rules/no-async-in-computed-properties.html
|
|
12986
13363
|
*/
|
|
12987
|
-
"vue/no-async-in-computed-properties"?: Linter.RuleEntry<
|
|
13364
|
+
"vue/no-async-in-computed-properties"?: Linter.RuleEntry<VueNoAsyncInComputedProperties>;
|
|
12988
13365
|
/**
|
|
12989
13366
|
* disallow the use of bare strings in `<template>`
|
|
12990
13367
|
* @see https://eslint.vuejs.org/rules/no-bare-strings-in-template.html
|
|
@@ -13226,6 +13603,16 @@ interface VueRules {
|
|
|
13226
13603
|
*/
|
|
13227
13604
|
"vue/no-mutating-props"?: Linter.RuleEntry<VueNoMutatingProps>;
|
|
13228
13605
|
/**
|
|
13606
|
+
* Disallow negated conditions in `<template>`
|
|
13607
|
+
* @see https://eslint.vuejs.org/rules/no-negated-condition.html
|
|
13608
|
+
*/
|
|
13609
|
+
"vue/no-negated-condition"?: Linter.RuleEntry<[]>;
|
|
13610
|
+
/**
|
|
13611
|
+
* disallow negated conditions in v-if/v-else
|
|
13612
|
+
* @see https://eslint.vuejs.org/rules/no-negated-v-if-condition.html
|
|
13613
|
+
*/
|
|
13614
|
+
"vue/no-negated-v-if-condition"?: Linter.RuleEntry<[]>;
|
|
13615
|
+
/**
|
|
13229
13616
|
* disallow parsing errors in `<template>`
|
|
13230
13617
|
* @see https://eslint.vuejs.org/rules/no-parsing-error.html
|
|
13231
13618
|
*/
|
|
@@ -13475,7 +13862,7 @@ interface VueRules {
|
|
|
13475
13862
|
* disallow use of v-html to prevent XSS attack
|
|
13476
13863
|
* @see https://eslint.vuejs.org/rules/no-v-html.html
|
|
13477
13864
|
*/
|
|
13478
|
-
"vue/no-v-html"?: Linter.RuleEntry<
|
|
13865
|
+
"vue/no-v-html"?: Linter.RuleEntry<VueNoVHtml>;
|
|
13479
13866
|
/**
|
|
13480
13867
|
* disallow adding an argument to `v-model` used in custom component
|
|
13481
13868
|
* @see https://eslint.vuejs.org/rules/no-v-model-argument.html
|
|
@@ -14035,7 +14422,6 @@ type IntlifyVueI18NNoRawText = [] | [{
|
|
|
14035
14422
|
ignoreNodes?: unknown[];
|
|
14036
14423
|
ignorePattern?: string;
|
|
14037
14424
|
ignoreText?: unknown[];
|
|
14038
|
-
[k: string]: unknown | undefined;
|
|
14039
14425
|
}];
|
|
14040
14426
|
// ----- @intlify/vue-i18n/no-unknown-locale -----
|
|
14041
14427
|
type IntlifyVueI18NNoUnknownLocale = [] | [{
|
|
@@ -14068,6 +14454,7 @@ type VueScopedCssNoUnusedSelector = [] | [{
|
|
|
14068
14454
|
ignoreBEMModifier?: boolean;
|
|
14069
14455
|
captureClassesFromDoc?: [] | [string];
|
|
14070
14456
|
checkUnscoped?: boolean;
|
|
14457
|
+
extraClassAttributes?: string[];
|
|
14071
14458
|
}];
|
|
14072
14459
|
// ----- vue-scoped-css/require-scoped -----
|
|
14073
14460
|
type VueScopedCssRequireScoped = [] | [("always" | "never")];
|
|
@@ -14122,6 +14509,7 @@ type VueAttributeHyphenation = [] | [("always" | "never")] | [("always" | "never
|
|
|
14122
14509
|
type VueAttributesOrder = [] | [{
|
|
14123
14510
|
order?: (("DEFINITION" | "LIST_RENDERING" | "CONDITIONALS" | "RENDER_MODIFIERS" | "GLOBAL" | "UNIQUE" | "SLOT" | "TWO_WAY_BINDING" | "OTHER_DIRECTIVES" | "OTHER_ATTR" | "ATTR_STATIC" | "ATTR_DYNAMIC" | "ATTR_SHORTHAND_BOOL" | "EVENTS" | "CONTENT") | ("DEFINITION" | "LIST_RENDERING" | "CONDITIONALS" | "RENDER_MODIFIERS" | "GLOBAL" | "UNIQUE" | "SLOT" | "TWO_WAY_BINDING" | "OTHER_DIRECTIVES" | "OTHER_ATTR" | "ATTR_STATIC" | "ATTR_DYNAMIC" | "ATTR_SHORTHAND_BOOL" | "EVENTS" | "CONTENT")[])[];
|
|
14124
14511
|
alphabetical?: boolean;
|
|
14512
|
+
sortLineLength?: boolean;
|
|
14125
14513
|
}];
|
|
14126
14514
|
// ----- vue/block-lang -----
|
|
14127
14515
|
type VueBlockLang = [] | [{
|
|
@@ -14789,6 +15177,10 @@ type VueNewLineBetweenMultiLineProperty = [] | [{
|
|
|
14789
15177
|
}];
|
|
14790
15178
|
// ----- vue/next-tick-style -----
|
|
14791
15179
|
type VueNextTickStyle = [] | [("promise" | "callback")];
|
|
15180
|
+
// ----- vue/no-async-in-computed-properties -----
|
|
15181
|
+
type VueNoAsyncInComputedProperties = [] | [{
|
|
15182
|
+
ignoredObjectNames?: string[];
|
|
15183
|
+
}];
|
|
14792
15184
|
// ----- vue/no-bare-strings-in-template -----
|
|
14793
15185
|
type VueNoBareStringsInTemplate = [] | [{
|
|
14794
15186
|
allowlist?: string[];
|
|
@@ -14822,6 +15214,7 @@ type VueNoDeprecatedRouterLinkTagProp = [] | [{
|
|
|
14822
15214
|
// ----- vue/no-deprecated-slot-attribute -----
|
|
14823
15215
|
type VueNoDeprecatedSlotAttribute = [] | [{
|
|
14824
15216
|
ignore?: string[];
|
|
15217
|
+
ignoreParents?: string[];
|
|
14825
15218
|
}];
|
|
14826
15219
|
// ----- vue/no-dupe-keys -----
|
|
14827
15220
|
type VueNoDupeKeys = [] | [{
|
|
@@ -15073,6 +15466,10 @@ type VueNoUselessVBind = [] | [{
|
|
|
15073
15466
|
ignoreIncludesComment?: boolean;
|
|
15074
15467
|
ignoreStringEscape?: boolean;
|
|
15075
15468
|
}];
|
|
15469
|
+
// ----- vue/no-v-html -----
|
|
15470
|
+
type VueNoVHtml = [] | [{
|
|
15471
|
+
ignorePattern?: string;
|
|
15472
|
+
}];
|
|
15076
15473
|
// ----- vue/no-v-text-v-html-on-component -----
|
|
15077
15474
|
type VueNoVTextVHtmlOnComponent = [] | [{
|
|
15078
15475
|
allow?: string[];
|
|
@@ -15731,6 +16128,13 @@ interface CommentsOptions {
|
|
|
15731
16128
|
* An options for `@kazupon/eslint-plugin` comment config
|
|
15732
16129
|
*/
|
|
15733
16130
|
kazupon?: OverridesOptions<CommentsRules>;
|
|
16131
|
+
/**
|
|
16132
|
+
* enforce inline code for specific words on comments
|
|
16133
|
+
*
|
|
16134
|
+
* @see https://eslint-plugin.kazupon.dev/rules/prefer-inline-code-words-comments#options
|
|
16135
|
+
* @default []
|
|
16136
|
+
*/
|
|
16137
|
+
inlineCodeWords?: string[];
|
|
15734
16138
|
}
|
|
15735
16139
|
/**
|
|
15736
16140
|
* configure comments preset for the below plugins
|
|
@@ -15777,6 +16181,26 @@ interface CssOptions {
|
|
|
15777
16181
|
*/
|
|
15778
16182
|
declare function css(options?: CssOptions & OverridesOptions<CssRules>): Promise<Linter.Config[]>;
|
|
15779
16183
|
//#endregion
|
|
16184
|
+
//#region src/configs/deps.d.ts
|
|
16185
|
+
/**
|
|
16186
|
+
* Deps configuration options
|
|
16187
|
+
*/
|
|
16188
|
+
interface DepsOptions {
|
|
16189
|
+
/**
|
|
16190
|
+
* use `eslint-pluing-barrel-files`
|
|
16191
|
+
*
|
|
16192
|
+
* @default false
|
|
16193
|
+
*/
|
|
16194
|
+
barrel?: boolean;
|
|
16195
|
+
}
|
|
16196
|
+
/**
|
|
16197
|
+
* `eslint-plugin-barrel-files` and overrides configuration options
|
|
16198
|
+
*
|
|
16199
|
+
* @param {DepsOptions & OverridesOptions} options - deps configuration options
|
|
16200
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-barrel-files` and overrides
|
|
16201
|
+
*/
|
|
16202
|
+
declare function deps(options?: DepsOptions & OverridesOptions<DepsRules>): Promise<Linter.Config[]>;
|
|
16203
|
+
//#endregion
|
|
15780
16204
|
//#region src/configs/html.d.ts
|
|
15781
16205
|
/**
|
|
15782
16206
|
* html configuration options
|
|
@@ -15964,6 +16388,19 @@ interface MarkdownOptions {
|
|
|
15964
16388
|
*/
|
|
15965
16389
|
inlineCodeWords?: string[];
|
|
15966
16390
|
/**
|
|
16391
|
+
* ignore inline code words for back-quoted in markdown (`ignores` option of `markdown-preferences/prefer-inline-code-words`)
|
|
16392
|
+
*
|
|
16393
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-inline-code-words.html#%F0%9F%94%A7-options
|
|
16394
|
+
* @default []
|
|
16395
|
+
*/
|
|
16396
|
+
inlineCodeWordsIgnores?: {
|
|
16397
|
+
words?: string | string[];
|
|
16398
|
+
node?: {
|
|
16399
|
+
[k: string]: unknown | undefined;
|
|
16400
|
+
};
|
|
16401
|
+
[k: string]: unknown | undefined;
|
|
16402
|
+
}[];
|
|
16403
|
+
/**
|
|
15967
16404
|
* detect linked words for linked in markdown (`words` option of `markdown-preferences/prefer-linked-words`)
|
|
15968
16405
|
*
|
|
15969
16406
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-linked-words.html#%F0%9F%94%A7-options
|
|
@@ -15972,6 +16409,19 @@ interface MarkdownOptions {
|
|
|
15972
16409
|
linkedWords?: {
|
|
15973
16410
|
[k: string]: string | null;
|
|
15974
16411
|
} | string[];
|
|
16412
|
+
/**
|
|
16413
|
+
* ignore linked words for linked in markdown (`ignores` option of `markdown-preferences/prefer-linked-words`)
|
|
16414
|
+
*
|
|
16415
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-linked-words.html#%F0%9F%94%A7-options
|
|
16416
|
+
* @default []
|
|
16417
|
+
*/
|
|
16418
|
+
linkedWordsIgnores?: {
|
|
16419
|
+
words?: string | string[];
|
|
16420
|
+
node?: {
|
|
16421
|
+
[k: string]: unknown | undefined;
|
|
16422
|
+
};
|
|
16423
|
+
[k: string]: unknown | undefined;
|
|
16424
|
+
}[];
|
|
15975
16425
|
}
|
|
15976
16426
|
// export const parserPlain: Linter.Parser = {
|
|
15977
16427
|
// meta: {
|
|
@@ -16321,4 +16771,4 @@ declare function yml(options?: YmlOptions & OverridesOptions<YmlRules>): Promise
|
|
|
16321
16771
|
// alias
|
|
16322
16772
|
declare const yaml: typeof yml;
|
|
16323
16773
|
//#endregion
|
|
16324
|
-
export { CommentsOptions, CommentsRules, CssOptions, CssRules, HtmlOptions, HtmlRules, ImportsOptions, ImportsRules, JavaScriptOptions, JavascriptRules, JsDocumentOptions, JsdocRules, JsoncOptions, JsoncRules, MarkdownOptions, MarkdownRules, OverridesOptions, PrettierOptions, PrettierRules, PromiseOptions, PromiseRules, ReactOptions, ReactRules, RegexpOptions, RegexpRules, StylisticOptions, StylisticRules, SvelteRules, SvelteScriptOptions, TomlOptions, TomlRules, TypeScriptOptions, TypeScriptParserOptions, TypeScriptProjectServiceOptions, TypescriptRules, UnicornOptions, UnicornRules, VitestOptions, VitestRules, VueI18nOptions, VueRules, VueScriptOptions, YmlOptions, YmlRules, comments, css, defineConfig, html, imports, javascript, jsdoc, jsonc, markdown, md, prettier, promise, react, regexp, stylistic, svelte, toml, typescript, unicorn, vitest, vue, yaml, yml };
|
|
16774
|
+
export { CommentsOptions, CommentsRules, CssOptions, CssRules, DepsOptions, DepsRules, HtmlOptions, HtmlRules, ImportsOptions, ImportsRules, JavaScriptOptions, JavascriptRules, JsDocumentOptions, JsdocRules, JsoncOptions, JsoncRules, MarkdownOptions, MarkdownRules, OverridesOptions, PrettierOptions, PrettierRules, PromiseOptions, PromiseRules, ReactOptions, ReactRules, RegexpOptions, RegexpRules, StylisticOptions, StylisticRules, SvelteRules, SvelteScriptOptions, TomlOptions, TomlRules, TypeScriptOptions, TypeScriptParserOptions, TypeScriptProjectServiceOptions, TypescriptRules, UnicornOptions, UnicornRules, VitestOptions, VitestRules, VueI18nOptions, VueRules, VueScriptOptions, YmlOptions, YmlRules, comments, css, defineConfig, deps, html, imports, javascript, jsdoc, jsonc, markdown, md, prettier, promise, react, regexp, stylistic, svelte, toml, typescript, unicorn, vitest, vue, yaml, yml };
|