@jsse/eslint-config 0.2.18 → 0.2.19
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/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +18 -4
- package/dist/index.d.cts +341 -141
- package/dist/index.d.ts +341 -141
- package/dist/index.js +18 -4
- package/package.json +14 -13
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import * as yaml_eslint_parser from 'yaml-eslint-parser';
|
|
|
11
11
|
import * as eslint_plugin_jsonc_types from 'eslint-plugin-jsonc/types';
|
|
12
12
|
import * as eslint_plugin_jsonc_meta from 'eslint-plugin-jsonc/meta';
|
|
13
13
|
import * as jsonc_eslint_parser from 'jsonc-eslint-parser';
|
|
14
|
+
import * as eslint_plugin_react from 'eslint-plugin-react';
|
|
14
15
|
export { default as pluginTs } from '@typescript-eslint/eslint-plugin';
|
|
15
16
|
export { default as pluginAntfu } from 'eslint-plugin-antfu';
|
|
16
17
|
export { default as pluginEslintComments } from 'eslint-plugin-eslint-comments';
|
|
@@ -11793,6 +11794,11 @@ interface StylisticRuleOptions {
|
|
|
11793
11794
|
* @see https://eslint.style/rules/js/computed-property-spacing
|
|
11794
11795
|
*/
|
|
11795
11796
|
"@stylistic/computed-property-spacing"?: Linter.RuleEntry<StylisticComputedPropertySpacing>;
|
|
11797
|
+
/**
|
|
11798
|
+
* Enforce consistent line breaks after opening and before closing braces
|
|
11799
|
+
* @see https://eslint.style/rules/plus/curly-newline
|
|
11800
|
+
*/
|
|
11801
|
+
"@stylistic/curly-newline"?: Linter.RuleEntry<StylisticCurlyNewline>;
|
|
11796
11802
|
/**
|
|
11797
11803
|
* Enforce consistent newlines before and after dots
|
|
11798
11804
|
* @see https://eslint.style/rules/js/dot-location
|
|
@@ -11857,7 +11863,7 @@ interface StylisticRuleOptions {
|
|
|
11857
11863
|
* Enforce closing tag location for multiline JSX
|
|
11858
11864
|
* @see https://eslint.style/rules/jsx/jsx-closing-tag-location
|
|
11859
11865
|
*/
|
|
11860
|
-
"@stylistic/jsx-closing-tag-location"?: Linter.RuleEntry<
|
|
11866
|
+
"@stylistic/jsx-closing-tag-location"?: Linter.RuleEntry<StylisticJsxClosingTagLocation>;
|
|
11861
11867
|
/**
|
|
11862
11868
|
* Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes
|
|
11863
11869
|
* @see https://eslint.style/rules/jsx/jsx-curly-brace-presence
|
|
@@ -12345,6 +12351,178 @@ type StylisticComputedPropertySpacing =
|
|
|
12345
12351
|
enforceForClassMembers?: boolean;
|
|
12346
12352
|
},
|
|
12347
12353
|
];
|
|
12354
|
+
// ----- @stylistic/curly-newline -----
|
|
12355
|
+
type StylisticCurlyNewline =
|
|
12356
|
+
| []
|
|
12357
|
+
| [
|
|
12358
|
+
| ("always" | "never")
|
|
12359
|
+
| {
|
|
12360
|
+
IfStatementConsequent?:
|
|
12361
|
+
| ("always" | "never")
|
|
12362
|
+
| {
|
|
12363
|
+
multiline?: boolean;
|
|
12364
|
+
minElements?: number;
|
|
12365
|
+
consistent?: boolean;
|
|
12366
|
+
};
|
|
12367
|
+
IfStatementAlternative?:
|
|
12368
|
+
| ("always" | "never")
|
|
12369
|
+
| {
|
|
12370
|
+
multiline?: boolean;
|
|
12371
|
+
minElements?: number;
|
|
12372
|
+
consistent?: boolean;
|
|
12373
|
+
};
|
|
12374
|
+
DoWhileStatement?:
|
|
12375
|
+
| ("always" | "never")
|
|
12376
|
+
| {
|
|
12377
|
+
multiline?: boolean;
|
|
12378
|
+
minElements?: number;
|
|
12379
|
+
consistent?: boolean;
|
|
12380
|
+
};
|
|
12381
|
+
ForInStatement?:
|
|
12382
|
+
| ("always" | "never")
|
|
12383
|
+
| {
|
|
12384
|
+
multiline?: boolean;
|
|
12385
|
+
minElements?: number;
|
|
12386
|
+
consistent?: boolean;
|
|
12387
|
+
};
|
|
12388
|
+
ForOfStatement?:
|
|
12389
|
+
| ("always" | "never")
|
|
12390
|
+
| {
|
|
12391
|
+
multiline?: boolean;
|
|
12392
|
+
minElements?: number;
|
|
12393
|
+
consistent?: boolean;
|
|
12394
|
+
};
|
|
12395
|
+
ForStatement?:
|
|
12396
|
+
| ("always" | "never")
|
|
12397
|
+
| {
|
|
12398
|
+
multiline?: boolean;
|
|
12399
|
+
minElements?: number;
|
|
12400
|
+
consistent?: boolean;
|
|
12401
|
+
};
|
|
12402
|
+
WhileStatement?:
|
|
12403
|
+
| ("always" | "never")
|
|
12404
|
+
| {
|
|
12405
|
+
multiline?: boolean;
|
|
12406
|
+
minElements?: number;
|
|
12407
|
+
consistent?: boolean;
|
|
12408
|
+
};
|
|
12409
|
+
SwitchStatement?:
|
|
12410
|
+
| ("always" | "never")
|
|
12411
|
+
| {
|
|
12412
|
+
multiline?: boolean;
|
|
12413
|
+
minElements?: number;
|
|
12414
|
+
consistent?: boolean;
|
|
12415
|
+
};
|
|
12416
|
+
SwitchCase?:
|
|
12417
|
+
| ("always" | "never")
|
|
12418
|
+
| {
|
|
12419
|
+
multiline?: boolean;
|
|
12420
|
+
minElements?: number;
|
|
12421
|
+
consistent?: boolean;
|
|
12422
|
+
};
|
|
12423
|
+
TryStatementBlock?:
|
|
12424
|
+
| ("always" | "never")
|
|
12425
|
+
| {
|
|
12426
|
+
multiline?: boolean;
|
|
12427
|
+
minElements?: number;
|
|
12428
|
+
consistent?: boolean;
|
|
12429
|
+
};
|
|
12430
|
+
TryStatementHandler?:
|
|
12431
|
+
| ("always" | "never")
|
|
12432
|
+
| {
|
|
12433
|
+
multiline?: boolean;
|
|
12434
|
+
minElements?: number;
|
|
12435
|
+
consistent?: boolean;
|
|
12436
|
+
};
|
|
12437
|
+
TryStatementFinalizer?:
|
|
12438
|
+
| ("always" | "never")
|
|
12439
|
+
| {
|
|
12440
|
+
multiline?: boolean;
|
|
12441
|
+
minElements?: number;
|
|
12442
|
+
consistent?: boolean;
|
|
12443
|
+
};
|
|
12444
|
+
BlockStatement?:
|
|
12445
|
+
| ("always" | "never")
|
|
12446
|
+
| {
|
|
12447
|
+
multiline?: boolean;
|
|
12448
|
+
minElements?: number;
|
|
12449
|
+
consistent?: boolean;
|
|
12450
|
+
};
|
|
12451
|
+
ArrowFunctionExpression?:
|
|
12452
|
+
| ("always" | "never")
|
|
12453
|
+
| {
|
|
12454
|
+
multiline?: boolean;
|
|
12455
|
+
minElements?: number;
|
|
12456
|
+
consistent?: boolean;
|
|
12457
|
+
};
|
|
12458
|
+
FunctionDeclaration?:
|
|
12459
|
+
| ("always" | "never")
|
|
12460
|
+
| {
|
|
12461
|
+
multiline?: boolean;
|
|
12462
|
+
minElements?: number;
|
|
12463
|
+
consistent?: boolean;
|
|
12464
|
+
};
|
|
12465
|
+
FunctionExpression?:
|
|
12466
|
+
| ("always" | "never")
|
|
12467
|
+
| {
|
|
12468
|
+
multiline?: boolean;
|
|
12469
|
+
minElements?: number;
|
|
12470
|
+
consistent?: boolean;
|
|
12471
|
+
};
|
|
12472
|
+
Property?:
|
|
12473
|
+
| ("always" | "never")
|
|
12474
|
+
| {
|
|
12475
|
+
multiline?: boolean;
|
|
12476
|
+
minElements?: number;
|
|
12477
|
+
consistent?: boolean;
|
|
12478
|
+
};
|
|
12479
|
+
ClassBody?:
|
|
12480
|
+
| ("always" | "never")
|
|
12481
|
+
| {
|
|
12482
|
+
multiline?: boolean;
|
|
12483
|
+
minElements?: number;
|
|
12484
|
+
consistent?: boolean;
|
|
12485
|
+
};
|
|
12486
|
+
StaticBlock?:
|
|
12487
|
+
| ("always" | "never")
|
|
12488
|
+
| {
|
|
12489
|
+
multiline?: boolean;
|
|
12490
|
+
minElements?: number;
|
|
12491
|
+
consistent?: boolean;
|
|
12492
|
+
};
|
|
12493
|
+
WithStatement?:
|
|
12494
|
+
| ("always" | "never")
|
|
12495
|
+
| {
|
|
12496
|
+
multiline?: boolean;
|
|
12497
|
+
minElements?: number;
|
|
12498
|
+
consistent?: boolean;
|
|
12499
|
+
};
|
|
12500
|
+
TSEnumBody?:
|
|
12501
|
+
| ("always" | "never")
|
|
12502
|
+
| {
|
|
12503
|
+
multiline?: boolean;
|
|
12504
|
+
minElements?: number;
|
|
12505
|
+
consistent?: boolean;
|
|
12506
|
+
};
|
|
12507
|
+
TSInterfaceBody?:
|
|
12508
|
+
| ("always" | "never")
|
|
12509
|
+
| {
|
|
12510
|
+
multiline?: boolean;
|
|
12511
|
+
minElements?: number;
|
|
12512
|
+
consistent?: boolean;
|
|
12513
|
+
};
|
|
12514
|
+
TSModuleBlock?:
|
|
12515
|
+
| ("always" | "never")
|
|
12516
|
+
| {
|
|
12517
|
+
multiline?: boolean;
|
|
12518
|
+
minElements?: number;
|
|
12519
|
+
consistent?: boolean;
|
|
12520
|
+
};
|
|
12521
|
+
multiline?: boolean;
|
|
12522
|
+
minElements?: number;
|
|
12523
|
+
consistent?: boolean;
|
|
12524
|
+
},
|
|
12525
|
+
];
|
|
12348
12526
|
// ----- @stylistic/dot-location -----
|
|
12349
12527
|
type StylisticDotLocation = [] | ["object" | "property"];
|
|
12350
12528
|
// ----- @stylistic/eol-last -----
|
|
@@ -12486,6 +12664,8 @@ type StylisticJsxClosingBracketLocation =
|
|
|
12486
12664
|
| false;
|
|
12487
12665
|
},
|
|
12488
12666
|
];
|
|
12667
|
+
// ----- @stylistic/jsx-closing-tag-location -----
|
|
12668
|
+
type StylisticJsxClosingTagLocation = [] | ["tag-aligned" | "line-aligned"];
|
|
12489
12669
|
// ----- @stylistic/jsx-curly-brace-presence -----
|
|
12490
12670
|
type StylisticJsxCurlyBracePresence =
|
|
12491
12671
|
| []
|
|
@@ -14205,6 +14385,11 @@ interface VitestRuleOptions {
|
|
|
14205
14385
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-todo.md
|
|
14206
14386
|
*/
|
|
14207
14387
|
"vitest/prefer-todo"?: Linter.RuleEntry<[]>;
|
|
14388
|
+
/**
|
|
14389
|
+
* Prefer `vi.mocked()` over `fn as Mock`
|
|
14390
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-vi-mocked.md
|
|
14391
|
+
*/
|
|
14392
|
+
"vitest/prefer-vi-mocked"?: Linter.RuleEntry<[]>;
|
|
14208
14393
|
/**
|
|
14209
14394
|
* require setup and teardown to be within a hook
|
|
14210
14395
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md
|
|
@@ -19496,687 +19681,702 @@ type ImportPreferDefaultExport =
|
|
|
19496
19681
|
interface UnicornRuleOptions {
|
|
19497
19682
|
/**
|
|
19498
19683
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
19499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/better-regex.md
|
|
19500
19685
|
*/
|
|
19501
19686
|
"unicorn/better-regex"?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
19502
19687
|
/**
|
|
19503
19688
|
* Enforce a specific parameter name in catch clauses.
|
|
19504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/catch-error-name.md
|
|
19505
19690
|
*/
|
|
19506
19691
|
"unicorn/catch-error-name"?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
19507
19692
|
/**
|
|
19508
19693
|
* Use destructured variables over properties.
|
|
19509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-destructuring.md
|
|
19510
19695
|
*/
|
|
19511
19696
|
"unicorn/consistent-destructuring"?: Linter.RuleEntry<[]>;
|
|
19512
19697
|
/**
|
|
19513
19698
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
19514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-empty-array-spread.md
|
|
19515
19700
|
*/
|
|
19516
19701
|
"unicorn/consistent-empty-array-spread"?: Linter.RuleEntry<[]>;
|
|
19702
|
+
/**
|
|
19703
|
+
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
19704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-existence-index-check.md
|
|
19705
|
+
*/
|
|
19706
|
+
"unicorn/consistent-existence-index-check"?: Linter.RuleEntry<[]>;
|
|
19517
19707
|
/**
|
|
19518
19708
|
* Move function definitions to the highest possible scope.
|
|
19519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-function-scoping.md
|
|
19520
19710
|
*/
|
|
19521
19711
|
"unicorn/consistent-function-scoping"?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
19522
19712
|
/**
|
|
19523
19713
|
* Enforce correct `Error` subclassing.
|
|
19524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/custom-error-definition.md
|
|
19525
19715
|
*/
|
|
19526
19716
|
"unicorn/custom-error-definition"?: Linter.RuleEntry<[]>;
|
|
19527
19717
|
/**
|
|
19528
19718
|
* Enforce no spaces between braces.
|
|
19529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/empty-brace-spaces.md
|
|
19530
19720
|
*/
|
|
19531
19721
|
"unicorn/empty-brace-spaces"?: Linter.RuleEntry<[]>;
|
|
19532
19722
|
/**
|
|
19533
19723
|
* Enforce passing a `message` value when creating a built-in error.
|
|
19534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/error-message.md
|
|
19535
19725
|
*/
|
|
19536
19726
|
"unicorn/error-message"?: Linter.RuleEntry<[]>;
|
|
19537
19727
|
/**
|
|
19538
19728
|
* Require escape sequences to use uppercase values.
|
|
19539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/escape-case.md
|
|
19540
19730
|
*/
|
|
19541
19731
|
"unicorn/escape-case"?: Linter.RuleEntry<[]>;
|
|
19542
19732
|
/**
|
|
19543
19733
|
* Add expiration conditions to TODO comments.
|
|
19544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/expiring-todo-comments.md
|
|
19545
19735
|
*/
|
|
19546
19736
|
"unicorn/expiring-todo-comments"?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
19547
19737
|
/**
|
|
19548
19738
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
19549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19739
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/explicit-length-check.md
|
|
19550
19740
|
*/
|
|
19551
19741
|
"unicorn/explicit-length-check"?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
19552
19742
|
/**
|
|
19553
19743
|
* Enforce a case style for filenames.
|
|
19554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/filename-case.md
|
|
19555
19745
|
*/
|
|
19556
19746
|
"unicorn/filename-case"?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
19557
19747
|
/**
|
|
19558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#import-index
|
|
19559
19749
|
* @deprecated
|
|
19560
19750
|
*/
|
|
19561
19751
|
"unicorn/import-index"?: Linter.RuleEntry<[]>;
|
|
19562
19752
|
/**
|
|
19563
19753
|
* Enforce specific import styles per module.
|
|
19564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/import-style.md
|
|
19565
19755
|
*/
|
|
19566
19756
|
"unicorn/import-style"?: Linter.RuleEntry<UnicornImportStyle>;
|
|
19567
19757
|
/**
|
|
19568
19758
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
19569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/new-for-builtins.md
|
|
19570
19760
|
*/
|
|
19571
19761
|
"unicorn/new-for-builtins"?: Linter.RuleEntry<[]>;
|
|
19572
19762
|
/**
|
|
19573
19763
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
19574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19764
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
19575
19765
|
*/
|
|
19576
19766
|
"unicorn/no-abusive-eslint-disable"?: Linter.RuleEntry<[]>;
|
|
19577
19767
|
/**
|
|
19578
19768
|
* Disallow anonymous functions and classes as the default export.
|
|
19579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19769
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-anonymous-default-export.md
|
|
19580
19770
|
*/
|
|
19581
19771
|
"unicorn/no-anonymous-default-export"?: Linter.RuleEntry<[]>;
|
|
19582
19772
|
/**
|
|
19583
19773
|
* Prevent passing a function reference directly to iterator methods.
|
|
19584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19774
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-callback-reference.md
|
|
19585
19775
|
*/
|
|
19586
19776
|
"unicorn/no-array-callback-reference"?: Linter.RuleEntry<[]>;
|
|
19587
19777
|
/**
|
|
19588
19778
|
* Prefer `for…of` over the `forEach` method.
|
|
19589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19779
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-for-each.md
|
|
19590
19780
|
*/
|
|
19591
19781
|
"unicorn/no-array-for-each"?: Linter.RuleEntry<[]>;
|
|
19592
19782
|
/**
|
|
19593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-array-instanceof
|
|
19594
19784
|
* @deprecated
|
|
19595
19785
|
*/
|
|
19596
19786
|
"unicorn/no-array-instanceof"?: Linter.RuleEntry<[]>;
|
|
19597
19787
|
/**
|
|
19598
19788
|
* Disallow using the `this` argument in array methods.
|
|
19599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19789
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-method-this-argument.md
|
|
19600
19790
|
*/
|
|
19601
19791
|
"unicorn/no-array-method-this-argument"?: Linter.RuleEntry<[]>;
|
|
19602
19792
|
/**
|
|
19603
19793
|
* Enforce combining multiple `Array#push()` into one call.
|
|
19604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19794
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-push-push.md
|
|
19605
19795
|
*/
|
|
19606
19796
|
"unicorn/no-array-push-push"?: Linter.RuleEntry<UnicornNoArrayPushPush>;
|
|
19607
19797
|
/**
|
|
19608
19798
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
19609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19799
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-reduce.md
|
|
19610
19800
|
*/
|
|
19611
19801
|
"unicorn/no-array-reduce"?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
19612
19802
|
/**
|
|
19613
19803
|
* Disallow member access from await expression.
|
|
19614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19804
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-await-expression-member.md
|
|
19615
19805
|
*/
|
|
19616
19806
|
"unicorn/no-await-expression-member"?: Linter.RuleEntry<[]>;
|
|
19617
19807
|
/**
|
|
19618
19808
|
* Disallow using `await` in `Promise` method parameters.
|
|
19619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-await-in-promise-methods.md
|
|
19620
19810
|
*/
|
|
19621
19811
|
"unicorn/no-await-in-promise-methods"?: Linter.RuleEntry<[]>;
|
|
19622
19812
|
/**
|
|
19623
19813
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
19624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19814
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-console-spaces.md
|
|
19625
19815
|
*/
|
|
19626
19816
|
"unicorn/no-console-spaces"?: Linter.RuleEntry<[]>;
|
|
19627
19817
|
/**
|
|
19628
19818
|
* Do not use `document.cookie` directly.
|
|
19629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19819
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-document-cookie.md
|
|
19630
19820
|
*/
|
|
19631
19821
|
"unicorn/no-document-cookie"?: Linter.RuleEntry<[]>;
|
|
19632
19822
|
/**
|
|
19633
19823
|
* Disallow empty files.
|
|
19634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19824
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-empty-file.md
|
|
19635
19825
|
*/
|
|
19636
19826
|
"unicorn/no-empty-file"?: Linter.RuleEntry<[]>;
|
|
19637
19827
|
/**
|
|
19638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19828
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-fn-reference-in-iterator
|
|
19639
19829
|
* @deprecated
|
|
19640
19830
|
*/
|
|
19641
19831
|
"unicorn/no-fn-reference-in-iterator"?: Linter.RuleEntry<[]>;
|
|
19642
19832
|
/**
|
|
19643
19833
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
19644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19834
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-for-loop.md
|
|
19645
19835
|
*/
|
|
19646
19836
|
"unicorn/no-for-loop"?: Linter.RuleEntry<[]>;
|
|
19647
19837
|
/**
|
|
19648
19838
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
19649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19839
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-hex-escape.md
|
|
19650
19840
|
*/
|
|
19651
19841
|
"unicorn/no-hex-escape"?: Linter.RuleEntry<[]>;
|
|
19652
19842
|
/**
|
|
19653
19843
|
* Require `Array.isArray()` instead of `instanceof Array`.
|
|
19654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19844
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-instanceof-array.md
|
|
19655
19845
|
*/
|
|
19656
19846
|
"unicorn/no-instanceof-array"?: Linter.RuleEntry<[]>;
|
|
19657
19847
|
/**
|
|
19658
19848
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
19659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19849
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-invalid-fetch-options.md
|
|
19660
19850
|
*/
|
|
19661
19851
|
"unicorn/no-invalid-fetch-options"?: Linter.RuleEntry<[]>;
|
|
19662
19852
|
/**
|
|
19663
19853
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
19664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19854
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
19665
19855
|
*/
|
|
19666
19856
|
"unicorn/no-invalid-remove-event-listener"?: Linter.RuleEntry<[]>;
|
|
19667
19857
|
/**
|
|
19668
19858
|
* Disallow identifiers starting with `new` or `class`.
|
|
19669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19859
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-keyword-prefix.md
|
|
19670
19860
|
*/
|
|
19671
19861
|
"unicorn/no-keyword-prefix"?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
19672
19862
|
/**
|
|
19673
19863
|
* Disallow using `.length` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
19674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19864
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-length-as-slice-end.md
|
|
19675
19865
|
*/
|
|
19676
19866
|
"unicorn/no-length-as-slice-end"?: Linter.RuleEntry<[]>;
|
|
19677
19867
|
/**
|
|
19678
19868
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
19679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19869
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-lonely-if.md
|
|
19680
19870
|
*/
|
|
19681
19871
|
"unicorn/no-lonely-if"?: Linter.RuleEntry<[]>;
|
|
19682
19872
|
/**
|
|
19683
19873
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
19684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19874
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
19685
19875
|
*/
|
|
19686
19876
|
"unicorn/no-magic-array-flat-depth"?: Linter.RuleEntry<[]>;
|
|
19687
19877
|
/**
|
|
19688
19878
|
* Disallow negated conditions.
|
|
19689
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-negated-condition.md
|
|
19690
19880
|
*/
|
|
19691
19881
|
"unicorn/no-negated-condition"?: Linter.RuleEntry<[]>;
|
|
19692
19882
|
/**
|
|
19693
19883
|
* Disallow negated expression in equality check.
|
|
19694
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19884
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-negation-in-equality-check.md
|
|
19695
19885
|
*/
|
|
19696
19886
|
"unicorn/no-negation-in-equality-check"?: Linter.RuleEntry<[]>;
|
|
19697
19887
|
/**
|
|
19698
19888
|
* Disallow nested ternary expressions.
|
|
19699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-nested-ternary.md
|
|
19700
19890
|
*/
|
|
19701
19891
|
"unicorn/no-nested-ternary"?: Linter.RuleEntry<[]>;
|
|
19702
19892
|
/**
|
|
19703
19893
|
* Disallow `new Array()`.
|
|
19704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-new-array.md
|
|
19705
19895
|
*/
|
|
19706
19896
|
"unicorn/no-new-array"?: Linter.RuleEntry<[]>;
|
|
19707
19897
|
/**
|
|
19708
19898
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
19709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19899
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-new-buffer.md
|
|
19710
19900
|
*/
|
|
19711
19901
|
"unicorn/no-new-buffer"?: Linter.RuleEntry<[]>;
|
|
19712
19902
|
/**
|
|
19713
19903
|
* Disallow the use of the `null` literal.
|
|
19714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19904
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-null.md
|
|
19715
19905
|
*/
|
|
19716
19906
|
"unicorn/no-null"?: Linter.RuleEntry<UnicornNoNull>;
|
|
19717
19907
|
/**
|
|
19718
19908
|
* Disallow the use of objects as default parameters.
|
|
19719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19909
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-object-as-default-parameter.md
|
|
19720
19910
|
*/
|
|
19721
19911
|
"unicorn/no-object-as-default-parameter"?: Linter.RuleEntry<[]>;
|
|
19722
19912
|
/**
|
|
19723
19913
|
* Disallow `process.exit()`.
|
|
19724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-process-exit.md
|
|
19725
19915
|
*/
|
|
19726
19916
|
"unicorn/no-process-exit"?: Linter.RuleEntry<[]>;
|
|
19727
19917
|
/**
|
|
19728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19918
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-reduce
|
|
19729
19919
|
* @deprecated
|
|
19730
19920
|
*/
|
|
19731
19921
|
"unicorn/no-reduce"?: Linter.RuleEntry<[]>;
|
|
19732
19922
|
/**
|
|
19733
19923
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
19734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
19735
19925
|
*/
|
|
19736
19926
|
"unicorn/no-single-promise-in-promise-methods"?: Linter.RuleEntry<[]>;
|
|
19737
19927
|
/**
|
|
19738
19928
|
* Disallow classes that only have static members.
|
|
19739
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-static-only-class.md
|
|
19740
19930
|
*/
|
|
19741
19931
|
"unicorn/no-static-only-class"?: Linter.RuleEntry<[]>;
|
|
19742
19932
|
/**
|
|
19743
19933
|
* Disallow `then` property.
|
|
19744
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-thenable.md
|
|
19745
19935
|
*/
|
|
19746
19936
|
"unicorn/no-thenable"?: Linter.RuleEntry<[]>;
|
|
19747
19937
|
/**
|
|
19748
19938
|
* Disallow assigning `this` to a variable.
|
|
19749
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-this-assignment.md
|
|
19750
19940
|
*/
|
|
19751
19941
|
"unicorn/no-this-assignment"?: Linter.RuleEntry<[]>;
|
|
19752
19942
|
/**
|
|
19753
19943
|
* Disallow comparing `undefined` using `typeof`.
|
|
19754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-typeof-undefined.md
|
|
19755
19945
|
*/
|
|
19756
19946
|
"unicorn/no-typeof-undefined"?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
19757
19947
|
/**
|
|
19758
19948
|
* Disallow awaiting non-promise values.
|
|
19759
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19949
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unnecessary-await.md
|
|
19760
19950
|
*/
|
|
19761
19951
|
"unicorn/no-unnecessary-await"?: Linter.RuleEntry<[]>;
|
|
19762
19952
|
/**
|
|
19763
19953
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
19764
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19954
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
19765
19955
|
*/
|
|
19766
19956
|
"unicorn/no-unnecessary-polyfills"?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
19767
19957
|
/**
|
|
19768
19958
|
* Disallow unreadable array destructuring.
|
|
19769
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
19770
19960
|
*/
|
|
19771
19961
|
"unicorn/no-unreadable-array-destructuring"?: Linter.RuleEntry<[]>;
|
|
19772
19962
|
/**
|
|
19773
19963
|
* Disallow unreadable IIFEs.
|
|
19774
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unreadable-iife.md
|
|
19775
19965
|
*/
|
|
19776
19966
|
"unicorn/no-unreadable-iife"?: Linter.RuleEntry<[]>;
|
|
19777
19967
|
/**
|
|
19778
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19968
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-unsafe-regex
|
|
19779
19969
|
* @deprecated
|
|
19780
19970
|
*/
|
|
19781
19971
|
"unicorn/no-unsafe-regex"?: Linter.RuleEntry<[]>;
|
|
19782
19972
|
/**
|
|
19783
19973
|
* Disallow unused object properties.
|
|
19784
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unused-properties.md
|
|
19785
19975
|
*/
|
|
19786
19976
|
"unicorn/no-unused-properties"?: Linter.RuleEntry<[]>;
|
|
19787
19977
|
/**
|
|
19788
19978
|
* Disallow useless fallback when spreading in object literals.
|
|
19789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19979
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
19790
19980
|
*/
|
|
19791
19981
|
"unicorn/no-useless-fallback-in-spread"?: Linter.RuleEntry<[]>;
|
|
19792
19982
|
/**
|
|
19793
19983
|
* Disallow useless array length check.
|
|
19794
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-length-check.md
|
|
19795
19985
|
*/
|
|
19796
19986
|
"unicorn/no-useless-length-check"?: Linter.RuleEntry<[]>;
|
|
19797
19987
|
/**
|
|
19798
19988
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
19799
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
19800
19990
|
*/
|
|
19801
19991
|
"unicorn/no-useless-promise-resolve-reject"?: Linter.RuleEntry<[]>;
|
|
19802
19992
|
/**
|
|
19803
19993
|
* Disallow unnecessary spread.
|
|
19804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-spread.md
|
|
19805
19995
|
*/
|
|
19806
19996
|
"unicorn/no-useless-spread"?: Linter.RuleEntry<[]>;
|
|
19807
19997
|
/**
|
|
19808
19998
|
* Disallow useless case in switch statements.
|
|
19809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-switch-case.md
|
|
19810
20000
|
*/
|
|
19811
20001
|
"unicorn/no-useless-switch-case"?: Linter.RuleEntry<[]>;
|
|
19812
20002
|
/**
|
|
19813
20003
|
* Disallow useless `undefined`.
|
|
19814
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20004
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-undefined.md
|
|
19815
20005
|
*/
|
|
19816
20006
|
"unicorn/no-useless-undefined"?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
19817
20007
|
/**
|
|
19818
20008
|
* Disallow number literals with zero fractions or dangling dots.
|
|
19819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20009
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-zero-fractions.md
|
|
19820
20010
|
*/
|
|
19821
20011
|
"unicorn/no-zero-fractions"?: Linter.RuleEntry<[]>;
|
|
19822
20012
|
/**
|
|
19823
20013
|
* Enforce proper case for numeric literals.
|
|
19824
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/number-literal-case.md
|
|
19825
20015
|
*/
|
|
19826
20016
|
"unicorn/number-literal-case"?: Linter.RuleEntry<[]>;
|
|
19827
20017
|
/**
|
|
19828
20018
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
19829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/numeric-separators-style.md
|
|
19830
20020
|
*/
|
|
19831
20021
|
"unicorn/numeric-separators-style"?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
19832
20022
|
/**
|
|
19833
20023
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
19834
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-add-event-listener.md
|
|
19835
20025
|
*/
|
|
19836
20026
|
"unicorn/prefer-add-event-listener"?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
19837
20027
|
/**
|
|
19838
20028
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
19839
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20029
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-find.md
|
|
19840
20030
|
*/
|
|
19841
20031
|
"unicorn/prefer-array-find"?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
19842
20032
|
/**
|
|
19843
20033
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
19844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-flat.md
|
|
19845
20035
|
*/
|
|
19846
20036
|
"unicorn/prefer-array-flat"?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
19847
20037
|
/**
|
|
19848
20038
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
19849
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-flat-map.md
|
|
19850
20040
|
*/
|
|
19851
20041
|
"unicorn/prefer-array-flat-map"?: Linter.RuleEntry<[]>;
|
|
19852
20042
|
/**
|
|
19853
20043
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
19854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-index-of.md
|
|
19855
20045
|
*/
|
|
19856
20046
|
"unicorn/prefer-array-index-of"?: Linter.RuleEntry<[]>;
|
|
19857
20047
|
/**
|
|
19858
20048
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
19859
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-some.md
|
|
19860
20050
|
*/
|
|
19861
20051
|
"unicorn/prefer-array-some"?: Linter.RuleEntry<[]>;
|
|
19862
20052
|
/**
|
|
19863
20053
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
19864
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-at.md
|
|
19865
20055
|
*/
|
|
19866
20056
|
"unicorn/prefer-at"?: Linter.RuleEntry<UnicornPreferAt>;
|
|
19867
20057
|
/**
|
|
19868
20058
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
19869
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
19870
20060
|
*/
|
|
19871
20061
|
"unicorn/prefer-blob-reading-methods"?: Linter.RuleEntry<[]>;
|
|
19872
20062
|
/**
|
|
19873
20063
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
19874
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-code-point.md
|
|
19875
20065
|
*/
|
|
19876
20066
|
"unicorn/prefer-code-point"?: Linter.RuleEntry<[]>;
|
|
19877
20067
|
/**
|
|
19878
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20068
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-dataset
|
|
19879
20069
|
* @deprecated
|
|
19880
20070
|
*/
|
|
19881
20071
|
"unicorn/prefer-dataset"?: Linter.RuleEntry<[]>;
|
|
19882
20072
|
/**
|
|
19883
20073
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
19884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-date-now.md
|
|
19885
20075
|
*/
|
|
19886
20076
|
"unicorn/prefer-date-now"?: Linter.RuleEntry<[]>;
|
|
19887
20077
|
/**
|
|
19888
20078
|
* Prefer default parameters over reassignment.
|
|
19889
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-default-parameters.md
|
|
19890
20080
|
*/
|
|
19891
20081
|
"unicorn/prefer-default-parameters"?: Linter.RuleEntry<[]>;
|
|
19892
20082
|
/**
|
|
19893
20083
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
19894
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-append.md
|
|
19895
20085
|
*/
|
|
19896
20086
|
"unicorn/prefer-dom-node-append"?: Linter.RuleEntry<[]>;
|
|
19897
20087
|
/**
|
|
19898
20088
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
19899
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
19900
20090
|
*/
|
|
19901
20091
|
"unicorn/prefer-dom-node-dataset"?: Linter.RuleEntry<[]>;
|
|
19902
20092
|
/**
|
|
19903
20093
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
19904
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-remove.md
|
|
19905
20095
|
*/
|
|
19906
20096
|
"unicorn/prefer-dom-node-remove"?: Linter.RuleEntry<[]>;
|
|
19907
20097
|
/**
|
|
19908
20098
|
* Prefer `.textContent` over `.innerText`.
|
|
19909
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
19910
20100
|
*/
|
|
19911
20101
|
"unicorn/prefer-dom-node-text-content"?: Linter.RuleEntry<[]>;
|
|
19912
20102
|
/**
|
|
19913
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20103
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-event-key
|
|
19914
20104
|
* @deprecated
|
|
19915
20105
|
*/
|
|
19916
20106
|
"unicorn/prefer-event-key"?: Linter.RuleEntry<[]>;
|
|
19917
20107
|
/**
|
|
19918
20108
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
19919
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-event-target.md
|
|
19920
20110
|
*/
|
|
19921
20111
|
"unicorn/prefer-event-target"?: Linter.RuleEntry<[]>;
|
|
19922
20112
|
/**
|
|
19923
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20113
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-exponentiation-operator
|
|
19924
20114
|
* @deprecated
|
|
19925
20115
|
*/
|
|
19926
20116
|
"unicorn/prefer-exponentiation-operator"?: Linter.RuleEntry<[]>;
|
|
19927
20117
|
/**
|
|
19928
20118
|
* Prefer `export…from` when re-exporting.
|
|
19929
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-export-from.md
|
|
19930
20120
|
*/
|
|
19931
20121
|
"unicorn/prefer-export-from"?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
19932
20122
|
/**
|
|
19933
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20123
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-flat-map
|
|
19934
20124
|
* @deprecated
|
|
19935
20125
|
*/
|
|
19936
20126
|
"unicorn/prefer-flat-map"?: Linter.RuleEntry<[]>;
|
|
20127
|
+
/**
|
|
20128
|
+
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
20129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-global-this.md
|
|
20130
|
+
*/
|
|
20131
|
+
"unicorn/prefer-global-this"?: Linter.RuleEntry<[]>;
|
|
19937
20132
|
/**
|
|
19938
20133
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
19939
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-includes.md
|
|
19940
20135
|
*/
|
|
19941
20136
|
"unicorn/prefer-includes"?: Linter.RuleEntry<[]>;
|
|
19942
20137
|
/**
|
|
19943
20138
|
* Prefer reading a JSON file as a buffer.
|
|
19944
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
19945
20140
|
*/
|
|
19946
20141
|
"unicorn/prefer-json-parse-buffer"?: Linter.RuleEntry<[]>;
|
|
19947
20142
|
/**
|
|
19948
20143
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
19949
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
19950
20145
|
*/
|
|
19951
20146
|
"unicorn/prefer-keyboard-event-key"?: Linter.RuleEntry<[]>;
|
|
19952
20147
|
/**
|
|
19953
20148
|
* Prefer using a logical operator over a ternary.
|
|
19954
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
19955
20150
|
*/
|
|
19956
20151
|
"unicorn/prefer-logical-operator-over-ternary"?: Linter.RuleEntry<[]>;
|
|
20152
|
+
/**
|
|
20153
|
+
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
20154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-math-min-max.md
|
|
20155
|
+
*/
|
|
20156
|
+
"unicorn/prefer-math-min-max"?: Linter.RuleEntry<[]>;
|
|
19957
20157
|
/**
|
|
19958
20158
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
19959
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-math-trunc.md
|
|
19960
20160
|
*/
|
|
19961
20161
|
"unicorn/prefer-math-trunc"?: Linter.RuleEntry<[]>;
|
|
19962
20162
|
/**
|
|
19963
20163
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
19964
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
19965
20165
|
*/
|
|
19966
20166
|
"unicorn/prefer-modern-dom-apis"?: Linter.RuleEntry<[]>;
|
|
19967
20167
|
/**
|
|
19968
20168
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
19969
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-modern-math-apis.md
|
|
19970
20170
|
*/
|
|
19971
20171
|
"unicorn/prefer-modern-math-apis"?: Linter.RuleEntry<[]>;
|
|
19972
20172
|
/**
|
|
19973
20173
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
19974
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-module.md
|
|
19975
20175
|
*/
|
|
19976
20176
|
"unicorn/prefer-module"?: Linter.RuleEntry<[]>;
|
|
19977
20177
|
/**
|
|
19978
20178
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
19979
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
19980
20180
|
*/
|
|
19981
20181
|
"unicorn/prefer-native-coercion-functions"?: Linter.RuleEntry<[]>;
|
|
19982
20182
|
/**
|
|
19983
20183
|
* Prefer negative index over `.length - index` when possible.
|
|
19984
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-negative-index.md
|
|
19985
20185
|
*/
|
|
19986
20186
|
"unicorn/prefer-negative-index"?: Linter.RuleEntry<[]>;
|
|
19987
20187
|
/**
|
|
19988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20188
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-node-append
|
|
19989
20189
|
* @deprecated
|
|
19990
20190
|
*/
|
|
19991
20191
|
"unicorn/prefer-node-append"?: Linter.RuleEntry<[]>;
|
|
19992
20192
|
/**
|
|
19993
20193
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
19994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-node-protocol.md
|
|
19995
20195
|
*/
|
|
19996
20196
|
"unicorn/prefer-node-protocol"?: Linter.RuleEntry<[]>;
|
|
19997
20197
|
/**
|
|
19998
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20198
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-node-remove
|
|
19999
20199
|
* @deprecated
|
|
20000
20200
|
*/
|
|
20001
20201
|
"unicorn/prefer-node-remove"?: Linter.RuleEntry<[]>;
|
|
20002
20202
|
/**
|
|
20003
20203
|
* Prefer `Number` static properties over global ones.
|
|
20004
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-number-properties.md
|
|
20005
20205
|
*/
|
|
20006
20206
|
"unicorn/prefer-number-properties"?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
20007
20207
|
/**
|
|
20008
20208
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
20009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-object-from-entries.md
|
|
20010
20210
|
*/
|
|
20011
20211
|
"unicorn/prefer-object-from-entries"?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
20012
20212
|
/**
|
|
20013
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20213
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-object-has-own
|
|
20014
20214
|
* @deprecated
|
|
20015
20215
|
*/
|
|
20016
20216
|
"unicorn/prefer-object-has-own"?: Linter.RuleEntry<[]>;
|
|
20017
20217
|
/**
|
|
20018
20218
|
* Prefer omitting the `catch` binding parameter.
|
|
20019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
20020
20220
|
*/
|
|
20021
20221
|
"unicorn/prefer-optional-catch-binding"?: Linter.RuleEntry<[]>;
|
|
20022
20222
|
/**
|
|
20023
20223
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
20024
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-prototype-methods.md
|
|
20025
20225
|
*/
|
|
20026
20226
|
"unicorn/prefer-prototype-methods"?: Linter.RuleEntry<[]>;
|
|
20027
20227
|
/**
|
|
20028
|
-
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()`.
|
|
20029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20228
|
+
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
20229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-query-selector.md
|
|
20030
20230
|
*/
|
|
20031
20231
|
"unicorn/prefer-query-selector"?: Linter.RuleEntry<[]>;
|
|
20032
20232
|
/**
|
|
20033
20233
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
20034
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-reflect-apply.md
|
|
20035
20235
|
*/
|
|
20036
20236
|
"unicorn/prefer-reflect-apply"?: Linter.RuleEntry<[]>;
|
|
20037
20237
|
/**
|
|
20038
20238
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
20039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-regexp-test.md
|
|
20040
20240
|
*/
|
|
20041
20241
|
"unicorn/prefer-regexp-test"?: Linter.RuleEntry<[]>;
|
|
20042
20242
|
/**
|
|
20043
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20243
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-replace-all
|
|
20044
20244
|
* @deprecated
|
|
20045
20245
|
*/
|
|
20046
20246
|
"unicorn/prefer-replace-all"?: Linter.RuleEntry<[]>;
|
|
20047
20247
|
/**
|
|
20048
20248
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
20049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-set-has.md
|
|
20050
20250
|
*/
|
|
20051
20251
|
"unicorn/prefer-set-has"?: Linter.RuleEntry<[]>;
|
|
20052
20252
|
/**
|
|
20053
20253
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
20054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-set-size.md
|
|
20055
20255
|
*/
|
|
20056
20256
|
"unicorn/prefer-set-size"?: Linter.RuleEntry<[]>;
|
|
20057
20257
|
/**
|
|
20058
20258
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
20059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-spread.md
|
|
20060
20260
|
*/
|
|
20061
20261
|
"unicorn/prefer-spread"?: Linter.RuleEntry<[]>;
|
|
20062
20262
|
/**
|
|
20063
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-starts-ends-with
|
|
20064
20264
|
* @deprecated
|
|
20065
20265
|
*/
|
|
20066
20266
|
"unicorn/prefer-starts-ends-with"?: Linter.RuleEntry<[]>;
|
|
20067
20267
|
/**
|
|
20068
20268
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
20069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-raw.md
|
|
20070
20270
|
*/
|
|
20071
20271
|
"unicorn/prefer-string-raw"?: Linter.RuleEntry<[]>;
|
|
20072
20272
|
/**
|
|
20073
20273
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
20074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-replace-all.md
|
|
20075
20275
|
*/
|
|
20076
20276
|
"unicorn/prefer-string-replace-all"?: Linter.RuleEntry<[]>;
|
|
20077
20277
|
/**
|
|
20078
20278
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
20079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-slice.md
|
|
20080
20280
|
*/
|
|
20081
20281
|
"unicorn/prefer-string-slice"?: Linter.RuleEntry<[]>;
|
|
20082
20282
|
/**
|
|
20083
20283
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
20084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
20085
20285
|
*/
|
|
20086
20286
|
"unicorn/prefer-string-starts-ends-with"?: Linter.RuleEntry<[]>;
|
|
20087
20287
|
/**
|
|
20088
20288
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
20089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
20090
20290
|
*/
|
|
20091
20291
|
"unicorn/prefer-string-trim-start-end"?: Linter.RuleEntry<[]>;
|
|
20092
20292
|
/**
|
|
20093
20293
|
* Prefer using `structuredClone` to create a deep clone.
|
|
20094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-structured-clone.md
|
|
20095
20295
|
*/
|
|
20096
20296
|
"unicorn/prefer-structured-clone"?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
20097
20297
|
/**
|
|
20098
20298
|
* Prefer `switch` over multiple `else-if`.
|
|
20099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-switch.md
|
|
20100
20300
|
*/
|
|
20101
20301
|
"unicorn/prefer-switch"?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
20102
20302
|
/**
|
|
20103
20303
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
20104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-ternary.md
|
|
20105
20305
|
*/
|
|
20106
20306
|
"unicorn/prefer-ternary"?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
20107
20307
|
/**
|
|
20108
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-text-content
|
|
20109
20309
|
* @deprecated
|
|
20110
20310
|
*/
|
|
20111
20311
|
"unicorn/prefer-text-content"?: Linter.RuleEntry<[]>;
|
|
20112
20312
|
/**
|
|
20113
20313
|
* Prefer top-level await over top-level promises and async function calls.
|
|
20114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-top-level-await.md
|
|
20115
20315
|
*/
|
|
20116
20316
|
"unicorn/prefer-top-level-await"?: Linter.RuleEntry<[]>;
|
|
20117
20317
|
/**
|
|
20118
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-trim-start-end
|
|
20119
20319
|
* @deprecated
|
|
20120
20320
|
*/
|
|
20121
20321
|
"unicorn/prefer-trim-start-end"?: Linter.RuleEntry<[]>;
|
|
20122
20322
|
/**
|
|
20123
20323
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
20124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-type-error.md
|
|
20125
20325
|
*/
|
|
20126
20326
|
"unicorn/prefer-type-error"?: Linter.RuleEntry<[]>;
|
|
20127
20327
|
/**
|
|
20128
20328
|
* Prevent abbreviations.
|
|
20129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prevent-abbreviations.md
|
|
20130
20330
|
*/
|
|
20131
20331
|
"unicorn/prevent-abbreviations"?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
20132
20332
|
/**
|
|
20133
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#regex-shorthand
|
|
20134
20334
|
* @deprecated
|
|
20135
20335
|
*/
|
|
20136
20336
|
"unicorn/regex-shorthand"?: Linter.RuleEntry<[]>;
|
|
20137
20337
|
/**
|
|
20138
20338
|
* Enforce consistent relative URL style.
|
|
20139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/relative-url-style.md
|
|
20140
20340
|
*/
|
|
20141
20341
|
"unicorn/relative-url-style"?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
20142
20342
|
/**
|
|
20143
20343
|
* Enforce using the separator argument with `Array#join()`.
|
|
20144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20344
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/require-array-join-separator.md
|
|
20145
20345
|
*/
|
|
20146
20346
|
"unicorn/require-array-join-separator"?: Linter.RuleEntry<[]>;
|
|
20147
20347
|
/**
|
|
20148
20348
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
20149
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
20150
20350
|
*/
|
|
20151
20351
|
"unicorn/require-number-to-fixed-digits-argument"?: Linter.RuleEntry<[]>;
|
|
20152
20352
|
/**
|
|
20153
20353
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
20154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20354
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/require-post-message-target-origin.md
|
|
20155
20355
|
*/
|
|
20156
20356
|
"unicorn/require-post-message-target-origin"?: Linter.RuleEntry<[]>;
|
|
20157
20357
|
/**
|
|
20158
20358
|
* Enforce better string content.
|
|
20159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/string-content.md
|
|
20160
20360
|
*/
|
|
20161
20361
|
"unicorn/string-content"?: Linter.RuleEntry<UnicornStringContent>;
|
|
20162
20362
|
/**
|
|
20163
20363
|
* Enforce consistent brace style for `case` clauses.
|
|
20164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/switch-case-braces.md
|
|
20165
20365
|
*/
|
|
20166
20366
|
"unicorn/switch-case-braces"?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
20167
20367
|
/**
|
|
20168
20368
|
* Fix whitespace-insensitive template indentation.
|
|
20169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/template-indent.md
|
|
20170
20370
|
*/
|
|
20171
20371
|
"unicorn/template-indent"?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
20172
20372
|
/**
|
|
20173
20373
|
* Enforce consistent case for text encoding identifiers.
|
|
20174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/text-encoding-identifier-case.md
|
|
20175
20375
|
*/
|
|
20176
20376
|
"unicorn/text-encoding-identifier-case"?: Linter.RuleEntry<[]>;
|
|
20177
20377
|
/**
|
|
20178
20378
|
* Require `new` when creating an error.
|
|
20179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/throw-new-error.md
|
|
20180
20380
|
*/
|
|
20181
20381
|
"unicorn/throw-new-error"?: Linter.RuleEntry<[]>;
|
|
20182
20382
|
}
|
|
@@ -21300,7 +21500,7 @@ declare const GLOB_ALL_SRC: string[];
|
|
|
21300
21500
|
declare const GLOB_EXCLUDE: string[];
|
|
21301
21501
|
|
|
21302
21502
|
declare function importPluginReact(): Promise<{
|
|
21303
|
-
pluginReact:
|
|
21503
|
+
pluginReact: typeof eslint_plugin_react;
|
|
21304
21504
|
}>;
|
|
21305
21505
|
declare function importPluginReactHooks(): Promise<{
|
|
21306
21506
|
pluginReactHooks: any;
|
|
@@ -21309,7 +21509,7 @@ declare function importPluginReactRefresh(): Promise<{
|
|
|
21309
21509
|
pluginReactRefresh: any;
|
|
21310
21510
|
}>;
|
|
21311
21511
|
declare function importReactPlugins(): Promise<{
|
|
21312
|
-
pluginReact:
|
|
21512
|
+
pluginReact: typeof eslint_plugin_react;
|
|
21313
21513
|
pluginReactHooks: any;
|
|
21314
21514
|
pluginReactRefresh: any;
|
|
21315
21515
|
}>;
|