@ntnyq/eslint-config 7.0.0-beta.11 → 7.0.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +432 -336
- package/dist/index.mjs +9 -2
- package/package.json +21 -21
package/dist/index.d.mts
CHANGED
|
@@ -1495,6 +1495,7 @@ interface RuleOptions {
|
|
|
1495
1495
|
/**
|
|
1496
1496
|
* Disallow function declarations that contain unsafe references inside loop statements
|
|
1497
1497
|
* @see https://typescript-eslint.io/rules/no-loop-func
|
|
1498
|
+
* @deprecated
|
|
1498
1499
|
*/
|
|
1499
1500
|
'@typescript-eslint/no-loop-func'?: Linter.RuleEntry<[]>;
|
|
1500
1501
|
/**
|
|
@@ -1571,6 +1572,7 @@ interface RuleOptions {
|
|
|
1571
1572
|
/**
|
|
1572
1573
|
* Disallow specified modules when loaded by `import`
|
|
1573
1574
|
* @see https://typescript-eslint.io/rules/no-restricted-imports
|
|
1575
|
+
* @deprecated
|
|
1574
1576
|
*/
|
|
1575
1577
|
'@typescript-eslint/no-restricted-imports'?: Linter.RuleEntry<TypescriptEslintNoRestrictedImports>;
|
|
1576
1578
|
/**
|
|
@@ -2248,6 +2250,12 @@ interface RuleOptions {
|
|
|
2248
2250
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-exports-from-components/
|
|
2249
2251
|
*/
|
|
2250
2252
|
'astro/no-exports-from-components'?: Linter.RuleEntry<[]>;
|
|
2253
|
+
/**
|
|
2254
|
+
* disallow omitted end tags
|
|
2255
|
+
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-omitted-end-tags/
|
|
2256
|
+
* @deprecated
|
|
2257
|
+
*/
|
|
2258
|
+
'astro/no-omitted-end-tags'?: Linter.RuleEntry<[]>;
|
|
2251
2259
|
/**
|
|
2252
2260
|
* disallow `prerender` export outside of pages/ directory
|
|
2253
2261
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-prerender-export-outside-pages/
|
|
@@ -2306,6 +2314,7 @@ interface RuleOptions {
|
|
|
2306
2314
|
/**
|
|
2307
2315
|
* disallow warnings when compiling.
|
|
2308
2316
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/valid-compile/
|
|
2317
|
+
* @deprecated
|
|
2309
2318
|
*/
|
|
2310
2319
|
'astro/valid-compile'?: Linter.RuleEntry<[]>;
|
|
2311
2320
|
/**
|
|
@@ -2592,6 +2601,11 @@ interface RuleOptions {
|
|
|
2592
2601
|
* @see https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/require-meta-has-suggestions.md
|
|
2593
2602
|
*/
|
|
2594
2603
|
'eslint-plugin/require-meta-has-suggestions'?: Linter.RuleEntry<[]>;
|
|
2604
|
+
/**
|
|
2605
|
+
* require rules to implement a `meta.languages` property
|
|
2606
|
+
* @see https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/require-meta-languages.md
|
|
2607
|
+
*/
|
|
2608
|
+
'eslint-plugin/require-meta-languages'?: Linter.RuleEntry<[]>;
|
|
2595
2609
|
/**
|
|
2596
2610
|
* require rules to implement a `meta.schema` property
|
|
2597
2611
|
* @see https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/require-meta-schema.md
|
|
@@ -3228,6 +3242,11 @@ interface RuleOptions {
|
|
|
3228
3242
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-undefined-types.md#repos-sticky-header
|
|
3229
3243
|
*/
|
|
3230
3244
|
'jsdoc/no-undefined-types'?: Linter.RuleEntry<JsdocNoUndefinedTypes>;
|
|
3245
|
+
/**
|
|
3246
|
+
* Normalizes labeled links in `@see` tags to a canonical `{@link}` form.
|
|
3247
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/normalize-see-links.md#repos-sticky-header
|
|
3248
|
+
*/
|
|
3249
|
+
'jsdoc/normalize-see-links'?: Linter.RuleEntry<JsdocNormalizeSeeLinks>;
|
|
3231
3250
|
/**
|
|
3232
3251
|
* Prefer `@import` tags to inline `import()` statements.
|
|
3233
3252
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/prefer-import-tag.md#repos-sticky-header
|
|
@@ -5928,6 +5947,16 @@ interface RuleOptions {
|
|
|
5928
5947
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-at-html-tags/
|
|
5929
5948
|
*/
|
|
5930
5949
|
'svelte/no-at-html-tags'?: Linter.RuleEntry<[]>;
|
|
5950
|
+
/**
|
|
5951
|
+
* disallow useless `bind:value` on `<input type="checkbox">` and `<input type="radio">`
|
|
5952
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-bind-value-on-checkable-inputs/
|
|
5953
|
+
*/
|
|
5954
|
+
'svelte/no-bind-value-on-checkable-inputs'?: Linter.RuleEntry<[]>;
|
|
5955
|
+
/**
|
|
5956
|
+
* disallow a `.svelte` component and a same-named runes module (e.g. `Foo.svelte` and `Foo.svelte.ts`) from coexisting
|
|
5957
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-conflicting-module-names/
|
|
5958
|
+
*/
|
|
5959
|
+
'svelte/no-conflicting-module-names'?: Linter.RuleEntry<[]>;
|
|
5931
5960
|
/**
|
|
5932
5961
|
* disallow DOM manipulating
|
|
5933
5962
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dom-manipulating/
|
|
@@ -6392,1670 +6421,1715 @@ interface RuleOptions {
|
|
|
6392
6421
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
6393
6422
|
/**
|
|
6394
6423
|
* Prefer better DOM traversal APIs.
|
|
6395
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/better-dom-traversing.md
|
|
6396
6425
|
*/
|
|
6397
6426
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
6398
6427
|
/**
|
|
6399
6428
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
6400
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
6401
6430
|
* @deprecated
|
|
6402
6431
|
*/
|
|
6403
6432
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
6404
6433
|
/**
|
|
6405
6434
|
* Enforce a specific parameter name in catch clauses.
|
|
6406
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6435
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/catch-error-name.md
|
|
6407
6436
|
*/
|
|
6408
6437
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
6409
6438
|
/**
|
|
6410
6439
|
* Enforce consistent class references in static methods.
|
|
6411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6440
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/class-reference-in-static-methods.md
|
|
6412
6441
|
*/
|
|
6413
6442
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
6414
6443
|
/**
|
|
6415
6444
|
* Enforce better comment content.
|
|
6416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6445
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/comment-content.md
|
|
6417
6446
|
*/
|
|
6418
6447
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
6419
6448
|
/**
|
|
6420
6449
|
* Enforce consistent assertion style with `node:assert`.
|
|
6421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-assert.md
|
|
6422
6451
|
*/
|
|
6423
6452
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6424
6453
|
/**
|
|
6425
6454
|
* Enforce consistent naming for boolean names.
|
|
6426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-boolean-name.md
|
|
6427
6456
|
*/
|
|
6428
6457
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
6429
6458
|
/**
|
|
6430
6459
|
* Enforce consistent class member order.
|
|
6431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6460
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-class-member-order.md
|
|
6432
6461
|
*/
|
|
6433
6462
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
6434
6463
|
/**
|
|
6435
6464
|
* Enforce consistent spelling of compound words in identifiers.
|
|
6436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6465
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-compound-words.md
|
|
6437
6466
|
*/
|
|
6438
6467
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
6439
6468
|
/**
|
|
6440
6469
|
* Enforce consistent conditional object spread style.
|
|
6441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6470
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
6442
6471
|
*/
|
|
6443
6472
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
6444
6473
|
/**
|
|
6445
6474
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6446
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6475
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-date-clone.md
|
|
6447
6476
|
*/
|
|
6448
6477
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6449
6478
|
/**
|
|
6450
6479
|
* Use destructured variables over properties.
|
|
6451
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6480
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-destructuring.md
|
|
6452
6481
|
*/
|
|
6453
6482
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6454
6483
|
/**
|
|
6455
6484
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6456
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-empty-array-spread.md
|
|
6457
6486
|
*/
|
|
6458
6487
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6459
6488
|
/**
|
|
6460
6489
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6461
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6490
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-existence-index-check.md
|
|
6462
6491
|
*/
|
|
6463
6492
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6464
6493
|
/**
|
|
6465
6494
|
* Enforce consistent decorator position on exported classes.
|
|
6466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-export-decorator-position.md
|
|
6467
6496
|
*/
|
|
6468
6497
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
6469
6498
|
/**
|
|
6470
6499
|
* Move function definitions to the highest possible scope.
|
|
6471
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6500
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-function-scoping.md
|
|
6472
6501
|
*/
|
|
6473
6502
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6474
6503
|
/**
|
|
6475
6504
|
* Enforce function syntax by role.
|
|
6476
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6505
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-function-style.md
|
|
6477
6506
|
*/
|
|
6478
6507
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
6479
6508
|
/**
|
|
6480
6509
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
6481
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6510
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-json-file-read.md
|
|
6482
6511
|
*/
|
|
6483
6512
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
6484
6513
|
/**
|
|
6485
6514
|
* Enforce consistent optional chaining for same-base member access.
|
|
6486
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-optional-chaining.md
|
|
6487
6516
|
*/
|
|
6488
6517
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
6489
6518
|
/**
|
|
6490
6519
|
* Enforce consistent style for escaping `${` in template literals.
|
|
6491
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6520
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-template-literal-escape.md
|
|
6492
6521
|
*/
|
|
6493
6522
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
6494
6523
|
/**
|
|
6495
6524
|
* Enforce consistent labels on tuple type elements.
|
|
6496
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6525
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-tuple-labels.md
|
|
6497
6526
|
*/
|
|
6498
6527
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
6499
6528
|
/**
|
|
6500
6529
|
* Enforce correct `Error` subclassing.
|
|
6501
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6530
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/custom-error-definition.md
|
|
6502
6531
|
*/
|
|
6503
6532
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6504
6533
|
/**
|
|
6505
6534
|
* Enforce consistent default export declarations.
|
|
6506
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6535
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/default-export-style.md
|
|
6507
6536
|
*/
|
|
6508
6537
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
6509
6538
|
/**
|
|
6510
6539
|
* Enforce consistent style for DOM element dataset access.
|
|
6511
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/dom-node-dataset.md
|
|
6512
6541
|
*/
|
|
6513
6542
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
6514
6543
|
/**
|
|
6515
6544
|
* Enforce no spaces between braces.
|
|
6516
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6545
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/empty-brace-spaces.md
|
|
6517
6546
|
*/
|
|
6518
6547
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6519
6548
|
/**
|
|
6520
6549
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6521
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6550
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/error-message.md
|
|
6522
6551
|
*/
|
|
6523
6552
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6524
6553
|
/**
|
|
6525
6554
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6526
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6555
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/escape-case.md
|
|
6527
6556
|
*/
|
|
6528
6557
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
6529
6558
|
/**
|
|
6530
6559
|
* Add expiration conditions to TODO comments.
|
|
6531
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6560
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/expiring-todo-comments.md
|
|
6532
6561
|
*/
|
|
6533
6562
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
6534
6563
|
/**
|
|
6535
6564
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6536
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6565
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/explicit-length-check.md
|
|
6537
6566
|
*/
|
|
6538
6567
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
6539
6568
|
/**
|
|
6540
6569
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
6541
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6570
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/explicit-timer-delay.md
|
|
6542
6571
|
*/
|
|
6543
6572
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
6544
6573
|
/**
|
|
6545
6574
|
* Enforce a case style for filenames and directory names.
|
|
6546
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6575
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/filename-case.md
|
|
6547
6576
|
*/
|
|
6548
6577
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
6549
6578
|
/**
|
|
6550
6579
|
* Require identifiers to match a specified regular expression.
|
|
6551
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6580
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/id-match.md
|
|
6552
6581
|
*/
|
|
6553
6582
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
6554
6583
|
/**
|
|
6555
6584
|
* Enforce specific import styles per module.
|
|
6556
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6585
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/import-style.md
|
|
6557
6586
|
*/
|
|
6558
6587
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
6559
6588
|
/**
|
|
6560
6589
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
6561
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6590
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/isolated-functions.md
|
|
6562
6591
|
*/
|
|
6563
6592
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
6564
6593
|
/**
|
|
6565
6594
|
* Require or disallow logical assignment operator shorthand
|
|
6566
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6595
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/logical-assignment-operators.md
|
|
6567
6596
|
*/
|
|
6568
6597
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
6569
6598
|
/**
|
|
6570
6599
|
* Limit the depth of nested calls.
|
|
6571
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/max-nested-calls.md
|
|
6572
6601
|
*/
|
|
6573
6602
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
6574
6603
|
/**
|
|
6575
6604
|
* Enforce replacements for variable, property, and filenames.
|
|
6576
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/name-replacements.md
|
|
6577
6606
|
*/
|
|
6578
6607
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
6579
6608
|
/**
|
|
6580
6609
|
* Enforce correct use of `new` for builtin constructors.
|
|
6581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/new-for-builtins.md
|
|
6582
6611
|
*/
|
|
6583
6612
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
6584
6613
|
/**
|
|
6585
6614
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
6587
6616
|
*/
|
|
6588
6617
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
6589
6618
|
/**
|
|
6590
6619
|
* Disallow recursive access to `this` within getters and setters.
|
|
6591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-accessor-recursion.md
|
|
6592
6621
|
*/
|
|
6593
6622
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6594
6623
|
/**
|
|
6595
6624
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
6596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
6597
6626
|
*/
|
|
6598
6627
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
6599
6628
|
/**
|
|
6600
6629
|
* Disallow anonymous functions and classes as the default export.
|
|
6601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-anonymous-default-export.md
|
|
6602
6631
|
*/
|
|
6603
6632
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
6604
6633
|
/**
|
|
6605
6634
|
* Prevent passing a function reference directly to iterator methods.
|
|
6606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-callback-reference.md
|
|
6607
6636
|
*/
|
|
6608
6637
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
6609
6638
|
/**
|
|
6610
6639
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
6611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6640
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-concat-in-loop.md
|
|
6612
6641
|
*/
|
|
6613
6642
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
6614
6643
|
/**
|
|
6615
6644
|
* Disallow using reference values as `Array#fill()` values.
|
|
6616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6645
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
6617
6646
|
*/
|
|
6618
6647
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
6619
6648
|
/**
|
|
6620
6649
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
6621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-from-fill.md
|
|
6622
6651
|
*/
|
|
6623
6652
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
6624
6653
|
/**
|
|
6625
6654
|
* Disallow front-of-array mutation.
|
|
6626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-front-mutation.md
|
|
6627
6656
|
*/
|
|
6628
6657
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
6629
6658
|
/**
|
|
6630
6659
|
* Disallow using the `this` argument in array methods.
|
|
6631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-method-this-argument.md
|
|
6632
6661
|
*/
|
|
6633
6662
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
6634
6663
|
/**
|
|
6635
6664
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
6637
6666
|
* @deprecated
|
|
6638
6667
|
*/
|
|
6639
6668
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
6640
6669
|
/**
|
|
6641
6670
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-reduce.md
|
|
6643
6672
|
*/
|
|
6644
6673
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
6645
6674
|
/**
|
|
6646
6675
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-reverse.md
|
|
6648
6677
|
*/
|
|
6649
6678
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
6650
6679
|
/**
|
|
6651
6680
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-sort.md
|
|
6653
6682
|
*/
|
|
6654
6683
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
6655
6684
|
/**
|
|
6656
6685
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
6657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
6658
6687
|
*/
|
|
6659
6688
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
6660
6689
|
/**
|
|
6661
6690
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
6662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-splice.md
|
|
6663
6692
|
*/
|
|
6664
6693
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
6665
6694
|
/**
|
|
6666
6695
|
* Disallow asterisk prefixes in documentation comments.
|
|
6667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
6668
6697
|
*/
|
|
6669
6698
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
6670
6699
|
/**
|
|
6671
6700
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
6672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-async-promise-finally.md
|
|
6673
6702
|
*/
|
|
6674
6703
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
6675
6704
|
/**
|
|
6676
6705
|
* Disallow member access from await expression.
|
|
6677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-await-expression-member.md
|
|
6678
6707
|
*/
|
|
6679
6708
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
6680
6709
|
/**
|
|
6681
6710
|
* Disallow using `await` in `Promise` method parameters.
|
|
6682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6711
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-await-in-promise-methods.md
|
|
6683
6712
|
*/
|
|
6684
6713
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6685
6714
|
/**
|
|
6686
6715
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
6687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-blob-to-file.md
|
|
6688
6717
|
*/
|
|
6689
6718
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
6690
6719
|
/**
|
|
6691
6720
|
* Disallow boolean-returning sort comparators.
|
|
6692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
6693
6722
|
*/
|
|
6694
6723
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
6695
6724
|
/**
|
|
6696
6725
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
6697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-break-in-nested-loop.md
|
|
6698
6727
|
*/
|
|
6699
6728
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
6700
6729
|
/**
|
|
6701
6730
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
6702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6731
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-canvas-to-image.md
|
|
6703
6732
|
*/
|
|
6704
6733
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
6705
6734
|
/**
|
|
6706
6735
|
* Disallow chained comparisons such as `a < b < c`.
|
|
6707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-chained-comparison.md
|
|
6708
6737
|
*/
|
|
6709
6738
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
6710
6739
|
/**
|
|
6711
6740
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
6712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-collection-bracket-access.md
|
|
6713
6742
|
*/
|
|
6714
6743
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
6715
6744
|
/**
|
|
6716
6745
|
* Disallow dynamic object property existence checks.
|
|
6717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-computed-property-existence-check.md
|
|
6718
6747
|
*/
|
|
6719
6748
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
6720
6749
|
/**
|
|
6721
6750
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
6722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-confusing-array-splice.md
|
|
6723
6752
|
*/
|
|
6724
6753
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
6725
6754
|
/**
|
|
6726
6755
|
* Disallow confusing uses of `Array#with()`.
|
|
6727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6756
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-confusing-array-with.md
|
|
6728
6757
|
*/
|
|
6729
6758
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
6730
6759
|
/**
|
|
6731
6760
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6761
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-console-spaces.md
|
|
6733
6762
|
*/
|
|
6734
6763
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6735
6764
|
/**
|
|
6736
6765
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
6737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-constant-zero-expression.md
|
|
6738
6767
|
*/
|
|
6739
6768
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
6740
6769
|
/**
|
|
6741
6770
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
6742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
6743
6772
|
*/
|
|
6744
6773
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
6745
6774
|
/**
|
|
6746
6775
|
* Do not use `document.cookie` directly.
|
|
6747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-document-cookie.md
|
|
6748
6777
|
*/
|
|
6749
6778
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6750
6779
|
/**
|
|
6751
6780
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
6752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-double-comparison.md
|
|
6753
6782
|
*/
|
|
6754
6783
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
6755
6784
|
/**
|
|
6756
6785
|
* Disallow duplicate adjacent branches in if chains.
|
|
6757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-if-branches.md
|
|
6758
6787
|
*/
|
|
6759
6788
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
6760
6789
|
/**
|
|
6761
6790
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
6762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
6763
6792
|
*/
|
|
6764
6793
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
6765
6794
|
/**
|
|
6766
6795
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
6767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-loops.md
|
|
6768
6797
|
*/
|
|
6769
6798
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
6770
6799
|
/**
|
|
6771
6800
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
6772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-set-values.md
|
|
6773
6802
|
*/
|
|
6774
6803
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
6775
6804
|
/**
|
|
6776
6805
|
* Disallow empty files.
|
|
6777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6806
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-empty-file.md
|
|
6778
6807
|
*/
|
|
6779
6808
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
6780
6809
|
/**
|
|
6781
6810
|
* Disallow assigning to built-in error properties.
|
|
6782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-error-property-assignment.md
|
|
6783
6812
|
*/
|
|
6784
6813
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6785
6814
|
/**
|
|
6786
6815
|
* Disallow exports in scripts.
|
|
6787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-exports-in-scripts.md
|
|
6788
6817
|
*/
|
|
6789
6818
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
6790
6819
|
/**
|
|
6791
6820
|
* Prefer `for…of` over the `forEach` method.
|
|
6792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-for-each.md
|
|
6793
6822
|
*/
|
|
6794
6823
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
6795
6824
|
/**
|
|
6796
6825
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-for-loop.md
|
|
6798
6827
|
*/
|
|
6799
6828
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
6800
6829
|
/**
|
|
6801
6830
|
* Disallow assigning properties on the global object.
|
|
6802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-global-object-property-assignment.md
|
|
6803
6832
|
*/
|
|
6804
6833
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6805
6834
|
/**
|
|
6806
6835
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
6807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
6808
6837
|
* @deprecated
|
|
6809
6838
|
*/
|
|
6810
6839
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
6811
6840
|
/**
|
|
6812
6841
|
* Disallow immediate mutation after variable assignment.
|
|
6813
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-immediate-mutation.md
|
|
6814
6843
|
*/
|
|
6815
6844
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
6816
6845
|
/**
|
|
6817
6846
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
6818
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-impossible-length-comparison.md
|
|
6819
6848
|
*/
|
|
6820
6849
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
6821
6850
|
/**
|
|
6822
6851
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
6823
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6852
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-incorrect-query-selector.md
|
|
6824
6853
|
*/
|
|
6825
6854
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
6826
6855
|
/**
|
|
6827
6856
|
* Disallow incorrect template literal interpolation syntax.
|
|
6828
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6857
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
6829
6858
|
*/
|
|
6830
6859
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
6831
6860
|
/**
|
|
6832
6861
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6833
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
6834
6863
|
* @deprecated
|
|
6835
6864
|
*/
|
|
6836
6865
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
6837
6866
|
/**
|
|
6838
6867
|
* Disallow `instanceof` with built-in objects
|
|
6839
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-instanceof-builtins.md
|
|
6840
6869
|
*/
|
|
6841
6870
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
6842
6871
|
/**
|
|
6843
6872
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
6844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-argument-count.md
|
|
6845
6874
|
*/
|
|
6846
6875
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
6847
6876
|
/**
|
|
6848
6877
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
6849
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6878
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-character-comparison.md
|
|
6850
6879
|
*/
|
|
6851
6880
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
6852
6881
|
/**
|
|
6853
6882
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6883
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-fetch-options.md
|
|
6855
6884
|
*/
|
|
6856
6885
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6857
6886
|
/**
|
|
6858
6887
|
* Disallow invalid `accept` values on file inputs.
|
|
6859
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6888
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
6860
6889
|
*/
|
|
6861
6890
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
6862
6891
|
/**
|
|
6863
6892
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6864
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6893
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
6865
6894
|
*/
|
|
6866
6895
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
6867
6896
|
/**
|
|
6868
6897
|
* Disallow invalid implementations of well-known symbol methods.
|
|
6869
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6898
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
6870
6899
|
*/
|
|
6871
6900
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
6872
6901
|
/**
|
|
6873
6902
|
* Disallow identifiers starting with `new` or `class`.
|
|
6874
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6903
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-keyword-prefix.md
|
|
6875
6904
|
*/
|
|
6876
6905
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
6877
6906
|
/**
|
|
6878
6907
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
6879
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6908
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-late-current-target-access.md
|
|
6880
6909
|
*/
|
|
6881
6910
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
6882
6911
|
/**
|
|
6883
6912
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
6884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6913
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-late-event-control.md
|
|
6885
6914
|
*/
|
|
6886
6915
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
6887
6916
|
/**
|
|
6888
6917
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6889
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6918
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
6890
6919
|
* @deprecated
|
|
6891
6920
|
*/
|
|
6892
6921
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
6893
6922
|
/**
|
|
6894
6923
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6895
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-lonely-if.md
|
|
6896
6925
|
*/
|
|
6897
6926
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
6898
6927
|
/**
|
|
6899
6928
|
* Disallow mutating a loop iterable during iteration.
|
|
6900
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
6901
6930
|
*/
|
|
6902
6931
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
6903
6932
|
/**
|
|
6904
6933
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
6906
6935
|
*/
|
|
6907
6936
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6908
6937
|
/**
|
|
6909
6938
|
* Disallow manually wrapped comments.
|
|
6910
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
6911
6940
|
*/
|
|
6912
6941
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
6913
6942
|
/**
|
|
6914
6943
|
* Disallow checking a Map key before accessing a different key.
|
|
6915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-mismatched-map-key.md
|
|
6916
6945
|
*/
|
|
6917
6946
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
6918
6947
|
/**
|
|
6919
6948
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
6920
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6949
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-misrefactored-assignment.md
|
|
6921
6950
|
*/
|
|
6922
6951
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
6952
|
+
/**
|
|
6953
|
+
* Disallow references to missing local resources.
|
|
6954
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-missing-local-resource.md
|
|
6955
|
+
*/
|
|
6956
|
+
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
6957
|
+
/**
|
|
6958
|
+
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
6959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
6960
|
+
*/
|
|
6961
|
+
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
6923
6962
|
/**
|
|
6924
6963
|
* Disallow named usage of default import and export.
|
|
6925
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-named-default.md
|
|
6926
6965
|
*/
|
|
6927
6966
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
6928
6967
|
/**
|
|
6929
6968
|
* Disallow negated array predicate calls.
|
|
6930
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6969
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negated-array-predicate.md
|
|
6931
6970
|
*/
|
|
6932
6971
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
6933
6972
|
/**
|
|
6934
6973
|
* Disallow negated comparisons.
|
|
6935
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negated-comparison.md
|
|
6936
6975
|
*/
|
|
6937
6976
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
6938
6977
|
/**
|
|
6939
6978
|
* Disallow negated conditions.
|
|
6940
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6979
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negated-condition.md
|
|
6941
6980
|
*/
|
|
6942
6981
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
6943
6982
|
/**
|
|
6944
6983
|
* Disallow negated expression in equality check.
|
|
6945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negation-in-equality-check.md
|
|
6946
6985
|
*/
|
|
6947
6986
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
6948
6987
|
/**
|
|
6949
6988
|
* Disallow nested ternary expressions.
|
|
6950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-nested-ternary.md
|
|
6951
6990
|
*/
|
|
6952
6991
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6953
6992
|
/**
|
|
6954
6993
|
* Disallow `new Array()`.
|
|
6955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-new-array.md
|
|
6956
6995
|
*/
|
|
6957
6996
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
6958
6997
|
/**
|
|
6959
6998
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6960
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-new-buffer.md
|
|
6961
7000
|
*/
|
|
6962
7001
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
6963
7002
|
/**
|
|
6964
7003
|
* Disallow non-function values with function-style verb prefixes.
|
|
6965
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7004
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
6966
7005
|
*/
|
|
6967
7006
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
6968
7007
|
/**
|
|
6969
7008
|
* Disallow non-standard properties on built-in objects.
|
|
6970
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7009
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
6971
7010
|
*/
|
|
6972
7011
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
6973
7012
|
/**
|
|
6974
7013
|
* Disallow the use of the `null` literal.
|
|
6975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-null.md
|
|
6976
7015
|
*/
|
|
6977
7016
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
6978
7017
|
/**
|
|
6979
7018
|
* Disallow the use of objects as default parameters.
|
|
6980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-object-as-default-parameter.md
|
|
6981
7020
|
*/
|
|
6982
7021
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
6983
7022
|
/**
|
|
6984
7023
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
6985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-object-methods-with-collections.md
|
|
6986
7025
|
*/
|
|
6987
7026
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
6988
7027
|
/**
|
|
6989
7028
|
* Disallow optional chaining on undeclared variables.
|
|
6990
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7029
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
6991
7030
|
*/
|
|
6992
7031
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
6993
7032
|
/**
|
|
6994
7033
|
* Disallow `process.exit()`.
|
|
6995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-process-exit.md
|
|
6996
7035
|
*/
|
|
6997
7036
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
6998
7037
|
/**
|
|
6999
7038
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
7000
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-redundant-comparison.md
|
|
7001
7040
|
*/
|
|
7002
7041
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
7003
7042
|
/**
|
|
7004
7043
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
7005
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-return-array-push.md
|
|
7006
7045
|
*/
|
|
7007
7046
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
7008
7047
|
/**
|
|
7009
7048
|
* Disallow selector syntax in DOM names.
|
|
7010
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-selector-as-dom-name.md
|
|
7011
7050
|
*/
|
|
7012
7051
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
7052
|
+
/**
|
|
7053
|
+
* Disallow shorthand properties that override related longhand properties.
|
|
7054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
7055
|
+
*/
|
|
7056
|
+
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
7013
7057
|
/**
|
|
7014
7058
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
7015
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
7016
7060
|
*/
|
|
7017
7061
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7018
7062
|
/**
|
|
7019
7063
|
* Disallow classes that only have static members.
|
|
7020
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-static-only-class.md
|
|
7021
7065
|
*/
|
|
7022
7066
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
7023
7067
|
/**
|
|
7024
7068
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
7025
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-subtraction-comparison.md
|
|
7026
7070
|
*/
|
|
7027
7071
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
7028
7072
|
/**
|
|
7029
7073
|
* Disallow `then` property.
|
|
7030
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-thenable.md
|
|
7031
7075
|
*/
|
|
7032
7076
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
7033
7077
|
/**
|
|
7034
7078
|
* Disallow assigning `this` to a variable.
|
|
7035
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-this-assignment.md
|
|
7036
7080
|
*/
|
|
7037
7081
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
7038
7082
|
/**
|
|
7039
7083
|
* Disallow `this` outside of classes.
|
|
7040
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-this-outside-of-class.md
|
|
7041
7085
|
*/
|
|
7042
7086
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
7043
7087
|
/**
|
|
7044
7088
|
* Disallow assigning to top-level variables from inside functions.
|
|
7045
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
7046
7090
|
*/
|
|
7047
7091
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
7048
7092
|
/**
|
|
7049
7093
|
* Disallow top-level side effects in exported modules.
|
|
7050
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-top-level-side-effects.md
|
|
7051
7095
|
*/
|
|
7052
7096
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
7097
|
+
/**
|
|
7098
|
+
* Disallow `all` as a transition property.
|
|
7099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-transition-all.md
|
|
7100
|
+
*/
|
|
7101
|
+
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
7053
7102
|
/**
|
|
7054
7103
|
* Disallow comparing `undefined` using `typeof`.
|
|
7055
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-typeof-undefined.md
|
|
7056
7105
|
*/
|
|
7057
7106
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
7058
7107
|
/**
|
|
7059
7108
|
* Disallow referencing methods without calling them.
|
|
7060
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-uncalled-method.md
|
|
7061
7110
|
*/
|
|
7062
7111
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
7063
7112
|
/**
|
|
7064
7113
|
* Require class members to be declared.
|
|
7065
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-undeclared-class-members.md
|
|
7066
7115
|
*/
|
|
7067
7116
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
7068
7117
|
/**
|
|
7069
7118
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
7070
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
7071
7120
|
*/
|
|
7072
7121
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7073
7122
|
/**
|
|
7074
7123
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
7075
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
7076
7125
|
*/
|
|
7077
7126
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7078
7127
|
/**
|
|
7079
7128
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
7080
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
7081
7130
|
*/
|
|
7082
7131
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
7083
7132
|
/**
|
|
7084
7133
|
* Disallow awaiting non-promise values.
|
|
7085
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-await.md
|
|
7086
7135
|
*/
|
|
7087
7136
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
7088
7137
|
/**
|
|
7089
7138
|
* Disallow unnecessary comparisons against boolean literals.
|
|
7090
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
7091
7140
|
*/
|
|
7092
7141
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
7093
7142
|
/**
|
|
7094
7143
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
7095
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
7096
7145
|
*/
|
|
7097
7146
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7098
7147
|
/**
|
|
7099
7148
|
* Disallow unnecessary `globalThis` references.
|
|
7100
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-global-this.md
|
|
7101
7150
|
*/
|
|
7102
7151
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
7103
7152
|
/**
|
|
7104
7153
|
* Disallow unnecessary nested ternary expressions.
|
|
7105
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
7106
7155
|
*/
|
|
7107
7156
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7108
7157
|
/**
|
|
7109
7158
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
7110
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
7111
7160
|
*/
|
|
7112
7161
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
7113
7162
|
/**
|
|
7114
7163
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
7115
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
7116
7165
|
*/
|
|
7117
7166
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
7118
7167
|
/**
|
|
7119
7168
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
7120
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-splice.md
|
|
7121
7170
|
*/
|
|
7122
7171
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
7172
|
+
/**
|
|
7173
|
+
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
7174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
7175
|
+
*/
|
|
7176
|
+
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
7123
7177
|
/**
|
|
7124
7178
|
* Disallow unreadable array destructuring.
|
|
7125
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
7126
7180
|
*/
|
|
7127
7181
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
7128
7182
|
/**
|
|
7129
7183
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
7130
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
7131
7185
|
*/
|
|
7132
7186
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
7133
7187
|
/**
|
|
7134
7188
|
* Disallow unreadable IIFEs.
|
|
7135
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-iife.md
|
|
7136
7190
|
*/
|
|
7137
7191
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
7138
7192
|
/**
|
|
7139
7193
|
* Disallow unreadable `new` expressions.
|
|
7140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-new-expression.md
|
|
7141
7195
|
*/
|
|
7142
7196
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
7143
7197
|
/**
|
|
7144
7198
|
* Disallow unreadable object destructuring.
|
|
7145
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
7146
7200
|
*/
|
|
7147
7201
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
7148
7202
|
/**
|
|
7149
7203
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
7150
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
7151
7205
|
*/
|
|
7152
7206
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
7153
7207
|
/**
|
|
7154
7208
|
* Disallow unsafe DOM HTML APIs.
|
|
7155
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-dom-html.md
|
|
7156
7210
|
*/
|
|
7157
7211
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
7158
7212
|
/**
|
|
7159
7213
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
7160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
7161
7215
|
*/
|
|
7162
7216
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
7163
7217
|
/**
|
|
7164
7218
|
* Disallow unsafe values as property keys.
|
|
7165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-property-key.md
|
|
7166
7220
|
*/
|
|
7167
7221
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
7168
7222
|
/**
|
|
7169
7223
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
7170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
7171
7225
|
*/
|
|
7172
7226
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
7173
7227
|
/**
|
|
7174
7228
|
* Disallow ignoring the return value of selected array methods.
|
|
7175
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unused-array-method-return.md
|
|
7176
7230
|
*/
|
|
7177
7231
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
7178
7232
|
/**
|
|
7179
7233
|
* Disallow unused object properties.
|
|
7180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unused-properties.md
|
|
7181
7235
|
*/
|
|
7182
7236
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
7183
7237
|
/**
|
|
7184
7238
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
7185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-boolean-cast.md
|
|
7186
7240
|
*/
|
|
7187
7241
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
7188
7242
|
/**
|
|
7189
7243
|
* Disallow useless type coercions of values that are already of the target type.
|
|
7190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-coercion.md
|
|
7191
7245
|
*/
|
|
7192
7246
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
7193
7247
|
/**
|
|
7194
7248
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
7195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-collection-argument.md
|
|
7196
7250
|
*/
|
|
7197
7251
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
7198
7252
|
/**
|
|
7199
7253
|
* Disallow useless compound assignments such as `x += 0`.
|
|
7200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-compound-assignment.md
|
|
7201
7255
|
*/
|
|
7202
7256
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
7203
7257
|
/**
|
|
7204
7258
|
* Disallow useless concatenation of literals.
|
|
7205
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-concat.md
|
|
7206
7260
|
*/
|
|
7207
7261
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
7208
7262
|
/**
|
|
7209
7263
|
* Disallow useless `continue` statements.
|
|
7210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-continue.md
|
|
7211
7265
|
*/
|
|
7212
7266
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
7213
7267
|
/**
|
|
7214
7268
|
* Disallow unnecessary existence checks before deletion.
|
|
7215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-delete-check.md
|
|
7216
7270
|
*/
|
|
7217
7271
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
7218
7272
|
/**
|
|
7219
7273
|
* Disallow `else` after a statement that exits.
|
|
7220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-else.md
|
|
7221
7275
|
*/
|
|
7222
7276
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
7223
7277
|
/**
|
|
7224
7278
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
7225
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
7226
7280
|
*/
|
|
7227
7281
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
7228
7282
|
/**
|
|
7229
7283
|
* Disallow useless fallback when spreading in object literals.
|
|
7230
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
7231
7285
|
*/
|
|
7232
7286
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
7233
7287
|
/**
|
|
7234
7288
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
7235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
7236
7290
|
*/
|
|
7237
7291
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7238
7292
|
/**
|
|
7239
7293
|
* Disallow useless array length check.
|
|
7240
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-length-check.md
|
|
7241
7295
|
*/
|
|
7242
7296
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
7243
7297
|
/**
|
|
7244
7298
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
7245
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-logical-operand.md
|
|
7246
7300
|
*/
|
|
7247
7301
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
7248
7302
|
/**
|
|
7249
7303
|
* Disallow useless overrides of class methods.
|
|
7250
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-override.md
|
|
7251
7305
|
*/
|
|
7252
7306
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
7253
7307
|
/**
|
|
7254
7308
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
7255
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
7256
7310
|
*/
|
|
7257
7311
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
7312
|
+
/**
|
|
7313
|
+
* Disallow redundant re-exports.
|
|
7314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-re-export.md
|
|
7315
|
+
*/
|
|
7316
|
+
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
7258
7317
|
/**
|
|
7259
7318
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
7260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-recursion.md
|
|
7261
7320
|
*/
|
|
7262
7321
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
7263
7322
|
/**
|
|
7264
7323
|
* Disallow unnecessary spread.
|
|
7265
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-spread.md
|
|
7266
7325
|
*/
|
|
7267
7326
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
7268
7327
|
/**
|
|
7269
7328
|
* Disallow useless case in switch statements.
|
|
7270
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-switch-case.md
|
|
7271
7330
|
*/
|
|
7272
7331
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
7273
7332
|
/**
|
|
7274
7333
|
* Disallow useless template literal expressions.
|
|
7275
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-template-literals.md
|
|
7276
7335
|
*/
|
|
7277
7336
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
7278
7337
|
/**
|
|
7279
7338
|
* Disallow useless `undefined`.
|
|
7280
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-undefined.md
|
|
7281
7340
|
*/
|
|
7282
7341
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
7283
7342
|
/**
|
|
7284
7343
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
7285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7344
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
7286
7345
|
*/
|
|
7287
7346
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
7288
7347
|
/**
|
|
7289
7348
|
* Disallow number literals with zero fractions or dangling dots.
|
|
7290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-zero-fractions.md
|
|
7291
7350
|
*/
|
|
7292
7351
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
7293
7352
|
/**
|
|
7294
7353
|
* Enforce proper case for numeric literals.
|
|
7295
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7354
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/number-literal-case.md
|
|
7296
7355
|
*/
|
|
7297
7356
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
7298
7357
|
/**
|
|
7299
7358
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
7300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/numeric-separators-style.md
|
|
7301
7360
|
*/
|
|
7302
7361
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
7303
7362
|
/**
|
|
7304
7363
|
* Require assignment operator shorthand where possible.
|
|
7305
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/operator-assignment.md
|
|
7306
7365
|
*/
|
|
7307
7366
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
7308
7367
|
/**
|
|
7309
7368
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
7310
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-abort-signal-any.md
|
|
7311
7370
|
*/
|
|
7312
7371
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
7313
7372
|
/**
|
|
7314
7373
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
7315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
7316
7375
|
*/
|
|
7317
7376
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
7318
7377
|
/**
|
|
7319
7378
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
7320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-add-event-listener.md
|
|
7321
7380
|
*/
|
|
7322
7381
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
7323
7382
|
/**
|
|
7324
7383
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
7325
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7384
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
7326
7385
|
*/
|
|
7327
7386
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
7328
7387
|
/**
|
|
7329
7388
|
* Prefer `AggregateError` when throwing collected errors.
|
|
7330
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-aggregate-error.md
|
|
7331
7390
|
*/
|
|
7332
7391
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
7333
7392
|
/**
|
|
7334
7393
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
7335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7394
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-find.md
|
|
7336
7395
|
*/
|
|
7337
7396
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
7338
7397
|
/**
|
|
7339
7398
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
7340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-flat.md
|
|
7341
7400
|
*/
|
|
7342
7401
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
7343
7402
|
/**
|
|
7344
7403
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
7345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7404
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-flat-map.md
|
|
7346
7405
|
*/
|
|
7347
7406
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7348
7407
|
/**
|
|
7349
7408
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
7350
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7409
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-from-async.md
|
|
7351
7410
|
*/
|
|
7352
7411
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
7353
7412
|
/**
|
|
7354
7413
|
* Prefer using the `Array.from()` mapping function argument.
|
|
7355
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7414
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-from-map.md
|
|
7356
7415
|
*/
|
|
7357
7416
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
7358
7417
|
/**
|
|
7359
7418
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
7360
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-from-range.md
|
|
7361
7420
|
*/
|
|
7362
7421
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
7363
7422
|
/**
|
|
7364
7423
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
7365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-index-of.md
|
|
7366
7425
|
*/
|
|
7367
7426
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
7368
7427
|
/**
|
|
7369
7428
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
7370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
7371
7430
|
*/
|
|
7372
7431
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
7373
7432
|
/**
|
|
7374
7433
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
7375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-last-methods.md
|
|
7376
7435
|
*/
|
|
7377
7436
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
7378
7437
|
/**
|
|
7379
7438
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
7380
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-slice.md
|
|
7381
7440
|
*/
|
|
7382
7441
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
7383
7442
|
/**
|
|
7384
7443
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
7385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-some.md
|
|
7386
7445
|
*/
|
|
7387
7446
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
7388
7447
|
/**
|
|
7389
7448
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
7390
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-at.md
|
|
7391
7450
|
*/
|
|
7392
7451
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
7393
7452
|
/**
|
|
7394
7453
|
* Prefer `await` over promise chaining.
|
|
7395
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-await.md
|
|
7396
7455
|
*/
|
|
7397
7456
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
7398
7457
|
/**
|
|
7399
7458
|
* Prefer `BigInt` literals over the constructor.
|
|
7400
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-bigint-literals.md
|
|
7401
7460
|
*/
|
|
7402
7461
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
7403
7462
|
/**
|
|
7404
7463
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
7405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
7406
7465
|
*/
|
|
7407
7466
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
7408
7467
|
/**
|
|
7409
7468
|
* Prefer block statements over IIFEs used only for scoping.
|
|
7410
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
7411
7470
|
*/
|
|
7412
7471
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
7413
7472
|
/**
|
|
7414
7473
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
7415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-boolean-return.md
|
|
7416
7475
|
*/
|
|
7417
7476
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
7418
7477
|
/**
|
|
7419
7478
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
7420
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-class-fields.md
|
|
7421
7480
|
*/
|
|
7422
7481
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
7423
7482
|
/**
|
|
7424
7483
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
7425
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-classlist-toggle.md
|
|
7426
7485
|
*/
|
|
7427
7486
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
7428
7487
|
/**
|
|
7429
7488
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
7430
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-code-point.md
|
|
7431
7490
|
*/
|
|
7432
7491
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
7433
7492
|
/**
|
|
7434
7493
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
7435
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-continue.md
|
|
7436
7495
|
*/
|
|
7437
7496
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
7438
7497
|
/**
|
|
7439
7498
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
7440
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-date-now.md
|
|
7441
7500
|
*/
|
|
7442
7501
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
7443
7502
|
/**
|
|
7444
7503
|
* Prefer default parameters over reassignment.
|
|
7445
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-default-parameters.md
|
|
7446
7505
|
*/
|
|
7447
7506
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
7448
7507
|
/**
|
|
7449
7508
|
* Prefer direct iteration over default iterator method calls.
|
|
7450
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-direct-iteration.md
|
|
7451
7510
|
*/
|
|
7452
7511
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
7453
7512
|
/**
|
|
7454
7513
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
7455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dispose.md
|
|
7456
7515
|
*/
|
|
7457
7516
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
7458
7517
|
/**
|
|
7459
7518
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
7460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-append.md
|
|
7461
7520
|
*/
|
|
7462
7521
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
7463
7522
|
/**
|
|
7464
7523
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
7465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
7466
7525
|
* @deprecated
|
|
7467
7526
|
*/
|
|
7468
7527
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
7469
7528
|
/**
|
|
7470
7529
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
7471
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7530
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
7472
7531
|
*/
|
|
7473
|
-
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<
|
|
7532
|
+
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
7474
7533
|
/**
|
|
7475
7534
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
7476
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7535
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-remove.md
|
|
7477
7536
|
*/
|
|
7478
7537
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
7479
7538
|
/**
|
|
7480
7539
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
7481
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
7482
7541
|
*/
|
|
7483
7542
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
7484
7543
|
/**
|
|
7485
7544
|
* Prefer `.textContent` over `.innerText`.
|
|
7486
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7545
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
7487
7546
|
*/
|
|
7488
7547
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
7489
7548
|
/**
|
|
7490
7549
|
* Prefer early returns over full-function conditional wrapping.
|
|
7491
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7550
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-early-return.md
|
|
7492
7551
|
*/
|
|
7493
7552
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
7494
7553
|
/**
|
|
7495
7554
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
7496
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7555
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-else-if.md
|
|
7497
7556
|
*/
|
|
7498
7557
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
7499
7558
|
/**
|
|
7500
7559
|
* Prefer `Error.isError()` when checking for errors.
|
|
7501
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7560
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-error-is-error.md
|
|
7502
7561
|
*/
|
|
7503
7562
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
7504
7563
|
/**
|
|
7505
7564
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
7506
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7565
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-event-target.md
|
|
7507
7566
|
*/
|
|
7508
7567
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
7568
|
+
/**
|
|
7569
|
+
* Prefer explicit viewport units.
|
|
7570
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
7571
|
+
*/
|
|
7572
|
+
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
7509
7573
|
/**
|
|
7510
7574
|
* Prefer `export…from` when re-exporting.
|
|
7511
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7575
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-export-from.md
|
|
7512
7576
|
*/
|
|
7513
7577
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
7514
7578
|
/**
|
|
7515
7579
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
7516
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7580
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
7517
7581
|
*/
|
|
7518
7582
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7519
7583
|
/**
|
|
7520
7584
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
7521
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7585
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
7522
7586
|
*/
|
|
7523
7587
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
7524
7588
|
/**
|
|
7525
7589
|
* Prefer global numeric constants over `Number` static properties.
|
|
7526
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7590
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-global-number-constants.md
|
|
7527
7591
|
*/
|
|
7528
7592
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
7529
7593
|
/**
|
|
7530
7594
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
7531
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7595
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-global-this.md
|
|
7532
7596
|
*/
|
|
7533
7597
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
7534
7598
|
/**
|
|
7535
7599
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
7536
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-group-by.md
|
|
7537
7601
|
*/
|
|
7538
7602
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
7539
7603
|
/**
|
|
7540
7604
|
* Prefer `.has()` when checking existence.
|
|
7541
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-has-check.md
|
|
7542
7606
|
*/
|
|
7543
7607
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
7544
7608
|
/**
|
|
7545
7609
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
7546
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
7547
7611
|
*/
|
|
7548
7612
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
7549
7613
|
/**
|
|
7550
7614
|
* Prefer HTTPS over HTTP.
|
|
7551
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-https.md
|
|
7552
7616
|
*/
|
|
7553
7617
|
'unicorn/prefer-https'?: Linter.RuleEntry<[]>;
|
|
7554
7618
|
/**
|
|
7555
7619
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
7556
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
7557
7621
|
*/
|
|
7558
7622
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
7559
7623
|
/**
|
|
7560
7624
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
7561
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-import-meta-properties.md
|
|
7562
7626
|
*/
|
|
7563
7627
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
7564
7628
|
/**
|
|
7565
7629
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
7566
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-includes.md
|
|
7567
7631
|
*/
|
|
7568
7632
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
7569
7633
|
/**
|
|
7570
7634
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
7571
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
7572
7636
|
*/
|
|
7573
7637
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
7574
7638
|
/**
|
|
7575
7639
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
7576
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7640
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
7577
7641
|
*/
|
|
7578
7642
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
7579
7643
|
/**
|
|
7580
7644
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
7581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7645
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-concat.md
|
|
7582
7646
|
*/
|
|
7583
7647
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
7584
7648
|
/**
|
|
7585
7649
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
7586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-helpers.md
|
|
7587
7651
|
*/
|
|
7588
7652
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
7589
7653
|
/**
|
|
7590
7654
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
7591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-to-array.md
|
|
7592
7656
|
*/
|
|
7593
7657
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7594
7658
|
/**
|
|
7595
7659
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
7596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
7597
7661
|
*/
|
|
7598
7662
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
7599
7663
|
/**
|
|
7600
7664
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
7601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
7602
7666
|
* @deprecated
|
|
7603
7667
|
*/
|
|
7604
7668
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
7605
7669
|
/**
|
|
7606
7670
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
7607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
7608
7672
|
*/
|
|
7609
7673
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
7610
7674
|
/**
|
|
7611
7675
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
7612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-location-assign.md
|
|
7613
7677
|
*/
|
|
7614
7678
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
7615
7679
|
/**
|
|
7616
7680
|
* Prefer using a logical operator over a ternary.
|
|
7617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
7618
7682
|
*/
|
|
7619
7683
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
7620
7684
|
/**
|
|
7621
7685
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
7622
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-map-from-entries.md
|
|
7623
7687
|
*/
|
|
7624
7688
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
7625
7689
|
/**
|
|
7626
7690
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
7627
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-abs.md
|
|
7628
7692
|
*/
|
|
7629
7693
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
7630
7694
|
/**
|
|
7631
7695
|
* Prefer `Math` constants over their approximate numeric values.
|
|
7632
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-constants.md
|
|
7633
7697
|
*/
|
|
7634
7698
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
7635
7699
|
/**
|
|
7636
7700
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
7637
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-min-max.md
|
|
7638
7702
|
*/
|
|
7639
7703
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7640
7704
|
/**
|
|
7641
7705
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
7642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-trunc.md
|
|
7643
7707
|
*/
|
|
7644
7708
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
7645
7709
|
/**
|
|
7646
7710
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
7647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7711
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-minimal-ternary.md
|
|
7648
7712
|
*/
|
|
7649
7713
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
7650
7714
|
/**
|
|
7651
7715
|
* Prefer modern DOM APIs.
|
|
7652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
7653
7717
|
*/
|
|
7654
7718
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
7655
7719
|
/**
|
|
7656
7720
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
7657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-modern-math-apis.md
|
|
7658
7722
|
*/
|
|
7659
7723
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
7660
7724
|
/**
|
|
7661
7725
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
7662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-module.md
|
|
7663
7727
|
*/
|
|
7664
7728
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
7665
7729
|
/**
|
|
7666
7730
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
7667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7731
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
7668
7732
|
*/
|
|
7669
7733
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
7670
7734
|
/**
|
|
7671
7735
|
* Prefer negative index over `.length - index` when possible.
|
|
7672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-negative-index.md
|
|
7673
7737
|
*/
|
|
7674
7738
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
7675
7739
|
/**
|
|
7676
7740
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
7677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-node-protocol.md
|
|
7678
7742
|
*/
|
|
7679
7743
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
7680
7744
|
/**
|
|
7681
7745
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
7682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-number-coercion.md
|
|
7683
7747
|
*/
|
|
7684
7748
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
7685
7749
|
/**
|
|
7686
7750
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
7687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
7688
7752
|
*/
|
|
7689
7753
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
7690
7754
|
/**
|
|
7691
7755
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
7692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7756
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-number-properties.md
|
|
7693
7757
|
*/
|
|
7694
7758
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
7695
7759
|
/**
|
|
7696
7760
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
7697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7761
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-define-properties.md
|
|
7698
7762
|
*/
|
|
7699
7763
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
7700
7764
|
/**
|
|
7701
7765
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
7702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
7703
7767
|
*/
|
|
7704
7768
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
7705
7769
|
/**
|
|
7706
7770
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
7707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-from-entries.md
|
|
7708
7772
|
*/
|
|
7709
7773
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
7710
7774
|
/**
|
|
7711
7775
|
* Prefer the most specific `Object` iterable method.
|
|
7712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
7713
7777
|
*/
|
|
7714
7778
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
7715
7779
|
/**
|
|
7716
7780
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
7717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-observer-apis.md
|
|
7718
7782
|
*/
|
|
7719
7783
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
7720
7784
|
/**
|
|
7721
7785
|
* Prefer omitting the `catch` binding parameter.
|
|
7722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
7723
7787
|
*/
|
|
7724
7788
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
7725
7789
|
/**
|
|
7726
7790
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
7727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-path2d.md
|
|
7728
7792
|
*/
|
|
7729
7793
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
7730
7794
|
/**
|
|
7731
7795
|
* Prefer private class fields over the underscore-prefix convention.
|
|
7732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-private-class-fields.md
|
|
7733
7797
|
*/
|
|
7734
7798
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
7735
7799
|
/**
|
|
7736
7800
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
7737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-promise-try.md
|
|
7738
7802
|
*/
|
|
7739
7803
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
7740
7804
|
/**
|
|
7741
7805
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
7742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7806
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
7743
7807
|
*/
|
|
7744
7808
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
7745
7809
|
/**
|
|
7746
7810
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
7747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-prototype-methods.md
|
|
7748
7812
|
*/
|
|
7749
7813
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
7750
7814
|
/**
|
|
7751
7815
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
7752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-query-selector.md
|
|
7753
7817
|
*/
|
|
7754
7818
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
7755
7819
|
/**
|
|
7756
7820
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
7757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-queue-microtask.md
|
|
7758
7822
|
*/
|
|
7759
7823
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
7760
7824
|
/**
|
|
7761
7825
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
7762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-reflect-apply.md
|
|
7763
7827
|
*/
|
|
7764
7828
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
7765
7829
|
/**
|
|
7766
7830
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
7767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-regexp-escape.md
|
|
7768
7832
|
*/
|
|
7769
7833
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
7770
7834
|
/**
|
|
7771
7835
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
7772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-regexp-test.md
|
|
7773
7837
|
*/
|
|
7774
7838
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
7775
7839
|
/**
|
|
7776
7840
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
7777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-response-static-json.md
|
|
7778
7842
|
*/
|
|
7779
7843
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
7780
7844
|
/**
|
|
7781
7845
|
* Prefer `:scope` when using element query selector methods.
|
|
7782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-scoped-selector.md
|
|
7783
7847
|
*/
|
|
7784
7848
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
7785
7849
|
/**
|
|
7786
7850
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
7787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-set-has.md
|
|
7788
7852
|
*/
|
|
7789
7853
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
7790
7854
|
/**
|
|
7791
7855
|
* Prefer `Set` methods for Set operations.
|
|
7792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-set-methods.md
|
|
7793
7857
|
*/
|
|
7794
7858
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
7795
7859
|
/**
|
|
7796
7860
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
7797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-set-size.md
|
|
7798
7862
|
*/
|
|
7799
7863
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
7800
7864
|
/**
|
|
7801
7865
|
* Prefer arrow function properties over methods with a single return.
|
|
7802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-short-arrow-method.md
|
|
7803
7867
|
*/
|
|
7804
|
-
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<
|
|
7868
|
+
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
7805
7869
|
/**
|
|
7806
7870
|
* Prefer simple conditions first in logical expressions.
|
|
7807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-simple-condition-first.md
|
|
7808
7872
|
*/
|
|
7809
7873
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
7810
7874
|
/**
|
|
7811
7875
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
7812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
7813
7877
|
*/
|
|
7814
7878
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7815
7879
|
/**
|
|
7816
7880
|
* Prefer simplified conditions.
|
|
7817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-simplified-conditions.md
|
|
7818
7882
|
*/
|
|
7819
7883
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
7820
7884
|
/**
|
|
7821
7885
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
7822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-array-predicate.md
|
|
7823
7887
|
*/
|
|
7824
7888
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7825
7889
|
/**
|
|
7826
7890
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
7827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-call.md
|
|
7828
7892
|
*/
|
|
7829
7893
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
7830
7894
|
/**
|
|
7831
7895
|
* Prefer a single object destructuring declaration per local const source.
|
|
7832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
7833
7897
|
*/
|
|
7834
7898
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
7835
7899
|
/**
|
|
7836
7900
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
7837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-replace.md
|
|
7838
7902
|
*/
|
|
7839
7903
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
7840
7904
|
/**
|
|
7841
7905
|
* Prefer declaring variables in the smallest possible scope.
|
|
7842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-smaller-scope.md
|
|
7843
7907
|
*/
|
|
7844
7908
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
7845
7909
|
/**
|
|
7846
7910
|
* Prefer `String#split()` with a limit.
|
|
7847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-split-limit.md
|
|
7848
7912
|
*/
|
|
7849
7913
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
7850
7914
|
/**
|
|
7851
7915
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
7852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-spread.md
|
|
7853
7917
|
*/
|
|
7854
7918
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
7855
7919
|
/**
|
|
7856
7920
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
7857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-match-all.md
|
|
7858
7922
|
*/
|
|
7859
7923
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
7860
7924
|
/**
|
|
7861
7925
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
7862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
7863
7927
|
*/
|
|
7864
7928
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
7865
7929
|
/**
|
|
7866
7930
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
7867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-raw.md
|
|
7868
7932
|
*/
|
|
7869
7933
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
7870
7934
|
/**
|
|
7871
7935
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
7872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-repeat.md
|
|
7873
7937
|
*/
|
|
7874
7938
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
7875
7939
|
/**
|
|
7876
7940
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
7877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-replace-all.md
|
|
7878
7942
|
*/
|
|
7879
7943
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
7880
7944
|
/**
|
|
7881
7945
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
7882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-slice.md
|
|
7883
7947
|
*/
|
|
7884
7948
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
7885
7949
|
/**
|
|
7886
|
-
* Prefer `String#startsWith()` & `String#endsWith()` over
|
|
7887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7950
|
+
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
7951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
7888
7952
|
*/
|
|
7889
7953
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
7890
7954
|
/**
|
|
7891
7955
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
7892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
7893
7957
|
*/
|
|
7894
7958
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
7895
7959
|
/**
|
|
7896
7960
|
* Prefer using `structuredClone` to create a deep clone.
|
|
7897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-structured-clone.md
|
|
7898
7962
|
*/
|
|
7899
7963
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
7900
7964
|
/**
|
|
7901
7965
|
* Prefer `switch` over multiple `else-if`.
|
|
7902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-switch.md
|
|
7903
7967
|
*/
|
|
7904
7968
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
7905
7969
|
/**
|
|
7906
7970
|
* Prefer `Temporal` over `Date`.
|
|
7907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-temporal.md
|
|
7908
7972
|
*/
|
|
7909
7973
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
7910
7974
|
/**
|
|
7911
7975
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
7912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-ternary.md
|
|
7913
7977
|
*/
|
|
7914
7978
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
7979
|
+
/**
|
|
7980
|
+
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
7981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-then-catch.md
|
|
7982
|
+
*/
|
|
7983
|
+
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
7915
7984
|
/**
|
|
7916
7985
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
7917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-toggle-attribute.md
|
|
7918
7987
|
*/
|
|
7919
7988
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
7920
7989
|
/**
|
|
7921
7990
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-top-level-await.md
|
|
7923
7992
|
*/
|
|
7924
7993
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
7925
7994
|
/**
|
|
7926
7995
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-type-error.md
|
|
7928
7997
|
*/
|
|
7929
7998
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
7930
7999
|
/**
|
|
7931
8000
|
* Require type literals to be last in union types.
|
|
7932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-type-literal-last.md
|
|
7933
8002
|
*/
|
|
7934
8003
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
7935
8004
|
/**
|
|
7936
8005
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
7937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-uint8array-base64.md
|
|
7938
8007
|
*/
|
|
7939
8008
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
7940
8009
|
/**
|
|
7941
8010
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
7942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-unary-minus.md
|
|
7943
8012
|
*/
|
|
7944
8013
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
7945
8014
|
/**
|
|
7946
8015
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
7947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
7948
8017
|
*/
|
|
7949
8018
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
7950
8019
|
/**
|
|
7951
8020
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
7952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8021
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-url-can-parse.md
|
|
7953
8022
|
*/
|
|
7954
8023
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
7955
8024
|
/**
|
|
7956
8025
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
7957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-url-href.md
|
|
7958
8027
|
*/
|
|
7959
8028
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
7960
8029
|
/**
|
|
7961
8030
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
7962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-url-search-parameters.md
|
|
7963
8032
|
*/
|
|
7964
8033
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
7965
8034
|
/**
|
|
7966
8035
|
* Prefer putting the condition in the while statement.
|
|
7967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-while-loop-condition.md
|
|
7968
8037
|
*/
|
|
7969
8038
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
7970
8039
|
/**
|
|
7971
8040
|
* Renamed to `unicorn/name-replacements`.
|
|
7972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8041
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
7973
8042
|
* @deprecated
|
|
7974
8043
|
*/
|
|
7975
8044
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
7976
8045
|
/**
|
|
7977
8046
|
* Enforce consistent relative URL style.
|
|
7978
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/relative-url-style.md
|
|
7979
8048
|
*/
|
|
7980
8049
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
7981
8050
|
/**
|
|
7982
8051
|
* Enforce using the separator argument with `Array#join()`.
|
|
7983
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-array-join-separator.md
|
|
7984
8053
|
*/
|
|
7985
8054
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
7986
8055
|
/**
|
|
7987
8056
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
7988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-array-sort-compare.md
|
|
7989
8058
|
*/
|
|
7990
8059
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
7991
8060
|
/**
|
|
7992
8061
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
7993
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-css-escape.md
|
|
7994
8063
|
*/
|
|
7995
8064
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
8065
|
+
/**
|
|
8066
|
+
* Require configured YAML frontmatter fields.
|
|
8067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-frontmatter-fields.md
|
|
8068
|
+
*/
|
|
8069
|
+
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
7996
8070
|
/**
|
|
7997
8071
|
* Require non-empty module attributes for imports and exports
|
|
7998
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8072
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-module-attributes.md
|
|
7999
8073
|
*/
|
|
8000
8074
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
8001
8075
|
/**
|
|
8002
8076
|
* Require non-empty specifier list in import and export statements.
|
|
8003
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-module-specifiers.md
|
|
8004
8078
|
*/
|
|
8005
8079
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
8006
8080
|
/**
|
|
8007
8081
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
8008
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
8009
8083
|
*/
|
|
8010
8084
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
8011
8085
|
/**
|
|
8012
8086
|
* Require passive event listeners for high-frequency events.
|
|
8013
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-passive-events.md
|
|
8014
8088
|
*/
|
|
8015
8089
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
8016
8090
|
/**
|
|
8017
8091
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
8018
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-post-message-target-origin.md
|
|
8019
8093
|
*/
|
|
8020
8094
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
8021
8095
|
/**
|
|
8022
8096
|
* Require boolean-returning Proxy traps to return booleans.
|
|
8023
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
8024
8098
|
*/
|
|
8025
8099
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8026
8100
|
/**
|
|
8027
8101
|
* Enforce better string content.
|
|
8028
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/string-content.md
|
|
8029
8103
|
*/
|
|
8030
8104
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
8031
8105
|
/**
|
|
8032
8106
|
* Enforce consistent brace style for `case` clauses.
|
|
8033
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/switch-case-braces.md
|
|
8034
8108
|
*/
|
|
8035
8109
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
8036
8110
|
/**
|
|
8037
8111
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
8038
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/switch-case-break-position.md
|
|
8039
8113
|
*/
|
|
8040
8114
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
8041
8115
|
/**
|
|
8042
8116
|
* Fix whitespace-insensitive template indentation.
|
|
8043
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8117
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/template-indent.md
|
|
8044
8118
|
*/
|
|
8045
8119
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
8046
8120
|
/**
|
|
8047
8121
|
* Enforce consistent case for text encoding identifiers.
|
|
8048
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/text-encoding-identifier-case.md
|
|
8049
8123
|
*/
|
|
8050
8124
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
8051
8125
|
/**
|
|
8052
8126
|
* Require `new` when creating an error.
|
|
8053
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/throw-new-error.md
|
|
8054
8128
|
*/
|
|
8055
8129
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
8056
8130
|
/**
|
|
8057
8131
|
* Limit the complexity of `try` blocks.
|
|
8058
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/try-complexity.md
|
|
8059
8133
|
*/
|
|
8060
8134
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
8061
8135
|
/**
|
|
@@ -11977,6 +12051,12 @@ type JsdocNoUndefinedTypes = [] | [{
|
|
|
11977
12051
|
disableReporting?: boolean;
|
|
11978
12052
|
markVariablesAsUsed?: boolean;
|
|
11979
12053
|
}];
|
|
12054
|
+
// ----- jsdoc/normalize-see-links -----
|
|
12055
|
+
type JsdocNormalizeSeeLinks = [] | [{
|
|
12056
|
+
canonicalForm?: ("pipe" | "prefix");
|
|
12057
|
+
enableFixer?: boolean;
|
|
12058
|
+
wrapBareUrls?: boolean;
|
|
12059
|
+
}];
|
|
11980
12060
|
// ----- jsdoc/prefer-import-tag -----
|
|
11981
12061
|
type JsdocPreferImportTag = [] | [{
|
|
11982
12062
|
enableFixer?: boolean;
|
|
@@ -18294,10 +18374,19 @@ type UnicornPreferAt = [] | [{
|
|
|
18294
18374
|
type UnicornPreferContinue = [] | [{
|
|
18295
18375
|
maximumStatements?: number;
|
|
18296
18376
|
}];
|
|
18377
|
+
// ----- unicorn/prefer-dom-node-html-methods -----
|
|
18378
|
+
type UnicornPreferDomNodeHtmlMethods = [] | [{
|
|
18379
|
+
checkGetHTML?: boolean;
|
|
18380
|
+
checkSetHTML?: boolean;
|
|
18381
|
+
}];
|
|
18297
18382
|
// ----- unicorn/prefer-early-return -----
|
|
18298
18383
|
type UnicornPreferEarlyReturn = [] | [{
|
|
18299
18384
|
maximumStatements?: number;
|
|
18300
18385
|
}];
|
|
18386
|
+
// ----- unicorn/prefer-explicit-viewport-units -----
|
|
18387
|
+
type UnicornPreferExplicitViewportUnits = [] | [{
|
|
18388
|
+
unit?: ("dvh" | "svh" | "lvh");
|
|
18389
|
+
}];
|
|
18301
18390
|
// ----- unicorn/prefer-export-from -----
|
|
18302
18391
|
type UnicornPreferExportFrom = [] | [{
|
|
18303
18392
|
checkUsedVariables?: boolean;
|
|
@@ -18308,7 +18397,7 @@ type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
|
18308
18397
|
}];
|
|
18309
18398
|
// ----- unicorn/prefer-minimal-ternary -----
|
|
18310
18399
|
type UnicornPreferMinimalTernary = [] | [{
|
|
18311
|
-
|
|
18400
|
+
checkVaryingBase?: boolean;
|
|
18312
18401
|
checkComputedMemberAccess?: boolean;
|
|
18313
18402
|
}];
|
|
18314
18403
|
// ----- unicorn/prefer-number-properties -----
|
|
@@ -18333,6 +18422,8 @@ type UnicornPreferQueueMicrotask = [] | [{
|
|
|
18333
18422
|
type UnicornPreferSetHas = [] | [{
|
|
18334
18423
|
minimumItems?: number;
|
|
18335
18424
|
}];
|
|
18425
|
+
// ----- unicorn/prefer-short-arrow-method -----
|
|
18426
|
+
type UnicornPreferShortArrowMethod = [] | [("always" | "consistent-as-needed")];
|
|
18336
18427
|
// ----- unicorn/prefer-single-call -----
|
|
18337
18428
|
type UnicornPreferSingleCall = [] | [{
|
|
18338
18429
|
ignore?: unknown[];
|
|
@@ -18364,6 +18455,10 @@ type UnicornRelativeUrlStyle = [] | [("never" | "always")];
|
|
|
18364
18455
|
type UnicornRequireCssEscape = [] | [{
|
|
18365
18456
|
checkAllSelectors?: boolean;
|
|
18366
18457
|
}];
|
|
18458
|
+
// ----- unicorn/require-frontmatter-fields -----
|
|
18459
|
+
type UnicornRequireFrontmatterFields = [] | [{
|
|
18460
|
+
fields?: string[];
|
|
18461
|
+
}];
|
|
18367
18462
|
// ----- unicorn/string-content -----
|
|
18368
18463
|
type UnicornStringContent = [] | [{
|
|
18369
18464
|
patterns?: {
|
|
@@ -19670,6 +19765,7 @@ type VueSortKeys = [] | [("asc" | "desc")] | [("asc" | "desc"), {
|
|
|
19670
19765
|
ignoreGrandchildrenOf?: unknown[];
|
|
19671
19766
|
minKeys?: number;
|
|
19672
19767
|
natural?: boolean;
|
|
19768
|
+
allowLineSeparatedGroups?: boolean;
|
|
19673
19769
|
}];
|
|
19674
19770
|
// ----- vue/space-in-parens -----
|
|
19675
19771
|
type VueSpaceInParens = [] | [("always" | "never")] | [("always" | "never"), {
|