@ntnyq/eslint-config 7.0.0-beta.5 → 7.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +593 -296
- package/dist/index.mjs +16 -1
- package/package.json +15 -15
package/dist/index.d.mts
CHANGED
|
@@ -6388,1294 +6388,1560 @@ 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/v68.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/v68.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/v68.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/v68.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/v68.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/v68.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/v68.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/v68.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/v68.0.0/docs/rules/consistent-compound-words.md
|
|
6428
6433
|
*/
|
|
6429
6434
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
6435
|
+
/**
|
|
6436
|
+
* Enforce consistent conditional object spread style.
|
|
6437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
6438
|
+
*/
|
|
6439
|
+
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
6430
6440
|
/**
|
|
6431
6441
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-date-clone.md
|
|
6433
6443
|
*/
|
|
6434
6444
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6435
6445
|
/**
|
|
6436
6446
|
* Use destructured variables over properties.
|
|
6437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-destructuring.md
|
|
6438
6448
|
*/
|
|
6439
6449
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6440
6450
|
/**
|
|
6441
6451
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-empty-array-spread.md
|
|
6443
6453
|
*/
|
|
6444
6454
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6445
6455
|
/**
|
|
6446
6456
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-existence-index-check.md
|
|
6448
6458
|
*/
|
|
6449
6459
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6450
6460
|
/**
|
|
6451
6461
|
* Enforce consistent decorator position on exported classes.
|
|
6452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-export-decorator-position.md
|
|
6453
6463
|
*/
|
|
6454
6464
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
6455
6465
|
/**
|
|
6456
6466
|
* Move function definitions to the highest possible scope.
|
|
6457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-function-scoping.md
|
|
6458
6468
|
*/
|
|
6459
6469
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6460
6470
|
/**
|
|
6461
6471
|
* Enforce function syntax by role.
|
|
6462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-function-style.md
|
|
6463
6473
|
*/
|
|
6464
6474
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
6465
6475
|
/**
|
|
6466
6476
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
6467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-json-file-read.md
|
|
6468
6478
|
*/
|
|
6469
6479
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
6470
6480
|
/**
|
|
6471
6481
|
* Enforce consistent optional chaining for same-base member access.
|
|
6472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-optional-chaining.md
|
|
6473
6483
|
*/
|
|
6474
6484
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
6475
6485
|
/**
|
|
6476
6486
|
* Enforce consistent style for escaping `${` in template literals.
|
|
6477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-template-literal-escape.md
|
|
6478
6488
|
*/
|
|
6479
6489
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
6480
6490
|
/**
|
|
6481
6491
|
* Enforce correct `Error` subclassing.
|
|
6482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/custom-error-definition.md
|
|
6483
6493
|
*/
|
|
6484
6494
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6495
|
+
/**
|
|
6496
|
+
* Enforce consistent default export declarations.
|
|
6497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/default-export-style.md
|
|
6498
|
+
*/
|
|
6499
|
+
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
6485
6500
|
/**
|
|
6486
6501
|
* Enforce consistent style for DOM element dataset access.
|
|
6487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/dom-node-dataset.md
|
|
6488
6503
|
*/
|
|
6489
6504
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
6490
6505
|
/**
|
|
6491
6506
|
* Enforce no spaces between braces.
|
|
6492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/empty-brace-spaces.md
|
|
6493
6508
|
*/
|
|
6494
6509
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6495
6510
|
/**
|
|
6496
6511
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/error-message.md
|
|
6498
6513
|
*/
|
|
6499
6514
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6500
6515
|
/**
|
|
6501
6516
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/escape-case.md
|
|
6503
6518
|
*/
|
|
6504
6519
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
6505
6520
|
/**
|
|
6506
6521
|
* Add expiration conditions to TODO comments.
|
|
6507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/expiring-todo-comments.md
|
|
6508
6523
|
*/
|
|
6509
6524
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
6510
6525
|
/**
|
|
6511
6526
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/explicit-length-check.md
|
|
6513
6528
|
*/
|
|
6514
6529
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
6515
6530
|
/**
|
|
6516
6531
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
6517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/explicit-timer-delay.md
|
|
6518
6533
|
*/
|
|
6519
6534
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
6520
6535
|
/**
|
|
6521
6536
|
* Enforce a case style for filenames and directory names.
|
|
6522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/filename-case.md
|
|
6523
6538
|
*/
|
|
6524
6539
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
6525
6540
|
/**
|
|
6526
6541
|
* Require identifiers to match a specified regular expression.
|
|
6527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/id-match.md
|
|
6528
6543
|
*/
|
|
6529
6544
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
6530
6545
|
/**
|
|
6531
6546
|
* Enforce specific import styles per module.
|
|
6532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/import-style.md
|
|
6533
6548
|
*/
|
|
6534
6549
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
6535
6550
|
/**
|
|
6536
6551
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
6537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/isolated-functions.md
|
|
6538
6553
|
*/
|
|
6539
6554
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
6555
|
+
/**
|
|
6556
|
+
* Require or disallow logical assignment operator shorthand
|
|
6557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/logical-assignment-operators.md
|
|
6558
|
+
*/
|
|
6559
|
+
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
6540
6560
|
/**
|
|
6541
6561
|
* Limit the depth of nested calls.
|
|
6542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/max-nested-calls.md
|
|
6543
6563
|
*/
|
|
6544
6564
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
6545
6565
|
/**
|
|
6546
|
-
* Enforce
|
|
6547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6566
|
+
* Enforce replacements for variable, property, and filenames.
|
|
6567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/name-replacements.md
|
|
6568
|
+
*/
|
|
6569
|
+
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
6570
|
+
/**
|
|
6571
|
+
* Enforce correct use of `new` for builtin constructors.
|
|
6572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/new-for-builtins.md
|
|
6548
6573
|
*/
|
|
6549
6574
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
6550
6575
|
/**
|
|
6551
6576
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
6553
6578
|
*/
|
|
6554
6579
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
6555
6580
|
/**
|
|
6556
6581
|
* Disallow recursive access to `this` within getters and setters.
|
|
6557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-accessor-recursion.md
|
|
6558
6583
|
*/
|
|
6559
6584
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6585
|
+
/**
|
|
6586
|
+
* Disallow bitwise operators where a logical operator was likely intended.
|
|
6587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
6588
|
+
*/
|
|
6589
|
+
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
6560
6590
|
/**
|
|
6561
6591
|
* Disallow anonymous functions and classes as the default export.
|
|
6562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-anonymous-default-export.md
|
|
6563
6593
|
*/
|
|
6564
6594
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
6565
6595
|
/**
|
|
6566
6596
|
* Prevent passing a function reference directly to iterator methods.
|
|
6567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-callback-reference.md
|
|
6568
6598
|
*/
|
|
6569
6599
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
6600
|
+
/**
|
|
6601
|
+
* Disallow array accumulation with `Array#concat()` in loops.
|
|
6602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-concat-in-loop.md
|
|
6603
|
+
*/
|
|
6604
|
+
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
6570
6605
|
/**
|
|
6571
6606
|
* Disallow using reference values as `Array#fill()` values.
|
|
6572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
6573
6608
|
*/
|
|
6574
6609
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
6575
6610
|
/**
|
|
6576
6611
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
6577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-from-fill.md
|
|
6578
6613
|
*/
|
|
6579
6614
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
6615
|
+
/**
|
|
6616
|
+
* Disallow front-of-array mutation.
|
|
6617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-front-mutation.md
|
|
6618
|
+
*/
|
|
6619
|
+
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
6580
6620
|
/**
|
|
6581
6621
|
* Disallow using the `this` argument in array methods.
|
|
6582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-method-this-argument.md
|
|
6583
6623
|
*/
|
|
6584
6624
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
6585
6625
|
/**
|
|
6586
6626
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
6588
6628
|
* @deprecated
|
|
6589
6629
|
*/
|
|
6590
6630
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
6591
6631
|
/**
|
|
6592
6632
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-reduce.md
|
|
6594
6634
|
*/
|
|
6595
6635
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
6596
6636
|
/**
|
|
6597
6637
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-reverse.md
|
|
6599
6639
|
*/
|
|
6600
6640
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
6601
6641
|
/**
|
|
6602
6642
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-sort.md
|
|
6604
6644
|
*/
|
|
6605
6645
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
6646
|
+
/**
|
|
6647
|
+
* Disallow sorting arrays to get the minimum or maximum value.
|
|
6648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
6649
|
+
*/
|
|
6650
|
+
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
6651
|
+
/**
|
|
6652
|
+
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
6653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-splice.md
|
|
6654
|
+
*/
|
|
6655
|
+
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
6606
6656
|
/**
|
|
6607
6657
|
* Disallow asterisk prefixes in documentation comments.
|
|
6608
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
6609
6659
|
*/
|
|
6610
6660
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
6611
6661
|
/**
|
|
6612
6662
|
* Disallow member access from await expression.
|
|
6613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-await-expression-member.md
|
|
6614
6664
|
*/
|
|
6615
6665
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
6616
6666
|
/**
|
|
6617
6667
|
* Disallow using `await` in `Promise` method parameters.
|
|
6618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-await-in-promise-methods.md
|
|
6619
6669
|
*/
|
|
6620
6670
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6621
6671
|
/**
|
|
6622
6672
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
6623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-blob-to-file.md
|
|
6624
6674
|
*/
|
|
6625
6675
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
6676
|
+
/**
|
|
6677
|
+
* Disallow boolean-returning sort comparators.
|
|
6678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
6679
|
+
*/
|
|
6680
|
+
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
6626
6681
|
/**
|
|
6627
6682
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
6628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-break-in-nested-loop.md
|
|
6629
6684
|
*/
|
|
6630
6685
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
6631
6686
|
/**
|
|
6632
6687
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
6633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-canvas-to-image.md
|
|
6634
6689
|
*/
|
|
6635
6690
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
6691
|
+
/**
|
|
6692
|
+
* Disallow chained comparisons such as `a < b < c`.
|
|
6693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-chained-comparison.md
|
|
6694
|
+
*/
|
|
6695
|
+
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
6696
|
+
/**
|
|
6697
|
+
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
6698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-collection-bracket-access.md
|
|
6699
|
+
*/
|
|
6700
|
+
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
6636
6701
|
/**
|
|
6637
6702
|
* Disallow dynamic object property existence checks.
|
|
6638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-computed-property-existence-check.md
|
|
6639
6704
|
*/
|
|
6640
6705
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
6641
6706
|
/**
|
|
6642
6707
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
6643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-confusing-array-splice.md
|
|
6644
6709
|
*/
|
|
6645
6710
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
6646
6711
|
/**
|
|
6647
6712
|
* Disallow confusing uses of `Array#with()`.
|
|
6648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-confusing-array-with.md
|
|
6649
6714
|
*/
|
|
6650
6715
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
6651
6716
|
/**
|
|
6652
6717
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-console-spaces.md
|
|
6654
6719
|
*/
|
|
6655
6720
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6721
|
+
/**
|
|
6722
|
+
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
6723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-constant-zero-expression.md
|
|
6724
|
+
*/
|
|
6725
|
+
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
6656
6726
|
/**
|
|
6657
6727
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
6658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
6659
6729
|
*/
|
|
6660
6730
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
6661
6731
|
/**
|
|
6662
6732
|
* Do not use `document.cookie` directly.
|
|
6663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-document-cookie.md
|
|
6664
6734
|
*/
|
|
6665
6735
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6736
|
+
/**
|
|
6737
|
+
* Disallow two comparisons of the same operands that can be combined into one.
|
|
6738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-double-comparison.md
|
|
6739
|
+
*/
|
|
6740
|
+
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
6741
|
+
/**
|
|
6742
|
+
* Disallow duplicate adjacent branches in if chains.
|
|
6743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-duplicate-if-branches.md
|
|
6744
|
+
*/
|
|
6745
|
+
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
6746
|
+
/**
|
|
6747
|
+
* Disallow adjacent duplicate operands in logical expressions.
|
|
6748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
6749
|
+
*/
|
|
6750
|
+
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
6666
6751
|
/**
|
|
6667
6752
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
6668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-duplicate-loops.md
|
|
6669
6754
|
*/
|
|
6670
6755
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
6671
6756
|
/**
|
|
6672
6757
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
6673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6758
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-duplicate-set-values.md
|
|
6674
6759
|
*/
|
|
6675
6760
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
6676
6761
|
/**
|
|
6677
6762
|
* Disallow empty files.
|
|
6678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-empty-file.md
|
|
6679
6764
|
*/
|
|
6680
6765
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
6681
6766
|
/**
|
|
6682
6767
|
* Disallow assigning to built-in error properties.
|
|
6683
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-error-property-assignment.md
|
|
6684
6769
|
*/
|
|
6685
6770
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6686
6771
|
/**
|
|
6687
6772
|
* Disallow exports in scripts.
|
|
6688
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-exports-in-scripts.md
|
|
6689
6774
|
*/
|
|
6690
6775
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
6691
6776
|
/**
|
|
6692
6777
|
* Prefer `for…of` over the `forEach` method.
|
|
6693
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-for-each.md
|
|
6694
6779
|
*/
|
|
6695
6780
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
6696
6781
|
/**
|
|
6697
6782
|
* 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/
|
|
6783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-for-loop.md
|
|
6699
6784
|
*/
|
|
6700
6785
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
6701
6786
|
/**
|
|
6702
6787
|
* Disallow assigning properties on the global object.
|
|
6703
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-global-object-property-assignment.md
|
|
6704
6789
|
*/
|
|
6705
6790
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6706
6791
|
/**
|
|
6707
6792
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
6708
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
6709
6794
|
* @deprecated
|
|
6710
6795
|
*/
|
|
6711
6796
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
6712
6797
|
/**
|
|
6713
6798
|
* Disallow immediate mutation after variable assignment.
|
|
6714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6799
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-immediate-mutation.md
|
|
6715
6800
|
*/
|
|
6716
6801
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
6802
|
+
/**
|
|
6803
|
+
* Disallow impossible comparisons against `.length` or `.size`.
|
|
6804
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-impossible-length-comparison.md
|
|
6805
|
+
*/
|
|
6806
|
+
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
6717
6807
|
/**
|
|
6718
6808
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
6719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-incorrect-query-selector.md
|
|
6720
6810
|
*/
|
|
6721
6811
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
6722
6812
|
/**
|
|
6723
6813
|
* Disallow incorrect template literal interpolation syntax.
|
|
6724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6814
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
6725
6815
|
*/
|
|
6726
6816
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
6727
6817
|
/**
|
|
6728
6818
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6819
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
6730
6820
|
* @deprecated
|
|
6731
6821
|
*/
|
|
6732
6822
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
6733
6823
|
/**
|
|
6734
6824
|
* Disallow `instanceof` with built-in objects
|
|
6735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-instanceof-builtins.md
|
|
6736
6826
|
*/
|
|
6737
6827
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
6738
6828
|
/**
|
|
6739
|
-
* Disallow calling functions with an invalid number of arguments.
|
|
6740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6829
|
+
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
6830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-invalid-argument-count.md
|
|
6831
|
+
*/
|
|
6832
|
+
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
6833
|
+
/**
|
|
6834
|
+
* Disallow comparing a single character from a string to a multi-character string.
|
|
6835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-invalid-character-comparison.md
|
|
6741
6836
|
*/
|
|
6742
|
-
'unicorn/no-invalid-
|
|
6837
|
+
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
6743
6838
|
/**
|
|
6744
6839
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-invalid-fetch-options.md
|
|
6746
6841
|
*/
|
|
6747
6842
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6748
6843
|
/**
|
|
6749
6844
|
* Disallow invalid `accept` values on file inputs.
|
|
6750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
6751
6846
|
*/
|
|
6752
6847
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
6753
6848
|
/**
|
|
6754
6849
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
6756
6851
|
*/
|
|
6757
6852
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
6758
6853
|
/**
|
|
6759
6854
|
* Disallow identifiers starting with `new` or `class`.
|
|
6760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-keyword-prefix.md
|
|
6761
6856
|
*/
|
|
6762
6857
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
6763
6858
|
/**
|
|
6764
6859
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
6765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-late-current-target-access.md
|
|
6766
6861
|
*/
|
|
6767
6862
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
6768
6863
|
/**
|
|
6769
6864
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
6771
6866
|
* @deprecated
|
|
6772
6867
|
*/
|
|
6773
6868
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
6774
6869
|
/**
|
|
6775
6870
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-lonely-if.md
|
|
6777
6872
|
*/
|
|
6778
6873
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
6874
|
+
/**
|
|
6875
|
+
* Disallow mutating a loop iterable during iteration.
|
|
6876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
6877
|
+
*/
|
|
6878
|
+
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
6779
6879
|
/**
|
|
6780
6880
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
6782
6882
|
*/
|
|
6783
6883
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6784
6884
|
/**
|
|
6785
6885
|
* Disallow manually wrapped comments.
|
|
6786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
6787
6887
|
*/
|
|
6788
6888
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
6789
6889
|
/**
|
|
6790
6890
|
* Disallow checking a Map key before accessing a different key.
|
|
6791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-mismatched-map-key.md
|
|
6792
6892
|
*/
|
|
6793
6893
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
6894
|
+
/**
|
|
6895
|
+
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
6896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-misrefactored-assignment.md
|
|
6897
|
+
*/
|
|
6898
|
+
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
6794
6899
|
/**
|
|
6795
6900
|
* Disallow named usage of default import and export.
|
|
6796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-named-default.md
|
|
6797
6902
|
*/
|
|
6798
6903
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
6799
6904
|
/**
|
|
6800
6905
|
* Disallow negated array predicate calls.
|
|
6801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-negated-array-predicate.md
|
|
6802
6907
|
*/
|
|
6803
6908
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
6804
6909
|
/**
|
|
6805
6910
|
* Disallow negated comparisons.
|
|
6806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-negated-comparison.md
|
|
6807
6912
|
*/
|
|
6808
6913
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
6809
6914
|
/**
|
|
6810
6915
|
* Disallow negated conditions.
|
|
6811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-negated-condition.md
|
|
6812
6917
|
*/
|
|
6813
6918
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
6814
6919
|
/**
|
|
6815
6920
|
* Disallow negated expression in equality check.
|
|
6816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-negation-in-equality-check.md
|
|
6817
6922
|
*/
|
|
6818
6923
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
6819
6924
|
/**
|
|
6820
6925
|
* Disallow nested ternary expressions.
|
|
6821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-nested-ternary.md
|
|
6822
6927
|
*/
|
|
6823
6928
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6824
6929
|
/**
|
|
6825
6930
|
* Disallow `new Array()`.
|
|
6826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-new-array.md
|
|
6827
6932
|
*/
|
|
6828
6933
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
6829
6934
|
/**
|
|
6830
6935
|
* 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/
|
|
6936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-new-buffer.md
|
|
6832
6937
|
*/
|
|
6833
6938
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
6939
|
+
/**
|
|
6940
|
+
* Disallow non-function values with function-style verb prefixes.
|
|
6941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
6942
|
+
*/
|
|
6943
|
+
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
6944
|
+
/**
|
|
6945
|
+
* Disallow non-standard properties on built-in objects.
|
|
6946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
6947
|
+
*/
|
|
6948
|
+
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
6834
6949
|
/**
|
|
6835
6950
|
* Disallow the use of the `null` literal.
|
|
6836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-null.md
|
|
6837
6952
|
*/
|
|
6838
6953
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
6839
6954
|
/**
|
|
6840
6955
|
* Disallow the use of objects as default parameters.
|
|
6841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-object-as-default-parameter.md
|
|
6842
6957
|
*/
|
|
6843
6958
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
6844
6959
|
/**
|
|
6845
6960
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
6846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-object-methods-with-collections.md
|
|
6847
6962
|
*/
|
|
6848
6963
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
6849
6964
|
/**
|
|
6850
6965
|
* Disallow optional chaining on undeclared variables.
|
|
6851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
6852
6967
|
*/
|
|
6853
6968
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
6854
6969
|
/**
|
|
6855
6970
|
* Disallow `process.exit()`.
|
|
6856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-process-exit.md
|
|
6857
6972
|
*/
|
|
6858
6973
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
6859
6974
|
/**
|
|
6860
6975
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
6861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-redundant-comparison.md
|
|
6862
6977
|
*/
|
|
6863
6978
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
6864
6979
|
/**
|
|
6865
|
-
* Disallow
|
|
6866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6980
|
+
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
6981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-return-array-push.md
|
|
6867
6982
|
*/
|
|
6868
6983
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
6984
|
+
/**
|
|
6985
|
+
* Disallow selector syntax in DOM names.
|
|
6986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-selector-as-dom-name.md
|
|
6987
|
+
*/
|
|
6988
|
+
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
6869
6989
|
/**
|
|
6870
6990
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
6872
6992
|
*/
|
|
6873
6993
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6874
6994
|
/**
|
|
6875
6995
|
* Disallow classes that only have static members.
|
|
6876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-static-only-class.md
|
|
6877
6997
|
*/
|
|
6878
6998
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
6879
6999
|
/**
|
|
6880
7000
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
6881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-subtraction-comparison.md
|
|
6882
7002
|
*/
|
|
6883
7003
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
6884
7004
|
/**
|
|
6885
7005
|
* Disallow `then` property.
|
|
6886
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-thenable.md
|
|
6887
7007
|
*/
|
|
6888
7008
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
6889
7009
|
/**
|
|
6890
7010
|
* Disallow assigning `this` to a variable.
|
|
6891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-this-assignment.md
|
|
6892
7012
|
*/
|
|
6893
7013
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
6894
7014
|
/**
|
|
6895
7015
|
* Disallow `this` outside of classes.
|
|
6896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-this-outside-of-class.md
|
|
6897
7017
|
*/
|
|
6898
7018
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
7019
|
+
/**
|
|
7020
|
+
* Disallow assigning to top-level variables from inside functions.
|
|
7021
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
7022
|
+
*/
|
|
7023
|
+
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
6899
7024
|
/**
|
|
6900
7025
|
* Disallow top-level side effects in exported modules.
|
|
6901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-top-level-side-effects.md
|
|
6902
7027
|
*/
|
|
6903
7028
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
6904
7029
|
/**
|
|
6905
7030
|
* Disallow comparing `undefined` using `typeof`.
|
|
6906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-typeof-undefined.md
|
|
6907
7032
|
*/
|
|
6908
7033
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
7034
|
+
/**
|
|
7035
|
+
* Disallow referencing methods without calling them.
|
|
7036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-uncalled-method.md
|
|
7037
|
+
*/
|
|
7038
|
+
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
6909
7039
|
/**
|
|
6910
7040
|
* Require class members to be declared.
|
|
6911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7041
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-undeclared-class-members.md
|
|
6912
7042
|
*/
|
|
6913
7043
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
6914
7044
|
/**
|
|
6915
7045
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7046
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6917
7047
|
*/
|
|
6918
7048
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6919
7049
|
/**
|
|
6920
7050
|
* 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/
|
|
7051
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
6922
7052
|
*/
|
|
6923
7053
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
6924
7054
|
/**
|
|
6925
7055
|
* Disallow awaiting non-promise values.
|
|
6926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7056
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unnecessary-await.md
|
|
6927
7057
|
*/
|
|
6928
7058
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
7059
|
+
/**
|
|
7060
|
+
* Disallow unnecessary comparisons against boolean literals.
|
|
7061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
7062
|
+
*/
|
|
7063
|
+
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
6929
7064
|
/**
|
|
6930
7065
|
* Disallow unnecessary `globalThis` references.
|
|
6931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7066
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unnecessary-global-this.md
|
|
6932
7067
|
*/
|
|
6933
7068
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
6934
7069
|
/**
|
|
6935
7070
|
* Disallow unnecessary nested ternary expressions.
|
|
6936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7071
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
6937
7072
|
*/
|
|
6938
7073
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6939
7074
|
/**
|
|
6940
7075
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6941
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7076
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
6942
7077
|
*/
|
|
6943
7078
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
6944
7079
|
/**
|
|
6945
7080
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
6947
7082
|
*/
|
|
6948
7083
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
6949
7084
|
/**
|
|
6950
7085
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
6951
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7086
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unnecessary-splice.md
|
|
6952
7087
|
*/
|
|
6953
7088
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
6954
7089
|
/**
|
|
6955
7090
|
* Disallow unreadable array destructuring.
|
|
6956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7091
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
6957
7092
|
*/
|
|
6958
7093
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
7094
|
+
/**
|
|
7095
|
+
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
7096
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
7097
|
+
*/
|
|
7098
|
+
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
6959
7099
|
/**
|
|
6960
7100
|
* Disallow unreadable IIFEs.
|
|
6961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7101
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unreadable-iife.md
|
|
6962
7102
|
*/
|
|
6963
7103
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
6964
7104
|
/**
|
|
6965
7105
|
* Disallow unreadable `new` expressions.
|
|
6966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7106
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unreadable-new-expression.md
|
|
6967
7107
|
*/
|
|
6968
7108
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
6969
7109
|
/**
|
|
6970
7110
|
* Disallow unreadable object destructuring.
|
|
6971
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7111
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
6972
7112
|
*/
|
|
6973
7113
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
6974
7114
|
/**
|
|
6975
7115
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
6976
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7116
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
6977
7117
|
*/
|
|
6978
7118
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
6979
7119
|
/**
|
|
6980
7120
|
* Disallow unsafe DOM HTML APIs.
|
|
6981
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7121
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unsafe-dom-html.md
|
|
6982
7122
|
*/
|
|
6983
7123
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
6984
7124
|
/**
|
|
6985
7125
|
* Disallow unsafe values as property keys.
|
|
6986
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7126
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unsafe-property-key.md
|
|
6987
7127
|
*/
|
|
6988
7128
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
6989
7129
|
/**
|
|
6990
7130
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
6991
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7131
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
6992
7132
|
*/
|
|
6993
7133
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
6994
7134
|
/**
|
|
6995
7135
|
* Disallow ignoring the return value of selected array methods.
|
|
6996
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7136
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unused-array-method-return.md
|
|
6997
7137
|
*/
|
|
6998
7138
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
6999
7139
|
/**
|
|
7000
7140
|
* Disallow unused object properties.
|
|
7001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7141
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unused-properties.md
|
|
7002
7142
|
*/
|
|
7003
7143
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
7004
7144
|
/**
|
|
7005
7145
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
7006
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7146
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-boolean-cast.md
|
|
7007
7147
|
*/
|
|
7008
7148
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
7149
|
+
/**
|
|
7150
|
+
* Disallow useless type coercions of values that are already of the target type.
|
|
7151
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-coercion.md
|
|
7152
|
+
*/
|
|
7153
|
+
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
7009
7154
|
/**
|
|
7010
7155
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
7011
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7156
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-collection-argument.md
|
|
7012
7157
|
*/
|
|
7013
7158
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
7159
|
+
/**
|
|
7160
|
+
* Disallow useless compound assignments such as `x += 0`.
|
|
7161
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-compound-assignment.md
|
|
7162
|
+
*/
|
|
7163
|
+
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
7014
7164
|
/**
|
|
7015
7165
|
* Disallow useless concatenation of literals.
|
|
7016
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7166
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-concat.md
|
|
7017
7167
|
*/
|
|
7018
7168
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
7169
|
+
/**
|
|
7170
|
+
* Disallow useless `continue` statements.
|
|
7171
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-continue.md
|
|
7172
|
+
*/
|
|
7173
|
+
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
7174
|
+
/**
|
|
7175
|
+
* Disallow unnecessary existence checks before deletion.
|
|
7176
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-delete-check.md
|
|
7177
|
+
*/
|
|
7178
|
+
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
7019
7179
|
/**
|
|
7020
7180
|
* Disallow `else` after a statement that exits.
|
|
7021
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7181
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-else.md
|
|
7022
7182
|
*/
|
|
7023
7183
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
7024
7184
|
/**
|
|
7025
7185
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
7026
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7186
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
7027
7187
|
*/
|
|
7028
7188
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
7029
7189
|
/**
|
|
7030
7190
|
* Disallow useless fallback when spreading in object literals.
|
|
7031
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7191
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
7032
7192
|
*/
|
|
7033
7193
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
7034
7194
|
/**
|
|
7035
7195
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
7036
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7196
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
7037
7197
|
*/
|
|
7038
7198
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7039
7199
|
/**
|
|
7040
7200
|
* Disallow useless array length check.
|
|
7041
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7201
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-length-check.md
|
|
7042
7202
|
*/
|
|
7043
7203
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
7204
|
+
/**
|
|
7205
|
+
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
7206
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-logical-operand.md
|
|
7207
|
+
*/
|
|
7208
|
+
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
7209
|
+
/**
|
|
7210
|
+
* Disallow useless overrides of class methods.
|
|
7211
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-override.md
|
|
7212
|
+
*/
|
|
7213
|
+
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
7044
7214
|
/**
|
|
7045
7215
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
7046
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7216
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
7047
7217
|
*/
|
|
7048
7218
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
7049
7219
|
/**
|
|
7050
7220
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
7051
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-recursion.md
|
|
7052
7222
|
*/
|
|
7053
7223
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
7054
7224
|
/**
|
|
7055
7225
|
* Disallow unnecessary spread.
|
|
7056
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7226
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-spread.md
|
|
7057
7227
|
*/
|
|
7058
7228
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
7059
7229
|
/**
|
|
7060
7230
|
* Disallow useless case in switch statements.
|
|
7061
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7231
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-switch-case.md
|
|
7062
7232
|
*/
|
|
7063
7233
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
7064
7234
|
/**
|
|
7065
7235
|
* Disallow useless template literal expressions.
|
|
7066
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7236
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-template-literals.md
|
|
7067
7237
|
*/
|
|
7068
7238
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
7069
7239
|
/**
|
|
7070
7240
|
* Disallow useless `undefined`.
|
|
7071
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-undefined.md
|
|
7072
7242
|
*/
|
|
7073
7243
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
7244
|
+
/**
|
|
7245
|
+
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
7246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
7247
|
+
*/
|
|
7248
|
+
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
7074
7249
|
/**
|
|
7075
7250
|
* Disallow number literals with zero fractions or dangling dots.
|
|
7076
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-zero-fractions.md
|
|
7077
7252
|
*/
|
|
7078
7253
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
7079
7254
|
/**
|
|
7080
7255
|
* Enforce proper case for numeric literals.
|
|
7081
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/number-literal-case.md
|
|
7082
7257
|
*/
|
|
7083
7258
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
7084
7259
|
/**
|
|
7085
7260
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
7086
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/numeric-separators-style.md
|
|
7087
7262
|
*/
|
|
7088
7263
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
7264
|
+
/**
|
|
7265
|
+
* Require assignment operator shorthand where possible.
|
|
7266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/operator-assignment.md
|
|
7267
|
+
*/
|
|
7268
|
+
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
7089
7269
|
/**
|
|
7090
7270
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
7091
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-add-event-listener.md
|
|
7092
7272
|
*/
|
|
7093
7273
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
7094
7274
|
/**
|
|
7095
7275
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
7096
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
7097
7277
|
*/
|
|
7098
7278
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
7099
7279
|
/**
|
|
7100
7280
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
7101
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-find.md
|
|
7102
7282
|
*/
|
|
7103
7283
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
7104
7284
|
/**
|
|
7105
7285
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
7106
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-flat.md
|
|
7107
7287
|
*/
|
|
7108
7288
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
7109
7289
|
/**
|
|
7110
7290
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
7111
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-flat-map.md
|
|
7112
7292
|
*/
|
|
7113
7293
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7294
|
+
/**
|
|
7295
|
+
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
7296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-from-async.md
|
|
7297
|
+
*/
|
|
7298
|
+
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
7114
7299
|
/**
|
|
7115
7300
|
* Prefer using the `Array.from()` mapping function argument.
|
|
7116
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-from-map.md
|
|
7117
7302
|
*/
|
|
7118
7303
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
7119
7304
|
/**
|
|
7120
7305
|
* 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/
|
|
7306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-index-of.md
|
|
7122
7307
|
*/
|
|
7123
7308
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
7309
|
+
/**
|
|
7310
|
+
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
7311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
7312
|
+
*/
|
|
7313
|
+
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
7124
7314
|
/**
|
|
7125
7315
|
* 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/
|
|
7316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-last-methods.md
|
|
7127
7317
|
*/
|
|
7128
7318
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
7319
|
+
/**
|
|
7320
|
+
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
7321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-slice.md
|
|
7322
|
+
*/
|
|
7323
|
+
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
7129
7324
|
/**
|
|
7130
7325
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
7131
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-some.md
|
|
7132
7327
|
*/
|
|
7133
7328
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
7134
7329
|
/**
|
|
7135
7330
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
7136
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-at.md
|
|
7137
7332
|
*/
|
|
7138
7333
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
7139
7334
|
/**
|
|
7140
7335
|
* Prefer `await` over promise chaining.
|
|
7141
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7336
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-await.md
|
|
7142
7337
|
*/
|
|
7143
7338
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
7144
7339
|
/**
|
|
7145
7340
|
* Prefer `BigInt` literals over the constructor.
|
|
7146
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-bigint-literals.md
|
|
7147
7342
|
*/
|
|
7148
7343
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
7149
7344
|
/**
|
|
7150
7345
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
7151
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
7152
7347
|
*/
|
|
7153
7348
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
7349
|
+
/**
|
|
7350
|
+
* Prefer directly returning boolean expressions over `if` statements.
|
|
7351
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-boolean-return.md
|
|
7352
|
+
*/
|
|
7353
|
+
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
7154
7354
|
/**
|
|
7155
7355
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
7156
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-class-fields.md
|
|
7157
7357
|
*/
|
|
7158
7358
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
7159
7359
|
/**
|
|
7160
7360
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
7161
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7361
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-classlist-toggle.md
|
|
7162
7362
|
*/
|
|
7163
7363
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
7164
7364
|
/**
|
|
7165
7365
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
7166
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7366
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-code-point.md
|
|
7167
7367
|
*/
|
|
7168
7368
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
7369
|
+
/**
|
|
7370
|
+
* Prefer early continues over whole-loop conditional wrapping.
|
|
7371
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-continue.md
|
|
7372
|
+
*/
|
|
7373
|
+
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
7169
7374
|
/**
|
|
7170
7375
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
7171
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-date-now.md
|
|
7172
7377
|
*/
|
|
7173
7378
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
7174
7379
|
/**
|
|
7175
7380
|
* Prefer default parameters over reassignment.
|
|
7176
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-default-parameters.md
|
|
7177
7382
|
*/
|
|
7178
7383
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
7179
7384
|
/**
|
|
7180
7385
|
* Prefer direct iteration over default iterator method calls.
|
|
7181
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-direct-iteration.md
|
|
7182
7387
|
*/
|
|
7183
7388
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
7184
7389
|
/**
|
|
7185
7390
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
7186
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-dispose.md
|
|
7187
7392
|
*/
|
|
7188
7393
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
7189
7394
|
/**
|
|
7190
7395
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
7191
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-dom-node-append.md
|
|
7192
7397
|
*/
|
|
7193
7398
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
7194
7399
|
/**
|
|
7195
7400
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
7196
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
7197
7402
|
* @deprecated
|
|
7198
7403
|
*/
|
|
7199
7404
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
7200
7405
|
/**
|
|
7201
7406
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
7202
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
7203
7408
|
*/
|
|
7204
7409
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<[]>;
|
|
7205
7410
|
/**
|
|
7206
7411
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
7207
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-dom-node-remove.md
|
|
7208
7413
|
*/
|
|
7209
7414
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
7210
7415
|
/**
|
|
7211
7416
|
* Prefer `.textContent` over `.innerText`.
|
|
7212
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
7213
7418
|
*/
|
|
7214
7419
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
7215
7420
|
/**
|
|
7216
7421
|
* Prefer early returns over full-function conditional wrapping.
|
|
7217
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-early-return.md
|
|
7218
7423
|
*/
|
|
7219
7424
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
7425
|
+
/**
|
|
7426
|
+
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
7427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-else-if.md
|
|
7428
|
+
*/
|
|
7429
|
+
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
7220
7430
|
/**
|
|
7221
7431
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
7222
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-event-target.md
|
|
7223
7433
|
*/
|
|
7224
7434
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
7225
7435
|
/**
|
|
7226
7436
|
* Prefer `export…from` when re-exporting.
|
|
7227
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-export-from.md
|
|
7228
7438
|
*/
|
|
7229
7439
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
7440
|
+
/**
|
|
7441
|
+
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
7442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
7443
|
+
*/
|
|
7444
|
+
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7230
7445
|
/**
|
|
7231
7446
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
7232
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
7233
7448
|
*/
|
|
7234
7449
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
7235
7450
|
/**
|
|
7236
7451
|
* Prefer global numeric constants over `Number` static properties.
|
|
7237
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-global-number-constants.md
|
|
7238
7453
|
*/
|
|
7239
7454
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
7240
7455
|
/**
|
|
7241
7456
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
7242
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-global-this.md
|
|
7243
7458
|
*/
|
|
7244
7459
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
7460
|
+
/**
|
|
7461
|
+
* Prefer `.has()` when checking existence.
|
|
7462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-has-check.md
|
|
7463
|
+
*/
|
|
7464
|
+
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
7465
|
+
/**
|
|
7466
|
+
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
7467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
7468
|
+
*/
|
|
7469
|
+
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
7245
7470
|
/**
|
|
7246
7471
|
* Prefer HTTPS over HTTP.
|
|
7247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-https.md
|
|
7248
7473
|
*/
|
|
7249
7474
|
'unicorn/prefer-https'?: Linter.RuleEntry<[]>;
|
|
7250
7475
|
/**
|
|
7251
7476
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
7252
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
7253
7478
|
*/
|
|
7254
7479
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
7255
7480
|
/**
|
|
7256
7481
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
7257
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-import-meta-properties.md
|
|
7258
7483
|
*/
|
|
7259
7484
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
7260
7485
|
/**
|
|
7261
7486
|
* 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/
|
|
7487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-includes.md
|
|
7263
7488
|
*/
|
|
7264
7489
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
7265
7490
|
/**
|
|
7266
7491
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
7267
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
7268
7493
|
*/
|
|
7269
7494
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
7270
7495
|
/**
|
|
7271
7496
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
7272
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
7273
7498
|
*/
|
|
7274
7499
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
7275
7500
|
/**
|
|
7276
7501
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
7277
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-iterator-concat.md
|
|
7278
7503
|
*/
|
|
7279
7504
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
7280
7505
|
/**
|
|
7281
7506
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
7282
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-iterator-to-array.md
|
|
7283
7508
|
*/
|
|
7284
7509
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7285
7510
|
/**
|
|
7286
7511
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
7287
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
7288
7513
|
*/
|
|
7289
7514
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
7290
7515
|
/**
|
|
7291
7516
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
7292
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
7293
7518
|
* @deprecated
|
|
7294
7519
|
*/
|
|
7295
7520
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
7296
7521
|
/**
|
|
7297
7522
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
7298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7523
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
7299
7524
|
*/
|
|
7300
7525
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
7301
7526
|
/**
|
|
7302
7527
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
7303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7528
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-location-assign.md
|
|
7304
7529
|
*/
|
|
7305
7530
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
7306
7531
|
/**
|
|
7307
7532
|
* Prefer using a logical operator over a ternary.
|
|
7308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7533
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
7309
7534
|
*/
|
|
7310
7535
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
7536
|
+
/**
|
|
7537
|
+
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
7538
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-map-from-entries.md
|
|
7539
|
+
*/
|
|
7540
|
+
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
7311
7541
|
/**
|
|
7312
7542
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
7313
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7543
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-math-abs.md
|
|
7314
7544
|
*/
|
|
7315
7545
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
7546
|
+
/**
|
|
7547
|
+
* Prefer `Math` constants over their approximate numeric values.
|
|
7548
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-math-constants.md
|
|
7549
|
+
*/
|
|
7550
|
+
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
7316
7551
|
/**
|
|
7317
7552
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
7318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7553
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-math-min-max.md
|
|
7319
7554
|
*/
|
|
7320
7555
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7321
7556
|
/**
|
|
7322
7557
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
7323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-math-trunc.md
|
|
7324
7559
|
*/
|
|
7325
7560
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
7326
7561
|
/**
|
|
7327
7562
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
7328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-minimal-ternary.md
|
|
7329
7564
|
*/
|
|
7330
|
-
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<
|
|
7565
|
+
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
7331
7566
|
/**
|
|
7332
7567
|
* Prefer modern DOM APIs.
|
|
7333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
7334
7569
|
*/
|
|
7335
7570
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
7336
7571
|
/**
|
|
7337
7572
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
7338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-modern-math-apis.md
|
|
7339
7574
|
*/
|
|
7340
7575
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
7341
7576
|
/**
|
|
7342
7577
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
7343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7578
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-module.md
|
|
7344
7579
|
*/
|
|
7345
7580
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
7346
7581
|
/**
|
|
7347
7582
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
7348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7583
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
7349
7584
|
*/
|
|
7350
7585
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
7351
7586
|
/**
|
|
7352
7587
|
* Prefer negative index over `.length - index` when possible.
|
|
7353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-negative-index.md
|
|
7354
7589
|
*/
|
|
7355
7590
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
7356
7591
|
/**
|
|
7357
7592
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
7358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-node-protocol.md
|
|
7359
7594
|
*/
|
|
7360
7595
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
7361
7596
|
/**
|
|
7362
7597
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
7363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-number-coercion.md
|
|
7364
7599
|
*/
|
|
7365
7600
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
7366
7601
|
/**
|
|
7367
7602
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
7368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
7369
7604
|
*/
|
|
7370
7605
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
7371
7606
|
/**
|
|
7372
7607
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
7373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-number-properties.md
|
|
7374
7609
|
*/
|
|
7375
7610
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
7376
7611
|
/**
|
|
7377
7612
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
7378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-object-define-properties.md
|
|
7379
7614
|
*/
|
|
7380
7615
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
7381
7616
|
/**
|
|
7382
7617
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
7383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
7384
7619
|
*/
|
|
7385
7620
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
7386
7621
|
/**
|
|
7387
7622
|
* 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/
|
|
7623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-object-from-entries.md
|
|
7389
7624
|
*/
|
|
7390
7625
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
7391
7626
|
/**
|
|
7392
7627
|
* Prefer the most specific `Object` iterable method.
|
|
7393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
7394
7629
|
*/
|
|
7395
7630
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
7396
7631
|
/**
|
|
7397
7632
|
* Prefer omitting the `catch` binding parameter.
|
|
7398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
7399
7634
|
*/
|
|
7400
7635
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
7401
7636
|
/**
|
|
7402
7637
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
7403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-path2d.md
|
|
7404
7639
|
*/
|
|
7405
7640
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
7406
7641
|
/**
|
|
7407
7642
|
* Prefer private class fields over the underscore-prefix convention.
|
|
7408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-private-class-fields.md
|
|
7409
7644
|
*/
|
|
7410
7645
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
7646
|
+
/**
|
|
7647
|
+
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
7648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
7649
|
+
*/
|
|
7650
|
+
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
7411
7651
|
/**
|
|
7412
7652
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
7413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-prototype-methods.md
|
|
7414
7654
|
*/
|
|
7415
7655
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
7416
7656
|
/**
|
|
7417
7657
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
7418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-query-selector.md
|
|
7419
7659
|
*/
|
|
7420
7660
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
7421
7661
|
/**
|
|
7422
7662
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
7423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-queue-microtask.md
|
|
7424
7664
|
*/
|
|
7425
7665
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
7426
7666
|
/**
|
|
7427
7667
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
7428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-reflect-apply.md
|
|
7429
7669
|
*/
|
|
7430
7670
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
7671
|
+
/**
|
|
7672
|
+
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
7673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-regexp-escape.md
|
|
7674
|
+
*/
|
|
7675
|
+
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
7431
7676
|
/**
|
|
7432
7677
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
7433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-regexp-test.md
|
|
7434
7679
|
*/
|
|
7435
7680
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
7436
7681
|
/**
|
|
7437
7682
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
7438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-response-static-json.md
|
|
7439
7684
|
*/
|
|
7440
7685
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
7441
7686
|
/**
|
|
7442
7687
|
* Prefer `:scope` when using element query selector methods.
|
|
7443
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-scoped-selector.md
|
|
7444
7689
|
*/
|
|
7445
7690
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
7446
7691
|
/**
|
|
7447
7692
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
7448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-set-has.md
|
|
7449
7694
|
*/
|
|
7450
7695
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
7451
7696
|
/**
|
|
7452
7697
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
7453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-set-size.md
|
|
7454
7699
|
*/
|
|
7455
7700
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
7456
7701
|
/**
|
|
7457
7702
|
* Prefer arrow function properties over methods with a single return.
|
|
7458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-short-arrow-method.md
|
|
7459
7704
|
*/
|
|
7460
7705
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<[]>;
|
|
7461
7706
|
/**
|
|
7462
7707
|
* Prefer simple conditions first in logical expressions.
|
|
7463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-simple-condition-first.md
|
|
7464
7709
|
*/
|
|
7465
7710
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
7466
7711
|
/**
|
|
7467
7712
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
7468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
7469
7714
|
*/
|
|
7470
7715
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7471
7716
|
/**
|
|
7472
7717
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
7473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-single-array-predicate.md
|
|
7474
7719
|
*/
|
|
7475
7720
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7476
7721
|
/**
|
|
7477
7722
|
* 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/
|
|
7723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-single-call.md
|
|
7479
7724
|
*/
|
|
7480
7725
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
7481
7726
|
/**
|
|
7482
7727
|
* Prefer a single object destructuring declaration per local const source.
|
|
7483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
7484
7729
|
*/
|
|
7485
7730
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
7731
|
+
/**
|
|
7732
|
+
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
7733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-single-replace.md
|
|
7734
|
+
*/
|
|
7735
|
+
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
7486
7736
|
/**
|
|
7487
7737
|
* Prefer declaring variables in the smallest possible scope.
|
|
7488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-smaller-scope.md
|
|
7489
7739
|
*/
|
|
7490
7740
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
7491
7741
|
/**
|
|
7492
7742
|
* Prefer `String#split()` with a limit.
|
|
7493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-split-limit.md
|
|
7494
7744
|
*/
|
|
7495
7745
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
7496
7746
|
/**
|
|
7497
7747
|
* 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/
|
|
7748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-spread.md
|
|
7499
7749
|
*/
|
|
7500
7750
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
7501
7751
|
/**
|
|
7502
7752
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
7503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-string-match-all.md
|
|
7504
7754
|
*/
|
|
7505
7755
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
7506
7756
|
/**
|
|
7507
7757
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
7508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7758
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
7509
7759
|
*/
|
|
7510
7760
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
7511
7761
|
/**
|
|
7512
7762
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
7513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-string-raw.md
|
|
7514
7764
|
*/
|
|
7515
7765
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
7516
7766
|
/**
|
|
7517
7767
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
7518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-string-repeat.md
|
|
7519
7769
|
*/
|
|
7520
7770
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
7521
7771
|
/**
|
|
7522
7772
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
7523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-string-replace-all.md
|
|
7524
7774
|
*/
|
|
7525
7775
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
7526
7776
|
/**
|
|
7527
7777
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
7528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-string-slice.md
|
|
7529
7779
|
*/
|
|
7530
7780
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
7531
7781
|
/**
|
|
7532
7782
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()` and `String#indexOf() === 0`.
|
|
7533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
7534
7784
|
*/
|
|
7535
7785
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
7536
7786
|
/**
|
|
7537
7787
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
7538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
7539
7789
|
*/
|
|
7540
7790
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
7541
7791
|
/**
|
|
7542
7792
|
* Prefer using `structuredClone` to create a deep clone.
|
|
7543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-structured-clone.md
|
|
7544
7794
|
*/
|
|
7545
7795
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
7546
7796
|
/**
|
|
7547
7797
|
* Prefer `switch` over multiple `else-if`.
|
|
7548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-switch.md
|
|
7549
7799
|
*/
|
|
7550
7800
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
7551
7801
|
/**
|
|
7552
7802
|
* Prefer `Temporal` over `Date`.
|
|
7553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-temporal.md
|
|
7554
7804
|
*/
|
|
7555
7805
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
7556
7806
|
/**
|
|
7557
|
-
* Prefer ternary expressions over simple `if
|
|
7558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7807
|
+
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
7808
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-ternary.md
|
|
7559
7809
|
*/
|
|
7560
7810
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
7561
7811
|
/**
|
|
7562
7812
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-top-level-await.md
|
|
7564
7814
|
*/
|
|
7565
7815
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
7566
7816
|
/**
|
|
7567
7817
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7818
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-type-error.md
|
|
7569
7819
|
*/
|
|
7570
7820
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
7571
7821
|
/**
|
|
7572
|
-
* Require type literals to be last in union
|
|
7573
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7822
|
+
* Require type literals to be last in union types.
|
|
7823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-type-literal-last.md
|
|
7574
7824
|
*/
|
|
7575
7825
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
7576
7826
|
/**
|
|
7577
7827
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
7578
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7828
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-uint8array-base64.md
|
|
7579
7829
|
*/
|
|
7580
7830
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
7831
|
+
/**
|
|
7832
|
+
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
7833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-unary-minus.md
|
|
7834
|
+
*/
|
|
7835
|
+
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
7581
7836
|
/**
|
|
7582
7837
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
7583
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
7584
7839
|
*/
|
|
7585
7840
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
7841
|
+
/**
|
|
7842
|
+
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
7843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-url-can-parse.md
|
|
7844
|
+
*/
|
|
7845
|
+
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
7586
7846
|
/**
|
|
7587
7847
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
7588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-url-href.md
|
|
7589
7849
|
*/
|
|
7590
7850
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
7591
7851
|
/**
|
|
7592
|
-
*
|
|
7593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7852
|
+
* Prefer putting the condition in the while statement.
|
|
7853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-while-loop-condition.md
|
|
7854
|
+
*/
|
|
7855
|
+
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
7856
|
+
/**
|
|
7857
|
+
* Renamed to `unicorn/name-replacements`.
|
|
7858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
7859
|
+
* @deprecated
|
|
7594
7860
|
*/
|
|
7595
|
-
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<
|
|
7861
|
+
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
7596
7862
|
/**
|
|
7597
7863
|
* Enforce consistent relative URL style.
|
|
7598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7864
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/relative-url-style.md
|
|
7599
7865
|
*/
|
|
7600
7866
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
7601
7867
|
/**
|
|
7602
7868
|
* Enforce using the separator argument with `Array#join()`.
|
|
7603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7869
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/require-array-join-separator.md
|
|
7604
7870
|
*/
|
|
7605
7871
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
7606
7872
|
/**
|
|
7607
7873
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
7608
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7874
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/require-array-sort-compare.md
|
|
7609
7875
|
*/
|
|
7610
7876
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
7611
7877
|
/**
|
|
7612
7878
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
7613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/require-css-escape.md
|
|
7614
7880
|
*/
|
|
7615
7881
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
7616
7882
|
/**
|
|
7617
7883
|
* Require non-empty module attributes for imports and exports
|
|
7618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7884
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/require-module-attributes.md
|
|
7619
7885
|
*/
|
|
7620
7886
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
7621
7887
|
/**
|
|
7622
7888
|
* Require non-empty specifier list in import and export statements.
|
|
7623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/require-module-specifiers.md
|
|
7624
7890
|
*/
|
|
7625
7891
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
7626
7892
|
/**
|
|
7627
7893
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7629
7895
|
*/
|
|
7630
7896
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
7631
7897
|
/**
|
|
7632
7898
|
* Require passive event listeners for high-frequency events.
|
|
7633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7899
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/require-passive-events.md
|
|
7634
7900
|
*/
|
|
7635
7901
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
7636
7902
|
/**
|
|
7637
7903
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7904
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/require-post-message-target-origin.md
|
|
7639
7905
|
*/
|
|
7640
7906
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
7641
7907
|
/**
|
|
7642
7908
|
* Require boolean-returning Proxy traps to return booleans.
|
|
7643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7909
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
7644
7910
|
*/
|
|
7645
7911
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
7646
7912
|
/**
|
|
7647
7913
|
* Enforce better string content.
|
|
7648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/string-content.md
|
|
7649
7915
|
*/
|
|
7650
7916
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
7651
7917
|
/**
|
|
7652
7918
|
* Enforce consistent brace style for `case` clauses.
|
|
7653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/switch-case-braces.md
|
|
7654
7920
|
*/
|
|
7655
7921
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
7656
7922
|
/**
|
|
7657
7923
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
7658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/switch-case-break-position.md
|
|
7659
7925
|
*/
|
|
7660
7926
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
7661
7927
|
/**
|
|
7662
7928
|
* Fix whitespace-insensitive template indentation.
|
|
7663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/template-indent.md
|
|
7664
7930
|
*/
|
|
7665
7931
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
7666
7932
|
/**
|
|
7667
7933
|
* Enforce consistent case for text encoding identifiers.
|
|
7668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/text-encoding-identifier-case.md
|
|
7669
7935
|
*/
|
|
7670
7936
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
7671
7937
|
/**
|
|
7672
7938
|
* Require `new` when creating an error.
|
|
7673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/throw-new-error.md
|
|
7674
7940
|
*/
|
|
7675
7941
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
7676
7942
|
/**
|
|
7677
7943
|
* Limit the complexity of `try` blocks.
|
|
7678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/try-complexity.md
|
|
7679
7945
|
*/
|
|
7680
7946
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
7681
7947
|
/**
|
|
@@ -16917,6 +17183,7 @@ type UnicornClassReferenceInStaticMethods = [] | [{
|
|
|
16917
17183
|
preferSuper?: boolean;
|
|
16918
17184
|
}]; // ----- unicorn/comment-content -----
|
|
16919
17185
|
type UnicornCommentContent = [] | [{
|
|
17186
|
+
checkUniformCase?: boolean;
|
|
16920
17187
|
extendDefaultReplacements?: boolean;
|
|
16921
17188
|
replacements?: {
|
|
16922
17189
|
[k: string]: (false | string | {
|
|
@@ -16924,9 +17191,15 @@ type UnicornCommentContent = [] | [{
|
|
|
16924
17191
|
caseSensitive?: boolean;
|
|
16925
17192
|
}) | undefined;
|
|
16926
17193
|
};
|
|
17194
|
+
}]; // ----- unicorn/consistent-boolean-name -----
|
|
17195
|
+
type UnicornConsistentBooleanName = [] | [{
|
|
17196
|
+
checkProperties?: boolean;
|
|
17197
|
+
prefixes?: {
|
|
17198
|
+
[k: string]: boolean | undefined;
|
|
17199
|
+
};
|
|
16927
17200
|
}]; // ----- unicorn/consistent-class-member-order -----
|
|
16928
17201
|
type UnicornConsistentClassMemberOrder = [] | [{
|
|
16929
|
-
order?: [("static-field" | "static-block" | "
|
|
17202
|
+
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
17203
|
}]; // ----- unicorn/consistent-compound-words -----
|
|
16931
17204
|
type UnicornConsistentCompoundWords = [] | [{
|
|
16932
17205
|
checkProperties?: boolean;
|
|
@@ -16943,7 +17216,8 @@ interface _UnicornConsistentCompoundWords_Replacements {
|
|
|
16943
17216
|
}
|
|
16944
17217
|
interface _UnicornConsistentCompoundWords_TrueObject {
|
|
16945
17218
|
[k: string]: true | undefined;
|
|
16946
|
-
} // ----- unicorn/consistent-
|
|
17219
|
+
} // ----- unicorn/consistent-conditional-object-spread -----
|
|
17220
|
+
type UnicornConsistentConditionalObjectSpread = [] | [("logical" | "ternary")]; // ----- unicorn/consistent-export-decorator-position -----
|
|
16947
17221
|
type UnicornConsistentExportDecoratorPosition = [] | [("above" | "before" | "after")]; // ----- unicorn/consistent-function-scoping -----
|
|
16948
17222
|
type UnicornConsistentFunctionScoping = [] | [{
|
|
16949
17223
|
checkArrowFunctions?: boolean;
|
|
@@ -16957,7 +17231,11 @@ type UnicornConsistentFunctionStyle = [] | [{
|
|
|
16957
17231
|
reassignedVariables?: ("function-expression" | "arrow-function" | "ignore");
|
|
16958
17232
|
typedVariables?: ("function-expression" | "arrow-function" | "ignore");
|
|
16959
17233
|
}]; // ----- unicorn/consistent-json-file-read -----
|
|
16960
|
-
type UnicornConsistentJsonFileRead = [] | [("string" | "buffer")]; // ----- unicorn/
|
|
17234
|
+
type UnicornConsistentJsonFileRead = [] | [("string" | "buffer")]; // ----- unicorn/default-export-style -----
|
|
17235
|
+
type UnicornDefaultExportStyle = [] | [{
|
|
17236
|
+
functions?: ("inline" | "separate" | "ignore");
|
|
17237
|
+
classes?: ("inline" | "separate" | "ignore");
|
|
17238
|
+
}]; // ----- unicorn/dom-node-dataset -----
|
|
16961
17239
|
type UnicornDomNodeDataset = [] | [{
|
|
16962
17240
|
preferAttributes?: boolean;
|
|
16963
17241
|
}]; // ----- unicorn/escape-case -----
|
|
@@ -17020,10 +17298,36 @@ type UnicornIsolatedFunctions = [] | [{
|
|
|
17020
17298
|
functions?: string[];
|
|
17021
17299
|
selectors?: string[];
|
|
17022
17300
|
comments?: string[];
|
|
17023
|
-
}]; // ----- unicorn/
|
|
17301
|
+
}]; // ----- unicorn/logical-assignment-operators -----
|
|
17302
|
+
type UnicornLogicalAssignmentOperators = (([] | ["always"] | ["always", {
|
|
17303
|
+
enforceForIfStatements?: boolean;
|
|
17304
|
+
}] | ["never"]) & unknown[]); // ----- unicorn/max-nested-calls -----
|
|
17024
17305
|
type UnicornMaxNestedCalls = [] | [{
|
|
17025
17306
|
max?: number;
|
|
17026
|
-
}]; // ----- unicorn/
|
|
17307
|
+
}]; // ----- unicorn/name-replacements -----
|
|
17308
|
+
type UnicornNameReplacements = [] | [{
|
|
17309
|
+
checkProperties?: boolean;
|
|
17310
|
+
checkVariables?: boolean;
|
|
17311
|
+
checkDefaultAndNamespaceImports?: (boolean | string);
|
|
17312
|
+
checkShorthandImports?: (boolean | string);
|
|
17313
|
+
checkShorthandProperties?: boolean;
|
|
17314
|
+
checkFilenames?: boolean;
|
|
17315
|
+
extendDefaultReplacements?: boolean;
|
|
17316
|
+
replacements?: _UnicornNameReplacements_NameReplacements;
|
|
17317
|
+
extendDefaultAllowList?: boolean;
|
|
17318
|
+
allowList?: _UnicornNameReplacements_BooleanObject;
|
|
17319
|
+
ignore?: unknown[];
|
|
17320
|
+
}];
|
|
17321
|
+
type _UnicornNameReplacementsReplacements = (false | _UnicornNameReplacements_BooleanObject) | undefined;
|
|
17322
|
+
interface _UnicornNameReplacements_NameReplacements {
|
|
17323
|
+
[k: string]: _UnicornNameReplacementsReplacements | undefined;
|
|
17324
|
+
}
|
|
17325
|
+
interface _UnicornNameReplacements_BooleanObject {
|
|
17326
|
+
[k: string]: boolean | undefined;
|
|
17327
|
+
}
|
|
17328
|
+
interface _UnicornNameReplacements_BooleanObject {
|
|
17329
|
+
[k: string]: boolean | undefined;
|
|
17330
|
+
} // ----- unicorn/no-array-callback-reference -----
|
|
17027
17331
|
type UnicornNoArrayCallbackReference = [] | [{
|
|
17028
17332
|
ignore?: string[];
|
|
17029
17333
|
}]; // ----- unicorn/no-array-reduce -----
|
|
@@ -17044,6 +17348,12 @@ type UnicornNoInstanceofBuiltins = [] | [{
|
|
|
17044
17348
|
strategy?: ("loose" | "strict");
|
|
17045
17349
|
include?: string[];
|
|
17046
17350
|
exclude?: string[];
|
|
17351
|
+
}]; // ----- unicorn/no-invalid-argument-count -----
|
|
17352
|
+
type UnicornNoInvalidArgumentCount = [] | [{
|
|
17353
|
+
[k: string]: (number | [number, ...(number)[]] | {
|
|
17354
|
+
min?: number;
|
|
17355
|
+
max?: number;
|
|
17356
|
+
}) | undefined;
|
|
17047
17357
|
}]; // ----- unicorn/no-keyword-prefix -----
|
|
17048
17358
|
type UnicornNoKeywordPrefix = [] | [{
|
|
17049
17359
|
disallowedPrefixes?: [] | [string];
|
|
@@ -17052,6 +17362,9 @@ type UnicornNoKeywordPrefix = [] | [{
|
|
|
17052
17362
|
}]; // ----- unicorn/no-negated-comparison -----
|
|
17053
17363
|
type UnicornNoNegatedComparison = [] | [{
|
|
17054
17364
|
checkLogicalExpressions?: boolean;
|
|
17365
|
+
}]; // ----- unicorn/no-non-function-verb-prefix -----
|
|
17366
|
+
type UnicornNoNonFunctionVerbPrefix = [] | [{
|
|
17367
|
+
verbs?: string[];
|
|
17055
17368
|
}]; // ----- unicorn/no-null -----
|
|
17056
17369
|
type UnicornNoNull = [] | [{
|
|
17057
17370
|
checkArguments?: boolean;
|
|
@@ -17098,7 +17411,8 @@ type UnicornNumericSeparatorsStyle = [] | [{
|
|
|
17098
17411
|
fractionGroupLength?: number;
|
|
17099
17412
|
};
|
|
17100
17413
|
onlyIfContainsSeparator?: boolean;
|
|
17101
|
-
}]; // ----- unicorn/
|
|
17414
|
+
}]; // ----- unicorn/operator-assignment -----
|
|
17415
|
+
type UnicornOperatorAssignment = [] | [("always" | "never")]; // ----- unicorn/prefer-add-event-listener -----
|
|
17102
17416
|
type UnicornPreferAddEventListener = [] | [{
|
|
17103
17417
|
excludedPackages?: string[];
|
|
17104
17418
|
}]; // ----- unicorn/prefer-array-find -----
|
|
@@ -17111,6 +17425,9 @@ type UnicornPreferArrayFlat = [] | [{
|
|
|
17111
17425
|
type UnicornPreferAt = [] | [{
|
|
17112
17426
|
getLastElementFunctions?: unknown[];
|
|
17113
17427
|
checkAllIndexAccess?: boolean;
|
|
17428
|
+
}]; // ----- unicorn/prefer-continue -----
|
|
17429
|
+
type UnicornPreferContinue = [] | [{
|
|
17430
|
+
maximumStatements?: number;
|
|
17114
17431
|
}]; // ----- unicorn/prefer-early-return -----
|
|
17115
17432
|
type UnicornPreferEarlyReturn = [] | [{
|
|
17116
17433
|
maximumStatements?: number;
|
|
@@ -17120,6 +17437,9 @@ type UnicornPreferExportFrom = [] | [{
|
|
|
17120
17437
|
}]; // ----- unicorn/prefer-includes-over-repeated-comparisons -----
|
|
17121
17438
|
type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
17122
17439
|
minimumComparisons?: number;
|
|
17440
|
+
}]; // ----- unicorn/prefer-minimal-ternary -----
|
|
17441
|
+
type UnicornPreferMinimalTernary = [] | [{
|
|
17442
|
+
checkComputedMemberAccess?: boolean;
|
|
17123
17443
|
}]; // ----- unicorn/prefer-number-properties -----
|
|
17124
17444
|
type UnicornPreferNumberProperties = [] | [{
|
|
17125
17445
|
checkInfinity?: boolean;
|
|
@@ -17156,30 +17476,7 @@ type UnicornPreferTemporal = [] | [{
|
|
|
17156
17476
|
checkReferences?: boolean;
|
|
17157
17477
|
checkMethods?: boolean;
|
|
17158
17478
|
}]; // ----- unicorn/prefer-ternary -----
|
|
17159
|
-
type UnicornPreferTernary = [] | [("always" | "only-single-line")]; // ----- unicorn/
|
|
17160
|
-
type UnicornPreventAbbreviations = [] | [{
|
|
17161
|
-
checkProperties?: boolean;
|
|
17162
|
-
checkVariables?: boolean;
|
|
17163
|
-
checkDefaultAndNamespaceImports?: (boolean | string);
|
|
17164
|
-
checkShorthandImports?: (boolean | string);
|
|
17165
|
-
checkShorthandProperties?: boolean;
|
|
17166
|
-
checkFilenames?: boolean;
|
|
17167
|
-
extendDefaultReplacements?: boolean;
|
|
17168
|
-
replacements?: _UnicornPreventAbbreviations_Abbreviations;
|
|
17169
|
-
extendDefaultAllowList?: boolean;
|
|
17170
|
-
allowList?: _UnicornPreventAbbreviations_BooleanObject;
|
|
17171
|
-
ignore?: unknown[];
|
|
17172
|
-
}];
|
|
17173
|
-
type _UnicornPreventAbbreviationsReplacements = (false | _UnicornPreventAbbreviations_BooleanObject) | undefined;
|
|
17174
|
-
interface _UnicornPreventAbbreviations_Abbreviations {
|
|
17175
|
-
[k: string]: _UnicornPreventAbbreviationsReplacements | undefined;
|
|
17176
|
-
}
|
|
17177
|
-
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
17178
|
-
[k: string]: boolean | undefined;
|
|
17179
|
-
}
|
|
17180
|
-
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
17181
|
-
[k: string]: boolean | undefined;
|
|
17182
|
-
} // ----- unicorn/relative-url-style -----
|
|
17479
|
+
type UnicornPreferTernary = [] | [("always" | "only-single-line")]; // ----- unicorn/relative-url-style -----
|
|
17183
17480
|
type UnicornRelativeUrlStyle = [] | [("never" | "always")]; // ----- unicorn/require-css-escape -----
|
|
17184
17481
|
type UnicornRequireCssEscape = [] | [{
|
|
17185
17482
|
checkAllSelectors?: boolean;
|