@ntnyq/eslint-config 7.0.0-beta.5 → 7.0.0-beta.6
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 +366 -265
- package/dist/index.mjs +11 -0
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -6388,1294 +6388,1369 @@ interface RuleOptions {
|
|
|
6388
6388
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
6389
6389
|
/**
|
|
6390
6390
|
* Prefer better DOM traversal APIs.
|
|
6391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/better-dom-traversing.md
|
|
6392
6392
|
*/
|
|
6393
6393
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
6394
6394
|
/**
|
|
6395
6395
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
6396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
6397
6397
|
* @deprecated
|
|
6398
6398
|
*/
|
|
6399
6399
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
6400
6400
|
/**
|
|
6401
6401
|
* Enforce a specific parameter name in catch clauses.
|
|
6402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/catch-error-name.md
|
|
6403
6403
|
*/
|
|
6404
6404
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
6405
6405
|
/**
|
|
6406
6406
|
* Enforce consistent class references in static methods.
|
|
6407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/class-reference-in-static-methods.md
|
|
6408
6408
|
*/
|
|
6409
6409
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
6410
6410
|
/**
|
|
6411
6411
|
* Enforce better comment content.
|
|
6412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/comment-content.md
|
|
6413
6413
|
*/
|
|
6414
6414
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
6415
6415
|
/**
|
|
6416
6416
|
* Enforce consistent assertion style with `node:assert`.
|
|
6417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/consistent-assert.md
|
|
6418
6418
|
*/
|
|
6419
6419
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6420
|
+
/**
|
|
6421
|
+
* Enforce consistent naming for boolean names.
|
|
6422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/consistent-boolean-name.md
|
|
6423
|
+
*/
|
|
6424
|
+
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
6420
6425
|
/**
|
|
6421
6426
|
* Enforce consistent class member order.
|
|
6422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/consistent-class-member-order.md
|
|
6423
6428
|
*/
|
|
6424
6429
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
6425
6430
|
/**
|
|
6426
6431
|
* Enforce consistent spelling of compound words in identifiers.
|
|
6427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/consistent-compound-words.md
|
|
6428
6433
|
*/
|
|
6429
6434
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
6430
6435
|
/**
|
|
6431
6436
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/consistent-date-clone.md
|
|
6433
6438
|
*/
|
|
6434
6439
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6435
6440
|
/**
|
|
6436
6441
|
* Use destructured variables over properties.
|
|
6437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/consistent-destructuring.md
|
|
6438
6443
|
*/
|
|
6439
6444
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6440
6445
|
/**
|
|
6441
6446
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/consistent-empty-array-spread.md
|
|
6443
6448
|
*/
|
|
6444
6449
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6445
6450
|
/**
|
|
6446
6451
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/consistent-existence-index-check.md
|
|
6448
6453
|
*/
|
|
6449
6454
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6450
6455
|
/**
|
|
6451
6456
|
* Enforce consistent decorator position on exported classes.
|
|
6452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/consistent-export-decorator-position.md
|
|
6453
6458
|
*/
|
|
6454
6459
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
6455
6460
|
/**
|
|
6456
6461
|
* Move function definitions to the highest possible scope.
|
|
6457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/consistent-function-scoping.md
|
|
6458
6463
|
*/
|
|
6459
6464
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6460
6465
|
/**
|
|
6461
6466
|
* Enforce function syntax by role.
|
|
6462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/consistent-function-style.md
|
|
6463
6468
|
*/
|
|
6464
6469
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
6465
6470
|
/**
|
|
6466
6471
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
6467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/consistent-json-file-read.md
|
|
6468
6473
|
*/
|
|
6469
6474
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
6470
6475
|
/**
|
|
6471
6476
|
* Enforce consistent optional chaining for same-base member access.
|
|
6472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/consistent-optional-chaining.md
|
|
6473
6478
|
*/
|
|
6474
6479
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
6475
6480
|
/**
|
|
6476
6481
|
* Enforce consistent style for escaping `${` in template literals.
|
|
6477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/consistent-template-literal-escape.md
|
|
6478
6483
|
*/
|
|
6479
6484
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
6480
6485
|
/**
|
|
6481
6486
|
* Enforce correct `Error` subclassing.
|
|
6482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/custom-error-definition.md
|
|
6483
6488
|
*/
|
|
6484
6489
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6485
6490
|
/**
|
|
6486
6491
|
* Enforce consistent style for DOM element dataset access.
|
|
6487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/dom-node-dataset.md
|
|
6488
6493
|
*/
|
|
6489
6494
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
6490
6495
|
/**
|
|
6491
6496
|
* Enforce no spaces between braces.
|
|
6492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/empty-brace-spaces.md
|
|
6493
6498
|
*/
|
|
6494
6499
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6495
6500
|
/**
|
|
6496
6501
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/error-message.md
|
|
6498
6503
|
*/
|
|
6499
6504
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6500
6505
|
/**
|
|
6501
6506
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/escape-case.md
|
|
6503
6508
|
*/
|
|
6504
6509
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
6505
6510
|
/**
|
|
6506
6511
|
* Add expiration conditions to TODO comments.
|
|
6507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/expiring-todo-comments.md
|
|
6508
6513
|
*/
|
|
6509
6514
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
6510
6515
|
/**
|
|
6511
6516
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/explicit-length-check.md
|
|
6513
6518
|
*/
|
|
6514
6519
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
6515
6520
|
/**
|
|
6516
6521
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
6517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/explicit-timer-delay.md
|
|
6518
6523
|
*/
|
|
6519
6524
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
6520
6525
|
/**
|
|
6521
6526
|
* Enforce a case style for filenames and directory names.
|
|
6522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/filename-case.md
|
|
6523
6528
|
*/
|
|
6524
6529
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
6525
6530
|
/**
|
|
6526
6531
|
* Require identifiers to match a specified regular expression.
|
|
6527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/id-match.md
|
|
6528
6533
|
*/
|
|
6529
6534
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
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/v67.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/v67.0.0/docs/rules/isolated-functions.md
|
|
6538
6543
|
*/
|
|
6539
6544
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
6545
|
+
/**
|
|
6546
|
+
* Require or disallow logical assignment operator shorthand
|
|
6547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/logical-assignment-operators.md
|
|
6548
|
+
*/
|
|
6549
|
+
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
6540
6550
|
/**
|
|
6541
6551
|
* Limit the depth of nested calls.
|
|
6542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/max-nested-calls.md
|
|
6543
6553
|
*/
|
|
6544
6554
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
6545
6555
|
/**
|
|
6546
6556
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
6547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/new-for-builtins.md
|
|
6548
6558
|
*/
|
|
6549
6559
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
6550
6560
|
/**
|
|
6551
6561
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
6553
6563
|
*/
|
|
6554
6564
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
6555
6565
|
/**
|
|
6556
6566
|
* Disallow recursive access to `this` within getters and setters.
|
|
6557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-accessor-recursion.md
|
|
6558
6568
|
*/
|
|
6559
6569
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6560
6570
|
/**
|
|
6561
6571
|
* Disallow anonymous functions and classes as the default export.
|
|
6562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-anonymous-default-export.md
|
|
6563
6573
|
*/
|
|
6564
6574
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
6565
6575
|
/**
|
|
6566
6576
|
* Prevent passing a function reference directly to iterator methods.
|
|
6567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-array-callback-reference.md
|
|
6568
6578
|
*/
|
|
6569
6579
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
6570
6580
|
/**
|
|
6571
6581
|
* Disallow using reference values as `Array#fill()` values.
|
|
6572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
6573
6583
|
*/
|
|
6574
6584
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
6575
6585
|
/**
|
|
6576
6586
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
6577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-array-from-fill.md
|
|
6578
6588
|
*/
|
|
6579
6589
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
6580
6590
|
/**
|
|
6581
6591
|
* Disallow using the `this` argument in array methods.
|
|
6582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-array-method-this-argument.md
|
|
6583
6593
|
*/
|
|
6584
6594
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
6585
6595
|
/**
|
|
6586
6596
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
6588
6598
|
* @deprecated
|
|
6589
6599
|
*/
|
|
6590
6600
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
6591
6601
|
/**
|
|
6592
6602
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-array-reduce.md
|
|
6594
6604
|
*/
|
|
6595
6605
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
6596
6606
|
/**
|
|
6597
6607
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-array-reverse.md
|
|
6599
6609
|
*/
|
|
6600
6610
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
6601
6611
|
/**
|
|
6602
6612
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-array-sort.md
|
|
6604
6614
|
*/
|
|
6605
6615
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
6616
|
+
/**
|
|
6617
|
+
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
6618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-array-splice.md
|
|
6619
|
+
*/
|
|
6620
|
+
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
6606
6621
|
/**
|
|
6607
6622
|
* Disallow asterisk prefixes in documentation comments.
|
|
6608
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
6609
6624
|
*/
|
|
6610
6625
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
6611
6626
|
/**
|
|
6612
6627
|
* Disallow member access from await expression.
|
|
6613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-await-expression-member.md
|
|
6614
6629
|
*/
|
|
6615
6630
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
6616
6631
|
/**
|
|
6617
6632
|
* Disallow using `await` in `Promise` method parameters.
|
|
6618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-await-in-promise-methods.md
|
|
6619
6634
|
*/
|
|
6620
6635
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6621
6636
|
/**
|
|
6622
6637
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
6623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-blob-to-file.md
|
|
6624
6639
|
*/
|
|
6625
6640
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
6626
6641
|
/**
|
|
6627
6642
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
6628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-break-in-nested-loop.md
|
|
6629
6644
|
*/
|
|
6630
6645
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
6631
6646
|
/**
|
|
6632
6647
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
6633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-canvas-to-image.md
|
|
6634
6649
|
*/
|
|
6635
6650
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
6636
6651
|
/**
|
|
6637
6652
|
* Disallow dynamic object property existence checks.
|
|
6638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-computed-property-existence-check.md
|
|
6639
6654
|
*/
|
|
6640
6655
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
6641
6656
|
/**
|
|
6642
6657
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
6643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-confusing-array-splice.md
|
|
6644
6659
|
*/
|
|
6645
6660
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
6646
6661
|
/**
|
|
6647
6662
|
* Disallow confusing uses of `Array#with()`.
|
|
6648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-confusing-array-with.md
|
|
6649
6664
|
*/
|
|
6650
6665
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
6651
6666
|
/**
|
|
6652
6667
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-console-spaces.md
|
|
6654
6669
|
*/
|
|
6655
6670
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6656
6671
|
/**
|
|
6657
6672
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
6658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
6659
6674
|
*/
|
|
6660
6675
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
6661
6676
|
/**
|
|
6662
6677
|
* Do not use `document.cookie` directly.
|
|
6663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-document-cookie.md
|
|
6664
6679
|
*/
|
|
6665
6680
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6666
6681
|
/**
|
|
6667
6682
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
6668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-duplicate-loops.md
|
|
6669
6684
|
*/
|
|
6670
6685
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
6671
6686
|
/**
|
|
6672
6687
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
6673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-duplicate-set-values.md
|
|
6674
6689
|
*/
|
|
6675
6690
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
6676
6691
|
/**
|
|
6677
6692
|
* Disallow empty files.
|
|
6678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-empty-file.md
|
|
6679
6694
|
*/
|
|
6680
6695
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
6681
6696
|
/**
|
|
6682
6697
|
* Disallow assigning to built-in error properties.
|
|
6683
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-error-property-assignment.md
|
|
6684
6699
|
*/
|
|
6685
6700
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6686
6701
|
/**
|
|
6687
6702
|
* Disallow exports in scripts.
|
|
6688
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-exports-in-scripts.md
|
|
6689
6704
|
*/
|
|
6690
6705
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
6691
6706
|
/**
|
|
6692
6707
|
* Prefer `for…of` over the `forEach` method.
|
|
6693
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-for-each.md
|
|
6694
6709
|
*/
|
|
6695
6710
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
6696
6711
|
/**
|
|
6697
6712
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6698
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-for-loop.md
|
|
6699
6714
|
*/
|
|
6700
6715
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
6701
6716
|
/**
|
|
6702
6717
|
* Disallow assigning properties on the global object.
|
|
6703
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-global-object-property-assignment.md
|
|
6704
6719
|
*/
|
|
6705
6720
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6706
6721
|
/**
|
|
6707
6722
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
6708
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
6709
6724
|
* @deprecated
|
|
6710
6725
|
*/
|
|
6711
6726
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
6712
6727
|
/**
|
|
6713
6728
|
* Disallow immediate mutation after variable assignment.
|
|
6714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-immediate-mutation.md
|
|
6715
6730
|
*/
|
|
6716
6731
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
6717
6732
|
/**
|
|
6718
6733
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
6719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-incorrect-query-selector.md
|
|
6720
6735
|
*/
|
|
6721
6736
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
6722
6737
|
/**
|
|
6723
6738
|
* Disallow incorrect template literal interpolation syntax.
|
|
6724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6739
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
6725
6740
|
*/
|
|
6726
6741
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
6727
6742
|
/**
|
|
6728
6743
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
6730
6745
|
* @deprecated
|
|
6731
6746
|
*/
|
|
6732
6747
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
6733
6748
|
/**
|
|
6734
6749
|
* Disallow `instanceof` with built-in objects
|
|
6735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-instanceof-builtins.md
|
|
6736
6751
|
*/
|
|
6737
6752
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
6738
6753
|
/**
|
|
6739
|
-
* Disallow calling functions with an invalid number of arguments.
|
|
6740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6754
|
+
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
6755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-invalid-argument-count.md
|
|
6741
6756
|
*/
|
|
6742
|
-
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<
|
|
6757
|
+
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
6743
6758
|
/**
|
|
6744
6759
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-invalid-fetch-options.md
|
|
6746
6761
|
*/
|
|
6747
6762
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6748
6763
|
/**
|
|
6749
6764
|
* Disallow invalid `accept` values on file inputs.
|
|
6750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
6751
6766
|
*/
|
|
6752
6767
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
6753
6768
|
/**
|
|
6754
6769
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
6756
6771
|
*/
|
|
6757
6772
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
6758
6773
|
/**
|
|
6759
6774
|
* Disallow identifiers starting with `new` or `class`.
|
|
6760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-keyword-prefix.md
|
|
6761
6776
|
*/
|
|
6762
6777
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
6763
6778
|
/**
|
|
6764
6779
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
6765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-late-current-target-access.md
|
|
6766
6781
|
*/
|
|
6767
6782
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
6768
6783
|
/**
|
|
6769
6784
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
6771
6786
|
* @deprecated
|
|
6772
6787
|
*/
|
|
6773
6788
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
6774
6789
|
/**
|
|
6775
6790
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-lonely-if.md
|
|
6777
6792
|
*/
|
|
6778
6793
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
6779
6794
|
/**
|
|
6780
6795
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
6782
6797
|
*/
|
|
6783
6798
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6784
6799
|
/**
|
|
6785
6800
|
* Disallow manually wrapped comments.
|
|
6786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
6787
6802
|
*/
|
|
6788
6803
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
6789
6804
|
/**
|
|
6790
6805
|
* Disallow checking a Map key before accessing a different key.
|
|
6791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6806
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-mismatched-map-key.md
|
|
6792
6807
|
*/
|
|
6793
6808
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
6794
6809
|
/**
|
|
6795
6810
|
* Disallow named usage of default import and export.
|
|
6796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-named-default.md
|
|
6797
6812
|
*/
|
|
6798
6813
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
6799
6814
|
/**
|
|
6800
6815
|
* Disallow negated array predicate calls.
|
|
6801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-negated-array-predicate.md
|
|
6802
6817
|
*/
|
|
6803
6818
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
6804
6819
|
/**
|
|
6805
6820
|
* Disallow negated comparisons.
|
|
6806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-negated-comparison.md
|
|
6807
6822
|
*/
|
|
6808
6823
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
6809
6824
|
/**
|
|
6810
6825
|
* Disallow negated conditions.
|
|
6811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-negated-condition.md
|
|
6812
6827
|
*/
|
|
6813
6828
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
6814
6829
|
/**
|
|
6815
6830
|
* Disallow negated expression in equality check.
|
|
6816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-negation-in-equality-check.md
|
|
6817
6832
|
*/
|
|
6818
6833
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
6819
6834
|
/**
|
|
6820
6835
|
* Disallow nested ternary expressions.
|
|
6821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-nested-ternary.md
|
|
6822
6837
|
*/
|
|
6823
6838
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6824
6839
|
/**
|
|
6825
6840
|
* Disallow `new Array()`.
|
|
6826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-new-array.md
|
|
6827
6842
|
*/
|
|
6828
6843
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
6829
6844
|
/**
|
|
6830
6845
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-new-buffer.md
|
|
6832
6847
|
*/
|
|
6833
6848
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
6849
|
+
/**
|
|
6850
|
+
* Disallow non-function values with function-style verb prefixes.
|
|
6851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
6852
|
+
*/
|
|
6853
|
+
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
6834
6854
|
/**
|
|
6835
6855
|
* Disallow the use of the `null` literal.
|
|
6836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-null.md
|
|
6837
6857
|
*/
|
|
6838
6858
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
6839
6859
|
/**
|
|
6840
6860
|
* Disallow the use of objects as default parameters.
|
|
6841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-object-as-default-parameter.md
|
|
6842
6862
|
*/
|
|
6843
6863
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
6844
6864
|
/**
|
|
6845
6865
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
6846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-object-methods-with-collections.md
|
|
6847
6867
|
*/
|
|
6848
6868
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
6849
6869
|
/**
|
|
6850
6870
|
* Disallow optional chaining on undeclared variables.
|
|
6851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
6852
6872
|
*/
|
|
6853
6873
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
6854
6874
|
/**
|
|
6855
6875
|
* Disallow `process.exit()`.
|
|
6856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-process-exit.md
|
|
6857
6877
|
*/
|
|
6858
6878
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
6859
6879
|
/**
|
|
6860
6880
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
6861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-redundant-comparison.md
|
|
6862
6882
|
*/
|
|
6863
6883
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
6864
6884
|
/**
|
|
6865
|
-
* Disallow
|
|
6866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6885
|
+
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
6886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-return-array-push.md
|
|
6867
6887
|
*/
|
|
6868
6888
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
6869
6889
|
/**
|
|
6870
6890
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
6872
6892
|
*/
|
|
6873
6893
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6874
6894
|
/**
|
|
6875
6895
|
* Disallow classes that only have static members.
|
|
6876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-static-only-class.md
|
|
6877
6897
|
*/
|
|
6878
6898
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
6879
6899
|
/**
|
|
6880
6900
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
6881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-subtraction-comparison.md
|
|
6882
6902
|
*/
|
|
6883
6903
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
6884
6904
|
/**
|
|
6885
6905
|
* Disallow `then` property.
|
|
6886
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-thenable.md
|
|
6887
6907
|
*/
|
|
6888
6908
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
6889
6909
|
/**
|
|
6890
6910
|
* Disallow assigning `this` to a variable.
|
|
6891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-this-assignment.md
|
|
6892
6912
|
*/
|
|
6893
6913
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
6894
6914
|
/**
|
|
6895
6915
|
* Disallow `this` outside of classes.
|
|
6896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-this-outside-of-class.md
|
|
6897
6917
|
*/
|
|
6898
6918
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
6919
|
+
/**
|
|
6920
|
+
* Disallow assigning to top-level variables from inside functions.
|
|
6921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
6922
|
+
*/
|
|
6923
|
+
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
6899
6924
|
/**
|
|
6900
6925
|
* Disallow top-level side effects in exported modules.
|
|
6901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-top-level-side-effects.md
|
|
6902
6927
|
*/
|
|
6903
6928
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
6904
6929
|
/**
|
|
6905
6930
|
* Disallow comparing `undefined` using `typeof`.
|
|
6906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-typeof-undefined.md
|
|
6907
6932
|
*/
|
|
6908
6933
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
6934
|
+
/**
|
|
6935
|
+
* Disallow referencing methods without calling them.
|
|
6936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-uncalled-method.md
|
|
6937
|
+
*/
|
|
6938
|
+
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
6909
6939
|
/**
|
|
6910
6940
|
* Require class members to be declared.
|
|
6911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-undeclared-class-members.md
|
|
6912
6942
|
*/
|
|
6913
6943
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
6914
6944
|
/**
|
|
6915
6945
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6917
6947
|
*/
|
|
6918
6948
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6919
6949
|
/**
|
|
6920
6950
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
6922
6952
|
*/
|
|
6923
6953
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
6924
6954
|
/**
|
|
6925
6955
|
* Disallow awaiting non-promise values.
|
|
6926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-unnecessary-await.md
|
|
6927
6957
|
*/
|
|
6928
6958
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
6929
6959
|
/**
|
|
6930
6960
|
* Disallow unnecessary `globalThis` references.
|
|
6931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-unnecessary-global-this.md
|
|
6932
6962
|
*/
|
|
6933
6963
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
6934
6964
|
/**
|
|
6935
6965
|
* Disallow unnecessary nested ternary expressions.
|
|
6936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
6937
6967
|
*/
|
|
6938
6968
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6939
6969
|
/**
|
|
6940
6970
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6941
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
6942
6972
|
*/
|
|
6943
6973
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
6944
6974
|
/**
|
|
6945
6975
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
6947
6977
|
*/
|
|
6948
6978
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
6949
6979
|
/**
|
|
6950
6980
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
6951
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-unnecessary-splice.md
|
|
6952
6982
|
*/
|
|
6953
6983
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
6954
6984
|
/**
|
|
6955
6985
|
* Disallow unreadable array destructuring.
|
|
6956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
6957
6987
|
*/
|
|
6958
6988
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
6989
|
+
/**
|
|
6990
|
+
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
6991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
6992
|
+
*/
|
|
6993
|
+
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
6959
6994
|
/**
|
|
6960
6995
|
* Disallow unreadable IIFEs.
|
|
6961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-unreadable-iife.md
|
|
6962
6997
|
*/
|
|
6963
6998
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
6964
6999
|
/**
|
|
6965
7000
|
* Disallow unreadable `new` expressions.
|
|
6966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-unreadable-new-expression.md
|
|
6967
7002
|
*/
|
|
6968
7003
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
6969
7004
|
/**
|
|
6970
7005
|
* Disallow unreadable object destructuring.
|
|
6971
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
6972
7007
|
*/
|
|
6973
7008
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
6974
7009
|
/**
|
|
6975
7010
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
6976
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
6977
7012
|
*/
|
|
6978
7013
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
6979
7014
|
/**
|
|
6980
7015
|
* Disallow unsafe DOM HTML APIs.
|
|
6981
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-unsafe-dom-html.md
|
|
6982
7017
|
*/
|
|
6983
7018
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
6984
7019
|
/**
|
|
6985
7020
|
* Disallow unsafe values as property keys.
|
|
6986
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7021
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-unsafe-property-key.md
|
|
6987
7022
|
*/
|
|
6988
7023
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
6989
7024
|
/**
|
|
6990
7025
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
6991
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
6992
7027
|
*/
|
|
6993
7028
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
6994
7029
|
/**
|
|
6995
7030
|
* Disallow ignoring the return value of selected array methods.
|
|
6996
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-unused-array-method-return.md
|
|
6997
7032
|
*/
|
|
6998
7033
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
6999
7034
|
/**
|
|
7000
7035
|
* Disallow unused object properties.
|
|
7001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-unused-properties.md
|
|
7002
7037
|
*/
|
|
7003
7038
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
7004
7039
|
/**
|
|
7005
7040
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
7006
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7041
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-useless-boolean-cast.md
|
|
7007
7042
|
*/
|
|
7008
7043
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
7044
|
+
/**
|
|
7045
|
+
* Disallow useless type coercions of values that are already of the target type.
|
|
7046
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-useless-coercion.md
|
|
7047
|
+
*/
|
|
7048
|
+
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
7009
7049
|
/**
|
|
7010
7050
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
7011
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7051
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-useless-collection-argument.md
|
|
7012
7052
|
*/
|
|
7013
7053
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
7014
7054
|
/**
|
|
7015
7055
|
* Disallow useless concatenation of literals.
|
|
7016
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7056
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-useless-concat.md
|
|
7017
7057
|
*/
|
|
7018
7058
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
7059
|
+
/**
|
|
7060
|
+
* Disallow useless `continue` statements.
|
|
7061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-useless-continue.md
|
|
7062
|
+
*/
|
|
7063
|
+
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
7019
7064
|
/**
|
|
7020
7065
|
* Disallow `else` after a statement that exits.
|
|
7021
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7066
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-useless-else.md
|
|
7022
7067
|
*/
|
|
7023
7068
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
7024
7069
|
/**
|
|
7025
7070
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
7026
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7071
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
7027
7072
|
*/
|
|
7028
7073
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
7029
7074
|
/**
|
|
7030
7075
|
* Disallow useless fallback when spreading in object literals.
|
|
7031
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7076
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
7032
7077
|
*/
|
|
7033
|
-
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<
|
|
7078
|
+
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<UnicornNoUselessFallbackInSpread>;
|
|
7034
7079
|
/**
|
|
7035
7080
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
7036
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
7037
7082
|
*/
|
|
7038
7083
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7039
7084
|
/**
|
|
7040
7085
|
* Disallow useless array length check.
|
|
7041
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7086
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-useless-length-check.md
|
|
7042
7087
|
*/
|
|
7043
7088
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
7089
|
+
/**
|
|
7090
|
+
* Disallow useless overrides of class methods.
|
|
7091
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-useless-override.md
|
|
7092
|
+
*/
|
|
7093
|
+
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
7044
7094
|
/**
|
|
7045
7095
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
7046
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7096
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
7047
7097
|
*/
|
|
7048
7098
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
7049
7099
|
/**
|
|
7050
7100
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
7051
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7101
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-useless-recursion.md
|
|
7052
7102
|
*/
|
|
7053
7103
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
7054
7104
|
/**
|
|
7055
7105
|
* Disallow unnecessary spread.
|
|
7056
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7106
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-useless-spread.md
|
|
7057
7107
|
*/
|
|
7058
7108
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
7059
7109
|
/**
|
|
7060
7110
|
* Disallow useless case in switch statements.
|
|
7061
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7111
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-useless-switch-case.md
|
|
7062
7112
|
*/
|
|
7063
7113
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
7064
7114
|
/**
|
|
7065
7115
|
* Disallow useless template literal expressions.
|
|
7066
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7116
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-useless-template-literals.md
|
|
7067
7117
|
*/
|
|
7068
7118
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
7069
7119
|
/**
|
|
7070
7120
|
* Disallow useless `undefined`.
|
|
7071
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7121
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-useless-undefined.md
|
|
7072
7122
|
*/
|
|
7073
7123
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
7074
7124
|
/**
|
|
7075
7125
|
* Disallow number literals with zero fractions or dangling dots.
|
|
7076
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7126
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/no-zero-fractions.md
|
|
7077
7127
|
*/
|
|
7078
7128
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
7079
7129
|
/**
|
|
7080
7130
|
* Enforce proper case for numeric literals.
|
|
7081
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7131
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/number-literal-case.md
|
|
7082
7132
|
*/
|
|
7083
7133
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
7084
7134
|
/**
|
|
7085
7135
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
7086
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7136
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/numeric-separators-style.md
|
|
7087
7137
|
*/
|
|
7088
7138
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
7139
|
+
/**
|
|
7140
|
+
* Require assignment operator shorthand where possible.
|
|
7141
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/operator-assignment.md
|
|
7142
|
+
*/
|
|
7143
|
+
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
7089
7144
|
/**
|
|
7090
7145
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
7091
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7146
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-add-event-listener.md
|
|
7092
7147
|
*/
|
|
7093
7148
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
7094
7149
|
/**
|
|
7095
7150
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
7096
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7151
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
7097
7152
|
*/
|
|
7098
7153
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
7099
7154
|
/**
|
|
7100
7155
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
7101
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7156
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-array-find.md
|
|
7102
7157
|
*/
|
|
7103
7158
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
7104
7159
|
/**
|
|
7105
7160
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
7106
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7161
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-array-flat.md
|
|
7107
7162
|
*/
|
|
7108
7163
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
7109
7164
|
/**
|
|
7110
7165
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
7111
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7166
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-array-flat-map.md
|
|
7112
7167
|
*/
|
|
7113
7168
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7114
7169
|
/**
|
|
7115
7170
|
* Prefer using the `Array.from()` mapping function argument.
|
|
7116
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7171
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-array-from-map.md
|
|
7117
7172
|
*/
|
|
7118
7173
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
7119
7174
|
/**
|
|
7120
7175
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
7121
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7176
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-array-index-of.md
|
|
7122
7177
|
*/
|
|
7123
7178
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
7124
7179
|
/**
|
|
7125
7180
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
7126
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7181
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-array-last-methods.md
|
|
7127
7182
|
*/
|
|
7128
7183
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
7184
|
+
/**
|
|
7185
|
+
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
7186
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-array-slice.md
|
|
7187
|
+
*/
|
|
7188
|
+
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
7129
7189
|
/**
|
|
7130
7190
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
7131
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7191
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-array-some.md
|
|
7132
7192
|
*/
|
|
7133
7193
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
7134
7194
|
/**
|
|
7135
7195
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
7136
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7196
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-at.md
|
|
7137
7197
|
*/
|
|
7138
7198
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
7139
7199
|
/**
|
|
7140
7200
|
* Prefer `await` over promise chaining.
|
|
7141
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7201
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-await.md
|
|
7142
7202
|
*/
|
|
7143
7203
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
7144
7204
|
/**
|
|
7145
7205
|
* Prefer `BigInt` literals over the constructor.
|
|
7146
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7206
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-bigint-literals.md
|
|
7147
7207
|
*/
|
|
7148
7208
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
7149
7209
|
/**
|
|
7150
7210
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
7151
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7211
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
7152
7212
|
*/
|
|
7153
7213
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
7154
7214
|
/**
|
|
7155
7215
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
7156
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7216
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-class-fields.md
|
|
7157
7217
|
*/
|
|
7158
7218
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
7159
7219
|
/**
|
|
7160
7220
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
7161
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-classlist-toggle.md
|
|
7162
7222
|
*/
|
|
7163
7223
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
7164
7224
|
/**
|
|
7165
7225
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
7166
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7226
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-code-point.md
|
|
7167
7227
|
*/
|
|
7168
7228
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
7169
7229
|
/**
|
|
7170
7230
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
7171
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7231
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-date-now.md
|
|
7172
7232
|
*/
|
|
7173
7233
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
7174
7234
|
/**
|
|
7175
7235
|
* Prefer default parameters over reassignment.
|
|
7176
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7236
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-default-parameters.md
|
|
7177
7237
|
*/
|
|
7178
7238
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
7179
7239
|
/**
|
|
7180
7240
|
* Prefer direct iteration over default iterator method calls.
|
|
7181
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-direct-iteration.md
|
|
7182
7242
|
*/
|
|
7183
7243
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
7184
7244
|
/**
|
|
7185
7245
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
7186
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-dispose.md
|
|
7187
7247
|
*/
|
|
7188
7248
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
7189
7249
|
/**
|
|
7190
7250
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
7191
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-dom-node-append.md
|
|
7192
7252
|
*/
|
|
7193
7253
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
7194
7254
|
/**
|
|
7195
7255
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
7196
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
7197
7257
|
* @deprecated
|
|
7198
7258
|
*/
|
|
7199
7259
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
7200
7260
|
/**
|
|
7201
7261
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
7202
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7262
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
7203
7263
|
*/
|
|
7204
7264
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<[]>;
|
|
7205
7265
|
/**
|
|
7206
7266
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
7207
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7267
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-dom-node-remove.md
|
|
7208
7268
|
*/
|
|
7209
7269
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
7210
7270
|
/**
|
|
7211
7271
|
* Prefer `.textContent` over `.innerText`.
|
|
7212
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7272
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
7213
7273
|
*/
|
|
7214
7274
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
7215
7275
|
/**
|
|
7216
7276
|
* Prefer early returns over full-function conditional wrapping.
|
|
7217
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7277
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-early-return.md
|
|
7218
7278
|
*/
|
|
7219
7279
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
7280
|
+
/**
|
|
7281
|
+
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
7282
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-else-if.md
|
|
7283
|
+
*/
|
|
7284
|
+
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
7220
7285
|
/**
|
|
7221
7286
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
7222
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7287
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-event-target.md
|
|
7223
7288
|
*/
|
|
7224
7289
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
7225
7290
|
/**
|
|
7226
7291
|
* Prefer `export…from` when re-exporting.
|
|
7227
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7292
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-export-from.md
|
|
7228
7293
|
*/
|
|
7229
7294
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
7230
7295
|
/**
|
|
7231
7296
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
7232
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7297
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
7233
7298
|
*/
|
|
7234
7299
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
7235
7300
|
/**
|
|
7236
7301
|
* Prefer global numeric constants over `Number` static properties.
|
|
7237
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7302
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-global-number-constants.md
|
|
7238
7303
|
*/
|
|
7239
7304
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
7240
7305
|
/**
|
|
7241
7306
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
7242
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7307
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-global-this.md
|
|
7243
7308
|
*/
|
|
7244
7309
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
7310
|
+
/**
|
|
7311
|
+
* Prefer `.has()` when checking existence.
|
|
7312
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-has-check.md
|
|
7313
|
+
*/
|
|
7314
|
+
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
7245
7315
|
/**
|
|
7246
7316
|
* Prefer HTTPS over HTTP.
|
|
7247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-https.md
|
|
7248
7318
|
*/
|
|
7249
7319
|
'unicorn/prefer-https'?: Linter.RuleEntry<[]>;
|
|
7250
7320
|
/**
|
|
7251
7321
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
7252
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7322
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
7253
7323
|
*/
|
|
7254
7324
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
7255
7325
|
/**
|
|
7256
7326
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
7257
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7327
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-import-meta-properties.md
|
|
7258
7328
|
*/
|
|
7259
7329
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
7260
7330
|
/**
|
|
7261
7331
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
7262
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7332
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-includes.md
|
|
7263
7333
|
*/
|
|
7264
7334
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
7265
7335
|
/**
|
|
7266
7336
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
7267
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7337
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
7268
7338
|
*/
|
|
7269
7339
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
7270
7340
|
/**
|
|
7271
7341
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
7272
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7342
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
7273
7343
|
*/
|
|
7274
7344
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
7275
7345
|
/**
|
|
7276
7346
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
7277
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7347
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-iterator-concat.md
|
|
7278
7348
|
*/
|
|
7279
7349
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
7280
7350
|
/**
|
|
7281
7351
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
7282
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-iterator-to-array.md
|
|
7283
7353
|
*/
|
|
7284
7354
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7285
7355
|
/**
|
|
7286
7356
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
7287
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7357
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
7288
7358
|
*/
|
|
7289
7359
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
7290
7360
|
/**
|
|
7291
7361
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
7292
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
7293
7363
|
* @deprecated
|
|
7294
7364
|
*/
|
|
7295
7365
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
7296
7366
|
/**
|
|
7297
7367
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
7298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
7299
7369
|
*/
|
|
7300
7370
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
7301
7371
|
/**
|
|
7302
7372
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
7303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-location-assign.md
|
|
7304
7374
|
*/
|
|
7305
7375
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
7306
7376
|
/**
|
|
7307
7377
|
* Prefer using a logical operator over a ternary.
|
|
7308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
7309
7379
|
*/
|
|
7310
7380
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
7381
|
+
/**
|
|
7382
|
+
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
7383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-map-from-entries.md
|
|
7384
|
+
*/
|
|
7385
|
+
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
7311
7386
|
/**
|
|
7312
7387
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
7313
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-math-abs.md
|
|
7314
7389
|
*/
|
|
7315
7390
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
7316
7391
|
/**
|
|
7317
7392
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
7318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-math-min-max.md
|
|
7319
7394
|
*/
|
|
7320
7395
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7321
7396
|
/**
|
|
7322
7397
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
7323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-math-trunc.md
|
|
7324
7399
|
*/
|
|
7325
7400
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
7326
7401
|
/**
|
|
7327
7402
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
7328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-minimal-ternary.md
|
|
7329
7404
|
*/
|
|
7330
|
-
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<
|
|
7405
|
+
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
7331
7406
|
/**
|
|
7332
7407
|
* Prefer modern DOM APIs.
|
|
7333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
7334
7409
|
*/
|
|
7335
7410
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
7336
7411
|
/**
|
|
7337
7412
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
7338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-modern-math-apis.md
|
|
7339
7414
|
*/
|
|
7340
7415
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
7341
7416
|
/**
|
|
7342
7417
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
7343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-module.md
|
|
7344
7419
|
*/
|
|
7345
7420
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
7346
7421
|
/**
|
|
7347
7422
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
7348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
7349
7424
|
*/
|
|
7350
7425
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
7351
7426
|
/**
|
|
7352
7427
|
* Prefer negative index over `.length - index` when possible.
|
|
7353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-negative-index.md
|
|
7354
7429
|
*/
|
|
7355
7430
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
7356
7431
|
/**
|
|
7357
7432
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
7358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-node-protocol.md
|
|
7359
7434
|
*/
|
|
7360
7435
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
7361
7436
|
/**
|
|
7362
7437
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
7363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-number-coercion.md
|
|
7364
7439
|
*/
|
|
7365
7440
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
7366
7441
|
/**
|
|
7367
7442
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
7368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
7369
7444
|
*/
|
|
7370
7445
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
7371
7446
|
/**
|
|
7372
7447
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
7373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-number-properties.md
|
|
7374
7449
|
*/
|
|
7375
7450
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
7376
7451
|
/**
|
|
7377
7452
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
7378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-object-define-properties.md
|
|
7379
7454
|
*/
|
|
7380
7455
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
7381
7456
|
/**
|
|
7382
7457
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
7383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
7384
7459
|
*/
|
|
7385
7460
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
7386
7461
|
/**
|
|
7387
7462
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
7388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7463
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-object-from-entries.md
|
|
7389
7464
|
*/
|
|
7390
7465
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
7391
7466
|
/**
|
|
7392
7467
|
* Prefer the most specific `Object` iterable method.
|
|
7393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7468
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
7394
7469
|
*/
|
|
7395
7470
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
7396
7471
|
/**
|
|
7397
7472
|
* Prefer omitting the `catch` binding parameter.
|
|
7398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7473
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
7399
7474
|
*/
|
|
7400
7475
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
7401
7476
|
/**
|
|
7402
7477
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
7403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-path2d.md
|
|
7404
7479
|
*/
|
|
7405
7480
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
7406
7481
|
/**
|
|
7407
7482
|
* Prefer private class fields over the underscore-prefix convention.
|
|
7408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7483
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-private-class-fields.md
|
|
7409
7484
|
*/
|
|
7410
7485
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
7411
7486
|
/**
|
|
7412
7487
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
7413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7488
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-prototype-methods.md
|
|
7414
7489
|
*/
|
|
7415
7490
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
7416
7491
|
/**
|
|
7417
7492
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
7418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7493
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-query-selector.md
|
|
7419
7494
|
*/
|
|
7420
7495
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
7421
7496
|
/**
|
|
7422
7497
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
7423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7498
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-queue-microtask.md
|
|
7424
7499
|
*/
|
|
7425
7500
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
7426
7501
|
/**
|
|
7427
7502
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
7428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-reflect-apply.md
|
|
7429
7504
|
*/
|
|
7430
7505
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
7431
7506
|
/**
|
|
7432
7507
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
7433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7508
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-regexp-test.md
|
|
7434
7509
|
*/
|
|
7435
7510
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
7436
7511
|
/**
|
|
7437
7512
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
7438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7513
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-response-static-json.md
|
|
7439
7514
|
*/
|
|
7440
7515
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
7441
7516
|
/**
|
|
7442
7517
|
* Prefer `:scope` when using element query selector methods.
|
|
7443
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7518
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-scoped-selector.md
|
|
7444
7519
|
*/
|
|
7445
7520
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
7446
7521
|
/**
|
|
7447
7522
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
7448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7523
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-set-has.md
|
|
7449
7524
|
*/
|
|
7450
7525
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
7451
7526
|
/**
|
|
7452
7527
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
7453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7528
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-set-size.md
|
|
7454
7529
|
*/
|
|
7455
7530
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
7456
7531
|
/**
|
|
7457
7532
|
* Prefer arrow function properties over methods with a single return.
|
|
7458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7533
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-short-arrow-method.md
|
|
7459
7534
|
*/
|
|
7460
7535
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<[]>;
|
|
7461
7536
|
/**
|
|
7462
7537
|
* Prefer simple conditions first in logical expressions.
|
|
7463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7538
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-simple-condition-first.md
|
|
7464
7539
|
*/
|
|
7465
7540
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
7466
7541
|
/**
|
|
7467
7542
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
7468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7543
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
7469
7544
|
*/
|
|
7470
7545
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7471
7546
|
/**
|
|
7472
7547
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
7473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7548
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-single-array-predicate.md
|
|
7474
7549
|
*/
|
|
7475
7550
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7476
7551
|
/**
|
|
7477
7552
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
7478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7553
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-single-call.md
|
|
7479
7554
|
*/
|
|
7480
7555
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
7481
7556
|
/**
|
|
7482
7557
|
* Prefer a single object destructuring declaration per local const source.
|
|
7483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
7484
7559
|
*/
|
|
7485
7560
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
7486
7561
|
/**
|
|
7487
7562
|
* Prefer declaring variables in the smallest possible scope.
|
|
7488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-smaller-scope.md
|
|
7489
7564
|
*/
|
|
7490
7565
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
7491
7566
|
/**
|
|
7492
7567
|
* Prefer `String#split()` with a limit.
|
|
7493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-split-limit.md
|
|
7494
7569
|
*/
|
|
7495
7570
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
7496
7571
|
/**
|
|
7497
7572
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
7498
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-spread.md
|
|
7499
7574
|
*/
|
|
7500
7575
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
7501
7576
|
/**
|
|
7502
7577
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
7503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7578
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-string-match-all.md
|
|
7504
7579
|
*/
|
|
7505
7580
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
7506
7581
|
/**
|
|
7507
7582
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
7508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7583
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
7509
7584
|
*/
|
|
7510
7585
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
7511
7586
|
/**
|
|
7512
7587
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
7513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-string-raw.md
|
|
7514
7589
|
*/
|
|
7515
7590
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
7516
7591
|
/**
|
|
7517
7592
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
7518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-string-repeat.md
|
|
7519
7594
|
*/
|
|
7520
7595
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
7521
7596
|
/**
|
|
7522
7597
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
7523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-string-replace-all.md
|
|
7524
7599
|
*/
|
|
7525
7600
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
7526
7601
|
/**
|
|
7527
7602
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
7528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-string-slice.md
|
|
7529
7604
|
*/
|
|
7530
7605
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
7531
7606
|
/**
|
|
7532
7607
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()` and `String#indexOf() === 0`.
|
|
7533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
7534
7609
|
*/
|
|
7535
7610
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
7536
7611
|
/**
|
|
7537
7612
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
7538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
7539
7614
|
*/
|
|
7540
7615
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
7541
7616
|
/**
|
|
7542
7617
|
* Prefer using `structuredClone` to create a deep clone.
|
|
7543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-structured-clone.md
|
|
7544
7619
|
*/
|
|
7545
7620
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
7546
7621
|
/**
|
|
7547
7622
|
* Prefer `switch` over multiple `else-if`.
|
|
7548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-switch.md
|
|
7549
7624
|
*/
|
|
7550
7625
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
7551
7626
|
/**
|
|
7552
7627
|
* Prefer `Temporal` over `Date`.
|
|
7553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-temporal.md
|
|
7554
7629
|
*/
|
|
7555
7630
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
7556
7631
|
/**
|
|
7557
7632
|
* Prefer ternary expressions over simple `if-else` statements that return or assign values.
|
|
7558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-ternary.md
|
|
7559
7634
|
*/
|
|
7560
7635
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
7561
7636
|
/**
|
|
7562
7637
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-top-level-await.md
|
|
7564
7639
|
*/
|
|
7565
7640
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
7566
7641
|
/**
|
|
7567
7642
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-type-error.md
|
|
7569
7644
|
*/
|
|
7570
7645
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
7571
7646
|
/**
|
|
7572
7647
|
* Require type literals to be last in union and intersection types.
|
|
7573
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-type-literal-last.md
|
|
7574
7649
|
*/
|
|
7575
7650
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
7576
7651
|
/**
|
|
7577
7652
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
7578
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-uint8array-base64.md
|
|
7579
7654
|
*/
|
|
7580
7655
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
7581
7656
|
/**
|
|
7582
7657
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
7583
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
7584
7659
|
*/
|
|
7585
7660
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
7586
7661
|
/**
|
|
7587
7662
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
7588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prefer-url-href.md
|
|
7589
7664
|
*/
|
|
7590
7665
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
7591
7666
|
/**
|
|
7592
7667
|
* Prevent abbreviations.
|
|
7593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/prevent-abbreviations.md
|
|
7594
7669
|
*/
|
|
7595
7670
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
7596
7671
|
/**
|
|
7597
7672
|
* Enforce consistent relative URL style.
|
|
7598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/relative-url-style.md
|
|
7599
7674
|
*/
|
|
7600
7675
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
7601
7676
|
/**
|
|
7602
7677
|
* Enforce using the separator argument with `Array#join()`.
|
|
7603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/require-array-join-separator.md
|
|
7604
7679
|
*/
|
|
7605
7680
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
7606
7681
|
/**
|
|
7607
7682
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
7608
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/require-array-sort-compare.md
|
|
7609
7684
|
*/
|
|
7610
7685
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
7611
7686
|
/**
|
|
7612
7687
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
7613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/require-css-escape.md
|
|
7614
7689
|
*/
|
|
7615
7690
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
7616
7691
|
/**
|
|
7617
7692
|
* Require non-empty module attributes for imports and exports
|
|
7618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/require-module-attributes.md
|
|
7619
7694
|
*/
|
|
7620
7695
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
7621
7696
|
/**
|
|
7622
7697
|
* Require non-empty specifier list in import and export statements.
|
|
7623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/require-module-specifiers.md
|
|
7624
7699
|
*/
|
|
7625
7700
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
7626
7701
|
/**
|
|
7627
7702
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7629
7704
|
*/
|
|
7630
7705
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
7631
7706
|
/**
|
|
7632
7707
|
* Require passive event listeners for high-frequency events.
|
|
7633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/require-passive-events.md
|
|
7634
7709
|
*/
|
|
7635
7710
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
7636
7711
|
/**
|
|
7637
7712
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/require-post-message-target-origin.md
|
|
7639
7714
|
*/
|
|
7640
7715
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
7641
7716
|
/**
|
|
7642
7717
|
* Require boolean-returning Proxy traps to return booleans.
|
|
7643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
7644
7719
|
*/
|
|
7645
7720
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
7646
7721
|
/**
|
|
7647
7722
|
* Enforce better string content.
|
|
7648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/string-content.md
|
|
7649
7724
|
*/
|
|
7650
7725
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
7651
7726
|
/**
|
|
7652
7727
|
* Enforce consistent brace style for `case` clauses.
|
|
7653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/switch-case-braces.md
|
|
7654
7729
|
*/
|
|
7655
7730
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
7656
7731
|
/**
|
|
7657
7732
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
7658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/switch-case-break-position.md
|
|
7659
7734
|
*/
|
|
7660
7735
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
7661
7736
|
/**
|
|
7662
7737
|
* Fix whitespace-insensitive template indentation.
|
|
7663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/template-indent.md
|
|
7664
7739
|
*/
|
|
7665
7740
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
7666
7741
|
/**
|
|
7667
7742
|
* Enforce consistent case for text encoding identifiers.
|
|
7668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/text-encoding-identifier-case.md
|
|
7669
7744
|
*/
|
|
7670
7745
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
7671
7746
|
/**
|
|
7672
7747
|
* Require `new` when creating an error.
|
|
7673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/throw-new-error.md
|
|
7674
7749
|
*/
|
|
7675
7750
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
7676
7751
|
/**
|
|
7677
7752
|
* Limit the complexity of `try` blocks.
|
|
7678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v67.0.0/docs/rules/try-complexity.md
|
|
7679
7754
|
*/
|
|
7680
7755
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
7681
7756
|
/**
|
|
@@ -16917,6 +16992,7 @@ type UnicornClassReferenceInStaticMethods = [] | [{
|
|
|
16917
16992
|
preferSuper?: boolean;
|
|
16918
16993
|
}]; // ----- unicorn/comment-content -----
|
|
16919
16994
|
type UnicornCommentContent = [] | [{
|
|
16995
|
+
checkUniformCase?: boolean;
|
|
16920
16996
|
extendDefaultReplacements?: boolean;
|
|
16921
16997
|
replacements?: {
|
|
16922
16998
|
[k: string]: (false | string | {
|
|
@@ -16924,9 +17000,15 @@ type UnicornCommentContent = [] | [{
|
|
|
16924
17000
|
caseSensitive?: boolean;
|
|
16925
17001
|
}) | undefined;
|
|
16926
17002
|
};
|
|
17003
|
+
}]; // ----- unicorn/consistent-boolean-name -----
|
|
17004
|
+
type UnicornConsistentBooleanName = [] | [{
|
|
17005
|
+
checkProperties?: boolean;
|
|
17006
|
+
prefixes?: {
|
|
17007
|
+
[k: string]: boolean | undefined;
|
|
17008
|
+
};
|
|
16927
17009
|
}]; // ----- unicorn/consistent-class-member-order -----
|
|
16928
17010
|
type UnicornConsistentClassMemberOrder = [] | [{
|
|
16929
|
-
order?: [("static-field" | "static-block" | "
|
|
17011
|
+
order?: [("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method")];
|
|
16930
17012
|
}]; // ----- unicorn/consistent-compound-words -----
|
|
16931
17013
|
type UnicornConsistentCompoundWords = [] | [{
|
|
16932
17014
|
checkProperties?: boolean;
|
|
@@ -17020,7 +17102,10 @@ type UnicornIsolatedFunctions = [] | [{
|
|
|
17020
17102
|
functions?: string[];
|
|
17021
17103
|
selectors?: string[];
|
|
17022
17104
|
comments?: string[];
|
|
17023
|
-
}]; // ----- unicorn/
|
|
17105
|
+
}]; // ----- unicorn/logical-assignment-operators -----
|
|
17106
|
+
type UnicornLogicalAssignmentOperators = (([] | ["always"] | ["always", {
|
|
17107
|
+
enforceForIfStatements?: boolean;
|
|
17108
|
+
}] | ["never"]) & unknown[]); // ----- unicorn/max-nested-calls -----
|
|
17024
17109
|
type UnicornMaxNestedCalls = [] | [{
|
|
17025
17110
|
max?: number;
|
|
17026
17111
|
}]; // ----- unicorn/no-array-callback-reference -----
|
|
@@ -17044,6 +17129,12 @@ type UnicornNoInstanceofBuiltins = [] | [{
|
|
|
17044
17129
|
strategy?: ("loose" | "strict");
|
|
17045
17130
|
include?: string[];
|
|
17046
17131
|
exclude?: string[];
|
|
17132
|
+
}]; // ----- unicorn/no-invalid-argument-count -----
|
|
17133
|
+
type UnicornNoInvalidArgumentCount = [] | [{
|
|
17134
|
+
[k: string]: (number | [number, ...(number)[]] | {
|
|
17135
|
+
min?: number;
|
|
17136
|
+
max?: number;
|
|
17137
|
+
}) | undefined;
|
|
17047
17138
|
}]; // ----- unicorn/no-keyword-prefix -----
|
|
17048
17139
|
type UnicornNoKeywordPrefix = [] | [{
|
|
17049
17140
|
disallowedPrefixes?: [] | [string];
|
|
@@ -17052,6 +17143,9 @@ type UnicornNoKeywordPrefix = [] | [{
|
|
|
17052
17143
|
}]; // ----- unicorn/no-negated-comparison -----
|
|
17053
17144
|
type UnicornNoNegatedComparison = [] | [{
|
|
17054
17145
|
checkLogicalExpressions?: boolean;
|
|
17146
|
+
}]; // ----- unicorn/no-non-function-verb-prefix -----
|
|
17147
|
+
type UnicornNoNonFunctionVerbPrefix = [] | [{
|
|
17148
|
+
verbs?: string[];
|
|
17055
17149
|
}]; // ----- unicorn/no-null -----
|
|
17056
17150
|
type UnicornNoNull = [] | [{
|
|
17057
17151
|
checkArguments?: boolean;
|
|
@@ -17067,6 +17161,9 @@ type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
|
17067
17161
|
}]; // ----- unicorn/no-unreadable-array-destructuring -----
|
|
17068
17162
|
type UnicornNoUnreadableArrayDestructuring = [] | [{
|
|
17069
17163
|
maximumIgnoredElements?: number;
|
|
17164
|
+
}]; // ----- unicorn/no-useless-fallback-in-spread -----
|
|
17165
|
+
type UnicornNoUselessFallbackInSpread = [] | [{
|
|
17166
|
+
checkTernary?: boolean;
|
|
17070
17167
|
}]; // ----- unicorn/no-useless-undefined -----
|
|
17071
17168
|
type UnicornNoUselessUndefined = [] | [{
|
|
17072
17169
|
checkArguments?: boolean;
|
|
@@ -17098,7 +17195,8 @@ type UnicornNumericSeparatorsStyle = [] | [{
|
|
|
17098
17195
|
fractionGroupLength?: number;
|
|
17099
17196
|
};
|
|
17100
17197
|
onlyIfContainsSeparator?: boolean;
|
|
17101
|
-
}]; // ----- unicorn/
|
|
17198
|
+
}]; // ----- unicorn/operator-assignment -----
|
|
17199
|
+
type UnicornOperatorAssignment = [] | [("always" | "never")]; // ----- unicorn/prefer-add-event-listener -----
|
|
17102
17200
|
type UnicornPreferAddEventListener = [] | [{
|
|
17103
17201
|
excludedPackages?: string[];
|
|
17104
17202
|
}]; // ----- unicorn/prefer-array-find -----
|
|
@@ -17120,6 +17218,9 @@ type UnicornPreferExportFrom = [] | [{
|
|
|
17120
17218
|
}]; // ----- unicorn/prefer-includes-over-repeated-comparisons -----
|
|
17121
17219
|
type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
17122
17220
|
minimumComparisons?: number;
|
|
17221
|
+
}]; // ----- unicorn/prefer-minimal-ternary -----
|
|
17222
|
+
type UnicornPreferMinimalTernary = [] | [{
|
|
17223
|
+
checkComputedMemberAccess?: boolean;
|
|
17123
17224
|
}]; // ----- unicorn/prefer-number-properties -----
|
|
17124
17225
|
type UnicornPreferNumberProperties = [] | [{
|
|
17125
17226
|
checkInfinity?: boolean;
|