@w5s/eslint-config 3.26.0 → 3.28.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/dist/index.d.ts +470 -366
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +102 -71
- package/dist/index.js.map +1 -1
- package/package.json +12 -12
- package/src/config/e18e.ts +1 -0
- package/src/config/es.ts +1 -0
- package/src/config/jsdoc.ts +1 -1
- package/src/config/jsx.ts +1 -0
- package/src/config/markdown.ts +24 -6
- package/src/config/test.ts +21 -1
- package/src/config/ts.ts +47 -28
- package/src/meta.ts +1 -1
- package/src/typegen/jsonc.d.ts +12 -4
- package/src/typegen/node.d.ts +15 -1
- package/src/typegen/unicorn.d.ts +424 -356
- package/src/typegen/yml.d.ts +12 -4
package/dist/index.d.ts
CHANGED
|
@@ -679,15 +679,19 @@ type JsoncSortKeys = ([{
|
|
|
679
679
|
hasProperties?: string[];
|
|
680
680
|
order: ((string | {
|
|
681
681
|
keyPattern?: string;
|
|
682
|
-
order?: {
|
|
682
|
+
order?: ({
|
|
683
683
|
type?: ("asc" | "desc");
|
|
684
684
|
caseSensitive?: boolean;
|
|
685
685
|
natural?: boolean;
|
|
686
|
-
}
|
|
686
|
+
} | {
|
|
687
|
+
type: "ignore";
|
|
688
|
+
});
|
|
687
689
|
})[] | {
|
|
688
690
|
type?: ("asc" | "desc");
|
|
689
691
|
caseSensitive?: boolean;
|
|
690
692
|
natural?: boolean;
|
|
693
|
+
} | {
|
|
694
|
+
type: "ignore";
|
|
691
695
|
});
|
|
692
696
|
minKeys?: number;
|
|
693
697
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -696,15 +700,19 @@ type JsoncSortKeys = ([{
|
|
|
696
700
|
hasProperties?: string[];
|
|
697
701
|
order: ((string | {
|
|
698
702
|
keyPattern?: string;
|
|
699
|
-
order?: {
|
|
703
|
+
order?: ({
|
|
700
704
|
type?: ("asc" | "desc");
|
|
701
705
|
caseSensitive?: boolean;
|
|
702
706
|
natural?: boolean;
|
|
703
|
-
}
|
|
707
|
+
} | {
|
|
708
|
+
type: "ignore";
|
|
709
|
+
});
|
|
704
710
|
})[] | {
|
|
705
711
|
type?: ("asc" | "desc");
|
|
706
712
|
caseSensitive?: boolean;
|
|
707
713
|
natural?: boolean;
|
|
714
|
+
} | {
|
|
715
|
+
type: "ignore";
|
|
708
716
|
});
|
|
709
717
|
minKeys?: number;
|
|
710
718
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -3078,7 +3086,7 @@ type MarkdownTableColumnCount = [] | [{
|
|
|
3078
3086
|
}];
|
|
3079
3087
|
//#endregion
|
|
3080
3088
|
//#region src/config/markdown.d.ts
|
|
3081
|
-
declare function markdown(options?: markdown.Options): Promise<[Config, Config]>;
|
|
3089
|
+
declare function markdown(options?: markdown.Options): Promise<[Config, Config, Config]>;
|
|
3082
3090
|
declare namespace markdown {
|
|
3083
3091
|
interface Options extends PluginOptionsBase<Rules> {
|
|
3084
3092
|
/**
|
|
@@ -3309,7 +3317,7 @@ interface RuleOptions$8 {
|
|
|
3309
3317
|
*/
|
|
3310
3318
|
'node/no-new-require'?: Linter.RuleEntry<[]>;
|
|
3311
3319
|
/**
|
|
3312
|
-
* disallow string concatenation with `__dirname` and `
|
|
3320
|
+
* disallow string concatenation with `__dirname`, `__filename`, and `import.meta` paths
|
|
3313
3321
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-path-concat.md
|
|
3314
3322
|
*/
|
|
3315
3323
|
'node/no-path-concat'?: Linter.RuleEntry<[]>;
|
|
@@ -3418,11 +3426,21 @@ interface RuleOptions$8 {
|
|
|
3418
3426
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url-search-params.md
|
|
3419
3427
|
*/
|
|
3420
3428
|
'node/prefer-global/url-search-params'?: Linter.RuleEntry<NodePreferGlobalUrlSearchParams>;
|
|
3429
|
+
/**
|
|
3430
|
+
* enforce using `node:assert/strict` instead of `node:assert`.
|
|
3431
|
+
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-import/assert-strict.md
|
|
3432
|
+
*/
|
|
3433
|
+
'node/prefer-import/assert-strict'?: Linter.RuleEntry<[]>;
|
|
3421
3434
|
/**
|
|
3422
3435
|
* enforce using the `node:` protocol when importing Node.js builtin modules.
|
|
3423
3436
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-node-protocol.md
|
|
3424
3437
|
*/
|
|
3425
3438
|
'node/prefer-node-protocol'?: Linter.RuleEntry<NodePreferNodeProtocol>;
|
|
3439
|
+
/**
|
|
3440
|
+
* enforce using `process.getBuiltinModule()` to load Node.js built-in modules
|
|
3441
|
+
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-process-get-builtin-module.md
|
|
3442
|
+
*/
|
|
3443
|
+
'node/prefer-process-get-builtin-module'?: Linter.RuleEntry<NodePreferProcessGetBuiltinModule>;
|
|
3426
3444
|
/**
|
|
3427
3445
|
* enforce `require("dns").promises`
|
|
3428
3446
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-promises/dns.md
|
|
@@ -3697,6 +3715,10 @@ type NodePreferGlobalUrlSearchParams = [] | [("always" | "never")];
|
|
|
3697
3715
|
type NodePreferNodeProtocol = [] | [{
|
|
3698
3716
|
version?: string;
|
|
3699
3717
|
}];
|
|
3718
|
+
// ----- node/prefer-process-get-builtin-module -----
|
|
3719
|
+
type NodePreferProcessGetBuiltinModule = [] | [{
|
|
3720
|
+
version?: string;
|
|
3721
|
+
}];
|
|
3700
3722
|
// ----- node/shebang -----
|
|
3701
3723
|
type NodeShebang = [] | [{
|
|
3702
3724
|
convertPath?: ({
|
|
@@ -11335,6 +11357,20 @@ type TsUnifiedSignatures = [] | [{
|
|
|
11335
11357
|
declare function ts(options?: ts.Options): Promise<[Config, Config] | [Config, Config, Config]>;
|
|
11336
11358
|
declare namespace ts {
|
|
11337
11359
|
interface Options extends PluginOptionsBase<Rules> {
|
|
11360
|
+
/**
|
|
11361
|
+
* Parser options for TypeScript ESLint parser
|
|
11362
|
+
*/
|
|
11363
|
+
parserOptions?: Record<string, unknown>;
|
|
11364
|
+
/**
|
|
11365
|
+
* Path to the tsconfig.json file.
|
|
11366
|
+
* This must be to enable type aware rules.
|
|
11367
|
+
*
|
|
11368
|
+
* @default './tsconfig.json'
|
|
11369
|
+
*/
|
|
11370
|
+
tsconfigPath?: string;
|
|
11371
|
+
/**
|
|
11372
|
+
* Whether to enable type aware rules
|
|
11373
|
+
*/
|
|
11338
11374
|
typeChecked?: boolean;
|
|
11339
11375
|
}
|
|
11340
11376
|
type Rules = RuleOptions$3;
|
|
@@ -11349,1715 +11385,1740 @@ declare module 'eslint' {
|
|
|
11349
11385
|
interface RuleOptions$2 {
|
|
11350
11386
|
/**
|
|
11351
11387
|
* Prefer better DOM traversal APIs.
|
|
11352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/better-dom-traversing.md
|
|
11353
11389
|
*/
|
|
11354
11390
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
11355
11391
|
/**
|
|
11356
11392
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
11357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
11358
11394
|
* @deprecated
|
|
11359
11395
|
*/
|
|
11360
11396
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
11361
11397
|
/**
|
|
11362
11398
|
* Enforce a specific parameter name in catch clauses.
|
|
11363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/catch-error-name.md
|
|
11364
11400
|
*/
|
|
11365
11401
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
11366
11402
|
/**
|
|
11367
11403
|
* Enforce consistent class references in static methods.
|
|
11368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11404
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/class-reference-in-static-methods.md
|
|
11369
11405
|
*/
|
|
11370
11406
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
11371
11407
|
/**
|
|
11372
11408
|
* Enforce better comment content.
|
|
11373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11409
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/comment-content.md
|
|
11374
11410
|
*/
|
|
11375
11411
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
11412
|
+
/**
|
|
11413
|
+
* Enforce a consistent return style for multiline arrow function bodies.
|
|
11414
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-arrow-return-style.md
|
|
11415
|
+
*/
|
|
11416
|
+
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
11376
11417
|
/**
|
|
11377
11418
|
* Enforce consistent assertion style with `node:assert`.
|
|
11378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-assert.md
|
|
11379
11420
|
*/
|
|
11380
11421
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
11381
11422
|
/**
|
|
11382
11423
|
* Enforce consistent naming for boolean names.
|
|
11383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-boolean-name.md
|
|
11384
11425
|
*/
|
|
11385
11426
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
11386
11427
|
/**
|
|
11387
11428
|
* Enforce consistent class member order.
|
|
11388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-class-member-order.md
|
|
11389
11430
|
*/
|
|
11390
11431
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
11391
11432
|
/**
|
|
11392
11433
|
* Enforce consistent spelling of compound words in identifiers.
|
|
11393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-compound-words.md
|
|
11394
11435
|
*/
|
|
11395
11436
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
11396
11437
|
/**
|
|
11397
11438
|
* Enforce consistent conditional object spread style.
|
|
11398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
11399
11440
|
*/
|
|
11400
11441
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
11401
11442
|
/**
|
|
11402
11443
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
11403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-date-clone.md
|
|
11404
11445
|
*/
|
|
11405
11446
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
11406
11447
|
/**
|
|
11407
11448
|
* Use destructured variables over properties.
|
|
11408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-destructuring.md
|
|
11409
11450
|
*/
|
|
11410
11451
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
11411
11452
|
/**
|
|
11412
11453
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
11413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-empty-array-spread.md
|
|
11414
11455
|
*/
|
|
11415
11456
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
11416
11457
|
/**
|
|
11417
11458
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
11418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-existence-index-check.md
|
|
11419
11460
|
*/
|
|
11420
11461
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
11421
11462
|
/**
|
|
11422
11463
|
* Enforce consistent decorator position on exported classes.
|
|
11423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-export-decorator-position.md
|
|
11424
11465
|
*/
|
|
11425
11466
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
11426
11467
|
/**
|
|
11427
11468
|
* Move function definitions to the highest possible scope.
|
|
11428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-function-scoping.md
|
|
11429
11470
|
*/
|
|
11430
11471
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
11431
11472
|
/**
|
|
11432
11473
|
* Enforce function syntax by role.
|
|
11433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-function-style.md
|
|
11434
11475
|
*/
|
|
11435
11476
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
11436
11477
|
/**
|
|
11437
11478
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
11438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-json-file-read.md
|
|
11439
11480
|
*/
|
|
11440
11481
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
11441
11482
|
/**
|
|
11442
11483
|
* Enforce consistent optional chaining for same-base member access.
|
|
11443
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-optional-chaining.md
|
|
11444
11485
|
*/
|
|
11445
11486
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
11446
11487
|
/**
|
|
11447
11488
|
* Enforce consistent style for escaping `${` in template literals.
|
|
11448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-template-literal-escape.md
|
|
11449
11490
|
*/
|
|
11450
11491
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
11451
11492
|
/**
|
|
11452
11493
|
* Enforce consistent labels on tuple type elements.
|
|
11453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-tuple-labels.md
|
|
11454
11495
|
*/
|
|
11455
11496
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
11456
11497
|
/**
|
|
11457
11498
|
* Enforce correct `Error` subclassing.
|
|
11458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/custom-error-definition.md
|
|
11459
11500
|
*/
|
|
11460
11501
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
11461
11502
|
/**
|
|
11462
11503
|
* Enforce consistent default export declarations.
|
|
11463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/default-export-style.md
|
|
11464
11505
|
*/
|
|
11465
11506
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
11466
11507
|
/**
|
|
11467
11508
|
* Enforce consistent style for DOM element dataset access.
|
|
11468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/dom-node-dataset.md
|
|
11469
11510
|
*/
|
|
11470
11511
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
11471
11512
|
/**
|
|
11472
11513
|
* Enforce no spaces between braces.
|
|
11473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/empty-brace-spaces.md
|
|
11474
11515
|
*/
|
|
11475
11516
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
11476
11517
|
/**
|
|
11477
11518
|
* Enforce passing a `message` value when creating a built-in error.
|
|
11478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/error-message.md
|
|
11479
11520
|
*/
|
|
11480
11521
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
11481
11522
|
/**
|
|
11482
11523
|
* Require escape sequences to use uppercase or lowercase values.
|
|
11483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/escape-case.md
|
|
11484
11525
|
*/
|
|
11485
11526
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
11486
11527
|
/**
|
|
11487
11528
|
* Add expiration conditions to TODO comments.
|
|
11488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/expiring-todo-comments.md
|
|
11489
11530
|
*/
|
|
11490
11531
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
11491
11532
|
/**
|
|
11492
11533
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
11493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/explicit-length-check.md
|
|
11494
11535
|
*/
|
|
11495
11536
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
11496
11537
|
/**
|
|
11497
11538
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
11498
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/explicit-timer-delay.md
|
|
11499
11540
|
*/
|
|
11500
11541
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
11501
11542
|
/**
|
|
11502
11543
|
* Enforce a case style for filenames and directory names.
|
|
11503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/filename-case.md
|
|
11504
11545
|
*/
|
|
11505
11546
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
11506
11547
|
/**
|
|
11507
11548
|
* Require identifiers to match a specified regular expression.
|
|
11508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/id-match.md
|
|
11509
11550
|
*/
|
|
11510
11551
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
11511
11552
|
/**
|
|
11512
11553
|
* Enforce specific import styles per module.
|
|
11513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/import-style.md
|
|
11514
11555
|
*/
|
|
11515
11556
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
11516
11557
|
/**
|
|
11517
11558
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
11518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/isolated-functions.md
|
|
11519
11560
|
*/
|
|
11520
11561
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
11562
|
+
/**
|
|
11563
|
+
* Enforce a consistent style for optional loop sources.
|
|
11564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/iteration-fallback-style.md
|
|
11565
|
+
*/
|
|
11566
|
+
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
11521
11567
|
/**
|
|
11522
11568
|
* Require or disallow logical assignment operator shorthand
|
|
11523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/logical-assignment-operators.md
|
|
11524
11570
|
*/
|
|
11525
11571
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
11526
11572
|
/**
|
|
11527
11573
|
* Limit the depth of nested calls.
|
|
11528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/max-nested-calls.md
|
|
11529
11575
|
*/
|
|
11530
11576
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
11531
11577
|
/**
|
|
11532
11578
|
* Enforce replacements for variable, property, and filenames.
|
|
11533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/name-replacements.md
|
|
11534
11580
|
*/
|
|
11535
11581
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
11536
11582
|
/**
|
|
11537
11583
|
* Enforce correct use of `new` for builtin constructors.
|
|
11538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/new-for-builtins.md
|
|
11539
11585
|
*/
|
|
11540
11586
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
11541
11587
|
/**
|
|
11542
11588
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
11543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
11544
11590
|
*/
|
|
11545
11591
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
11546
11592
|
/**
|
|
11547
11593
|
* Disallow recursive access to `this` within getters and setters.
|
|
11548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-accessor-recursion.md
|
|
11549
11595
|
*/
|
|
11550
11596
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
11551
11597
|
/**
|
|
11552
11598
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
11553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
11554
11600
|
*/
|
|
11555
11601
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
11556
11602
|
/**
|
|
11557
11603
|
* Disallow anonymous functions and classes as the default export.
|
|
11558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-anonymous-default-export.md
|
|
11559
11605
|
*/
|
|
11560
11606
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
11561
11607
|
/**
|
|
11562
11608
|
* Prevent passing a function reference directly to iterator methods.
|
|
11563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-callback-reference.md
|
|
11564
11610
|
*/
|
|
11565
11611
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
11566
11612
|
/**
|
|
11567
11613
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
11568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-concat-in-loop.md
|
|
11569
11615
|
*/
|
|
11570
11616
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
11571
11617
|
/**
|
|
11572
11618
|
* Disallow using reference values as `Array#fill()` values.
|
|
11573
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
11574
11620
|
*/
|
|
11575
11621
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
11576
11622
|
/**
|
|
11577
11623
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
11578
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-from-fill.md
|
|
11579
11625
|
*/
|
|
11580
11626
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
11581
11627
|
/**
|
|
11582
11628
|
* Disallow front-of-array mutation.
|
|
11583
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-front-mutation.md
|
|
11584
11630
|
*/
|
|
11585
11631
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
11586
11632
|
/**
|
|
11587
11633
|
* Disallow using the `this` argument in array methods.
|
|
11588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-method-this-argument.md
|
|
11589
11635
|
*/
|
|
11590
11636
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
11591
11637
|
/**
|
|
11592
11638
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
11593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
11594
11640
|
* @deprecated
|
|
11595
11641
|
*/
|
|
11596
11642
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
11597
11643
|
/**
|
|
11598
11644
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
11599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11645
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-reduce.md
|
|
11600
11646
|
*/
|
|
11601
11647
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
11602
11648
|
/**
|
|
11603
11649
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
11604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-reverse.md
|
|
11605
11651
|
*/
|
|
11606
11652
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
11607
11653
|
/**
|
|
11608
11654
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
11609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-sort.md
|
|
11610
11656
|
*/
|
|
11611
11657
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
11612
11658
|
/**
|
|
11613
11659
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
11614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
11615
11661
|
*/
|
|
11616
11662
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
11617
11663
|
/**
|
|
11618
11664
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
11619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-splice.md
|
|
11620
11666
|
*/
|
|
11621
11667
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
11622
11668
|
/**
|
|
11623
11669
|
* Disallow asterisk prefixes in documentation comments.
|
|
11624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
11625
11671
|
*/
|
|
11626
11672
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
11627
11673
|
/**
|
|
11628
11674
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
11629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-async-promise-finally.md
|
|
11630
11676
|
*/
|
|
11631
11677
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
11632
11678
|
/**
|
|
11633
11679
|
* Disallow member access from await expression.
|
|
11634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-await-expression-member.md
|
|
11635
11681
|
*/
|
|
11636
11682
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
11637
11683
|
/**
|
|
11638
11684
|
* Disallow using `await` in `Promise` method parameters.
|
|
11639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-await-in-promise-methods.md
|
|
11640
11686
|
*/
|
|
11641
11687
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
11688
|
+
/**
|
|
11689
|
+
* Disallow barrel files.
|
|
11690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-barrel-files.md
|
|
11691
|
+
*/
|
|
11692
|
+
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
11642
11693
|
/**
|
|
11643
11694
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
11644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-blob-to-file.md
|
|
11645
11696
|
*/
|
|
11646
11697
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
11647
11698
|
/**
|
|
11648
11699
|
* Disallow boolean-returning sort comparators.
|
|
11649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
11650
11701
|
*/
|
|
11651
11702
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
11652
11703
|
/**
|
|
11653
11704
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
11654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-break-in-nested-loop.md
|
|
11655
11706
|
*/
|
|
11656
11707
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
11657
11708
|
/**
|
|
11658
11709
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
11659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-canvas-to-image.md
|
|
11660
11711
|
*/
|
|
11661
11712
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
11662
11713
|
/**
|
|
11663
11714
|
* Disallow chained comparisons such as `a < b < c`.
|
|
11664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-chained-comparison.md
|
|
11665
11716
|
*/
|
|
11666
11717
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
11667
11718
|
/**
|
|
11668
11719
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
11669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-collection-bracket-access.md
|
|
11670
11721
|
*/
|
|
11671
11722
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
11672
11723
|
/**
|
|
11673
11724
|
* Disallow dynamic object property existence checks.
|
|
11674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-computed-property-existence-check.md
|
|
11675
11726
|
*/
|
|
11676
11727
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
11677
11728
|
/**
|
|
11678
11729
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
11679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-confusing-array-splice.md
|
|
11680
11731
|
*/
|
|
11681
11732
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
11682
11733
|
/**
|
|
11683
11734
|
* Disallow confusing uses of `Array#with()`.
|
|
11684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-confusing-array-with.md
|
|
11685
11736
|
*/
|
|
11686
11737
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
11687
11738
|
/**
|
|
11688
11739
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
11689
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-console-spaces.md
|
|
11690
11741
|
*/
|
|
11691
11742
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
11692
11743
|
/**
|
|
11693
11744
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
11694
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-constant-zero-expression.md
|
|
11695
11746
|
*/
|
|
11696
11747
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
11697
11748
|
/**
|
|
11698
11749
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
11699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
11700
11751
|
*/
|
|
11701
11752
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
11702
11753
|
/**
|
|
11703
11754
|
* Do not use `document.cookie` directly.
|
|
11704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-document-cookie.md
|
|
11705
11756
|
*/
|
|
11706
11757
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
11707
11758
|
/**
|
|
11708
11759
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
11709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-double-comparison.md
|
|
11710
11761
|
*/
|
|
11711
11762
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
11712
11763
|
/**
|
|
11713
11764
|
* Disallow duplicate adjacent branches in if chains.
|
|
11714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-if-branches.md
|
|
11715
11766
|
*/
|
|
11716
11767
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
11717
11768
|
/**
|
|
11718
11769
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
11719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
11720
11771
|
*/
|
|
11721
11772
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
11722
11773
|
/**
|
|
11723
11774
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
11724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-loops.md
|
|
11725
11776
|
*/
|
|
11726
11777
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
11727
11778
|
/**
|
|
11728
11779
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
11729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-set-values.md
|
|
11730
11781
|
*/
|
|
11731
11782
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
11732
11783
|
/**
|
|
11733
11784
|
* Disallow empty files.
|
|
11734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-empty-file.md
|
|
11735
11786
|
*/
|
|
11736
11787
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
11737
11788
|
/**
|
|
11738
11789
|
* Disallow assigning to built-in error properties.
|
|
11739
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-error-property-assignment.md
|
|
11740
11791
|
*/
|
|
11741
11792
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
11742
11793
|
/**
|
|
11743
11794
|
* Disallow exports in scripts.
|
|
11744
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-exports-in-scripts.md
|
|
11745
11796
|
*/
|
|
11746
11797
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
11747
11798
|
/**
|
|
11748
11799
|
* Prefer `for…of` over the `forEach` method.
|
|
11749
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-for-each.md
|
|
11750
11801
|
*/
|
|
11751
11802
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
11752
11803
|
/**
|
|
11753
11804
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
11754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-for-loop.md
|
|
11755
11806
|
*/
|
|
11756
11807
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
11757
11808
|
/**
|
|
11758
11809
|
* Disallow assigning properties on the global object.
|
|
11759
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-global-object-property-assignment.md
|
|
11760
11811
|
*/
|
|
11761
11812
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
11762
11813
|
/**
|
|
11763
11814
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
11764
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
11765
11816
|
* @deprecated
|
|
11766
11817
|
*/
|
|
11767
11818
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
11768
11819
|
/**
|
|
11769
11820
|
* Disallow immediate mutation after variable assignment.
|
|
11770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-immediate-mutation.md
|
|
11771
11822
|
*/
|
|
11772
11823
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
11773
11824
|
/**
|
|
11774
11825
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
11775
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-impossible-length-comparison.md
|
|
11776
11827
|
*/
|
|
11777
11828
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
11778
11829
|
/**
|
|
11779
11830
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
11780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-incorrect-query-selector.md
|
|
11781
11832
|
*/
|
|
11782
11833
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
11783
11834
|
/**
|
|
11784
11835
|
* Disallow incorrect template literal interpolation syntax.
|
|
11785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
11786
11837
|
*/
|
|
11787
11838
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
11788
11839
|
/**
|
|
11789
11840
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
11790
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
11791
11842
|
* @deprecated
|
|
11792
11843
|
*/
|
|
11793
11844
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
11794
11845
|
/**
|
|
11795
11846
|
* Disallow `instanceof` with built-in objects
|
|
11796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-instanceof-builtins.md
|
|
11797
11848
|
*/
|
|
11798
11849
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
11799
11850
|
/**
|
|
11800
11851
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
11801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11852
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-argument-count.md
|
|
11802
11853
|
*/
|
|
11803
11854
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
11804
11855
|
/**
|
|
11805
11856
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
11806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11857
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-character-comparison.md
|
|
11807
11858
|
*/
|
|
11808
11859
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
11809
11860
|
/**
|
|
11810
11861
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
11811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-fetch-options.md
|
|
11812
11863
|
*/
|
|
11813
11864
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
11814
11865
|
/**
|
|
11815
11866
|
* Disallow invalid `accept` values on file inputs.
|
|
11816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
11817
11868
|
*/
|
|
11818
11869
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
11819
11870
|
/**
|
|
11820
11871
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
11821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
11822
11873
|
*/
|
|
11823
11874
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
11824
11875
|
/**
|
|
11825
11876
|
* Disallow invalid implementations of well-known symbol methods.
|
|
11826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
11827
11878
|
*/
|
|
11828
11879
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
11829
11880
|
/**
|
|
11830
11881
|
* Disallow identifiers starting with `new` or `class`.
|
|
11831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-keyword-prefix.md
|
|
11832
11883
|
*/
|
|
11833
11884
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
11834
11885
|
/**
|
|
11835
11886
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
11836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-late-current-target-access.md
|
|
11837
11888
|
*/
|
|
11838
11889
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
11839
11890
|
/**
|
|
11840
11891
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
11841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-late-event-control.md
|
|
11842
11893
|
*/
|
|
11843
11894
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
11844
11895
|
/**
|
|
11845
11896
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
11846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
11847
11898
|
* @deprecated
|
|
11848
11899
|
*/
|
|
11849
11900
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
11850
11901
|
/**
|
|
11851
11902
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
11852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11903
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-lonely-if.md
|
|
11853
11904
|
*/
|
|
11854
11905
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
11855
11906
|
/**
|
|
11856
11907
|
* Disallow mutating a loop iterable during iteration.
|
|
11857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11908
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
11858
11909
|
*/
|
|
11859
11910
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
11860
11911
|
/**
|
|
11861
11912
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
11862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11913
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
11863
11914
|
*/
|
|
11864
11915
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
11865
11916
|
/**
|
|
11866
11917
|
* Disallow manually wrapped comments.
|
|
11867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11918
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
11868
11919
|
*/
|
|
11869
11920
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
11870
11921
|
/**
|
|
11871
11922
|
* Disallow checking a Map key before accessing a different key.
|
|
11872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11923
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-mismatched-map-key.md
|
|
11873
11924
|
*/
|
|
11874
11925
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
11875
11926
|
/**
|
|
11876
11927
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
11877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11928
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-misrefactored-assignment.md
|
|
11878
11929
|
*/
|
|
11879
11930
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
11880
11931
|
/**
|
|
11881
11932
|
* Disallow references to missing local resources.
|
|
11882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11933
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-missing-local-resource.md
|
|
11883
11934
|
*/
|
|
11884
11935
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
11885
11936
|
/**
|
|
11886
11937
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
11887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11938
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
11888
11939
|
*/
|
|
11889
11940
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
11890
11941
|
/**
|
|
11891
11942
|
* Disallow named usage of default import and export.
|
|
11892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11943
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-named-default.md
|
|
11893
11944
|
*/
|
|
11894
11945
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
11895
11946
|
/**
|
|
11896
11947
|
* Disallow negated array predicate calls.
|
|
11897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11948
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negated-array-predicate.md
|
|
11898
11949
|
*/
|
|
11899
11950
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
11900
11951
|
/**
|
|
11901
11952
|
* Disallow negated comparisons.
|
|
11902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11953
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negated-comparison.md
|
|
11903
11954
|
*/
|
|
11904
11955
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
11905
11956
|
/**
|
|
11906
11957
|
* Disallow negated conditions.
|
|
11907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11958
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negated-condition.md
|
|
11908
11959
|
*/
|
|
11909
11960
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
11910
11961
|
/**
|
|
11911
11962
|
* Disallow negated expression in equality check.
|
|
11912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11963
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negation-in-equality-check.md
|
|
11913
11964
|
*/
|
|
11914
11965
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
11915
11966
|
/**
|
|
11916
11967
|
* Disallow nested ternary expressions.
|
|
11917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11968
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-nested-ternary.md
|
|
11918
11969
|
*/
|
|
11919
11970
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
11920
11971
|
/**
|
|
11921
11972
|
* Disallow `new Array()`.
|
|
11922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11973
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-new-array.md
|
|
11923
11974
|
*/
|
|
11924
11975
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
11925
11976
|
/**
|
|
11926
11977
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
11927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11978
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-new-buffer.md
|
|
11928
11979
|
*/
|
|
11929
11980
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
11930
11981
|
/**
|
|
11931
11982
|
* Disallow non-function values with function-style verb prefixes.
|
|
11932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11983
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
11933
11984
|
*/
|
|
11934
11985
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
11935
11986
|
/**
|
|
11936
11987
|
* Disallow non-standard properties on built-in objects.
|
|
11937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11988
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
11938
11989
|
*/
|
|
11939
11990
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
11940
11991
|
/**
|
|
11941
11992
|
* Disallow the use of the `null` literal.
|
|
11942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11993
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-null.md
|
|
11943
11994
|
*/
|
|
11944
11995
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
11945
11996
|
/**
|
|
11946
11997
|
* Disallow the use of objects as default parameters.
|
|
11947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11998
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-object-as-default-parameter.md
|
|
11948
11999
|
*/
|
|
11949
12000
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
11950
12001
|
/**
|
|
11951
12002
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
11952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12003
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-object-methods-with-collections.md
|
|
11953
12004
|
*/
|
|
11954
12005
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
11955
12006
|
/**
|
|
11956
12007
|
* Disallow optional chaining on undeclared variables.
|
|
11957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12008
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
11958
12009
|
*/
|
|
11959
12010
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
11960
12011
|
/**
|
|
11961
12012
|
* Disallow `process.exit()`.
|
|
11962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12013
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-process-exit.md
|
|
11963
12014
|
*/
|
|
11964
12015
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
11965
12016
|
/**
|
|
11966
12017
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
11967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-redundant-comparison.md
|
|
11968
12019
|
*/
|
|
11969
12020
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
11970
12021
|
/**
|
|
11971
12022
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
11972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12023
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-return-array-push.md
|
|
11973
12024
|
*/
|
|
11974
12025
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
11975
12026
|
/**
|
|
11976
12027
|
* Disallow selector syntax in DOM names.
|
|
11977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12028
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-selector-as-dom-name.md
|
|
11978
12029
|
*/
|
|
11979
12030
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
11980
12031
|
/**
|
|
11981
12032
|
* Disallow shorthand properties that override related longhand properties.
|
|
11982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12033
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
11983
12034
|
*/
|
|
11984
12035
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
11985
12036
|
/**
|
|
11986
12037
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
11987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12038
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
11988
12039
|
*/
|
|
11989
12040
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
11990
12041
|
/**
|
|
11991
12042
|
* Disallow classes that only have static members.
|
|
11992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12043
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-static-only-class.md
|
|
11993
12044
|
*/
|
|
11994
12045
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
11995
12046
|
/**
|
|
11996
12047
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
11997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12048
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-subtraction-comparison.md
|
|
11998
12049
|
*/
|
|
11999
12050
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
12000
12051
|
/**
|
|
12001
12052
|
* Disallow `then` property.
|
|
12002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12053
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-thenable.md
|
|
12003
12054
|
*/
|
|
12004
12055
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
12005
12056
|
/**
|
|
12006
12057
|
* Disallow assigning `this` to a variable.
|
|
12007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12058
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-this-assignment.md
|
|
12008
12059
|
*/
|
|
12009
12060
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
12010
12061
|
/**
|
|
12011
12062
|
* Disallow `this` outside of classes.
|
|
12012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12063
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-this-outside-of-class.md
|
|
12013
12064
|
*/
|
|
12014
12065
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
12015
12066
|
/**
|
|
12016
12067
|
* Disallow assigning to top-level variables from inside functions.
|
|
12017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12068
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
12018
12069
|
*/
|
|
12019
12070
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
12020
12071
|
/**
|
|
12021
12072
|
* Disallow top-level side effects in exported modules.
|
|
12022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12073
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-top-level-side-effects.md
|
|
12023
12074
|
*/
|
|
12024
12075
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
12025
12076
|
/**
|
|
12026
12077
|
* Disallow `all` as a transition property.
|
|
12027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12078
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-transition-all.md
|
|
12028
12079
|
*/
|
|
12029
12080
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
12030
12081
|
/**
|
|
12031
12082
|
* Disallow comparing `undefined` using `typeof`.
|
|
12032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12083
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-typeof-undefined.md
|
|
12033
12084
|
*/
|
|
12034
12085
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
12035
12086
|
/**
|
|
12036
12087
|
* Disallow referencing methods without calling them.
|
|
12037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12088
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-uncalled-method.md
|
|
12038
12089
|
*/
|
|
12039
12090
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
12040
12091
|
/**
|
|
12041
12092
|
* Require class members to be declared.
|
|
12042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12093
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-undeclared-class-members.md
|
|
12043
12094
|
*/
|
|
12044
12095
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
12045
12096
|
/**
|
|
12046
12097
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
12047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12098
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
12048
12099
|
*/
|
|
12049
12100
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
12050
12101
|
/**
|
|
12051
12102
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
12052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12103
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
12053
12104
|
*/
|
|
12054
12105
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
12055
12106
|
/**
|
|
12056
12107
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
12057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12108
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
12058
12109
|
*/
|
|
12059
12110
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
12060
12111
|
/**
|
|
12061
12112
|
* Disallow awaiting non-promise values.
|
|
12062
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12113
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-await.md
|
|
12063
12114
|
*/
|
|
12064
12115
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
12065
12116
|
/**
|
|
12066
12117
|
* Disallow unnecessary comparisons against boolean literals.
|
|
12067
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12118
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
12068
12119
|
*/
|
|
12069
12120
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
12070
12121
|
/**
|
|
12071
12122
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
12072
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12123
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
12073
12124
|
*/
|
|
12074
12125
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
12075
12126
|
/**
|
|
12076
12127
|
* Disallow unnecessary `globalThis` references.
|
|
12077
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12128
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-global-this.md
|
|
12078
12129
|
*/
|
|
12079
12130
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
12080
12131
|
/**
|
|
12081
12132
|
* Disallow unnecessary nested ternary expressions.
|
|
12082
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12133
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
12083
12134
|
*/
|
|
12084
12135
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
12085
12136
|
/**
|
|
12086
12137
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
12087
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12138
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
12088
12139
|
*/
|
|
12089
12140
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
12090
12141
|
/**
|
|
12091
12142
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
12092
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12143
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
12093
12144
|
*/
|
|
12094
12145
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
12095
12146
|
/**
|
|
12096
12147
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
12097
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12148
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-splice.md
|
|
12098
12149
|
*/
|
|
12099
12150
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
12100
12151
|
/**
|
|
12101
12152
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
12102
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12153
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
12103
12154
|
*/
|
|
12104
12155
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
12105
12156
|
/**
|
|
12106
12157
|
* Disallow unreadable array destructuring.
|
|
12107
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12158
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
12108
12159
|
*/
|
|
12109
12160
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
12110
12161
|
/**
|
|
12111
12162
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
12112
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12163
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
12113
12164
|
*/
|
|
12114
12165
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
12115
12166
|
/**
|
|
12116
12167
|
* Disallow unreadable IIFEs.
|
|
12117
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12168
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-iife.md
|
|
12118
12169
|
*/
|
|
12119
12170
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
12120
12171
|
/**
|
|
12121
12172
|
* Disallow unreadable `new` expressions.
|
|
12122
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12173
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-new-expression.md
|
|
12123
12174
|
*/
|
|
12124
12175
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
12125
12176
|
/**
|
|
12126
12177
|
* Disallow unreadable object destructuring.
|
|
12127
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12178
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
12128
12179
|
*/
|
|
12129
12180
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
12130
12181
|
/**
|
|
12131
12182
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
12132
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12183
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
12133
12184
|
*/
|
|
12134
12185
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
12135
12186
|
/**
|
|
12136
12187
|
* Disallow unsafe DOM HTML APIs.
|
|
12137
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12188
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-dom-html.md
|
|
12138
12189
|
*/
|
|
12139
12190
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
12140
12191
|
/**
|
|
12141
12192
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
12142
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12193
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
12143
12194
|
*/
|
|
12144
12195
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
12145
12196
|
/**
|
|
12146
12197
|
* Disallow unsafe values as property keys.
|
|
12147
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12198
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-property-key.md
|
|
12148
12199
|
*/
|
|
12149
12200
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
12201
|
+
/**
|
|
12202
|
+
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
12203
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
12204
|
+
*/
|
|
12205
|
+
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
12150
12206
|
/**
|
|
12151
12207
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
12152
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12208
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
12153
12209
|
*/
|
|
12154
12210
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
12155
12211
|
/**
|
|
12156
12212
|
* Disallow ignoring the return value of selected array methods.
|
|
12157
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12213
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unused-array-method-return.md
|
|
12158
12214
|
*/
|
|
12159
12215
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
12160
12216
|
/**
|
|
12161
12217
|
* Disallow unused object properties.
|
|
12162
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12218
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unused-properties.md
|
|
12163
12219
|
*/
|
|
12164
12220
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
12165
12221
|
/**
|
|
12166
12222
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
12167
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12223
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-boolean-cast.md
|
|
12168
12224
|
*/
|
|
12169
12225
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
12170
12226
|
/**
|
|
12171
12227
|
* Disallow useless type coercions of values that are already of the target type.
|
|
12172
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12228
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-coercion.md
|
|
12173
12229
|
*/
|
|
12174
12230
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
12175
12231
|
/**
|
|
12176
12232
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
12177
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-collection-argument.md
|
|
12178
12234
|
*/
|
|
12179
12235
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
12180
12236
|
/**
|
|
12181
12237
|
* Disallow useless compound assignments such as `x += 0`.
|
|
12182
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12238
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-compound-assignment.md
|
|
12183
12239
|
*/
|
|
12184
12240
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
12185
12241
|
/**
|
|
12186
12242
|
* Disallow useless concatenation of literals.
|
|
12187
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12243
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-concat.md
|
|
12188
12244
|
*/
|
|
12189
12245
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
12190
12246
|
/**
|
|
12191
12247
|
* Disallow useless `continue` statements.
|
|
12192
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12248
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-continue.md
|
|
12193
12249
|
*/
|
|
12194
12250
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
12195
12251
|
/**
|
|
12196
12252
|
* Disallow unnecessary existence checks before deletion.
|
|
12197
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12253
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-delete-check.md
|
|
12198
12254
|
*/
|
|
12199
12255
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
12200
12256
|
/**
|
|
12201
12257
|
* Disallow `else` after a statement that exits.
|
|
12202
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12258
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-else.md
|
|
12203
12259
|
*/
|
|
12204
12260
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
12205
12261
|
/**
|
|
12206
12262
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
12207
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
12208
12264
|
*/
|
|
12209
12265
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
12210
12266
|
/**
|
|
12211
12267
|
* Disallow useless fallback when spreading in object literals.
|
|
12212
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12268
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
12213
12269
|
*/
|
|
12214
12270
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
12215
12271
|
/**
|
|
12216
12272
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
12217
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
12218
12274
|
*/
|
|
12219
12275
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
12220
12276
|
/**
|
|
12221
12277
|
* Disallow useless array length check.
|
|
12222
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12278
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-length-check.md
|
|
12223
12279
|
*/
|
|
12224
12280
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
12225
12281
|
/**
|
|
12226
12282
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
12227
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-logical-operand.md
|
|
12228
12284
|
*/
|
|
12229
12285
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
12230
12286
|
/**
|
|
12231
12287
|
* Disallow useless overrides of class methods.
|
|
12232
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12288
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-override.md
|
|
12233
12289
|
*/
|
|
12234
12290
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
12235
12291
|
/**
|
|
12236
12292
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
12237
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12293
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
12238
12294
|
*/
|
|
12239
12295
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
12240
12296
|
/**
|
|
12241
12297
|
* Disallow redundant re-exports.
|
|
12242
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-re-export.md
|
|
12243
12299
|
*/
|
|
12244
12300
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
12245
12301
|
/**
|
|
12246
12302
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
12247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-recursion.md
|
|
12248
12304
|
*/
|
|
12249
12305
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
12250
12306
|
/**
|
|
12251
12307
|
* Disallow unnecessary spread.
|
|
12252
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-spread.md
|
|
12253
12309
|
*/
|
|
12254
12310
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
12255
12311
|
/**
|
|
12256
12312
|
* Disallow useless case in switch statements.
|
|
12257
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-switch-case.md
|
|
12258
12314
|
*/
|
|
12259
12315
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
12260
12316
|
/**
|
|
12261
12317
|
* Disallow useless template literal expressions.
|
|
12262
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-template-literals.md
|
|
12263
12319
|
*/
|
|
12264
12320
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
12265
12321
|
/**
|
|
12266
12322
|
* Disallow useless `undefined`.
|
|
12267
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-undefined.md
|
|
12268
12324
|
*/
|
|
12269
12325
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
12270
12326
|
/**
|
|
12271
12327
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
12272
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
12273
12329
|
*/
|
|
12274
12330
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
12275
12331
|
/**
|
|
12276
12332
|
* Disallow number literals with zero fractions or dangling dots.
|
|
12277
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-zero-fractions.md
|
|
12278
12334
|
*/
|
|
12279
12335
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
12280
12336
|
/**
|
|
12281
12337
|
* Enforce proper case for numeric literals.
|
|
12282
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/number-literal-case.md
|
|
12283
12339
|
*/
|
|
12284
12340
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
12285
12341
|
/**
|
|
12286
12342
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
12287
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/numeric-separators-style.md
|
|
12288
12344
|
*/
|
|
12289
12345
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
12290
12346
|
/**
|
|
12291
12347
|
* Require assignment operator shorthand where possible.
|
|
12292
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/operator-assignment.md
|
|
12293
12349
|
*/
|
|
12294
12350
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
12295
12351
|
/**
|
|
12296
12352
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
12297
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-abort-signal-any.md
|
|
12298
12354
|
*/
|
|
12299
12355
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
12300
12356
|
/**
|
|
12301
12357
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
12302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
12303
12359
|
*/
|
|
12304
12360
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
12305
12361
|
/**
|
|
12306
12362
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
12307
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-add-event-listener.md
|
|
12308
12364
|
*/
|
|
12309
12365
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
12310
12366
|
/**
|
|
12311
12367
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
12312
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
12313
12369
|
*/
|
|
12314
12370
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
12315
12371
|
/**
|
|
12316
12372
|
* Prefer `AggregateError` when throwing collected errors.
|
|
12317
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-aggregate-error.md
|
|
12318
12374
|
*/
|
|
12319
12375
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
12320
12376
|
/**
|
|
12321
12377
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
12322
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-find.md
|
|
12323
12379
|
*/
|
|
12324
12380
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
12325
12381
|
/**
|
|
12326
12382
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
12327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-flat.md
|
|
12328
12384
|
*/
|
|
12329
12385
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
12330
12386
|
/**
|
|
12331
12387
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
12332
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-flat-map.md
|
|
12333
12389
|
*/
|
|
12334
12390
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
12335
12391
|
/**
|
|
12336
12392
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
12337
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-from-async.md
|
|
12338
12394
|
*/
|
|
12339
12395
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
12340
12396
|
/**
|
|
12341
12397
|
* Prefer using the `Array.from()` mapping function argument.
|
|
12342
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-from-map.md
|
|
12343
12399
|
*/
|
|
12344
12400
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
12345
12401
|
/**
|
|
12346
12402
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
12347
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-from-range.md
|
|
12348
12404
|
*/
|
|
12349
12405
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
12350
12406
|
/**
|
|
12351
12407
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
12352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-index-of.md
|
|
12353
12409
|
*/
|
|
12354
12410
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
12355
12411
|
/**
|
|
12356
12412
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
12357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
12358
12414
|
*/
|
|
12359
12415
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
12360
12416
|
/**
|
|
12361
12417
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
12362
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-last-methods.md
|
|
12363
12419
|
*/
|
|
12364
12420
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
12365
12421
|
/**
|
|
12366
12422
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
12367
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-slice.md
|
|
12368
12424
|
*/
|
|
12369
12425
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
12370
12426
|
/**
|
|
12371
12427
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
12372
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-some.md
|
|
12373
12429
|
*/
|
|
12374
12430
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
12375
12431
|
/**
|
|
12376
12432
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
12377
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-at.md
|
|
12378
12434
|
*/
|
|
12379
12435
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
12380
12436
|
/**
|
|
12381
12437
|
* Prefer `await` over promise chaining.
|
|
12382
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-await.md
|
|
12383
12439
|
*/
|
|
12384
12440
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
12385
12441
|
/**
|
|
12386
12442
|
* Prefer `BigInt` literals over the constructor.
|
|
12387
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-bigint-literals.md
|
|
12388
12444
|
*/
|
|
12389
12445
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
12390
12446
|
/**
|
|
12391
12447
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
12392
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
12393
12449
|
*/
|
|
12394
12450
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
12395
12451
|
/**
|
|
12396
12452
|
* Prefer block statements over IIFEs used only for scoping.
|
|
12397
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
12398
12454
|
*/
|
|
12399
12455
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
12400
12456
|
/**
|
|
12401
12457
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
12402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-boolean-return.md
|
|
12403
12459
|
*/
|
|
12404
12460
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
12405
12461
|
/**
|
|
12406
12462
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
12407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12463
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-class-fields.md
|
|
12408
12464
|
*/
|
|
12409
12465
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
12410
12466
|
/**
|
|
12411
12467
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
12412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12468
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-classlist-toggle.md
|
|
12413
12469
|
*/
|
|
12414
12470
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
12415
12471
|
/**
|
|
12416
12472
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
12417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12473
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-code-point.md
|
|
12418
12474
|
*/
|
|
12419
12475
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
12420
12476
|
/**
|
|
12421
12477
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
12422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-continue.md
|
|
12423
12479
|
*/
|
|
12424
12480
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
12425
12481
|
/**
|
|
12426
12482
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
12427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12483
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-date-now.md
|
|
12428
12484
|
*/
|
|
12429
12485
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
12430
12486
|
/**
|
|
12431
12487
|
* Prefer default parameters over reassignment.
|
|
12432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12488
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-default-parameters.md
|
|
12433
12489
|
*/
|
|
12434
12490
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
12435
12491
|
/**
|
|
12436
12492
|
* Prefer direct iteration over default iterator method calls.
|
|
12437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12493
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-direct-iteration.md
|
|
12438
12494
|
*/
|
|
12439
12495
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
12440
12496
|
/**
|
|
12441
12497
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
12442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12498
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dispose.md
|
|
12443
12499
|
*/
|
|
12444
12500
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
12445
12501
|
/**
|
|
12446
12502
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
12447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-append.md
|
|
12448
12504
|
*/
|
|
12449
12505
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
12450
12506
|
/**
|
|
12451
12507
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
12452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12508
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
12453
12509
|
* @deprecated
|
|
12454
12510
|
*/
|
|
12455
12511
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
12456
12512
|
/**
|
|
12457
12513
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
12458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
12459
12515
|
*/
|
|
12460
12516
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
12461
12517
|
/**
|
|
12462
12518
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
12463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-remove.md
|
|
12464
12520
|
*/
|
|
12465
12521
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
12466
12522
|
/**
|
|
12467
12523
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
12468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
12469
12525
|
*/
|
|
12470
12526
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
12471
12527
|
/**
|
|
12472
12528
|
* Prefer `.textContent` over `.innerText`.
|
|
12473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
12474
12530
|
*/
|
|
12475
12531
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
12476
12532
|
/**
|
|
12477
12533
|
* Prefer early returns over full-function conditional wrapping.
|
|
12478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-early-return.md
|
|
12479
12535
|
*/
|
|
12480
12536
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
12481
12537
|
/**
|
|
12482
12538
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
12483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-else-if.md
|
|
12484
12540
|
*/
|
|
12485
12541
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
12486
12542
|
/**
|
|
12487
12543
|
* Prefer `Error.isError()` when checking for errors.
|
|
12488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-error-is-error.md
|
|
12489
12545
|
*/
|
|
12490
12546
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
12491
12547
|
/**
|
|
12492
12548
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
12493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-event-target.md
|
|
12494
12550
|
*/
|
|
12495
12551
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
12496
12552
|
/**
|
|
12497
12553
|
* Prefer explicit viewport units.
|
|
12498
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
12499
12555
|
*/
|
|
12500
12556
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
12501
12557
|
/**
|
|
12502
12558
|
* Prefer `export…from` when re-exporting.
|
|
12503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-export-from.md
|
|
12504
12560
|
*/
|
|
12505
12561
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
12506
12562
|
/**
|
|
12507
12563
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
12508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
12509
12565
|
*/
|
|
12510
12566
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
12511
12567
|
/**
|
|
12512
12568
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
12513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
12514
12570
|
*/
|
|
12515
12571
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
12516
12572
|
/**
|
|
12517
12573
|
* Prefer global numeric constants over `Number` static properties.
|
|
12518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-global-number-constants.md
|
|
12519
12575
|
*/
|
|
12520
12576
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
12521
12577
|
/**
|
|
12522
12578
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
12523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-global-this.md
|
|
12524
12580
|
*/
|
|
12525
12581
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
12526
12582
|
/**
|
|
12527
12583
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
12528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-group-by.md
|
|
12529
12585
|
*/
|
|
12530
12586
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
12531
12587
|
/**
|
|
12532
12588
|
* Prefer `.has()` when checking existence.
|
|
12533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-has-check.md
|
|
12534
12590
|
*/
|
|
12535
12591
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
12536
12592
|
/**
|
|
12537
12593
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
12538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
12539
12595
|
*/
|
|
12540
12596
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
12541
12597
|
/**
|
|
12542
12598
|
* Prefer HTTPS over HTTP.
|
|
12543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-https.md
|
|
12544
12600
|
*/
|
|
12545
|
-
'unicorn/prefer-https'?: Linter.RuleEntry<
|
|
12601
|
+
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
12546
12602
|
/**
|
|
12547
12603
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
12548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
12549
12605
|
*/
|
|
12550
12606
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
12551
12607
|
/**
|
|
12552
12608
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
12553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-import-meta-properties.md
|
|
12554
12610
|
*/
|
|
12555
12611
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
12556
12612
|
/**
|
|
12557
12613
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
12558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-includes.md
|
|
12559
12615
|
*/
|
|
12560
12616
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
12561
12617
|
/**
|
|
12562
12618
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
12563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
12564
12620
|
*/
|
|
12565
12621
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
12566
12622
|
/**
|
|
12567
12623
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
12568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
12569
12625
|
*/
|
|
12570
12626
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
12571
12627
|
/**
|
|
12572
12628
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
12573
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-concat.md
|
|
12574
12630
|
*/
|
|
12575
12631
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
12576
12632
|
/**
|
|
12577
12633
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
12578
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-helpers.md
|
|
12579
12635
|
*/
|
|
12580
12636
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
12581
12637
|
/**
|
|
12582
12638
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
12583
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-to-array.md
|
|
12584
12640
|
*/
|
|
12585
12641
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
12586
12642
|
/**
|
|
12587
12643
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
12588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
12589
12645
|
*/
|
|
12590
12646
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
12591
12647
|
/**
|
|
12592
12648
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
12593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
12594
12650
|
* @deprecated
|
|
12595
12651
|
*/
|
|
12596
12652
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
12597
12653
|
/**
|
|
12598
12654
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
12599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
12600
12656
|
*/
|
|
12601
12657
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
12602
12658
|
/**
|
|
12603
12659
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
12604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-location-assign.md
|
|
12605
12661
|
*/
|
|
12606
12662
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
12607
12663
|
/**
|
|
12608
12664
|
* Prefer using a logical operator over a ternary.
|
|
12609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
12610
12666
|
*/
|
|
12611
12667
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
12612
12668
|
/**
|
|
12613
12669
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
12614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-map-from-entries.md
|
|
12615
12671
|
*/
|
|
12616
12672
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
12617
12673
|
/**
|
|
12618
12674
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
12619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-abs.md
|
|
12620
12676
|
*/
|
|
12621
12677
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
12622
12678
|
/**
|
|
12623
12679
|
* Prefer `Math` constants over their approximate numeric values.
|
|
12624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-constants.md
|
|
12625
12681
|
*/
|
|
12626
12682
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
12627
12683
|
/**
|
|
12628
12684
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
12629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-min-max.md
|
|
12630
12686
|
*/
|
|
12631
12687
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
12632
12688
|
/**
|
|
12633
12689
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
12634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-trunc.md
|
|
12635
12691
|
*/
|
|
12636
12692
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
12637
12693
|
/**
|
|
12638
12694
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
12639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-minimal-ternary.md
|
|
12640
12696
|
*/
|
|
12641
12697
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
12642
12698
|
/**
|
|
12643
12699
|
* Prefer modern DOM APIs.
|
|
12644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
12645
12701
|
*/
|
|
12646
12702
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
12647
12703
|
/**
|
|
12648
12704
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
12649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-modern-math-apis.md
|
|
12650
12706
|
*/
|
|
12651
12707
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
12652
12708
|
/**
|
|
12653
12709
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
12654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-module.md
|
|
12655
12711
|
*/
|
|
12656
12712
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
12657
12713
|
/**
|
|
12658
12714
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
12659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
12660
12716
|
*/
|
|
12661
12717
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
12662
12718
|
/**
|
|
12663
12719
|
* Prefer negative index over `.length - index` when possible.
|
|
12664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-negative-index.md
|
|
12665
12721
|
*/
|
|
12666
12722
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
12667
12723
|
/**
|
|
12668
12724
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
12669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-node-protocol.md
|
|
12670
12726
|
*/
|
|
12671
12727
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
12672
12728
|
/**
|
|
12673
12729
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
12674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-number-coercion.md
|
|
12675
12731
|
*/
|
|
12676
12732
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
12677
12733
|
/**
|
|
12678
12734
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
12679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
12680
12736
|
*/
|
|
12681
12737
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
12682
12738
|
/**
|
|
12683
12739
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
12684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-number-properties.md
|
|
12685
12741
|
*/
|
|
12686
12742
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
12687
12743
|
/**
|
|
12688
12744
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
12689
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-define-properties.md
|
|
12690
12746
|
*/
|
|
12691
12747
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
12692
12748
|
/**
|
|
12693
12749
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
12694
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
12695
12751
|
*/
|
|
12696
12752
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
12697
12753
|
/**
|
|
12698
12754
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
12699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-from-entries.md
|
|
12700
12756
|
*/
|
|
12701
12757
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
12702
12758
|
/**
|
|
12703
12759
|
* Prefer the most specific `Object` iterable method.
|
|
12704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
12705
12761
|
*/
|
|
12706
12762
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
12707
12763
|
/**
|
|
12708
12764
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
12709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-observer-apis.md
|
|
12710
12766
|
*/
|
|
12711
12767
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
12712
12768
|
/**
|
|
12713
12769
|
* Prefer omitting the `catch` binding parameter.
|
|
12714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
12715
12771
|
*/
|
|
12716
12772
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
12717
12773
|
/**
|
|
12718
12774
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
12719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-path2d.md
|
|
12720
12776
|
*/
|
|
12721
12777
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
12722
12778
|
/**
|
|
12723
12779
|
* Prefer private class fields over the underscore-prefix convention.
|
|
12724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-private-class-fields.md
|
|
12725
12781
|
*/
|
|
12726
12782
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
12727
12783
|
/**
|
|
12728
12784
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
12729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-promise-try.md
|
|
12730
12786
|
*/
|
|
12731
12787
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
12732
12788
|
/**
|
|
12733
12789
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
12734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
12735
12791
|
*/
|
|
12736
12792
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
12737
12793
|
/**
|
|
12738
12794
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
12739
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-prototype-methods.md
|
|
12740
12796
|
*/
|
|
12741
12797
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
12742
12798
|
/**
|
|
12743
12799
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
12744
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-query-selector.md
|
|
12745
12801
|
*/
|
|
12746
12802
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
12747
12803
|
/**
|
|
12748
12804
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
12749
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-queue-microtask.md
|
|
12750
12806
|
*/
|
|
12751
12807
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
12752
12808
|
/**
|
|
12753
12809
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
12754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-reflect-apply.md
|
|
12755
12811
|
*/
|
|
12756
12812
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
12757
12813
|
/**
|
|
12758
12814
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
12759
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-regexp-escape.md
|
|
12760
12816
|
*/
|
|
12761
12817
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
12762
12818
|
/**
|
|
12763
12819
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
12764
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-regexp-test.md
|
|
12765
12821
|
*/
|
|
12766
12822
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
12767
12823
|
/**
|
|
12768
12824
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
12769
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-response-static-json.md
|
|
12770
12826
|
*/
|
|
12771
12827
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
12772
12828
|
/**
|
|
12773
12829
|
* Prefer `:scope` when using element query selector methods.
|
|
12774
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-scoped-selector.md
|
|
12775
12831
|
*/
|
|
12776
12832
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
12777
12833
|
/**
|
|
12778
12834
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
12779
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-set-has.md
|
|
12780
12836
|
*/
|
|
12781
12837
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
12782
12838
|
/**
|
|
12783
12839
|
* Prefer `Set` methods for Set operations.
|
|
12784
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-set-methods.md
|
|
12785
12841
|
*/
|
|
12786
12842
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
12787
12843
|
/**
|
|
12788
12844
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
12789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-set-size.md
|
|
12790
12846
|
*/
|
|
12791
12847
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
12792
12848
|
/**
|
|
12793
12849
|
* Prefer arrow function properties over methods with a single return.
|
|
12794
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-short-arrow-method.md
|
|
12795
12851
|
*/
|
|
12796
12852
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
12797
12853
|
/**
|
|
12798
12854
|
* Prefer simple conditions first in logical expressions.
|
|
12799
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-simple-condition-first.md
|
|
12800
12856
|
*/
|
|
12801
12857
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
12802
12858
|
/**
|
|
12803
12859
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
12804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
12805
12861
|
*/
|
|
12806
12862
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
12807
12863
|
/**
|
|
12808
12864
|
* Prefer simplified conditions.
|
|
12809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-simplified-conditions.md
|
|
12810
12866
|
*/
|
|
12811
12867
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
12812
12868
|
/**
|
|
12813
12869
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
12814
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-array-predicate.md
|
|
12815
12871
|
*/
|
|
12816
12872
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
12817
12873
|
/**
|
|
12818
12874
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
12819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-call.md
|
|
12820
12876
|
*/
|
|
12821
12877
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
12822
12878
|
/**
|
|
12823
12879
|
* Prefer a single object destructuring declaration per local const source.
|
|
12824
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
12825
12881
|
*/
|
|
12826
12882
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
12827
12883
|
/**
|
|
12828
12884
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
12829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-replace.md
|
|
12830
12886
|
*/
|
|
12831
12887
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
12832
12888
|
/**
|
|
12833
12889
|
* Prefer declaring variables in the smallest possible scope.
|
|
12834
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-smaller-scope.md
|
|
12835
12891
|
*/
|
|
12836
12892
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
12837
12893
|
/**
|
|
12838
12894
|
* Prefer `String#split()` with a limit.
|
|
12839
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-split-limit.md
|
|
12840
12896
|
*/
|
|
12841
12897
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
12842
12898
|
/**
|
|
12843
12899
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
12844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-spread.md
|
|
12845
12901
|
*/
|
|
12846
12902
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
12847
12903
|
/**
|
|
12848
12904
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
12849
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-match-all.md
|
|
12850
12906
|
*/
|
|
12851
12907
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
12852
12908
|
/**
|
|
12853
12909
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
12854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
12855
12911
|
*/
|
|
12856
12912
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
12857
12913
|
/**
|
|
12858
12914
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
12859
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12915
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-raw.md
|
|
12860
12916
|
*/
|
|
12861
12917
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
12862
12918
|
/**
|
|
12863
12919
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
12864
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12920
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-repeat.md
|
|
12865
12921
|
*/
|
|
12866
12922
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
12867
12923
|
/**
|
|
12868
12924
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
12869
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-replace-all.md
|
|
12870
12926
|
*/
|
|
12871
12927
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
12872
12928
|
/**
|
|
12873
12929
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
12874
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12930
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-slice.md
|
|
12875
12931
|
*/
|
|
12876
12932
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
12877
12933
|
/**
|
|
12878
12934
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
12879
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
12880
12936
|
*/
|
|
12881
12937
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
12882
12938
|
/**
|
|
12883
12939
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
12884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
12885
12941
|
*/
|
|
12886
12942
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
12887
12943
|
/**
|
|
12888
12944
|
* Prefer using `structuredClone` to create a deep clone.
|
|
12889
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-structured-clone.md
|
|
12890
12946
|
*/
|
|
12891
12947
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
12892
12948
|
/**
|
|
12893
12949
|
* Prefer `switch` over multiple `else-if`.
|
|
12894
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-switch.md
|
|
12895
12951
|
*/
|
|
12896
12952
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
12897
12953
|
/**
|
|
12898
12954
|
* Prefer `Temporal` over `Date`.
|
|
12899
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-temporal.md
|
|
12900
12956
|
*/
|
|
12901
12957
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
12902
12958
|
/**
|
|
12903
12959
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
12904
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-ternary.md
|
|
12905
12961
|
*/
|
|
12906
12962
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
12907
12963
|
/**
|
|
12908
12964
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
12909
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-then-catch.md
|
|
12910
12966
|
*/
|
|
12911
12967
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
12912
12968
|
/**
|
|
12913
12969
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
12914
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-toggle-attribute.md
|
|
12915
12971
|
*/
|
|
12916
12972
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
12917
12973
|
/**
|
|
12918
12974
|
* Prefer top-level await over top-level promises and async function calls.
|
|
12919
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-top-level-await.md
|
|
12920
12976
|
*/
|
|
12921
12977
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
12922
12978
|
/**
|
|
12923
12979
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
12924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-type-error.md
|
|
12925
12981
|
*/
|
|
12926
12982
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
12927
12983
|
/**
|
|
12928
12984
|
* Require type literals to be last in union types.
|
|
12929
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12985
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-type-literal-last.md
|
|
12930
12986
|
*/
|
|
12931
12987
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
12932
12988
|
/**
|
|
12933
12989
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
12934
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12990
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-uint8array-base64.md
|
|
12935
12991
|
*/
|
|
12936
12992
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
12937
12993
|
/**
|
|
12938
12994
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
12939
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-unary-minus.md
|
|
12940
12996
|
*/
|
|
12941
12997
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
12942
12998
|
/**
|
|
12943
12999
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
12944
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13000
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
12945
13001
|
*/
|
|
12946
13002
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
12947
13003
|
/**
|
|
12948
13004
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
12949
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13005
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-url-can-parse.md
|
|
12950
13006
|
*/
|
|
12951
13007
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
12952
13008
|
/**
|
|
12953
13009
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
12954
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13010
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-url-href.md
|
|
12955
13011
|
*/
|
|
12956
13012
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
12957
13013
|
/**
|
|
12958
13014
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
12959
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13015
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-url-search-parameters.md
|
|
12960
13016
|
*/
|
|
12961
13017
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
12962
13018
|
/**
|
|
12963
13019
|
* Prefer putting the condition in the while statement.
|
|
12964
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13020
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-while-loop-condition.md
|
|
12965
13021
|
*/
|
|
12966
13022
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
12967
13023
|
/**
|
|
12968
13024
|
* Renamed to `unicorn/name-replacements`.
|
|
12969
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13025
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
12970
13026
|
* @deprecated
|
|
12971
13027
|
*/
|
|
12972
13028
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
12973
13029
|
/**
|
|
12974
13030
|
* Enforce consistent relative URL style.
|
|
12975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/relative-url-style.md
|
|
12976
13032
|
*/
|
|
12977
13033
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
12978
13034
|
/**
|
|
12979
13035
|
* Enforce using the separator argument with `Array#join()`.
|
|
12980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-array-join-separator.md
|
|
12981
13037
|
*/
|
|
12982
13038
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
12983
13039
|
/**
|
|
12984
13040
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
12985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13041
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-array-sort-compare.md
|
|
12986
13042
|
*/
|
|
12987
13043
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
12988
13044
|
/**
|
|
12989
13045
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
12990
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13046
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-css-escape.md
|
|
12991
13047
|
*/
|
|
12992
13048
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
12993
13049
|
/**
|
|
12994
13050
|
* Require configured YAML frontmatter fields.
|
|
12995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13051
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-frontmatter-fields.md
|
|
12996
13052
|
*/
|
|
12997
13053
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
12998
13054
|
/**
|
|
12999
13055
|
* Require non-empty module attributes for imports and exports
|
|
13000
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13056
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-module-attributes.md
|
|
13001
13057
|
*/
|
|
13002
13058
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
13003
13059
|
/**
|
|
13004
13060
|
* Require non-empty specifier list in import and export statements.
|
|
13005
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-module-specifiers.md
|
|
13006
13062
|
*/
|
|
13007
13063
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
13008
13064
|
/**
|
|
13009
13065
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
13010
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13066
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
13011
13067
|
*/
|
|
13012
13068
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
13013
13069
|
/**
|
|
13014
13070
|
* Require passive event listeners for high-frequency events.
|
|
13015
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13071
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-passive-events.md
|
|
13016
13072
|
*/
|
|
13017
13073
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
13018
13074
|
/**
|
|
13019
13075
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
13020
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13076
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-post-message-target-origin.md
|
|
13021
13077
|
*/
|
|
13022
13078
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
13023
13079
|
/**
|
|
13024
13080
|
* Require boolean-returning Proxy traps to return booleans.
|
|
13025
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
13026
13082
|
*/
|
|
13027
13083
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
13084
|
+
/**
|
|
13085
|
+
* Enforce a consistent style for single-line block comments.
|
|
13086
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/single-line-block-comment-style.md
|
|
13087
|
+
*/
|
|
13088
|
+
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
13028
13089
|
/**
|
|
13029
13090
|
* Enforce better string content.
|
|
13030
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13091
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/string-content.md
|
|
13031
13092
|
*/
|
|
13032
13093
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
13033
13094
|
/**
|
|
13034
13095
|
* Enforce consistent brace style for `case` clauses.
|
|
13035
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13096
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/switch-case-braces.md
|
|
13036
13097
|
*/
|
|
13037
13098
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
13038
13099
|
/**
|
|
13039
13100
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
13040
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13101
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/switch-case-break-position.md
|
|
13041
13102
|
*/
|
|
13042
13103
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
13043
13104
|
/**
|
|
13044
13105
|
* Fix whitespace-insensitive template indentation.
|
|
13045
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13106
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/template-indent.md
|
|
13046
13107
|
*/
|
|
13047
13108
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
13048
13109
|
/**
|
|
13049
13110
|
* Enforce consistent case for text encoding identifiers.
|
|
13050
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13111
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/text-encoding-identifier-case.md
|
|
13051
13112
|
*/
|
|
13052
13113
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
13053
13114
|
/**
|
|
13054
13115
|
* Require `new` when creating an error.
|
|
13055
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13116
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/throw-new-error.md
|
|
13056
13117
|
*/
|
|
13057
13118
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
13058
13119
|
/**
|
|
13059
13120
|
* Limit the complexity of `try` blocks.
|
|
13060
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13121
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/try-complexity.md
|
|
13061
13122
|
*/
|
|
13062
13123
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
13063
13124
|
}
|
|
@@ -13065,7 +13126,9 @@ interface RuleOptions$2 {
|
|
|
13065
13126
|
// ----- unicorn/catch-error-name -----
|
|
13066
13127
|
type UnicornCatchErrorName = [] | [{
|
|
13067
13128
|
name?: string;
|
|
13068
|
-
ignore?:
|
|
13129
|
+
ignore?: (string | {
|
|
13130
|
+
[k: string]: unknown | undefined;
|
|
13131
|
+
})[];
|
|
13069
13132
|
}];
|
|
13070
13133
|
// ----- unicorn/class-reference-in-static-methods -----
|
|
13071
13134
|
type UnicornClassReferenceInStaticMethods = [] | [{
|
|
@@ -13085,11 +13148,19 @@ type UnicornCommentContent = [] | [{
|
|
|
13085
13148
|
}];
|
|
13086
13149
|
// ----- unicorn/consistent-boolean-name -----
|
|
13087
13150
|
type UnicornConsistentBooleanName = [] | [{
|
|
13088
|
-
|
|
13151
|
+
checkVariables?: ("always" | "prohibit" | "never");
|
|
13152
|
+
checkArguments?: ("always" | "prohibit" | "never");
|
|
13153
|
+
checkFunctions?: ("always" | "prohibit" | "never");
|
|
13154
|
+
checkMethods?: ("always" | "prohibit" | "never");
|
|
13155
|
+
checkFields?: ("always" | "prohibit" | "never");
|
|
13089
13156
|
prefixes?: {
|
|
13090
13157
|
[k: string]: boolean | undefined;
|
|
13091
13158
|
};
|
|
13159
|
+
wrappers?: {
|
|
13160
|
+
[k: string]: string | undefined;
|
|
13161
|
+
};
|
|
13092
13162
|
ignore?: unknown[];
|
|
13163
|
+
[k: string]: unknown;
|
|
13093
13164
|
}];
|
|
13094
13165
|
// ----- unicorn/consistent-class-member-order -----
|
|
13095
13166
|
type UnicornConsistentClassMemberOrder = [] | [{
|
|
@@ -13123,6 +13194,7 @@ type UnicornConsistentFunctionScoping = [] | [{
|
|
|
13123
13194
|
// ----- unicorn/consistent-function-style -----
|
|
13124
13195
|
type UnicornConsistentFunctionStyle = [] | [{
|
|
13125
13196
|
default?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
13197
|
+
defaultExport?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
13126
13198
|
namedFunctions?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
13127
13199
|
namedExports?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
13128
13200
|
callbacks?: ("function-expression" | "arrow-function" | "ignore");
|
|
@@ -13146,7 +13218,9 @@ type UnicornEscapeCase = [] | [("uppercase" | "lowercase")];
|
|
|
13146
13218
|
// ----- unicorn/expiring-todo-comments -----
|
|
13147
13219
|
type UnicornExpiringTodoComments = [] | [{
|
|
13148
13220
|
terms?: string[];
|
|
13149
|
-
ignore?:
|
|
13221
|
+
ignore?: (string | {
|
|
13222
|
+
[k: string]: unknown | undefined;
|
|
13223
|
+
})[];
|
|
13150
13224
|
checkDates?: boolean;
|
|
13151
13225
|
checkDatesOnPullRequests?: boolean;
|
|
13152
13226
|
allowWarningComments?: boolean;
|
|
@@ -13161,7 +13235,9 @@ type UnicornExplicitTimerDelay = [] | [("always" | "never")];
|
|
|
13161
13235
|
// ----- unicorn/filename-case -----
|
|
13162
13236
|
type UnicornFilenameCase = [] | [({
|
|
13163
13237
|
case?: ("camelCase" | "camelCaseWithAcronyms" | "snakeCase" | "kebabCase" | "pascalCase");
|
|
13164
|
-
ignore?:
|
|
13238
|
+
ignore?: (string | {
|
|
13239
|
+
[k: string]: unknown | undefined;
|
|
13240
|
+
})[];
|
|
13165
13241
|
multipleFileExtensions?: boolean;
|
|
13166
13242
|
checkDirectories?: boolean;
|
|
13167
13243
|
} | {
|
|
@@ -13172,7 +13248,9 @@ type UnicornFilenameCase = [] | [({
|
|
|
13172
13248
|
kebabCase?: boolean;
|
|
13173
13249
|
pascalCase?: boolean;
|
|
13174
13250
|
};
|
|
13175
|
-
ignore?:
|
|
13251
|
+
ignore?: (string | {
|
|
13252
|
+
[k: string]: unknown | undefined;
|
|
13253
|
+
})[];
|
|
13176
13254
|
multipleFileExtensions?: boolean;
|
|
13177
13255
|
checkDirectories?: boolean;
|
|
13178
13256
|
})];
|
|
@@ -13209,6 +13287,8 @@ type UnicornIsolatedFunctions = [] | [{
|
|
|
13209
13287
|
selectors?: string[];
|
|
13210
13288
|
comments?: string[];
|
|
13211
13289
|
}];
|
|
13290
|
+
// ----- unicorn/iteration-fallback-style -----
|
|
13291
|
+
type UnicornIterationFallbackStyle = [] | [("guard" | "fallback")];
|
|
13212
13292
|
// ----- unicorn/logical-assignment-operators -----
|
|
13213
13293
|
type UnicornLogicalAssignmentOperators = (([] | ["always"] | ["always", {
|
|
13214
13294
|
enforceForIfStatements?: boolean;
|
|
@@ -13229,7 +13309,9 @@ type UnicornNameReplacements = [] | [{
|
|
|
13229
13309
|
replacements?: _UnicornNameReplacements_NameReplacements;
|
|
13230
13310
|
extendDefaultAllowList?: boolean;
|
|
13231
13311
|
allowList?: _UnicornNameReplacements_BooleanObject;
|
|
13232
|
-
ignore?:
|
|
13312
|
+
ignore?: (string | {
|
|
13313
|
+
[k: string]: unknown | undefined;
|
|
13314
|
+
})[];
|
|
13233
13315
|
}];
|
|
13234
13316
|
type _UnicornNameReplacementsReplacements = (false | _UnicornNameReplacements_BooleanObject) | undefined;
|
|
13235
13317
|
interface _UnicornNameReplacements_NameReplacements {
|
|
@@ -13277,7 +13359,7 @@ type UnicornNoInvalidArgumentCount = [] | [{
|
|
|
13277
13359
|
}];
|
|
13278
13360
|
// ----- unicorn/no-keyword-prefix -----
|
|
13279
13361
|
type UnicornNoKeywordPrefix = [] | [{
|
|
13280
|
-
disallowedPrefixes?: []
|
|
13362
|
+
disallowedPrefixes?: string[];
|
|
13281
13363
|
checkProperties?: boolean;
|
|
13282
13364
|
onlyCamelCase?: boolean;
|
|
13283
13365
|
}];
|
|
@@ -13288,7 +13370,9 @@ type UnicornNoNegatedComparison = [] | [{
|
|
|
13288
13370
|
// ----- unicorn/no-non-function-verb-prefix -----
|
|
13289
13371
|
type UnicornNoNonFunctionVerbPrefix = [] | [{
|
|
13290
13372
|
verbs?: string[];
|
|
13291
|
-
ignore?:
|
|
13373
|
+
ignore?: (string | {
|
|
13374
|
+
[k: string]: unknown | undefined;
|
|
13375
|
+
})[];
|
|
13292
13376
|
}];
|
|
13293
13377
|
// ----- unicorn/no-null -----
|
|
13294
13378
|
type UnicornNoNull = [] | [{
|
|
@@ -13301,7 +13385,7 @@ type UnicornNoTypeofUndefined = [] | [{
|
|
|
13301
13385
|
}];
|
|
13302
13386
|
// ----- unicorn/no-unnecessary-polyfills -----
|
|
13303
13387
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
13304
|
-
targets?: (string |
|
|
13388
|
+
targets?: (string | string[] | {
|
|
13305
13389
|
[k: string]: unknown | undefined;
|
|
13306
13390
|
});
|
|
13307
13391
|
}];
|
|
@@ -13355,11 +13439,11 @@ type UnicornPreferArrayFind = [] | [{
|
|
|
13355
13439
|
}];
|
|
13356
13440
|
// ----- unicorn/prefer-array-flat -----
|
|
13357
13441
|
type UnicornPreferArrayFlat = [] | [{
|
|
13358
|
-
functions?:
|
|
13442
|
+
functions?: string[];
|
|
13359
13443
|
}];
|
|
13360
13444
|
// ----- unicorn/prefer-at -----
|
|
13361
13445
|
type UnicornPreferAt = [] | [{
|
|
13362
|
-
getLastElementFunctions?:
|
|
13446
|
+
getLastElementFunctions?: string[];
|
|
13363
13447
|
checkAllIndexAccess?: boolean;
|
|
13364
13448
|
}];
|
|
13365
13449
|
// ----- unicorn/prefer-continue -----
|
|
@@ -13383,6 +13467,12 @@ type UnicornPreferExplicitViewportUnits = [] | [{
|
|
|
13383
13467
|
type UnicornPreferExportFrom = [] | [{
|
|
13384
13468
|
checkUsedVariables?: boolean;
|
|
13385
13469
|
}];
|
|
13470
|
+
// ----- unicorn/prefer-https -----
|
|
13471
|
+
type UnicornPreferHttps = [] | [{
|
|
13472
|
+
ignore?: (string | {
|
|
13473
|
+
[k: string]: unknown | undefined;
|
|
13474
|
+
})[];
|
|
13475
|
+
}];
|
|
13386
13476
|
// ----- unicorn/prefer-includes-over-repeated-comparisons -----
|
|
13387
13477
|
type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
13388
13478
|
minimumComparisons?: number;
|
|
@@ -13399,7 +13489,7 @@ type UnicornPreferNumberProperties = [] | [{
|
|
|
13399
13489
|
}];
|
|
13400
13490
|
// ----- unicorn/prefer-object-from-entries -----
|
|
13401
13491
|
type UnicornPreferObjectFromEntries = [] | [{
|
|
13402
|
-
functions?:
|
|
13492
|
+
functions?: string[];
|
|
13403
13493
|
}];
|
|
13404
13494
|
// ----- unicorn/prefer-query-selector -----
|
|
13405
13495
|
type UnicornPreferQuerySelector = [] | [{
|
|
@@ -13418,7 +13508,7 @@ type UnicornPreferSetHas = [] | [{
|
|
|
13418
13508
|
type UnicornPreferShortArrowMethod = [] | [("always" | "consistent-as-needed")];
|
|
13419
13509
|
// ----- unicorn/prefer-single-call -----
|
|
13420
13510
|
type UnicornPreferSingleCall = [] | [{
|
|
13421
|
-
ignore?:
|
|
13511
|
+
ignore?: string[];
|
|
13422
13512
|
}];
|
|
13423
13513
|
// ----- unicorn/prefer-string-repeat -----
|
|
13424
13514
|
type UnicornPreferStringRepeat = [] | [{
|
|
@@ -13426,7 +13516,7 @@ type UnicornPreferStringRepeat = [] | [{
|
|
|
13426
13516
|
}];
|
|
13427
13517
|
// ----- unicorn/prefer-structured-clone -----
|
|
13428
13518
|
type UnicornPreferStructuredClone = [] | [{
|
|
13429
|
-
functions?:
|
|
13519
|
+
functions?: string[];
|
|
13430
13520
|
}];
|
|
13431
13521
|
// ----- unicorn/prefer-switch -----
|
|
13432
13522
|
type UnicornPreferSwitch = [] | [{
|
|
@@ -13451,6 +13541,12 @@ type UnicornRequireCssEscape = [] | [{
|
|
|
13451
13541
|
type UnicornRequireFrontmatterFields = [] | [{
|
|
13452
13542
|
fields?: string[];
|
|
13453
13543
|
}];
|
|
13544
|
+
// ----- unicorn/single-line-block-comment-style -----
|
|
13545
|
+
type UnicornSingleLineBlockCommentStyle = [] | [("multiline" | "single-line")] | [("multiline" | "single-line"), {
|
|
13546
|
+
ignore?: (string | {
|
|
13547
|
+
[k: string]: unknown | undefined;
|
|
13548
|
+
})[];
|
|
13549
|
+
}];
|
|
13454
13550
|
// ----- unicorn/string-content -----
|
|
13455
13551
|
type UnicornStringContent = [] | [{
|
|
13456
13552
|
patterns?: {
|
|
@@ -13851,15 +13947,19 @@ type YmlSortKeys = ([{
|
|
|
13851
13947
|
hasProperties?: string[];
|
|
13852
13948
|
order: ((string | {
|
|
13853
13949
|
keyPattern?: string;
|
|
13854
|
-
order?: {
|
|
13950
|
+
order?: ({
|
|
13855
13951
|
type?: ("asc" | "desc");
|
|
13856
13952
|
caseSensitive?: boolean;
|
|
13857
13953
|
natural?: boolean;
|
|
13858
|
-
}
|
|
13954
|
+
} | {
|
|
13955
|
+
type: "ignore";
|
|
13956
|
+
});
|
|
13859
13957
|
})[] | {
|
|
13860
13958
|
type?: ("asc" | "desc");
|
|
13861
13959
|
caseSensitive?: boolean;
|
|
13862
13960
|
natural?: boolean;
|
|
13961
|
+
} | {
|
|
13962
|
+
type: "ignore";
|
|
13863
13963
|
});
|
|
13864
13964
|
minKeys?: number;
|
|
13865
13965
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -13868,15 +13968,19 @@ type YmlSortKeys = ([{
|
|
|
13868
13968
|
hasProperties?: string[];
|
|
13869
13969
|
order: ((string | {
|
|
13870
13970
|
keyPattern?: string;
|
|
13871
|
-
order?: {
|
|
13971
|
+
order?: ({
|
|
13872
13972
|
type?: ("asc" | "desc");
|
|
13873
13973
|
caseSensitive?: boolean;
|
|
13874
13974
|
natural?: boolean;
|
|
13875
|
-
}
|
|
13975
|
+
} | {
|
|
13976
|
+
type: "ignore";
|
|
13977
|
+
});
|
|
13876
13978
|
})[] | {
|
|
13877
13979
|
type?: ("asc" | "desc");
|
|
13878
13980
|
caseSensitive?: boolean;
|
|
13879
13981
|
natural?: boolean;
|
|
13982
|
+
} | {
|
|
13983
|
+
type: "ignore";
|
|
13880
13984
|
});
|
|
13881
13985
|
minKeys?: number;
|
|
13882
13986
|
allowLineSeparatedGroups?: boolean;
|