@kitschpatrol/eslint-config 6.1.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +1 -1
- package/dist/index.d.ts +170 -146
- package/dist/index.js +1 -1
- package/package.json +10 -10
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
2
|
-
import { FlatGitignoreOptions } from "eslint-config-flat-gitignore";
|
|
3
2
|
import { Linter } from "eslint";
|
|
3
|
+
import { FlatGitignoreOptions } from "eslint-config-flat-gitignore";
|
|
4
4
|
|
|
5
5
|
//#region src/typegen.d.ts
|
|
6
6
|
interface RuleOptions {
|
|
@@ -6454,730 +6454,750 @@ interface RuleOptions {
|
|
|
6454
6454
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
6455
6455
|
/**
|
|
6456
6456
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
6457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/better-regex.md
|
|
6458
6458
|
*/
|
|
6459
6459
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
6460
6460
|
/**
|
|
6461
6461
|
* Enforce a specific parameter name in catch clauses.
|
|
6462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/catch-error-name.md
|
|
6463
6463
|
*/
|
|
6464
6464
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
6465
6465
|
/**
|
|
6466
6466
|
* Enforce consistent assertion style with `node:assert`.
|
|
6467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-assert.md
|
|
6468
6468
|
*/
|
|
6469
6469
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6470
6470
|
/**
|
|
6471
6471
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-date-clone.md
|
|
6473
6473
|
*/
|
|
6474
6474
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6475
6475
|
/**
|
|
6476
6476
|
* Use destructured variables over properties.
|
|
6477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-destructuring.md
|
|
6478
6478
|
*/
|
|
6479
6479
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6480
6480
|
/**
|
|
6481
6481
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-empty-array-spread.md
|
|
6483
6483
|
*/
|
|
6484
6484
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6485
6485
|
/**
|
|
6486
6486
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-existence-index-check.md
|
|
6488
6488
|
*/
|
|
6489
6489
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6490
6490
|
/**
|
|
6491
6491
|
* Move function definitions to the highest possible scope.
|
|
6492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-function-scoping.md
|
|
6493
6493
|
*/
|
|
6494
6494
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6495
|
+
/**
|
|
6496
|
+
* Enforce consistent style for escaping `${` in template literals.
|
|
6497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-template-literal-escape.md
|
|
6498
|
+
*/
|
|
6499
|
+
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
6495
6500
|
/**
|
|
6496
6501
|
* Enforce correct `Error` subclassing.
|
|
6497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/custom-error-definition.md
|
|
6498
6503
|
*/
|
|
6499
6504
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6500
6505
|
/**
|
|
6501
6506
|
* Enforce no spaces between braces.
|
|
6502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/empty-brace-spaces.md
|
|
6503
6508
|
*/
|
|
6504
6509
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6505
6510
|
/**
|
|
6506
6511
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/error-message.md
|
|
6508
6513
|
*/
|
|
6509
6514
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6510
6515
|
/**
|
|
6511
6516
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/escape-case.md
|
|
6513
6518
|
*/
|
|
6514
6519
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
6515
6520
|
/**
|
|
6516
6521
|
* Add expiration conditions to TODO comments.
|
|
6517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/expiring-todo-comments.md
|
|
6518
6523
|
*/
|
|
6519
6524
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
6520
6525
|
/**
|
|
6521
6526
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/explicit-length-check.md
|
|
6523
6528
|
*/
|
|
6524
6529
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
6525
6530
|
/**
|
|
6526
6531
|
* Enforce a case style for filenames.
|
|
6527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/filename-case.md
|
|
6528
6533
|
*/
|
|
6529
6534
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
6530
6535
|
/**
|
|
6531
6536
|
* Enforce specific import styles per module.
|
|
6532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/import-style.md
|
|
6533
6538
|
*/
|
|
6534
6539
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
6535
6540
|
/**
|
|
6536
6541
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
6537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/isolated-functions.md
|
|
6538
6543
|
*/
|
|
6539
6544
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
6540
6545
|
/**
|
|
6541
6546
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
6542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/new-for-builtins.md
|
|
6543
6548
|
*/
|
|
6544
6549
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
6545
6550
|
/**
|
|
6546
6551
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
6548
6553
|
*/
|
|
6549
6554
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
6550
6555
|
/**
|
|
6551
6556
|
* Disallow recursive access to `this` within getters and setters.
|
|
6552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-accessor-recursion.md
|
|
6553
6558
|
*/
|
|
6554
6559
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6555
6560
|
/**
|
|
6556
6561
|
* Disallow anonymous functions and classes as the default export.
|
|
6557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-anonymous-default-export.md
|
|
6558
6563
|
*/
|
|
6559
6564
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
6560
6565
|
/**
|
|
6561
6566
|
* Prevent passing a function reference directly to iterator methods.
|
|
6562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-callback-reference.md
|
|
6563
6568
|
*/
|
|
6564
6569
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
6565
6570
|
/**
|
|
6566
6571
|
* Prefer `for…of` over the `forEach` method.
|
|
6567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-for-each.md
|
|
6568
6573
|
*/
|
|
6569
6574
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
6570
6575
|
/**
|
|
6571
6576
|
* Disallow using the `this` argument in array methods.
|
|
6572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-method-this-argument.md
|
|
6573
6578
|
*/
|
|
6574
6579
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
6575
6580
|
/**
|
|
6576
6581
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
6578
6583
|
* @deprecated
|
|
6579
6584
|
*/
|
|
6580
6585
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
6581
6586
|
/**
|
|
6582
6587
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6583
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-reduce.md
|
|
6584
6589
|
*/
|
|
6585
6590
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
6586
6591
|
/**
|
|
6587
6592
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-reverse.md
|
|
6589
6594
|
*/
|
|
6590
6595
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
6591
6596
|
/**
|
|
6592
6597
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-sort.md
|
|
6594
6599
|
*/
|
|
6595
6600
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
6596
6601
|
/**
|
|
6597
6602
|
* Disallow member access from await expression.
|
|
6598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-await-expression-member.md
|
|
6599
6604
|
*/
|
|
6600
6605
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
6601
6606
|
/**
|
|
6602
6607
|
* Disallow using `await` in `Promise` method parameters.
|
|
6603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-await-in-promise-methods.md
|
|
6604
6609
|
*/
|
|
6605
6610
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6606
6611
|
/**
|
|
6607
6612
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6608
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-console-spaces.md
|
|
6609
6614
|
*/
|
|
6610
6615
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6611
6616
|
/**
|
|
6612
6617
|
* Do not use `document.cookie` directly.
|
|
6613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-document-cookie.md
|
|
6614
6619
|
*/
|
|
6615
6620
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6616
6621
|
/**
|
|
6617
6622
|
* Disallow empty files.
|
|
6618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-empty-file.md
|
|
6619
6624
|
*/
|
|
6620
6625
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
6621
6626
|
/**
|
|
6622
6627
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-for-loop.md
|
|
6624
6629
|
*/
|
|
6625
6630
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
6626
6631
|
/**
|
|
6627
6632
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
6628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-hex-escape.md
|
|
6629
6634
|
*/
|
|
6630
6635
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
6631
6636
|
/**
|
|
6632
6637
|
* Disallow immediate mutation after variable assignment.
|
|
6633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-immediate-mutation.md
|
|
6634
6639
|
*/
|
|
6635
6640
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
6636
6641
|
/**
|
|
6637
6642
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
6639
6644
|
* @deprecated
|
|
6640
6645
|
*/
|
|
6641
6646
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
6642
6647
|
/**
|
|
6643
6648
|
* Disallow `instanceof` with built-in objects
|
|
6644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-instanceof-builtins.md
|
|
6645
6650
|
*/
|
|
6646
6651
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
6647
6652
|
/**
|
|
6648
6653
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-invalid-fetch-options.md
|
|
6650
6655
|
*/
|
|
6651
6656
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6652
6657
|
/**
|
|
6653
6658
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
6655
6660
|
*/
|
|
6656
6661
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
6657
6662
|
/**
|
|
6658
6663
|
* Disallow identifiers starting with `new` or `class`.
|
|
6659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-keyword-prefix.md
|
|
6660
6665
|
*/
|
|
6661
6666
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
6662
6667
|
/**
|
|
6663
6668
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
6665
6670
|
* @deprecated
|
|
6666
6671
|
*/
|
|
6667
6672
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
6668
6673
|
/**
|
|
6669
6674
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6670
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-lonely-if.md
|
|
6671
6676
|
*/
|
|
6672
6677
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
6673
6678
|
/**
|
|
6674
6679
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6675
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
6676
6681
|
*/
|
|
6677
6682
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6678
6683
|
/**
|
|
6679
6684
|
* Disallow named usage of default import and export.
|
|
6680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-named-default.md
|
|
6681
6686
|
*/
|
|
6682
6687
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
6683
6688
|
/**
|
|
6684
6689
|
* Disallow negated conditions.
|
|
6685
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-negated-condition.md
|
|
6686
6691
|
*/
|
|
6687
6692
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
6688
6693
|
/**
|
|
6689
6694
|
* Disallow negated expression in equality check.
|
|
6690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-negation-in-equality-check.md
|
|
6691
6696
|
*/
|
|
6692
6697
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
6693
6698
|
/**
|
|
6694
6699
|
* Disallow nested ternary expressions.
|
|
6695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-nested-ternary.md
|
|
6696
6701
|
*/
|
|
6697
6702
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6698
6703
|
/**
|
|
6699
6704
|
* Disallow `new Array()`.
|
|
6700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-new-array.md
|
|
6701
6706
|
*/
|
|
6702
6707
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
6703
6708
|
/**
|
|
6704
6709
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-new-buffer.md
|
|
6706
6711
|
*/
|
|
6707
6712
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
6708
6713
|
/**
|
|
6709
6714
|
* Disallow the use of the `null` literal.
|
|
6710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-null.md
|
|
6711
6716
|
*/
|
|
6712
6717
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
6713
6718
|
/**
|
|
6714
6719
|
* Disallow the use of objects as default parameters.
|
|
6715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-object-as-default-parameter.md
|
|
6716
6721
|
*/
|
|
6717
6722
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
6718
6723
|
/**
|
|
6719
6724
|
* Disallow `process.exit()`.
|
|
6720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-process-exit.md
|
|
6721
6726
|
*/
|
|
6722
6727
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
6723
6728
|
/**
|
|
6724
6729
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
6726
6731
|
*/
|
|
6727
6732
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6728
6733
|
/**
|
|
6729
6734
|
* Disallow classes that only have static members.
|
|
6730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-static-only-class.md
|
|
6731
6736
|
*/
|
|
6732
6737
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
6733
6738
|
/**
|
|
6734
6739
|
* Disallow `then` property.
|
|
6735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-thenable.md
|
|
6736
6741
|
*/
|
|
6737
6742
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
6738
6743
|
/**
|
|
6739
6744
|
* Disallow assigning `this` to a variable.
|
|
6740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-this-assignment.md
|
|
6741
6746
|
*/
|
|
6742
6747
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
6743
6748
|
/**
|
|
6744
6749
|
* Disallow comparing `undefined` using `typeof`.
|
|
6745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-typeof-undefined.md
|
|
6746
6751
|
*/
|
|
6747
6752
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
6748
6753
|
/**
|
|
6749
6754
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6751
6756
|
*/
|
|
6752
6757
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6753
6758
|
/**
|
|
6754
6759
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
6756
6761
|
*/
|
|
6757
6762
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
6758
6763
|
/**
|
|
6759
6764
|
* Disallow awaiting non-promise values.
|
|
6760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-await.md
|
|
6761
6766
|
*/
|
|
6762
6767
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
6763
6768
|
/**
|
|
6764
6769
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
6766
6771
|
*/
|
|
6767
6772
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
6768
6773
|
/**
|
|
6769
6774
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
6771
6776
|
*/
|
|
6772
6777
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
6773
6778
|
/**
|
|
6774
6779
|
* Disallow unreadable array destructuring.
|
|
6775
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
6776
6781
|
*/
|
|
6777
6782
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
6778
6783
|
/**
|
|
6779
6784
|
* Disallow unreadable IIFEs.
|
|
6780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unreadable-iife.md
|
|
6781
6786
|
*/
|
|
6782
6787
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
6783
6788
|
/**
|
|
6784
6789
|
* Disallow unused object properties.
|
|
6785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unused-properties.md
|
|
6786
6791
|
*/
|
|
6787
6792
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
6788
6793
|
/**
|
|
6789
6794
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
6790
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-collection-argument.md
|
|
6791
6796
|
*/
|
|
6792
6797
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
6793
6798
|
/**
|
|
6794
6799
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
6795
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
6796
6801
|
*/
|
|
6797
6802
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
6798
6803
|
/**
|
|
6799
6804
|
* Disallow useless fallback when spreading in object literals.
|
|
6800
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
6801
6806
|
*/
|
|
6802
6807
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
6808
|
+
/**
|
|
6809
|
+
* Disallow unnecessary `.toArray()` on iterators.
|
|
6810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
6811
|
+
*/
|
|
6812
|
+
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
6803
6813
|
/**
|
|
6804
6814
|
* Disallow useless array length check.
|
|
6805
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-length-check.md
|
|
6806
6816
|
*/
|
|
6807
6817
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
6808
6818
|
/**
|
|
6809
6819
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
6810
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
6811
6821
|
*/
|
|
6812
6822
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
6813
6823
|
/**
|
|
6814
6824
|
* Disallow unnecessary spread.
|
|
6815
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-spread.md
|
|
6816
6826
|
*/
|
|
6817
6827
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
6818
6828
|
/**
|
|
6819
6829
|
* Disallow useless case in switch statements.
|
|
6820
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-switch-case.md
|
|
6821
6831
|
*/
|
|
6822
6832
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
6823
6833
|
/**
|
|
6824
6834
|
* Disallow useless `undefined`.
|
|
6825
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-undefined.md
|
|
6826
6836
|
*/
|
|
6827
6837
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
6828
6838
|
/**
|
|
6829
6839
|
* Disallow number literals with zero fractions or dangling dots.
|
|
6830
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-zero-fractions.md
|
|
6831
6841
|
*/
|
|
6832
6842
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
6833
6843
|
/**
|
|
6834
6844
|
* Enforce proper case for numeric literals.
|
|
6835
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/number-literal-case.md
|
|
6836
6846
|
*/
|
|
6837
6847
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
6838
6848
|
/**
|
|
6839
6849
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
6840
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/numeric-separators-style.md
|
|
6841
6851
|
*/
|
|
6842
6852
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
6843
6853
|
/**
|
|
6844
6854
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
6845
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-add-event-listener.md
|
|
6846
6856
|
*/
|
|
6847
6857
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
6848
6858
|
/**
|
|
6849
6859
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
6850
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-find.md
|
|
6851
6861
|
*/
|
|
6852
6862
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
6853
6863
|
/**
|
|
6854
6864
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
6855
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-flat.md
|
|
6856
6866
|
*/
|
|
6857
6867
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
6858
6868
|
/**
|
|
6859
6869
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
6860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-flat-map.md
|
|
6861
6871
|
*/
|
|
6862
6872
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
6863
6873
|
/**
|
|
6864
6874
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
6865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-index-of.md
|
|
6866
6876
|
*/
|
|
6867
6877
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
6868
6878
|
/**
|
|
6869
6879
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
6870
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-some.md
|
|
6871
6881
|
*/
|
|
6872
6882
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
6873
6883
|
/**
|
|
6874
6884
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
6875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-at.md
|
|
6876
6886
|
*/
|
|
6877
6887
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
6878
6888
|
/**
|
|
6879
6889
|
* Prefer `BigInt` literals over the constructor.
|
|
6880
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-bigint-literals.md
|
|
6881
6891
|
*/
|
|
6882
6892
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
6883
6893
|
/**
|
|
6884
6894
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
6885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
6886
6896
|
*/
|
|
6887
6897
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
6888
6898
|
/**
|
|
6889
6899
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
6890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-class-fields.md
|
|
6891
6901
|
*/
|
|
6892
6902
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
6893
6903
|
/**
|
|
6894
6904
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
6895
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-classlist-toggle.md
|
|
6896
6906
|
*/
|
|
6897
6907
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
6898
6908
|
/**
|
|
6899
6909
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
6900
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-code-point.md
|
|
6901
6911
|
*/
|
|
6902
6912
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
6903
6913
|
/**
|
|
6904
6914
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
6905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6915
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-date-now.md
|
|
6906
6916
|
*/
|
|
6907
6917
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
6908
6918
|
/**
|
|
6909
6919
|
* Prefer default parameters over reassignment.
|
|
6910
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6920
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-default-parameters.md
|
|
6911
6921
|
*/
|
|
6912
6922
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
6913
6923
|
/**
|
|
6914
6924
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
6915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-append.md
|
|
6916
6926
|
*/
|
|
6917
6927
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
6918
6928
|
/**
|
|
6919
6929
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
6920
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6930
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
6921
6931
|
*/
|
|
6922
6932
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
6923
6933
|
/**
|
|
6924
6934
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
6925
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-remove.md
|
|
6926
6936
|
*/
|
|
6927
6937
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
6928
6938
|
/**
|
|
6929
6939
|
* Prefer `.textContent` over `.innerText`.
|
|
6930
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
6931
6941
|
*/
|
|
6932
6942
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
6933
6943
|
/**
|
|
6934
6944
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
6935
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-event-target.md
|
|
6936
6946
|
*/
|
|
6937
6947
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
6938
6948
|
/**
|
|
6939
6949
|
* Prefer `export…from` when re-exporting.
|
|
6940
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-export-from.md
|
|
6941
6951
|
*/
|
|
6942
6952
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
6943
6953
|
/**
|
|
6944
6954
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
6945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-global-this.md
|
|
6946
6956
|
*/
|
|
6947
6957
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
6948
6958
|
/**
|
|
6949
6959
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
6950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-import-meta-properties.md
|
|
6951
6961
|
*/
|
|
6952
6962
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
6953
6963
|
/**
|
|
6954
6964
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
6955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-includes.md
|
|
6956
6966
|
*/
|
|
6957
6967
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
6958
6968
|
/**
|
|
6959
6969
|
* Prefer reading a JSON file as a buffer.
|
|
6960
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
6961
6971
|
*/
|
|
6962
6972
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
6963
6973
|
/**
|
|
6964
6974
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
6965
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
6966
6976
|
*/
|
|
6967
6977
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
6968
6978
|
/**
|
|
6969
6979
|
* Prefer using a logical operator over a ternary.
|
|
6970
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
6971
6981
|
*/
|
|
6972
6982
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
6973
6983
|
/**
|
|
6974
6984
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
6975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6985
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-math-min-max.md
|
|
6976
6986
|
*/
|
|
6977
6987
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
6978
6988
|
/**
|
|
6979
6989
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
6980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6990
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-math-trunc.md
|
|
6981
6991
|
*/
|
|
6982
6992
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
6983
6993
|
/**
|
|
6984
6994
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
6985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
6986
6996
|
*/
|
|
6987
6997
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
6988
6998
|
/**
|
|
6989
6999
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
6990
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7000
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-modern-math-apis.md
|
|
6991
7001
|
*/
|
|
6992
7002
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
6993
7003
|
/**
|
|
6994
7004
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
6995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7005
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-module.md
|
|
6996
7006
|
*/
|
|
6997
7007
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
6998
7008
|
/**
|
|
6999
7009
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
7000
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7010
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
7001
7011
|
*/
|
|
7002
7012
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
7003
7013
|
/**
|
|
7004
7014
|
* Prefer negative index over `.length - index` when possible.
|
|
7005
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7015
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-negative-index.md
|
|
7006
7016
|
*/
|
|
7007
7017
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
7008
7018
|
/**
|
|
7009
7019
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
7010
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7020
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-node-protocol.md
|
|
7011
7021
|
*/
|
|
7012
7022
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
7013
7023
|
/**
|
|
7014
7024
|
* Prefer `Number` static properties over global ones.
|
|
7015
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7025
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-number-properties.md
|
|
7016
7026
|
*/
|
|
7017
7027
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
7018
7028
|
/**
|
|
7019
7029
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
7020
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7030
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-object-from-entries.md
|
|
7021
7031
|
*/
|
|
7022
7032
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
7023
7033
|
/**
|
|
7024
7034
|
* Prefer omitting the `catch` binding parameter.
|
|
7025
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7035
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
7026
7036
|
*/
|
|
7027
7037
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
7028
7038
|
/**
|
|
7029
7039
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
7030
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7040
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-prototype-methods.md
|
|
7031
7041
|
*/
|
|
7032
7042
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
7033
7043
|
/**
|
|
7034
7044
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
7035
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7045
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-query-selector.md
|
|
7036
7046
|
*/
|
|
7037
7047
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
7038
7048
|
/**
|
|
7039
7049
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
7040
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7050
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-reflect-apply.md
|
|
7041
7051
|
*/
|
|
7042
7052
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
7043
7053
|
/**
|
|
7044
7054
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
7045
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-regexp-test.md
|
|
7046
7056
|
*/
|
|
7047
7057
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
7048
7058
|
/**
|
|
7049
7059
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
7050
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7060
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-response-static-json.md
|
|
7051
7061
|
*/
|
|
7052
7062
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
7053
7063
|
/**
|
|
7054
7064
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
7055
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7065
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-set-has.md
|
|
7056
7066
|
*/
|
|
7057
7067
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
7058
7068
|
/**
|
|
7059
7069
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
7060
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7070
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-set-size.md
|
|
7061
7071
|
*/
|
|
7062
7072
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
7073
|
+
/**
|
|
7074
|
+
* Prefer simple conditions first in logical expressions.
|
|
7075
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-simple-condition-first.md
|
|
7076
|
+
*/
|
|
7077
|
+
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
7063
7078
|
/**
|
|
7064
7079
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
7065
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7080
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-single-call.md
|
|
7066
7081
|
*/
|
|
7067
7082
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
7068
7083
|
/**
|
|
7069
7084
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
7070
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7085
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-spread.md
|
|
7071
7086
|
*/
|
|
7072
7087
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
7073
7088
|
/**
|
|
7074
7089
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
7075
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7090
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-raw.md
|
|
7076
7091
|
*/
|
|
7077
7092
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
7078
7093
|
/**
|
|
7079
7094
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
7080
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7095
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-replace-all.md
|
|
7081
7096
|
*/
|
|
7082
7097
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
7083
7098
|
/**
|
|
7084
7099
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
7085
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7100
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-slice.md
|
|
7086
7101
|
*/
|
|
7087
7102
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
7088
7103
|
/**
|
|
7089
7104
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
7090
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7105
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
7091
7106
|
*/
|
|
7092
7107
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
7093
7108
|
/**
|
|
7094
7109
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
7095
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7110
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
7096
7111
|
*/
|
|
7097
7112
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
7098
7113
|
/**
|
|
7099
7114
|
* Prefer using `structuredClone` to create a deep clone.
|
|
7100
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7115
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-structured-clone.md
|
|
7101
7116
|
*/
|
|
7102
7117
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
7103
7118
|
/**
|
|
7104
7119
|
* Prefer `switch` over multiple `else-if`.
|
|
7105
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7120
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-switch.md
|
|
7106
7121
|
*/
|
|
7107
7122
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
7108
7123
|
/**
|
|
7109
7124
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
7110
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-ternary.md
|
|
7111
7126
|
*/
|
|
7112
7127
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
7113
7128
|
/**
|
|
7114
7129
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7115
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-top-level-await.md
|
|
7116
7131
|
*/
|
|
7117
7132
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
7118
7133
|
/**
|
|
7119
7134
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7120
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7135
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-type-error.md
|
|
7121
7136
|
*/
|
|
7122
7137
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
7123
7138
|
/**
|
|
7124
7139
|
* Prevent abbreviations.
|
|
7125
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7140
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prevent-abbreviations.md
|
|
7126
7141
|
*/
|
|
7127
7142
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
7128
7143
|
/**
|
|
7129
7144
|
* Enforce consistent relative URL style.
|
|
7130
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7145
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/relative-url-style.md
|
|
7131
7146
|
*/
|
|
7132
7147
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
7133
7148
|
/**
|
|
7134
7149
|
* Enforce using the separator argument with `Array#join()`.
|
|
7135
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7150
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-array-join-separator.md
|
|
7136
7151
|
*/
|
|
7137
7152
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
7138
7153
|
/**
|
|
7139
7154
|
* Require non-empty module attributes for imports and exports
|
|
7140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7155
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-module-attributes.md
|
|
7141
7156
|
*/
|
|
7142
7157
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
7143
7158
|
/**
|
|
7144
7159
|
* Require non-empty specifier list in import and export statements.
|
|
7145
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7160
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-module-specifiers.md
|
|
7146
7161
|
*/
|
|
7147
7162
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
7148
7163
|
/**
|
|
7149
7164
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7150
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7151
7166
|
*/
|
|
7152
7167
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
7153
7168
|
/**
|
|
7154
7169
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7155
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-post-message-target-origin.md
|
|
7156
7171
|
*/
|
|
7157
7172
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
7158
7173
|
/**
|
|
7159
7174
|
* Enforce better string content.
|
|
7160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/string-content.md
|
|
7161
7176
|
*/
|
|
7162
7177
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
7163
7178
|
/**
|
|
7164
7179
|
* Enforce consistent brace style for `case` clauses.
|
|
7165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/switch-case-braces.md
|
|
7166
7181
|
*/
|
|
7167
7182
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
7183
|
+
/**
|
|
7184
|
+
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
7185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/switch-case-break-position.md
|
|
7186
|
+
*/
|
|
7187
|
+
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
7168
7188
|
/**
|
|
7169
7189
|
* Fix whitespace-insensitive template indentation.
|
|
7170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/template-indent.md
|
|
7171
7191
|
*/
|
|
7172
7192
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
7173
7193
|
/**
|
|
7174
7194
|
* Enforce consistent case for text encoding identifiers.
|
|
7175
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7195
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/text-encoding-identifier-case.md
|
|
7176
7196
|
*/
|
|
7177
7197
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
7178
7198
|
/**
|
|
7179
7199
|
* Require `new` when creating an error.
|
|
7180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7200
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/throw-new-error.md
|
|
7181
7201
|
*/
|
|
7182
7202
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
7183
7203
|
/**
|
|
@@ -14335,6 +14355,7 @@ type UnicornEscapeCase = [] | ['uppercase' | 'lowercase']; // ----- unicorn/expi
|
|
|
14335
14355
|
type UnicornExpiringTodoComments = [] | [{
|
|
14336
14356
|
terms?: string[];
|
|
14337
14357
|
ignore?: unknown[];
|
|
14358
|
+
ignoreDates?: boolean;
|
|
14338
14359
|
ignoreDatesOnPullRequests?: boolean;
|
|
14339
14360
|
allowWarningComments?: boolean;
|
|
14340
14361
|
date?: string;
|
|
@@ -14491,6 +14512,9 @@ type _UnicornPreventAbbreviationsReplacements = (false | _UnicornPreventAbbrevia
|
|
|
14491
14512
|
interface _UnicornPreventAbbreviations_Abbreviations {
|
|
14492
14513
|
[k: string]: _UnicornPreventAbbreviationsReplacements | undefined;
|
|
14493
14514
|
}
|
|
14515
|
+
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
14516
|
+
[k: string]: boolean | undefined;
|
|
14517
|
+
}
|
|
14494
14518
|
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
14495
14519
|
[k: string]: boolean | undefined;
|
|
14496
14520
|
} // ----- unicorn/relative-url-style -----
|