@jsse/eslint-config 0.2.33 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/cli.js +1 -1
- package/dist/esm/configs/unicorn.js +2 -3
- package/dist/esm/fixable.js +4 -1
- package/dist/esm/generated/version.d.ts +1 -1
- package/dist/esm/generated/version.js +1 -1
- package/dist/esm/plugins.d.ts +14 -1
- package/dist/esm/plugins.js +6 -0
- package/dist/esm/types.d.ts +1 -0
- package/dist/index.d.ts +179 -213
- package/dist/index.js +216 -29
- package/package.json +24 -26
- package/dist/cli.cjs +0 -723
- package/dist/cli.d.cts +0 -2
- package/dist/index.cjs +0 -13570
- package/dist/index.d.cts +0 -25888
package/dist/index.d.ts
CHANGED
|
@@ -14697,7 +14697,7 @@ interface StylisticRuleOptions {
|
|
|
14697
14697
|
"@stylistic/semi"?: Linter.RuleEntry<StylisticSemi>;
|
|
14698
14698
|
/**
|
|
14699
14699
|
* Enforce consistent spacing before and after semicolons
|
|
14700
|
-
* @see https://eslint.style/rules/
|
|
14700
|
+
* @see https://eslint.style/rules/ts/semi-spacing
|
|
14701
14701
|
*/
|
|
14702
14702
|
"@stylistic/semi-spacing"?: Linter.RuleEntry<StylisticSemiSpacing>;
|
|
14703
14703
|
/**
|
|
@@ -16640,6 +16640,7 @@ type StylisticSpaceInfixOps =
|
|
|
16640
16640
|
| [
|
|
16641
16641
|
{
|
|
16642
16642
|
int32Hint?: boolean;
|
|
16643
|
+
ignoreTypes?: boolean;
|
|
16643
16644
|
},
|
|
16644
16645
|
];
|
|
16645
16646
|
// ----- @stylistic/space-unary-ops -----
|
|
@@ -22426,702 +22427,642 @@ type ImportPreferDefaultExport =
|
|
|
22426
22427
|
interface UnicornRuleOptions {
|
|
22427
22428
|
/**
|
|
22428
22429
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
22429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22430
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/better-regex.md
|
|
22430
22431
|
*/
|
|
22431
22432
|
"unicorn/better-regex"?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
22432
22433
|
/**
|
|
22433
22434
|
* Enforce a specific parameter name in catch clauses.
|
|
22434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22435
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/catch-error-name.md
|
|
22435
22436
|
*/
|
|
22436
22437
|
"unicorn/catch-error-name"?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
22438
|
+
/**
|
|
22439
|
+
* Enforce consistent assertion style with `node:assert`.
|
|
22440
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-assert.md
|
|
22441
|
+
*/
|
|
22442
|
+
"unicorn/consistent-assert"?: Linter.RuleEntry<[]>;
|
|
22443
|
+
/**
|
|
22444
|
+
* Prefer passing `Date` directly to the constructor when cloning.
|
|
22445
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-date-clone.md
|
|
22446
|
+
*/
|
|
22447
|
+
"unicorn/consistent-date-clone"?: Linter.RuleEntry<[]>;
|
|
22437
22448
|
/**
|
|
22438
22449
|
* Use destructured variables over properties.
|
|
22439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-destructuring.md
|
|
22440
22451
|
*/
|
|
22441
22452
|
"unicorn/consistent-destructuring"?: Linter.RuleEntry<[]>;
|
|
22442
22453
|
/**
|
|
22443
22454
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
22444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-empty-array-spread.md
|
|
22445
22456
|
*/
|
|
22446
22457
|
"unicorn/consistent-empty-array-spread"?: Linter.RuleEntry<[]>;
|
|
22447
22458
|
/**
|
|
22448
22459
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
22449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22460
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-existence-index-check.md
|
|
22450
22461
|
*/
|
|
22451
22462
|
"unicorn/consistent-existence-index-check"?: Linter.RuleEntry<[]>;
|
|
22452
22463
|
/**
|
|
22453
22464
|
* Move function definitions to the highest possible scope.
|
|
22454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22465
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/consistent-function-scoping.md
|
|
22455
22466
|
*/
|
|
22456
22467
|
"unicorn/consistent-function-scoping"?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
22457
22468
|
/**
|
|
22458
22469
|
* Enforce correct `Error` subclassing.
|
|
22459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22470
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/custom-error-definition.md
|
|
22460
22471
|
*/
|
|
22461
22472
|
"unicorn/custom-error-definition"?: Linter.RuleEntry<[]>;
|
|
22462
22473
|
/**
|
|
22463
22474
|
* Enforce no spaces between braces.
|
|
22464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22475
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/empty-brace-spaces.md
|
|
22465
22476
|
*/
|
|
22466
22477
|
"unicorn/empty-brace-spaces"?: Linter.RuleEntry<[]>;
|
|
22467
22478
|
/**
|
|
22468
22479
|
* Enforce passing a `message` value when creating a built-in error.
|
|
22469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22480
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/error-message.md
|
|
22470
22481
|
*/
|
|
22471
22482
|
"unicorn/error-message"?: Linter.RuleEntry<[]>;
|
|
22472
22483
|
/**
|
|
22473
22484
|
* Require escape sequences to use uppercase values.
|
|
22474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/escape-case.md
|
|
22475
22486
|
*/
|
|
22476
22487
|
"unicorn/escape-case"?: Linter.RuleEntry<[]>;
|
|
22477
22488
|
/**
|
|
22478
22489
|
* Add expiration conditions to TODO comments.
|
|
22479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22490
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/expiring-todo-comments.md
|
|
22480
22491
|
*/
|
|
22481
22492
|
"unicorn/expiring-todo-comments"?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
22482
22493
|
/**
|
|
22483
22494
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
22484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/explicit-length-check.md
|
|
22485
22496
|
*/
|
|
22486
22497
|
"unicorn/explicit-length-check"?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
22487
22498
|
/**
|
|
22488
22499
|
* Enforce a case style for filenames.
|
|
22489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22500
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/filename-case.md
|
|
22490
22501
|
*/
|
|
22491
22502
|
"unicorn/filename-case"?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
22492
|
-
/**
|
|
22493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#import-index
|
|
22494
|
-
* @deprecated
|
|
22495
|
-
*/
|
|
22496
|
-
"unicorn/import-index"?: Linter.RuleEntry<[]>;
|
|
22497
22503
|
/**
|
|
22498
22504
|
* Enforce specific import styles per module.
|
|
22499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22505
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/import-style.md
|
|
22500
22506
|
*/
|
|
22501
22507
|
"unicorn/import-style"?: Linter.RuleEntry<UnicornImportStyle>;
|
|
22502
22508
|
/**
|
|
22503
22509
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
22504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22510
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/new-for-builtins.md
|
|
22505
22511
|
*/
|
|
22506
22512
|
"unicorn/new-for-builtins"?: Linter.RuleEntry<[]>;
|
|
22507
22513
|
/**
|
|
22508
22514
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
22509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
22510
22516
|
*/
|
|
22511
22517
|
"unicorn/no-abusive-eslint-disable"?: Linter.RuleEntry<[]>;
|
|
22518
|
+
/**
|
|
22519
|
+
* Disallow recursive access to `this` within getters and setters.
|
|
22520
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-accessor-recursion.md
|
|
22521
|
+
*/
|
|
22522
|
+
"unicorn/no-accessor-recursion"?: Linter.RuleEntry<[]>;
|
|
22512
22523
|
/**
|
|
22513
22524
|
* Disallow anonymous functions and classes as the default export.
|
|
22514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22525
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-anonymous-default-export.md
|
|
22515
22526
|
*/
|
|
22516
22527
|
"unicorn/no-anonymous-default-export"?: Linter.RuleEntry<[]>;
|
|
22517
22528
|
/**
|
|
22518
22529
|
* Prevent passing a function reference directly to iterator methods.
|
|
22519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22530
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-callback-reference.md
|
|
22520
22531
|
*/
|
|
22521
22532
|
"unicorn/no-array-callback-reference"?: Linter.RuleEntry<[]>;
|
|
22522
22533
|
/**
|
|
22523
22534
|
* Prefer `for…of` over the `forEach` method.
|
|
22524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22535
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-for-each.md
|
|
22525
22536
|
*/
|
|
22526
22537
|
"unicorn/no-array-for-each"?: Linter.RuleEntry<[]>;
|
|
22527
|
-
/**
|
|
22528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-array-instanceof
|
|
22529
|
-
* @deprecated
|
|
22530
|
-
*/
|
|
22531
|
-
"unicorn/no-array-instanceof"?: Linter.RuleEntry<[]>;
|
|
22532
22538
|
/**
|
|
22533
22539
|
* Disallow using the `this` argument in array methods.
|
|
22534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-method-this-argument.md
|
|
22535
22541
|
*/
|
|
22536
22542
|
"unicorn/no-array-method-this-argument"?: Linter.RuleEntry<[]>;
|
|
22537
22543
|
/**
|
|
22538
22544
|
* Enforce combining multiple `Array#push()` into one call.
|
|
22539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22545
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-push-push.md
|
|
22540
22546
|
*/
|
|
22541
22547
|
"unicorn/no-array-push-push"?: Linter.RuleEntry<UnicornNoArrayPushPush>;
|
|
22542
22548
|
/**
|
|
22543
22549
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
22544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22550
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-array-reduce.md
|
|
22545
22551
|
*/
|
|
22546
22552
|
"unicorn/no-array-reduce"?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
22547
22553
|
/**
|
|
22548
22554
|
* Disallow member access from await expression.
|
|
22549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22555
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-await-expression-member.md
|
|
22550
22556
|
*/
|
|
22551
22557
|
"unicorn/no-await-expression-member"?: Linter.RuleEntry<[]>;
|
|
22552
22558
|
/**
|
|
22553
22559
|
* Disallow using `await` in `Promise` method parameters.
|
|
22554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22560
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-await-in-promise-methods.md
|
|
22555
22561
|
*/
|
|
22556
22562
|
"unicorn/no-await-in-promise-methods"?: Linter.RuleEntry<[]>;
|
|
22557
22563
|
/**
|
|
22558
22564
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
22559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22565
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-console-spaces.md
|
|
22560
22566
|
*/
|
|
22561
22567
|
"unicorn/no-console-spaces"?: Linter.RuleEntry<[]>;
|
|
22562
22568
|
/**
|
|
22563
22569
|
* Do not use `document.cookie` directly.
|
|
22564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22570
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-document-cookie.md
|
|
22565
22571
|
*/
|
|
22566
22572
|
"unicorn/no-document-cookie"?: Linter.RuleEntry<[]>;
|
|
22567
22573
|
/**
|
|
22568
22574
|
* Disallow empty files.
|
|
22569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22575
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-empty-file.md
|
|
22570
22576
|
*/
|
|
22571
22577
|
"unicorn/no-empty-file"?: Linter.RuleEntry<[]>;
|
|
22572
|
-
/**
|
|
22573
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-fn-reference-in-iterator
|
|
22574
|
-
* @deprecated
|
|
22575
|
-
*/
|
|
22576
|
-
"unicorn/no-fn-reference-in-iterator"?: Linter.RuleEntry<[]>;
|
|
22577
22578
|
/**
|
|
22578
22579
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
22579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22580
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-for-loop.md
|
|
22580
22581
|
*/
|
|
22581
22582
|
"unicorn/no-for-loop"?: Linter.RuleEntry<[]>;
|
|
22582
22583
|
/**
|
|
22583
22584
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
22584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22585
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-hex-escape.md
|
|
22585
22586
|
*/
|
|
22586
22587
|
"unicorn/no-hex-escape"?: Linter.RuleEntry<[]>;
|
|
22587
22588
|
/**
|
|
22588
|
-
*
|
|
22589
|
-
* @
|
|
22589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
22590
|
+
* @deprecated
|
|
22590
22591
|
*/
|
|
22591
22592
|
"unicorn/no-instanceof-array"?: Linter.RuleEntry<[]>;
|
|
22593
|
+
/**
|
|
22594
|
+
* Disallow `instanceof` with built-in objects
|
|
22595
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-instanceof-builtins.md
|
|
22596
|
+
*/
|
|
22597
|
+
"unicorn/no-instanceof-builtins"?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
22592
22598
|
/**
|
|
22593
22599
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
22594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-invalid-fetch-options.md
|
|
22595
22601
|
*/
|
|
22596
22602
|
"unicorn/no-invalid-fetch-options"?: Linter.RuleEntry<[]>;
|
|
22597
22603
|
/**
|
|
22598
22604
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
22599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
22600
22606
|
*/
|
|
22601
22607
|
"unicorn/no-invalid-remove-event-listener"?: Linter.RuleEntry<[]>;
|
|
22602
22608
|
/**
|
|
22603
22609
|
* Disallow identifiers starting with `new` or `class`.
|
|
22604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-keyword-prefix.md
|
|
22605
22611
|
*/
|
|
22606
22612
|
"unicorn/no-keyword-prefix"?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
22607
22613
|
/**
|
|
22608
22614
|
* Disallow using `.length` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
22609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-length-as-slice-end.md
|
|
22610
22616
|
*/
|
|
22611
22617
|
"unicorn/no-length-as-slice-end"?: Linter.RuleEntry<[]>;
|
|
22612
22618
|
/**
|
|
22613
22619
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
22614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-lonely-if.md
|
|
22615
22621
|
*/
|
|
22616
22622
|
"unicorn/no-lonely-if"?: Linter.RuleEntry<[]>;
|
|
22617
22623
|
/**
|
|
22618
22624
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
22619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
22620
22626
|
*/
|
|
22621
22627
|
"unicorn/no-magic-array-flat-depth"?: Linter.RuleEntry<[]>;
|
|
22628
|
+
/**
|
|
22629
|
+
* Disallow named usage of default import and export.
|
|
22630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-named-default.md
|
|
22631
|
+
*/
|
|
22632
|
+
"unicorn/no-named-default"?: Linter.RuleEntry<[]>;
|
|
22622
22633
|
/**
|
|
22623
22634
|
* Disallow negated conditions.
|
|
22624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-negated-condition.md
|
|
22625
22636
|
*/
|
|
22626
22637
|
"unicorn/no-negated-condition"?: Linter.RuleEntry<[]>;
|
|
22627
22638
|
/**
|
|
22628
22639
|
* Disallow negated expression in equality check.
|
|
22629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22640
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-negation-in-equality-check.md
|
|
22630
22641
|
*/
|
|
22631
22642
|
"unicorn/no-negation-in-equality-check"?: Linter.RuleEntry<[]>;
|
|
22632
22643
|
/**
|
|
22633
22644
|
* Disallow nested ternary expressions.
|
|
22634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22645
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-nested-ternary.md
|
|
22635
22646
|
*/
|
|
22636
22647
|
"unicorn/no-nested-ternary"?: Linter.RuleEntry<[]>;
|
|
22637
22648
|
/**
|
|
22638
22649
|
* Disallow `new Array()`.
|
|
22639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-new-array.md
|
|
22640
22651
|
*/
|
|
22641
22652
|
"unicorn/no-new-array"?: Linter.RuleEntry<[]>;
|
|
22642
22653
|
/**
|
|
22643
22654
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
22644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-new-buffer.md
|
|
22645
22656
|
*/
|
|
22646
22657
|
"unicorn/no-new-buffer"?: Linter.RuleEntry<[]>;
|
|
22647
22658
|
/**
|
|
22648
22659
|
* Disallow the use of the `null` literal.
|
|
22649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-null.md
|
|
22650
22661
|
*/
|
|
22651
22662
|
"unicorn/no-null"?: Linter.RuleEntry<UnicornNoNull>;
|
|
22652
22663
|
/**
|
|
22653
22664
|
* Disallow the use of objects as default parameters.
|
|
22654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-object-as-default-parameter.md
|
|
22655
22666
|
*/
|
|
22656
22667
|
"unicorn/no-object-as-default-parameter"?: Linter.RuleEntry<[]>;
|
|
22657
22668
|
/**
|
|
22658
22669
|
* Disallow `process.exit()`.
|
|
22659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-process-exit.md
|
|
22660
22671
|
*/
|
|
22661
22672
|
"unicorn/no-process-exit"?: Linter.RuleEntry<[]>;
|
|
22662
|
-
/**
|
|
22663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-reduce
|
|
22664
|
-
* @deprecated
|
|
22665
|
-
*/
|
|
22666
|
-
"unicorn/no-reduce"?: Linter.RuleEntry<[]>;
|
|
22667
22673
|
/**
|
|
22668
22674
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
22669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
22670
22676
|
*/
|
|
22671
22677
|
"unicorn/no-single-promise-in-promise-methods"?: Linter.RuleEntry<[]>;
|
|
22672
22678
|
/**
|
|
22673
22679
|
* Disallow classes that only have static members.
|
|
22674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-static-only-class.md
|
|
22675
22681
|
*/
|
|
22676
22682
|
"unicorn/no-static-only-class"?: Linter.RuleEntry<[]>;
|
|
22677
22683
|
/**
|
|
22678
22684
|
* Disallow `then` property.
|
|
22679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-thenable.md
|
|
22680
22686
|
*/
|
|
22681
22687
|
"unicorn/no-thenable"?: Linter.RuleEntry<[]>;
|
|
22682
22688
|
/**
|
|
22683
22689
|
* Disallow assigning `this` to a variable.
|
|
22684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-this-assignment.md
|
|
22685
22691
|
*/
|
|
22686
22692
|
"unicorn/no-this-assignment"?: Linter.RuleEntry<[]>;
|
|
22687
22693
|
/**
|
|
22688
22694
|
* Disallow comparing `undefined` using `typeof`.
|
|
22689
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-typeof-undefined.md
|
|
22690
22696
|
*/
|
|
22691
22697
|
"unicorn/no-typeof-undefined"?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
22692
22698
|
/**
|
|
22693
22699
|
* Disallow awaiting non-promise values.
|
|
22694
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unnecessary-await.md
|
|
22695
22701
|
*/
|
|
22696
22702
|
"unicorn/no-unnecessary-await"?: Linter.RuleEntry<[]>;
|
|
22697
22703
|
/**
|
|
22698
22704
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
22699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
22700
22706
|
*/
|
|
22701
22707
|
"unicorn/no-unnecessary-polyfills"?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
22702
22708
|
/**
|
|
22703
22709
|
* Disallow unreadable array destructuring.
|
|
22704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
22705
22711
|
*/
|
|
22706
22712
|
"unicorn/no-unreadable-array-destructuring"?: Linter.RuleEntry<[]>;
|
|
22707
22713
|
/**
|
|
22708
22714
|
* Disallow unreadable IIFEs.
|
|
22709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unreadable-iife.md
|
|
22710
22716
|
*/
|
|
22711
22717
|
"unicorn/no-unreadable-iife"?: Linter.RuleEntry<[]>;
|
|
22712
|
-
/**
|
|
22713
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#no-unsafe-regex
|
|
22714
|
-
* @deprecated
|
|
22715
|
-
*/
|
|
22716
|
-
"unicorn/no-unsafe-regex"?: Linter.RuleEntry<[]>;
|
|
22717
22718
|
/**
|
|
22718
22719
|
* Disallow unused object properties.
|
|
22719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-unused-properties.md
|
|
22720
22721
|
*/
|
|
22721
22722
|
"unicorn/no-unused-properties"?: Linter.RuleEntry<[]>;
|
|
22722
22723
|
/**
|
|
22723
22724
|
* Disallow useless fallback when spreading in object literals.
|
|
22724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
22725
22726
|
*/
|
|
22726
22727
|
"unicorn/no-useless-fallback-in-spread"?: Linter.RuleEntry<[]>;
|
|
22727
22728
|
/**
|
|
22728
22729
|
* Disallow useless array length check.
|
|
22729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-length-check.md
|
|
22730
22731
|
*/
|
|
22731
22732
|
"unicorn/no-useless-length-check"?: Linter.RuleEntry<[]>;
|
|
22732
22733
|
/**
|
|
22733
22734
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
22734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
22735
22736
|
*/
|
|
22736
22737
|
"unicorn/no-useless-promise-resolve-reject"?: Linter.RuleEntry<[]>;
|
|
22737
22738
|
/**
|
|
22738
22739
|
* Disallow unnecessary spread.
|
|
22739
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-spread.md
|
|
22740
22741
|
*/
|
|
22741
22742
|
"unicorn/no-useless-spread"?: Linter.RuleEntry<[]>;
|
|
22742
22743
|
/**
|
|
22743
22744
|
* Disallow useless case in switch statements.
|
|
22744
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-switch-case.md
|
|
22745
22746
|
*/
|
|
22746
22747
|
"unicorn/no-useless-switch-case"?: Linter.RuleEntry<[]>;
|
|
22747
22748
|
/**
|
|
22748
22749
|
* Disallow useless `undefined`.
|
|
22749
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-useless-undefined.md
|
|
22750
22751
|
*/
|
|
22751
22752
|
"unicorn/no-useless-undefined"?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
22752
22753
|
/**
|
|
22753
22754
|
* Disallow number literals with zero fractions or dangling dots.
|
|
22754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/no-zero-fractions.md
|
|
22755
22756
|
*/
|
|
22756
22757
|
"unicorn/no-zero-fractions"?: Linter.RuleEntry<[]>;
|
|
22757
22758
|
/**
|
|
22758
22759
|
* Enforce proper case for numeric literals.
|
|
22759
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/number-literal-case.md
|
|
22760
22761
|
*/
|
|
22761
22762
|
"unicorn/number-literal-case"?: Linter.RuleEntry<[]>;
|
|
22762
22763
|
/**
|
|
22763
22764
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
22764
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/numeric-separators-style.md
|
|
22765
22766
|
*/
|
|
22766
22767
|
"unicorn/numeric-separators-style"?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
22767
22768
|
/**
|
|
22768
22769
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
22769
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-add-event-listener.md
|
|
22770
22771
|
*/
|
|
22771
22772
|
"unicorn/prefer-add-event-listener"?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
22772
22773
|
/**
|
|
22773
22774
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
22774
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-find.md
|
|
22775
22776
|
*/
|
|
22776
22777
|
"unicorn/prefer-array-find"?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
22777
22778
|
/**
|
|
22778
22779
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
22779
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-flat.md
|
|
22780
22781
|
*/
|
|
22781
22782
|
"unicorn/prefer-array-flat"?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
22782
22783
|
/**
|
|
22783
22784
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
22784
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-flat-map.md
|
|
22785
22786
|
*/
|
|
22786
22787
|
"unicorn/prefer-array-flat-map"?: Linter.RuleEntry<[]>;
|
|
22787
22788
|
/**
|
|
22788
22789
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
22789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-index-of.md
|
|
22790
22791
|
*/
|
|
22791
22792
|
"unicorn/prefer-array-index-of"?: Linter.RuleEntry<[]>;
|
|
22792
22793
|
/**
|
|
22793
22794
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
22794
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-array-some.md
|
|
22795
22796
|
*/
|
|
22796
22797
|
"unicorn/prefer-array-some"?: Linter.RuleEntry<[]>;
|
|
22797
22798
|
/**
|
|
22798
22799
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
22799
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-at.md
|
|
22800
22801
|
*/
|
|
22801
22802
|
"unicorn/prefer-at"?: Linter.RuleEntry<UnicornPreferAt>;
|
|
22802
22803
|
/**
|
|
22803
22804
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
22804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
22805
22806
|
*/
|
|
22806
22807
|
"unicorn/prefer-blob-reading-methods"?: Linter.RuleEntry<[]>;
|
|
22807
22808
|
/**
|
|
22808
22809
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
22809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-code-point.md
|
|
22810
22811
|
*/
|
|
22811
22812
|
"unicorn/prefer-code-point"?: Linter.RuleEntry<[]>;
|
|
22812
|
-
/**
|
|
22813
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-dataset
|
|
22814
|
-
* @deprecated
|
|
22815
|
-
*/
|
|
22816
|
-
"unicorn/prefer-dataset"?: Linter.RuleEntry<[]>;
|
|
22817
22813
|
/**
|
|
22818
22814
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
22819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-date-now.md
|
|
22820
22816
|
*/
|
|
22821
22817
|
"unicorn/prefer-date-now"?: Linter.RuleEntry<[]>;
|
|
22822
22818
|
/**
|
|
22823
22819
|
* Prefer default parameters over reassignment.
|
|
22824
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-default-parameters.md
|
|
22825
22821
|
*/
|
|
22826
22822
|
"unicorn/prefer-default-parameters"?: Linter.RuleEntry<[]>;
|
|
22827
22823
|
/**
|
|
22828
22824
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
22829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-dom-node-append.md
|
|
22830
22826
|
*/
|
|
22831
22827
|
"unicorn/prefer-dom-node-append"?: Linter.RuleEntry<[]>;
|
|
22832
22828
|
/**
|
|
22833
22829
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
22834
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
22835
22831
|
*/
|
|
22836
22832
|
"unicorn/prefer-dom-node-dataset"?: Linter.RuleEntry<[]>;
|
|
22837
22833
|
/**
|
|
22838
22834
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
22839
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-dom-node-remove.md
|
|
22840
22836
|
*/
|
|
22841
22837
|
"unicorn/prefer-dom-node-remove"?: Linter.RuleEntry<[]>;
|
|
22842
22838
|
/**
|
|
22843
22839
|
* Prefer `.textContent` over `.innerText`.
|
|
22844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
22845
22841
|
*/
|
|
22846
22842
|
"unicorn/prefer-dom-node-text-content"?: Linter.RuleEntry<[]>;
|
|
22847
|
-
/**
|
|
22848
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-event-key
|
|
22849
|
-
* @deprecated
|
|
22850
|
-
*/
|
|
22851
|
-
"unicorn/prefer-event-key"?: Linter.RuleEntry<[]>;
|
|
22852
22843
|
/**
|
|
22853
22844
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
22854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-event-target.md
|
|
22855
22846
|
*/
|
|
22856
22847
|
"unicorn/prefer-event-target"?: Linter.RuleEntry<[]>;
|
|
22857
|
-
/**
|
|
22858
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-exponentiation-operator
|
|
22859
|
-
* @deprecated
|
|
22860
|
-
*/
|
|
22861
|
-
"unicorn/prefer-exponentiation-operator"?: Linter.RuleEntry<[]>;
|
|
22862
22848
|
/**
|
|
22863
22849
|
* Prefer `export…from` when re-exporting.
|
|
22864
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-export-from.md
|
|
22865
22851
|
*/
|
|
22866
22852
|
"unicorn/prefer-export-from"?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
22867
|
-
/**
|
|
22868
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-flat-map
|
|
22869
|
-
* @deprecated
|
|
22870
|
-
*/
|
|
22871
|
-
"unicorn/prefer-flat-map"?: Linter.RuleEntry<[]>;
|
|
22872
22853
|
/**
|
|
22873
22854
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
22874
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-global-this.md
|
|
22875
22856
|
*/
|
|
22876
22857
|
"unicorn/prefer-global-this"?: Linter.RuleEntry<[]>;
|
|
22877
22858
|
/**
|
|
22878
22859
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
22879
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-includes.md
|
|
22880
22861
|
*/
|
|
22881
22862
|
"unicorn/prefer-includes"?: Linter.RuleEntry<[]>;
|
|
22882
22863
|
/**
|
|
22883
22864
|
* Prefer reading a JSON file as a buffer.
|
|
22884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
22885
22866
|
*/
|
|
22886
22867
|
"unicorn/prefer-json-parse-buffer"?: Linter.RuleEntry<[]>;
|
|
22887
22868
|
/**
|
|
22888
22869
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
22889
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
22890
22871
|
*/
|
|
22891
22872
|
"unicorn/prefer-keyboard-event-key"?: Linter.RuleEntry<[]>;
|
|
22892
22873
|
/**
|
|
22893
22874
|
* Prefer using a logical operator over a ternary.
|
|
22894
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
22895
22876
|
*/
|
|
22896
22877
|
"unicorn/prefer-logical-operator-over-ternary"?: Linter.RuleEntry<[]>;
|
|
22897
22878
|
/**
|
|
22898
22879
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
22899
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-math-min-max.md
|
|
22900
22881
|
*/
|
|
22901
22882
|
"unicorn/prefer-math-min-max"?: Linter.RuleEntry<[]>;
|
|
22902
22883
|
/**
|
|
22903
22884
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
22904
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-math-trunc.md
|
|
22905
22886
|
*/
|
|
22906
22887
|
"unicorn/prefer-math-trunc"?: Linter.RuleEntry<[]>;
|
|
22907
22888
|
/**
|
|
22908
22889
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
22909
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
22910
22891
|
*/
|
|
22911
22892
|
"unicorn/prefer-modern-dom-apis"?: Linter.RuleEntry<[]>;
|
|
22912
22893
|
/**
|
|
22913
22894
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
22914
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-modern-math-apis.md
|
|
22915
22896
|
*/
|
|
22916
22897
|
"unicorn/prefer-modern-math-apis"?: Linter.RuleEntry<[]>;
|
|
22917
22898
|
/**
|
|
22918
22899
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
22919
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-module.md
|
|
22920
22901
|
*/
|
|
22921
22902
|
"unicorn/prefer-module"?: Linter.RuleEntry<[]>;
|
|
22922
22903
|
/**
|
|
22923
22904
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
22924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
22925
22906
|
*/
|
|
22926
22907
|
"unicorn/prefer-native-coercion-functions"?: Linter.RuleEntry<[]>;
|
|
22927
22908
|
/**
|
|
22928
22909
|
* Prefer negative index over `.length - index` when possible.
|
|
22929
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-negative-index.md
|
|
22930
22911
|
*/
|
|
22931
22912
|
"unicorn/prefer-negative-index"?: Linter.RuleEntry<[]>;
|
|
22932
|
-
/**
|
|
22933
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-node-append
|
|
22934
|
-
* @deprecated
|
|
22935
|
-
*/
|
|
22936
|
-
"unicorn/prefer-node-append"?: Linter.RuleEntry<[]>;
|
|
22937
22913
|
/**
|
|
22938
22914
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
22939
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22915
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-node-protocol.md
|
|
22940
22916
|
*/
|
|
22941
22917
|
"unicorn/prefer-node-protocol"?: Linter.RuleEntry<[]>;
|
|
22942
|
-
/**
|
|
22943
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-node-remove
|
|
22944
|
-
* @deprecated
|
|
22945
|
-
*/
|
|
22946
|
-
"unicorn/prefer-node-remove"?: Linter.RuleEntry<[]>;
|
|
22947
22918
|
/**
|
|
22948
22919
|
* Prefer `Number` static properties over global ones.
|
|
22949
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22920
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-number-properties.md
|
|
22950
22921
|
*/
|
|
22951
22922
|
"unicorn/prefer-number-properties"?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
22952
22923
|
/**
|
|
22953
22924
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
22954
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-object-from-entries.md
|
|
22955
22926
|
*/
|
|
22956
22927
|
"unicorn/prefer-object-from-entries"?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
22957
|
-
/**
|
|
22958
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-object-has-own
|
|
22959
|
-
* @deprecated
|
|
22960
|
-
*/
|
|
22961
|
-
"unicorn/prefer-object-has-own"?: Linter.RuleEntry<[]>;
|
|
22962
22928
|
/**
|
|
22963
22929
|
* Prefer omitting the `catch` binding parameter.
|
|
22964
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22930
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
22965
22931
|
*/
|
|
22966
22932
|
"unicorn/prefer-optional-catch-binding"?: Linter.RuleEntry<[]>;
|
|
22967
22933
|
/**
|
|
22968
22934
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
22969
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-prototype-methods.md
|
|
22970
22936
|
*/
|
|
22971
22937
|
"unicorn/prefer-prototype-methods"?: Linter.RuleEntry<[]>;
|
|
22972
22938
|
/**
|
|
22973
22939
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
22974
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-query-selector.md
|
|
22975
22941
|
*/
|
|
22976
22942
|
"unicorn/prefer-query-selector"?: Linter.RuleEntry<[]>;
|
|
22977
22943
|
/**
|
|
22978
22944
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
22979
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-reflect-apply.md
|
|
22980
22946
|
*/
|
|
22981
22947
|
"unicorn/prefer-reflect-apply"?: Linter.RuleEntry<[]>;
|
|
22982
22948
|
/**
|
|
22983
22949
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
22984
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-regexp-test.md
|
|
22985
22951
|
*/
|
|
22986
22952
|
"unicorn/prefer-regexp-test"?: Linter.RuleEntry<[]>;
|
|
22987
|
-
/**
|
|
22988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-replace-all
|
|
22989
|
-
* @deprecated
|
|
22990
|
-
*/
|
|
22991
|
-
"unicorn/prefer-replace-all"?: Linter.RuleEntry<[]>;
|
|
22992
22953
|
/**
|
|
22993
22954
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
22994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-set-has.md
|
|
22995
22956
|
*/
|
|
22996
22957
|
"unicorn/prefer-set-has"?: Linter.RuleEntry<[]>;
|
|
22997
22958
|
/**
|
|
22998
22959
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
22999
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-set-size.md
|
|
23000
22961
|
*/
|
|
23001
22962
|
"unicorn/prefer-set-size"?: Linter.RuleEntry<[]>;
|
|
23002
22963
|
/**
|
|
23003
22964
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
23004
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-spread.md
|
|
23005
22966
|
*/
|
|
23006
22967
|
"unicorn/prefer-spread"?: Linter.RuleEntry<[]>;
|
|
23007
|
-
/**
|
|
23008
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-starts-ends-with
|
|
23009
|
-
* @deprecated
|
|
23010
|
-
*/
|
|
23011
|
-
"unicorn/prefer-starts-ends-with"?: Linter.RuleEntry<[]>;
|
|
23012
22968
|
/**
|
|
23013
22969
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
23014
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-raw.md
|
|
23015
22971
|
*/
|
|
23016
22972
|
"unicorn/prefer-string-raw"?: Linter.RuleEntry<[]>;
|
|
23017
22973
|
/**
|
|
23018
22974
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
23019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-replace-all.md
|
|
23020
22976
|
*/
|
|
23021
22977
|
"unicorn/prefer-string-replace-all"?: Linter.RuleEntry<[]>;
|
|
23022
22978
|
/**
|
|
23023
22979
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
23024
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-slice.md
|
|
23025
22981
|
*/
|
|
23026
22982
|
"unicorn/prefer-string-slice"?: Linter.RuleEntry<[]>;
|
|
23027
22983
|
/**
|
|
23028
22984
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
23029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22985
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
23030
22986
|
*/
|
|
23031
22987
|
"unicorn/prefer-string-starts-ends-with"?: Linter.RuleEntry<[]>;
|
|
23032
22988
|
/**
|
|
23033
22989
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
23034
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22990
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
23035
22991
|
*/
|
|
23036
22992
|
"unicorn/prefer-string-trim-start-end"?: Linter.RuleEntry<[]>;
|
|
23037
22993
|
/**
|
|
23038
22994
|
* Prefer using `structuredClone` to create a deep clone.
|
|
23039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
22995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-structured-clone.md
|
|
23040
22996
|
*/
|
|
23041
22997
|
"unicorn/prefer-structured-clone"?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
23042
22998
|
/**
|
|
23043
22999
|
* Prefer `switch` over multiple `else-if`.
|
|
23044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
23000
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-switch.md
|
|
23045
23001
|
*/
|
|
23046
23002
|
"unicorn/prefer-switch"?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
23047
23003
|
/**
|
|
23048
23004
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
23049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
23005
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-ternary.md
|
|
23050
23006
|
*/
|
|
23051
23007
|
"unicorn/prefer-ternary"?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
23052
|
-
/**
|
|
23053
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-text-content
|
|
23054
|
-
* @deprecated
|
|
23055
|
-
*/
|
|
23056
|
-
"unicorn/prefer-text-content"?: Linter.RuleEntry<[]>;
|
|
23057
23008
|
/**
|
|
23058
23009
|
* Prefer top-level await over top-level promises and async function calls.
|
|
23059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
23010
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-top-level-await.md
|
|
23060
23011
|
*/
|
|
23061
23012
|
"unicorn/prefer-top-level-await"?: Linter.RuleEntry<[]>;
|
|
23062
|
-
/**
|
|
23063
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#prefer-trim-start-end
|
|
23064
|
-
* @deprecated
|
|
23065
|
-
*/
|
|
23066
|
-
"unicorn/prefer-trim-start-end"?: Linter.RuleEntry<[]>;
|
|
23067
23013
|
/**
|
|
23068
23014
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
23069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
23015
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prefer-type-error.md
|
|
23070
23016
|
*/
|
|
23071
23017
|
"unicorn/prefer-type-error"?: Linter.RuleEntry<[]>;
|
|
23072
23018
|
/**
|
|
23073
23019
|
* Prevent abbreviations.
|
|
23074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
23020
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/prevent-abbreviations.md
|
|
23075
23021
|
*/
|
|
23076
23022
|
"unicorn/prevent-abbreviations"?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
23077
|
-
/**
|
|
23078
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.1/docs/deprecated-rules.md#regex-shorthand
|
|
23079
|
-
* @deprecated
|
|
23080
|
-
*/
|
|
23081
|
-
"unicorn/regex-shorthand"?: Linter.RuleEntry<[]>;
|
|
23082
23023
|
/**
|
|
23083
23024
|
* Enforce consistent relative URL style.
|
|
23084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
23025
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/relative-url-style.md
|
|
23085
23026
|
*/
|
|
23086
23027
|
"unicorn/relative-url-style"?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
23087
23028
|
/**
|
|
23088
23029
|
* Enforce using the separator argument with `Array#join()`.
|
|
23089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
23030
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/require-array-join-separator.md
|
|
23090
23031
|
*/
|
|
23091
23032
|
"unicorn/require-array-join-separator"?: Linter.RuleEntry<[]>;
|
|
23092
23033
|
/**
|
|
23093
23034
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
23094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
23035
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
23095
23036
|
*/
|
|
23096
23037
|
"unicorn/require-number-to-fixed-digits-argument"?: Linter.RuleEntry<[]>;
|
|
23097
23038
|
/**
|
|
23098
23039
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
23099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
23040
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/require-post-message-target-origin.md
|
|
23100
23041
|
*/
|
|
23101
23042
|
"unicorn/require-post-message-target-origin"?: Linter.RuleEntry<[]>;
|
|
23102
23043
|
/**
|
|
23103
23044
|
* Enforce better string content.
|
|
23104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
23045
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/string-content.md
|
|
23105
23046
|
*/
|
|
23106
23047
|
"unicorn/string-content"?: Linter.RuleEntry<UnicornStringContent>;
|
|
23107
23048
|
/**
|
|
23108
23049
|
* Enforce consistent brace style for `case` clauses.
|
|
23109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
23050
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/switch-case-braces.md
|
|
23110
23051
|
*/
|
|
23111
23052
|
"unicorn/switch-case-braces"?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
23112
23053
|
/**
|
|
23113
23054
|
* Fix whitespace-insensitive template indentation.
|
|
23114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
23055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/template-indent.md
|
|
23115
23056
|
*/
|
|
23116
23057
|
"unicorn/template-indent"?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
23117
23058
|
/**
|
|
23118
23059
|
* Enforce consistent case for text encoding identifiers.
|
|
23119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
23060
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/text-encoding-identifier-case.md
|
|
23120
23061
|
*/
|
|
23121
23062
|
"unicorn/text-encoding-identifier-case"?: Linter.RuleEntry<[]>;
|
|
23122
23063
|
/**
|
|
23123
23064
|
* Require `new` when creating an error.
|
|
23124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
23065
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v57.0.0/docs/rules/throw-new-error.md
|
|
23125
23066
|
*/
|
|
23126
23067
|
"unicorn/throw-new-error"?: Linter.RuleEntry<[]>;
|
|
23127
23068
|
}
|
|
@@ -23230,6 +23171,17 @@ type UnicornNoArrayReduce =
|
|
|
23230
23171
|
allowSimpleOperations?: boolean;
|
|
23231
23172
|
},
|
|
23232
23173
|
];
|
|
23174
|
+
// ----- unicorn/no-instanceof-builtins -----
|
|
23175
|
+
type UnicornNoInstanceofBuiltins =
|
|
23176
|
+
| []
|
|
23177
|
+
| [
|
|
23178
|
+
{
|
|
23179
|
+
useErrorIsError?: boolean;
|
|
23180
|
+
strategy?: "loose" | "strict";
|
|
23181
|
+
include?: string[];
|
|
23182
|
+
exclude?: string[];
|
|
23183
|
+
},
|
|
23184
|
+
];
|
|
23233
23185
|
// ----- unicorn/no-keyword-prefix -----
|
|
23234
23186
|
type UnicornNoKeywordPrefix =
|
|
23235
23187
|
| []
|
|
@@ -23954,6 +23906,7 @@ type RuleOptionsUnion = BuiltinsRuleOptions &
|
|
|
23954
23906
|
YmlRuleOptions;
|
|
23955
23907
|
|
|
23956
23908
|
type Awaitable<T> = T | Promise<T>;
|
|
23909
|
+
type UnPromise<T> = T extends Promise<infer U> ? U : T;
|
|
23957
23910
|
type Rules = RuleOptionsUnion;
|
|
23958
23911
|
type LanguageOptions = Linter.Config["languageOptions"];
|
|
23959
23912
|
type TypedFlatConfigItem = Omit<Linter.Config<Linter.RulesRecord & Rules>, "plugins"> & {
|
|
@@ -24224,7 +24177,7 @@ declare function jsse(options?: OptionsConfig & TypedFlatConfigItem, ...userConf
|
|
|
24224
24177
|
declare function defineConfig(options?: OptionsConfig & TypedFlatConfigItem, ...userConfigs: (TypedFlatConfigItem | TypedFlatConfigItem[])[]): Promise<TypedFlatConfigItem[]>;
|
|
24225
24178
|
type DefineConfig = typeof defineConfig;
|
|
24226
24179
|
|
|
24227
|
-
declare const VERSION = "0.
|
|
24180
|
+
declare const VERSION = "0.3.0";
|
|
24228
24181
|
|
|
24229
24182
|
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
24230
24183
|
declare const GLOB_JS_SRC_EXT = "?([cm])js?(x)";
|
|
@@ -24281,6 +24234,16 @@ declare namespace globs {
|
|
|
24281
24234
|
export { globs_GLOB_ALL_SRC as GLOB_ALL_SRC, globs_GLOB_CSS as GLOB_CSS, globs_GLOB_EXCLUDE as GLOB_EXCLUDE, globs_GLOB_GRAPHQL as GLOB_GRAPHQL, globs_GLOB_HTML as GLOB_HTML, globs_GLOB_JS as GLOB_JS, globs_GLOB_JSON as GLOB_JSON, globs_GLOB_JSON5 as GLOB_JSON5, globs_GLOB_JSONC as GLOB_JSONC, globs_GLOB_JSX as GLOB_JSX, globs_GLOB_JS_SRC_EXT as GLOB_JS_SRC_EXT, globs_GLOB_LESS as GLOB_LESS, globs_GLOB_MARKDOWN as GLOB_MARKDOWN, globs_GLOB_MARKDOWN_CODE as GLOB_MARKDOWN_CODE, globs_GLOB_MARKDOWN_IN_MARKDOWN as GLOB_MARKDOWN_IN_MARKDOWN, globs_GLOB_SCSS as GLOB_SCSS, globs_GLOB_SRC as GLOB_SRC, globs_GLOB_SRC_EXT as GLOB_SRC_EXT, globs_GLOB_STYLE as GLOB_STYLE, globs_GLOB_TESTS as GLOB_TESTS, globs_GLOB_TOML as GLOB_TOML, globs_GLOB_TS as GLOB_TS, globs_GLOB_TSCONFIG as GLOB_TSCONFIG, globs_GLOB_TSX as GLOB_TSX, globs_GLOB_YAML as GLOB_YAML };
|
|
24282
24235
|
}
|
|
24283
24236
|
|
|
24237
|
+
declare function importPluginUnicorn(): Promise<{
|
|
24238
|
+
pluginUnicorn: eslint.ESLint.Plugin & {
|
|
24239
|
+
configs: {
|
|
24240
|
+
recommended: eslint.Linter.FlatConfig;
|
|
24241
|
+
all: eslint.Linter.FlatConfig;
|
|
24242
|
+
"flat/all": eslint.Linter.FlatConfig;
|
|
24243
|
+
"flat/recommended": eslint.Linter.FlatConfig;
|
|
24244
|
+
};
|
|
24245
|
+
};
|
|
24246
|
+
}>;
|
|
24284
24247
|
declare function importPluginReact(): Promise<{
|
|
24285
24248
|
pluginReact: {
|
|
24286
24249
|
deprecatedRules: Partial<{
|
|
@@ -25824,7 +25787,10 @@ declare function importPluginTsdoc(): Promise<{
|
|
|
25824
25787
|
};
|
|
25825
25788
|
}>;
|
|
25826
25789
|
declare function importPluginStylistic(): Promise<{
|
|
25827
|
-
pluginStylistic:
|
|
25790
|
+
pluginStylistic: {
|
|
25791
|
+
rules: _stylistic_eslint_plugin.Rules;
|
|
25792
|
+
configs: eslint.ESLint.Plugin["configs"] & _stylistic_eslint_plugin.Configs;
|
|
25793
|
+
};
|
|
25828
25794
|
}>;
|
|
25829
25795
|
declare function importPluginTailwind(): Promise<{
|
|
25830
25796
|
pluginTailwind: any;
|
|
@@ -25885,4 +25851,4 @@ declare function changeRuleEntrySeverity(ruleConfig: Linter.RuleEntry<any>, leve
|
|
|
25885
25851
|
declare function error2warn<T extends TypedFlatConfigItem>(configs: T[]): T[];
|
|
25886
25852
|
declare function warn2error<T extends TypedFlatConfigItem>(configs: T[]): T[];
|
|
25887
25853
|
|
|
25888
|
-
export { type Awaitable, type EslintConfigFn, type LanguageOptions, type OptionsCommon, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsPrefix, type OptionsReact, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type PromiseFlatConfigItem, type RenamePefix, type RuleName, type Rules, SLOW_RULES, type StylisticConfig, type TailwindEslintSettings, type TailwindOptions, type TypedFlatConfigItem, type TypedFlatConfigItemWithId, VERSION, changeRuleEntrySeverity, combine, combineAsync, jsse as default, defineConfig, error2warn, globs, importJsoncLibs, importParserJsonc, importPluginJsdoc, importPluginJsonc, importPluginMarkdown, importPluginReact, importPluginReactHooks, importPluginReactRefresh, importPluginStylistic, importPluginTailwind, importPluginTsdoc, importReactPlugins, importYmlLibs, interopDefault, isCI, isInEditor, jsse, jsseReact, parserPlain, renameRules, safeImportPluginTailwind, turnOffRules, uniqueStrings, warn2error };
|
|
25854
|
+
export { type Awaitable, type EslintConfigFn, type LanguageOptions, type OptionsCommon, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsPrefix, type OptionsReact, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type PromiseFlatConfigItem, type RenamePefix, type RuleName, type Rules, SLOW_RULES, type StylisticConfig, type TailwindEslintSettings, type TailwindOptions, type TypedFlatConfigItem, type TypedFlatConfigItemWithId, type UnPromise, VERSION, changeRuleEntrySeverity, combine, combineAsync, jsse as default, defineConfig, error2warn, globs, importJsoncLibs, importParserJsonc, importPluginJsdoc, importPluginJsonc, importPluginMarkdown, importPluginReact, importPluginReactHooks, importPluginReactRefresh, importPluginStylistic, importPluginTailwind, importPluginTsdoc, importPluginUnicorn, importReactPlugins, importYmlLibs, interopDefault, isCI, isInEditor, jsse, jsseReact, parserPlain, renameRules, safeImportPluginTailwind, turnOffRules, uniqueStrings, warn2error };
|