@infernodesign/eslint-config 2.12.1 → 2.13.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/cli.js +12 -12
- package/dist/index.d.ts +479 -366
- package/package.json +47 -47
package/dist/index.d.ts
CHANGED
|
@@ -2063,6 +2063,11 @@ interface RuleOptions {
|
|
|
2063
2063
|
* @see https://docs.medusajs.com/resources/lint/rules/prefer-modules-enum
|
|
2064
2064
|
*/
|
|
2065
2065
|
'medusa/prefer-modules-enum'?: Linter.RuleEntry<[]>;
|
|
2066
|
+
/**
|
|
2067
|
+
* In a subscriber's `config.event`, prefer workflow event enums (`*WorkflowEvents`) over the equivalent internal module-level events.
|
|
2068
|
+
* @see https://docs.medusajs.com/resources/lint/rules/prefer-workflow-event-over-module-event
|
|
2069
|
+
*/
|
|
2070
|
+
'medusa/prefer-workflow-event-over-module-event'?: Linter.RuleEntry<[]>;
|
|
2066
2071
|
/**
|
|
2067
2072
|
* Prices in Medusa are stored in major units (decimals). Flag values that look like they're in the smallest currency unit (cents).
|
|
2068
2073
|
* @see https://docs.medusajs.com/resources/lint/rules/prices-in-major-units
|
|
@@ -2329,6 +2334,11 @@ interface RuleOptions {
|
|
|
2329
2334
|
* @see https://nextjs.org/docs/messages/no-img-element
|
|
2330
2335
|
*/
|
|
2331
2336
|
'next/no-img-element'?: Linter.RuleEntry<[]>;
|
|
2337
|
+
/**
|
|
2338
|
+
* Prevent usage of `location.assign` or `location.href` assignment to navigate to internal Next.js pages.
|
|
2339
|
+
* @see https://nextjs.org/docs/messages/no-location-assign-relative-destination
|
|
2340
|
+
*/
|
|
2341
|
+
'next/no-location-assign-relative-destination'?: Linter.RuleEntry<[]>;
|
|
2332
2342
|
/**
|
|
2333
2343
|
* Prevent page-only custom fonts.
|
|
2334
2344
|
* @see https://nextjs.org/docs/messages/no-page-custom-font
|
|
@@ -3251,7 +3261,7 @@ interface RuleOptions {
|
|
|
3251
3261
|
*/
|
|
3252
3262
|
'node/no-new-require'?: Linter.RuleEntry<[]>;
|
|
3253
3263
|
/**
|
|
3254
|
-
* disallow string concatenation with `__dirname` and `
|
|
3264
|
+
* disallow string concatenation with `__dirname`, `__filename`, and `import.meta` paths
|
|
3255
3265
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-path-concat.md
|
|
3256
3266
|
*/
|
|
3257
3267
|
'node/no-path-concat'?: Linter.RuleEntry<[]>;
|
|
@@ -3360,11 +3370,21 @@ interface RuleOptions {
|
|
|
3360
3370
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url-search-params.md
|
|
3361
3371
|
*/
|
|
3362
3372
|
'node/prefer-global/url-search-params'?: Linter.RuleEntry<NodePreferGlobalUrlSearchParams>;
|
|
3373
|
+
/**
|
|
3374
|
+
* enforce using `node:assert/strict` instead of `node:assert`.
|
|
3375
|
+
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-import/assert-strict.md
|
|
3376
|
+
*/
|
|
3377
|
+
'node/prefer-import/assert-strict'?: Linter.RuleEntry<[]>;
|
|
3363
3378
|
/**
|
|
3364
3379
|
* enforce using the `node:` protocol when importing Node.js builtin modules.
|
|
3365
3380
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-node-protocol.md
|
|
3366
3381
|
*/
|
|
3367
3382
|
'node/prefer-node-protocol'?: Linter.RuleEntry<NodePreferNodeProtocol>;
|
|
3383
|
+
/**
|
|
3384
|
+
* enforce using `process.getBuiltinModule()` to load Node.js built-in modules
|
|
3385
|
+
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-process-get-builtin-module.md
|
|
3386
|
+
*/
|
|
3387
|
+
'node/prefer-process-get-builtin-module'?: Linter.RuleEntry<NodePreferProcessGetBuiltinModule>;
|
|
3368
3388
|
/**
|
|
3369
3389
|
* enforce `require("dns").promises`
|
|
3370
3390
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-promises/dns.md
|
|
@@ -6007,6 +6027,11 @@ interface RuleOptions {
|
|
|
6007
6027
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-mustaches/
|
|
6008
6028
|
*/
|
|
6009
6029
|
'svelte/no-useless-mustaches'?: Linter.RuleEntry<SvelteNoUselessMustaches>;
|
|
6030
|
+
/**
|
|
6031
|
+
* require attribute interpolation instead of template literals
|
|
6032
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-attribute-interpolation/
|
|
6033
|
+
*/
|
|
6034
|
+
'svelte/prefer-attribute-interpolation'?: Linter.RuleEntry<[]>;
|
|
6010
6035
|
/**
|
|
6011
6036
|
* require class directives instead of ternary expressions
|
|
6012
6037
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-class-directive/
|
|
@@ -7368,1715 +7393,1740 @@ interface RuleOptions {
|
|
|
7368
7393
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
7369
7394
|
/**
|
|
7370
7395
|
* Prefer better DOM traversal APIs.
|
|
7371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/better-dom-traversing.md
|
|
7372
7397
|
*/
|
|
7373
7398
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
7374
7399
|
/**
|
|
7375
7400
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
7376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
7377
7402
|
* @deprecated
|
|
7378
7403
|
*/
|
|
7379
7404
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
7380
7405
|
/**
|
|
7381
7406
|
* Enforce a specific parameter name in catch clauses.
|
|
7382
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/catch-error-name.md
|
|
7383
7408
|
*/
|
|
7384
7409
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
7385
7410
|
/**
|
|
7386
7411
|
* Enforce consistent class references in static methods.
|
|
7387
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/class-reference-in-static-methods.md
|
|
7388
7413
|
*/
|
|
7389
7414
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
7390
7415
|
/**
|
|
7391
7416
|
* Enforce better comment content.
|
|
7392
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/comment-content.md
|
|
7393
7418
|
*/
|
|
7394
7419
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
7420
|
+
/**
|
|
7421
|
+
* Enforce a consistent return style for multiline arrow function bodies.
|
|
7422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-arrow-return-style.md
|
|
7423
|
+
*/
|
|
7424
|
+
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
7395
7425
|
/**
|
|
7396
7426
|
* Enforce consistent assertion style with `node:assert`.
|
|
7397
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-assert.md
|
|
7398
7428
|
*/
|
|
7399
7429
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
7400
7430
|
/**
|
|
7401
7431
|
* Enforce consistent naming for boolean names.
|
|
7402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-boolean-name.md
|
|
7403
7433
|
*/
|
|
7404
7434
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
7405
7435
|
/**
|
|
7406
7436
|
* Enforce consistent class member order.
|
|
7407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-class-member-order.md
|
|
7408
7438
|
*/
|
|
7409
7439
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
7410
7440
|
/**
|
|
7411
7441
|
* Enforce consistent spelling of compound words in identifiers.
|
|
7412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-compound-words.md
|
|
7413
7443
|
*/
|
|
7414
7444
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
7415
7445
|
/**
|
|
7416
7446
|
* Enforce consistent conditional object spread style.
|
|
7417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
7418
7448
|
*/
|
|
7419
7449
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
7420
7450
|
/**
|
|
7421
7451
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
7422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-date-clone.md
|
|
7423
7453
|
*/
|
|
7424
7454
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
7425
7455
|
/**
|
|
7426
7456
|
* Use destructured variables over properties.
|
|
7427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-destructuring.md
|
|
7428
7458
|
*/
|
|
7429
7459
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
7430
7460
|
/**
|
|
7431
7461
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
7432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-empty-array-spread.md
|
|
7433
7463
|
*/
|
|
7434
7464
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
7435
7465
|
/**
|
|
7436
7466
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
7437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-existence-index-check.md
|
|
7438
7468
|
*/
|
|
7439
7469
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
7440
7470
|
/**
|
|
7441
7471
|
* Enforce consistent decorator position on exported classes.
|
|
7442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-export-decorator-position.md
|
|
7443
7473
|
*/
|
|
7444
7474
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
7445
7475
|
/**
|
|
7446
7476
|
* Move function definitions to the highest possible scope.
|
|
7447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-function-scoping.md
|
|
7448
7478
|
*/
|
|
7449
7479
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
7450
7480
|
/**
|
|
7451
7481
|
* Enforce function syntax by role.
|
|
7452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-function-style.md
|
|
7453
7483
|
*/
|
|
7454
7484
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
7455
7485
|
/**
|
|
7456
7486
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
7457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-json-file-read.md
|
|
7458
7488
|
*/
|
|
7459
7489
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
7460
7490
|
/**
|
|
7461
7491
|
* Enforce consistent optional chaining for same-base member access.
|
|
7462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-optional-chaining.md
|
|
7463
7493
|
*/
|
|
7464
7494
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
7465
7495
|
/**
|
|
7466
7496
|
* Enforce consistent style for escaping `${` in template literals.
|
|
7467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-template-literal-escape.md
|
|
7468
7498
|
*/
|
|
7469
7499
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
7470
7500
|
/**
|
|
7471
7501
|
* Enforce consistent labels on tuple type elements.
|
|
7472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-tuple-labels.md
|
|
7473
7503
|
*/
|
|
7474
7504
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
7475
7505
|
/**
|
|
7476
7506
|
* Enforce correct `Error` subclassing.
|
|
7477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/custom-error-definition.md
|
|
7478
7508
|
*/
|
|
7479
7509
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
7480
7510
|
/**
|
|
7481
7511
|
* Enforce consistent default export declarations.
|
|
7482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/default-export-style.md
|
|
7483
7513
|
*/
|
|
7484
7514
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
7485
7515
|
/**
|
|
7486
7516
|
* Enforce consistent style for DOM element dataset access.
|
|
7487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/dom-node-dataset.md
|
|
7488
7518
|
*/
|
|
7489
7519
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
7490
7520
|
/**
|
|
7491
7521
|
* Enforce no spaces between braces.
|
|
7492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/empty-brace-spaces.md
|
|
7493
7523
|
*/
|
|
7494
7524
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
7495
7525
|
/**
|
|
7496
7526
|
* Enforce passing a `message` value when creating a built-in error.
|
|
7497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/error-message.md
|
|
7498
7528
|
*/
|
|
7499
7529
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
7500
7530
|
/**
|
|
7501
7531
|
* Require escape sequences to use uppercase or lowercase values.
|
|
7502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/escape-case.md
|
|
7503
7533
|
*/
|
|
7504
7534
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
7505
7535
|
/**
|
|
7506
7536
|
* Add expiration conditions to TODO comments.
|
|
7507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/expiring-todo-comments.md
|
|
7508
7538
|
*/
|
|
7509
7539
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
7510
7540
|
/**
|
|
7511
7541
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
7512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/explicit-length-check.md
|
|
7513
7543
|
*/
|
|
7514
7544
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
7515
7545
|
/**
|
|
7516
7546
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
7517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/explicit-timer-delay.md
|
|
7518
7548
|
*/
|
|
7519
7549
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
7520
7550
|
/**
|
|
7521
7551
|
* Enforce a case style for filenames and directory names.
|
|
7522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/filename-case.md
|
|
7523
7553
|
*/
|
|
7524
7554
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
7525
7555
|
/**
|
|
7526
7556
|
* Require identifiers to match a specified regular expression.
|
|
7527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/id-match.md
|
|
7528
7558
|
*/
|
|
7529
7559
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
7530
7560
|
/**
|
|
7531
7561
|
* Enforce specific import styles per module.
|
|
7532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/import-style.md
|
|
7533
7563
|
*/
|
|
7534
7564
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
7535
7565
|
/**
|
|
7536
7566
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
7537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/isolated-functions.md
|
|
7538
7568
|
*/
|
|
7539
7569
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
7570
|
+
/**
|
|
7571
|
+
* Enforce a consistent style for optional loop sources.
|
|
7572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/iteration-fallback-style.md
|
|
7573
|
+
*/
|
|
7574
|
+
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
7540
7575
|
/**
|
|
7541
7576
|
* Require or disallow logical assignment operator shorthand
|
|
7542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/logical-assignment-operators.md
|
|
7543
7578
|
*/
|
|
7544
7579
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
7545
7580
|
/**
|
|
7546
7581
|
* Limit the depth of nested calls.
|
|
7547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/max-nested-calls.md
|
|
7548
7583
|
*/
|
|
7549
7584
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
7550
7585
|
/**
|
|
7551
7586
|
* Enforce replacements for variable, property, and filenames.
|
|
7552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/name-replacements.md
|
|
7553
7588
|
*/
|
|
7554
7589
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
7555
7590
|
/**
|
|
7556
7591
|
* Enforce correct use of `new` for builtin constructors.
|
|
7557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/new-for-builtins.md
|
|
7558
7593
|
*/
|
|
7559
7594
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
7560
7595
|
/**
|
|
7561
7596
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
7562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
7563
7598
|
*/
|
|
7564
7599
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
7565
7600
|
/**
|
|
7566
7601
|
* Disallow recursive access to `this` within getters and setters.
|
|
7567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-accessor-recursion.md
|
|
7568
7603
|
*/
|
|
7569
7604
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
7570
7605
|
/**
|
|
7571
7606
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
7572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
7573
7608
|
*/
|
|
7574
7609
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
7575
7610
|
/**
|
|
7576
7611
|
* Disallow anonymous functions and classes as the default export.
|
|
7577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-anonymous-default-export.md
|
|
7578
7613
|
*/
|
|
7579
7614
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
7580
7615
|
/**
|
|
7581
7616
|
* Prevent passing a function reference directly to iterator methods.
|
|
7582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-callback-reference.md
|
|
7583
7618
|
*/
|
|
7584
7619
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
7585
7620
|
/**
|
|
7586
7621
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
7587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-concat-in-loop.md
|
|
7588
7623
|
*/
|
|
7589
7624
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
7590
7625
|
/**
|
|
7591
7626
|
* Disallow using reference values as `Array#fill()` values.
|
|
7592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
7593
7628
|
*/
|
|
7594
7629
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
7595
7630
|
/**
|
|
7596
7631
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
7597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-from-fill.md
|
|
7598
7633
|
*/
|
|
7599
7634
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
7600
7635
|
/**
|
|
7601
7636
|
* Disallow front-of-array mutation.
|
|
7602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-front-mutation.md
|
|
7603
7638
|
*/
|
|
7604
7639
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
7605
7640
|
/**
|
|
7606
7641
|
* Disallow using the `this` argument in array methods.
|
|
7607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-method-this-argument.md
|
|
7608
7643
|
*/
|
|
7609
7644
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
7610
7645
|
/**
|
|
7611
7646
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
7612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
7613
7648
|
* @deprecated
|
|
7614
7649
|
*/
|
|
7615
7650
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
7616
7651
|
/**
|
|
7617
7652
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
7618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-reduce.md
|
|
7619
7654
|
*/
|
|
7620
7655
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
7621
7656
|
/**
|
|
7622
7657
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
7623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-reverse.md
|
|
7624
7659
|
*/
|
|
7625
7660
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
7626
7661
|
/**
|
|
7627
7662
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
7628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-sort.md
|
|
7629
7664
|
*/
|
|
7630
7665
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
7631
7666
|
/**
|
|
7632
7667
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
7633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
7634
7669
|
*/
|
|
7635
7670
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
7636
7671
|
/**
|
|
7637
7672
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
7638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-splice.md
|
|
7639
7674
|
*/
|
|
7640
7675
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
7641
7676
|
/**
|
|
7642
7677
|
* Disallow asterisk prefixes in documentation comments.
|
|
7643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
7644
7679
|
*/
|
|
7645
7680
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
7646
7681
|
/**
|
|
7647
7682
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
7648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-async-promise-finally.md
|
|
7649
7684
|
*/
|
|
7650
7685
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
7651
7686
|
/**
|
|
7652
7687
|
* Disallow member access from await expression.
|
|
7653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-await-expression-member.md
|
|
7654
7689
|
*/
|
|
7655
7690
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
7656
7691
|
/**
|
|
7657
7692
|
* Disallow using `await` in `Promise` method parameters.
|
|
7658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-await-in-promise-methods.md
|
|
7659
7694
|
*/
|
|
7660
7695
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7696
|
+
/**
|
|
7697
|
+
* Disallow barrel files.
|
|
7698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-barrel-files.md
|
|
7699
|
+
*/
|
|
7700
|
+
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
7661
7701
|
/**
|
|
7662
7702
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
7663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-blob-to-file.md
|
|
7664
7704
|
*/
|
|
7665
7705
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
7666
7706
|
/**
|
|
7667
7707
|
* Disallow boolean-returning sort comparators.
|
|
7668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
7669
7709
|
*/
|
|
7670
7710
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7671
7711
|
/**
|
|
7672
7712
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
7673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-break-in-nested-loop.md
|
|
7674
7714
|
*/
|
|
7675
7715
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
7676
7716
|
/**
|
|
7677
7717
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
7678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-canvas-to-image.md
|
|
7679
7719
|
*/
|
|
7680
7720
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
7681
7721
|
/**
|
|
7682
7722
|
* Disallow chained comparisons such as `a < b < c`.
|
|
7683
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-chained-comparison.md
|
|
7684
7724
|
*/
|
|
7685
7725
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
7686
7726
|
/**
|
|
7687
7727
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
7688
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-collection-bracket-access.md
|
|
7689
7729
|
*/
|
|
7690
7730
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
7691
7731
|
/**
|
|
7692
7732
|
* Disallow dynamic object property existence checks.
|
|
7693
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-computed-property-existence-check.md
|
|
7694
7734
|
*/
|
|
7695
7735
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
7696
7736
|
/**
|
|
7697
7737
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
7698
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-confusing-array-splice.md
|
|
7699
7739
|
*/
|
|
7700
7740
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
7701
7741
|
/**
|
|
7702
7742
|
* Disallow confusing uses of `Array#with()`.
|
|
7703
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-confusing-array-with.md
|
|
7704
7744
|
*/
|
|
7705
7745
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
7706
7746
|
/**
|
|
7707
7747
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
7708
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-console-spaces.md
|
|
7709
7749
|
*/
|
|
7710
7750
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
7711
7751
|
/**
|
|
7712
7752
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
7713
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-constant-zero-expression.md
|
|
7714
7754
|
*/
|
|
7715
7755
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
7716
7756
|
/**
|
|
7717
7757
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
7718
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7758
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
7719
7759
|
*/
|
|
7720
7760
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
7721
7761
|
/**
|
|
7722
7762
|
* Do not use `document.cookie` directly.
|
|
7723
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-document-cookie.md
|
|
7724
7764
|
*/
|
|
7725
7765
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
7726
7766
|
/**
|
|
7727
7767
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
7728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-double-comparison.md
|
|
7729
7769
|
*/
|
|
7730
7770
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
7731
7771
|
/**
|
|
7732
7772
|
* Disallow duplicate adjacent branches in if chains.
|
|
7733
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-if-branches.md
|
|
7734
7774
|
*/
|
|
7735
7775
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
7736
7776
|
/**
|
|
7737
7777
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
7738
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
7739
7779
|
*/
|
|
7740
7780
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
7741
7781
|
/**
|
|
7742
7782
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
7743
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-loops.md
|
|
7744
7784
|
*/
|
|
7745
7785
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
7746
7786
|
/**
|
|
7747
7787
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
7748
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-set-values.md
|
|
7749
7789
|
*/
|
|
7750
7790
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
7751
7791
|
/**
|
|
7752
7792
|
* Disallow empty files.
|
|
7753
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-empty-file.md
|
|
7754
7794
|
*/
|
|
7755
7795
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
7756
7796
|
/**
|
|
7757
7797
|
* Disallow assigning to built-in error properties.
|
|
7758
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-error-property-assignment.md
|
|
7759
7799
|
*/
|
|
7760
7800
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7761
7801
|
/**
|
|
7762
7802
|
* Disallow exports in scripts.
|
|
7763
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-exports-in-scripts.md
|
|
7764
7804
|
*/
|
|
7765
7805
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
7766
7806
|
/**
|
|
7767
7807
|
* Prefer `for…of` over the `forEach` method.
|
|
7768
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7808
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-for-each.md
|
|
7769
7809
|
*/
|
|
7770
7810
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
7771
7811
|
/**
|
|
7772
7812
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
7773
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-for-loop.md
|
|
7774
7814
|
*/
|
|
7775
7815
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
7776
7816
|
/**
|
|
7777
7817
|
* Disallow assigning properties on the global object.
|
|
7778
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7818
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-global-object-property-assignment.md
|
|
7779
7819
|
*/
|
|
7780
7820
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7781
7821
|
/**
|
|
7782
7822
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
7783
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
7784
7824
|
* @deprecated
|
|
7785
7825
|
*/
|
|
7786
7826
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
7787
7827
|
/**
|
|
7788
7828
|
* Disallow immediate mutation after variable assignment.
|
|
7789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7829
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-immediate-mutation.md
|
|
7790
7830
|
*/
|
|
7791
7831
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
7792
7832
|
/**
|
|
7793
7833
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
7794
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7834
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-impossible-length-comparison.md
|
|
7795
7835
|
*/
|
|
7796
7836
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
7797
7837
|
/**
|
|
7798
7838
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
7799
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7839
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-incorrect-query-selector.md
|
|
7800
7840
|
*/
|
|
7801
7841
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
7802
7842
|
/**
|
|
7803
7843
|
* Disallow incorrect template literal interpolation syntax.
|
|
7804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7844
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
7805
7845
|
*/
|
|
7806
7846
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
7807
7847
|
/**
|
|
7808
7848
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
7809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7849
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
7810
7850
|
* @deprecated
|
|
7811
7851
|
*/
|
|
7812
7852
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
7813
7853
|
/**
|
|
7814
7854
|
* Disallow `instanceof` with built-in objects
|
|
7815
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-instanceof-builtins.md
|
|
7816
7856
|
*/
|
|
7817
7857
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
7818
7858
|
/**
|
|
7819
7859
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
7820
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-argument-count.md
|
|
7821
7861
|
*/
|
|
7822
7862
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
7823
7863
|
/**
|
|
7824
7864
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
7825
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-character-comparison.md
|
|
7826
7866
|
*/
|
|
7827
7867
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
7828
7868
|
/**
|
|
7829
7869
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
7830
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-fetch-options.md
|
|
7831
7871
|
*/
|
|
7832
7872
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7833
7873
|
/**
|
|
7834
7874
|
* Disallow invalid `accept` values on file inputs.
|
|
7835
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
7836
7876
|
*/
|
|
7837
7877
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
7838
7878
|
/**
|
|
7839
7879
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
7840
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
7841
7881
|
*/
|
|
7842
7882
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
7843
7883
|
/**
|
|
7844
7884
|
* Disallow invalid implementations of well-known symbol methods.
|
|
7845
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
7846
7886
|
*/
|
|
7847
7887
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
7848
7888
|
/**
|
|
7849
7889
|
* Disallow identifiers starting with `new` or `class`.
|
|
7850
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-keyword-prefix.md
|
|
7851
7891
|
*/
|
|
7852
7892
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
7853
7893
|
/**
|
|
7854
7894
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
7855
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-late-current-target-access.md
|
|
7856
7896
|
*/
|
|
7857
7897
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
7858
7898
|
/**
|
|
7859
7899
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
7860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-late-event-control.md
|
|
7861
7901
|
*/
|
|
7862
7902
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
7863
7903
|
/**
|
|
7864
7904
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
7865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
7866
7906
|
* @deprecated
|
|
7867
7907
|
*/
|
|
7868
7908
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
7869
7909
|
/**
|
|
7870
7910
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
7871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-lonely-if.md
|
|
7872
7912
|
*/
|
|
7873
7913
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
7874
7914
|
/**
|
|
7875
7915
|
* Disallow mutating a loop iterable during iteration.
|
|
7876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
7877
7917
|
*/
|
|
7878
7918
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
7879
7919
|
/**
|
|
7880
7920
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
7881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
7882
7922
|
*/
|
|
7883
7923
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7884
7924
|
/**
|
|
7885
7925
|
* Disallow manually wrapped comments.
|
|
7886
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
7887
7927
|
*/
|
|
7888
7928
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
7889
7929
|
/**
|
|
7890
7930
|
* Disallow checking a Map key before accessing a different key.
|
|
7891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-mismatched-map-key.md
|
|
7892
7932
|
*/
|
|
7893
7933
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
7894
7934
|
/**
|
|
7895
7935
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
7896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-misrefactored-assignment.md
|
|
7897
7937
|
*/
|
|
7898
7938
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
7899
7939
|
/**
|
|
7900
7940
|
* Disallow references to missing local resources.
|
|
7901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-missing-local-resource.md
|
|
7902
7942
|
*/
|
|
7903
7943
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
7904
7944
|
/**
|
|
7905
7945
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
7906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
7907
7947
|
*/
|
|
7908
7948
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
7909
7949
|
/**
|
|
7910
7950
|
* Disallow named usage of default import and export.
|
|
7911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-named-default.md
|
|
7912
7952
|
*/
|
|
7913
7953
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
7914
7954
|
/**
|
|
7915
7955
|
* Disallow negated array predicate calls.
|
|
7916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negated-array-predicate.md
|
|
7917
7957
|
*/
|
|
7918
7958
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7919
7959
|
/**
|
|
7920
7960
|
* Disallow negated comparisons.
|
|
7921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negated-comparison.md
|
|
7922
7962
|
*/
|
|
7923
7963
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
7924
7964
|
/**
|
|
7925
7965
|
* Disallow negated conditions.
|
|
7926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negated-condition.md
|
|
7927
7967
|
*/
|
|
7928
7968
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
7929
7969
|
/**
|
|
7930
7970
|
* Disallow negated expression in equality check.
|
|
7931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negation-in-equality-check.md
|
|
7932
7972
|
*/
|
|
7933
7973
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
7934
7974
|
/**
|
|
7935
7975
|
* Disallow nested ternary expressions.
|
|
7936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-nested-ternary.md
|
|
7937
7977
|
*/
|
|
7938
7978
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7939
7979
|
/**
|
|
7940
7980
|
* Disallow `new Array()`.
|
|
7941
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-new-array.md
|
|
7942
7982
|
*/
|
|
7943
7983
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
7944
7984
|
/**
|
|
7945
7985
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
7946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-new-buffer.md
|
|
7947
7987
|
*/
|
|
7948
7988
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
7949
7989
|
/**
|
|
7950
7990
|
* Disallow non-function values with function-style verb prefixes.
|
|
7951
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
7952
7992
|
*/
|
|
7953
7993
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
7954
7994
|
/**
|
|
7955
7995
|
* Disallow non-standard properties on built-in objects.
|
|
7956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
7957
7997
|
*/
|
|
7958
7998
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
7959
7999
|
/**
|
|
7960
8000
|
* Disallow the use of the `null` literal.
|
|
7961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-null.md
|
|
7962
8002
|
*/
|
|
7963
8003
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
7964
8004
|
/**
|
|
7965
8005
|
* Disallow the use of objects as default parameters.
|
|
7966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-object-as-default-parameter.md
|
|
7967
8007
|
*/
|
|
7968
8008
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
7969
8009
|
/**
|
|
7970
8010
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
7971
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-object-methods-with-collections.md
|
|
7972
8012
|
*/
|
|
7973
8013
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
7974
8014
|
/**
|
|
7975
8015
|
* Disallow optional chaining on undeclared variables.
|
|
7976
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
7977
8017
|
*/
|
|
7978
8018
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
7979
8019
|
/**
|
|
7980
8020
|
* Disallow `process.exit()`.
|
|
7981
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8021
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-process-exit.md
|
|
7982
8022
|
*/
|
|
7983
8023
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
7984
8024
|
/**
|
|
7985
8025
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
7986
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-redundant-comparison.md
|
|
7987
8027
|
*/
|
|
7988
8028
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
7989
8029
|
/**
|
|
7990
8030
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
7991
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-return-array-push.md
|
|
7992
8032
|
*/
|
|
7993
8033
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
7994
8034
|
/**
|
|
7995
8035
|
* Disallow selector syntax in DOM names.
|
|
7996
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-selector-as-dom-name.md
|
|
7997
8037
|
*/
|
|
7998
8038
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
7999
8039
|
/**
|
|
8000
8040
|
* Disallow shorthand properties that override related longhand properties.
|
|
8001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8041
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
8002
8042
|
*/
|
|
8003
8043
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
8004
8044
|
/**
|
|
8005
8045
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
8006
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8046
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
8007
8047
|
*/
|
|
8008
8048
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
8009
8049
|
/**
|
|
8010
8050
|
* Disallow classes that only have static members.
|
|
8011
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8051
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-static-only-class.md
|
|
8012
8052
|
*/
|
|
8013
8053
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
8014
8054
|
/**
|
|
8015
8055
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
8016
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8056
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-subtraction-comparison.md
|
|
8017
8057
|
*/
|
|
8018
8058
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
8019
8059
|
/**
|
|
8020
8060
|
* Disallow `then` property.
|
|
8021
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-thenable.md
|
|
8022
8062
|
*/
|
|
8023
8063
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
8024
8064
|
/**
|
|
8025
8065
|
* Disallow assigning `this` to a variable.
|
|
8026
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8066
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-this-assignment.md
|
|
8027
8067
|
*/
|
|
8028
8068
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
8029
8069
|
/**
|
|
8030
8070
|
* Disallow `this` outside of classes.
|
|
8031
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8071
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-this-outside-of-class.md
|
|
8032
8072
|
*/
|
|
8033
8073
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
8034
8074
|
/**
|
|
8035
8075
|
* Disallow assigning to top-level variables from inside functions.
|
|
8036
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8076
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
8037
8077
|
*/
|
|
8038
8078
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
8039
8079
|
/**
|
|
8040
8080
|
* Disallow top-level side effects in exported modules.
|
|
8041
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-top-level-side-effects.md
|
|
8042
8082
|
*/
|
|
8043
8083
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
8044
8084
|
/**
|
|
8045
8085
|
* Disallow `all` as a transition property.
|
|
8046
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8086
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-transition-all.md
|
|
8047
8087
|
*/
|
|
8048
8088
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
8049
8089
|
/**
|
|
8050
8090
|
* Disallow comparing `undefined` using `typeof`.
|
|
8051
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8091
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-typeof-undefined.md
|
|
8052
8092
|
*/
|
|
8053
8093
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
8054
8094
|
/**
|
|
8055
8095
|
* Disallow referencing methods without calling them.
|
|
8056
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8096
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-uncalled-method.md
|
|
8057
8097
|
*/
|
|
8058
8098
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
8059
8099
|
/**
|
|
8060
8100
|
* Require class members to be declared.
|
|
8061
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8101
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-undeclared-class-members.md
|
|
8062
8102
|
*/
|
|
8063
8103
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
8064
8104
|
/**
|
|
8065
8105
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
8066
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8106
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
8067
8107
|
*/
|
|
8068
8108
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
8069
8109
|
/**
|
|
8070
8110
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
8071
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8111
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
8072
8112
|
*/
|
|
8073
8113
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8074
8114
|
/**
|
|
8075
8115
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
8076
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8116
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
8077
8117
|
*/
|
|
8078
8118
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
8079
8119
|
/**
|
|
8080
8120
|
* Disallow awaiting non-promise values.
|
|
8081
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8121
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-await.md
|
|
8082
8122
|
*/
|
|
8083
8123
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
8084
8124
|
/**
|
|
8085
8125
|
* Disallow unnecessary comparisons against boolean literals.
|
|
8086
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8126
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
8087
8127
|
*/
|
|
8088
8128
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
8089
8129
|
/**
|
|
8090
8130
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
8091
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8131
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
8092
8132
|
*/
|
|
8093
8133
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
8094
8134
|
/**
|
|
8095
8135
|
* Disallow unnecessary `globalThis` references.
|
|
8096
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8136
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-global-this.md
|
|
8097
8137
|
*/
|
|
8098
8138
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
8099
8139
|
/**
|
|
8100
8140
|
* Disallow unnecessary nested ternary expressions.
|
|
8101
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8141
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
8102
8142
|
*/
|
|
8103
8143
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
8104
8144
|
/**
|
|
8105
8145
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
8106
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8146
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
8107
8147
|
*/
|
|
8108
8148
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
8109
8149
|
/**
|
|
8110
8150
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
8111
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8151
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
8112
8152
|
*/
|
|
8113
8153
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
8114
8154
|
/**
|
|
8115
8155
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
8116
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8156
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-splice.md
|
|
8117
8157
|
*/
|
|
8118
8158
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
8119
8159
|
/**
|
|
8120
8160
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
8121
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8161
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
8122
8162
|
*/
|
|
8123
8163
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
8124
8164
|
/**
|
|
8125
8165
|
* Disallow unreadable array destructuring.
|
|
8126
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8166
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
8127
8167
|
*/
|
|
8128
8168
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
8129
8169
|
/**
|
|
8130
8170
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
8131
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8171
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
8132
8172
|
*/
|
|
8133
8173
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
8134
8174
|
/**
|
|
8135
8175
|
* Disallow unreadable IIFEs.
|
|
8136
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8176
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-iife.md
|
|
8137
8177
|
*/
|
|
8138
8178
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
8139
8179
|
/**
|
|
8140
8180
|
* Disallow unreadable `new` expressions.
|
|
8141
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8181
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-new-expression.md
|
|
8142
8182
|
*/
|
|
8143
8183
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
8144
8184
|
/**
|
|
8145
8185
|
* Disallow unreadable object destructuring.
|
|
8146
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8186
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
8147
8187
|
*/
|
|
8148
8188
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8149
8189
|
/**
|
|
8150
8190
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
8151
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8191
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
8152
8192
|
*/
|
|
8153
8193
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
8154
8194
|
/**
|
|
8155
8195
|
* Disallow unsafe DOM HTML APIs.
|
|
8156
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8196
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-dom-html.md
|
|
8157
8197
|
*/
|
|
8158
8198
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
8159
8199
|
/**
|
|
8160
8200
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
8161
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8201
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
8162
8202
|
*/
|
|
8163
8203
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
8164
8204
|
/**
|
|
8165
8205
|
* Disallow unsafe values as property keys.
|
|
8166
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8206
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-property-key.md
|
|
8167
8207
|
*/
|
|
8168
8208
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
8209
|
+
/**
|
|
8210
|
+
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
8211
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
8212
|
+
*/
|
|
8213
|
+
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
8169
8214
|
/**
|
|
8170
8215
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
8171
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8216
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
8172
8217
|
*/
|
|
8173
8218
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
8174
8219
|
/**
|
|
8175
8220
|
* Disallow ignoring the return value of selected array methods.
|
|
8176
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unused-array-method-return.md
|
|
8177
8222
|
*/
|
|
8178
8223
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
8179
8224
|
/**
|
|
8180
8225
|
* Disallow unused object properties.
|
|
8181
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8226
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unused-properties.md
|
|
8182
8227
|
*/
|
|
8183
8228
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
8184
8229
|
/**
|
|
8185
8230
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
8186
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8231
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-boolean-cast.md
|
|
8187
8232
|
*/
|
|
8188
8233
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
8189
8234
|
/**
|
|
8190
8235
|
* Disallow useless type coercions of values that are already of the target type.
|
|
8191
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8236
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-coercion.md
|
|
8192
8237
|
*/
|
|
8193
8238
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
8194
8239
|
/**
|
|
8195
8240
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
8196
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-collection-argument.md
|
|
8197
8242
|
*/
|
|
8198
8243
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
8199
8244
|
/**
|
|
8200
8245
|
* Disallow useless compound assignments such as `x += 0`.
|
|
8201
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-compound-assignment.md
|
|
8202
8247
|
*/
|
|
8203
8248
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
8204
8249
|
/**
|
|
8205
8250
|
* Disallow useless concatenation of literals.
|
|
8206
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-concat.md
|
|
8207
8252
|
*/
|
|
8208
8253
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
8209
8254
|
/**
|
|
8210
8255
|
* Disallow useless `continue` statements.
|
|
8211
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-continue.md
|
|
8212
8257
|
*/
|
|
8213
8258
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
8214
8259
|
/**
|
|
8215
8260
|
* Disallow unnecessary existence checks before deletion.
|
|
8216
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-delete-check.md
|
|
8217
8262
|
*/
|
|
8218
8263
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
8219
8264
|
/**
|
|
8220
8265
|
* Disallow `else` after a statement that exits.
|
|
8221
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-else.md
|
|
8222
8267
|
*/
|
|
8223
8268
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
8224
8269
|
/**
|
|
8225
8270
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
8226
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
8227
8272
|
*/
|
|
8228
8273
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
8229
8274
|
/**
|
|
8230
8275
|
* Disallow useless fallback when spreading in object literals.
|
|
8231
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
8232
8277
|
*/
|
|
8233
8278
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
8234
8279
|
/**
|
|
8235
8280
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
8236
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
8237
8282
|
*/
|
|
8238
8283
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8239
8284
|
/**
|
|
8240
8285
|
* Disallow useless array length check.
|
|
8241
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-length-check.md
|
|
8242
8287
|
*/
|
|
8243
8288
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
8244
8289
|
/**
|
|
8245
8290
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
8246
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-logical-operand.md
|
|
8247
8292
|
*/
|
|
8248
8293
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
8249
8294
|
/**
|
|
8250
8295
|
* Disallow useless overrides of class methods.
|
|
8251
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-override.md
|
|
8252
8297
|
*/
|
|
8253
8298
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
8254
8299
|
/**
|
|
8255
8300
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
8256
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
8257
8302
|
*/
|
|
8258
8303
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
8259
8304
|
/**
|
|
8260
8305
|
* Disallow redundant re-exports.
|
|
8261
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-re-export.md
|
|
8262
8307
|
*/
|
|
8263
8308
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
8264
8309
|
/**
|
|
8265
8310
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
8266
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-recursion.md
|
|
8267
8312
|
*/
|
|
8268
8313
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
8269
8314
|
/**
|
|
8270
8315
|
* Disallow unnecessary spread.
|
|
8271
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-spread.md
|
|
8272
8317
|
*/
|
|
8273
8318
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
8274
8319
|
/**
|
|
8275
8320
|
* Disallow useless case in switch statements.
|
|
8276
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-switch-case.md
|
|
8277
8322
|
*/
|
|
8278
8323
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
8279
8324
|
/**
|
|
8280
8325
|
* Disallow useless template literal expressions.
|
|
8281
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-template-literals.md
|
|
8282
8327
|
*/
|
|
8283
8328
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
8284
8329
|
/**
|
|
8285
8330
|
* Disallow useless `undefined`.
|
|
8286
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-undefined.md
|
|
8287
8332
|
*/
|
|
8288
8333
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
8289
8334
|
/**
|
|
8290
8335
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
8291
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8336
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
8292
8337
|
*/
|
|
8293
8338
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
8294
8339
|
/**
|
|
8295
8340
|
* Disallow number literals with zero fractions or dangling dots.
|
|
8296
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-zero-fractions.md
|
|
8297
8342
|
*/
|
|
8298
8343
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
8299
8344
|
/**
|
|
8300
8345
|
* Enforce proper case for numeric literals.
|
|
8301
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/number-literal-case.md
|
|
8302
8347
|
*/
|
|
8303
8348
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
8304
8349
|
/**
|
|
8305
8350
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
8306
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8351
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/numeric-separators-style.md
|
|
8307
8352
|
*/
|
|
8308
8353
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
8309
8354
|
/**
|
|
8310
8355
|
* Require assignment operator shorthand where possible.
|
|
8311
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/operator-assignment.md
|
|
8312
8357
|
*/
|
|
8313
8358
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
8314
8359
|
/**
|
|
8315
8360
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
8316
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8361
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-abort-signal-any.md
|
|
8317
8362
|
*/
|
|
8318
8363
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
8319
8364
|
/**
|
|
8320
8365
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
8321
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8366
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
8322
8367
|
*/
|
|
8323
8368
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
8324
8369
|
/**
|
|
8325
8370
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
8326
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8371
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-add-event-listener.md
|
|
8327
8372
|
*/
|
|
8328
8373
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
8329
8374
|
/**
|
|
8330
8375
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
8331
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
8332
8377
|
*/
|
|
8333
8378
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
8334
8379
|
/**
|
|
8335
8380
|
* Prefer `AggregateError` when throwing collected errors.
|
|
8336
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-aggregate-error.md
|
|
8337
8382
|
*/
|
|
8338
8383
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
8339
8384
|
/**
|
|
8340
8385
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
8341
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-find.md
|
|
8342
8387
|
*/
|
|
8343
8388
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
8344
8389
|
/**
|
|
8345
8390
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
8346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-flat.md
|
|
8347
8392
|
*/
|
|
8348
8393
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
8349
8394
|
/**
|
|
8350
8395
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
8351
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-flat-map.md
|
|
8352
8397
|
*/
|
|
8353
8398
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8354
8399
|
/**
|
|
8355
8400
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
8356
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-from-async.md
|
|
8357
8402
|
*/
|
|
8358
8403
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
8359
8404
|
/**
|
|
8360
8405
|
* Prefer using the `Array.from()` mapping function argument.
|
|
8361
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-from-map.md
|
|
8362
8407
|
*/
|
|
8363
8408
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
8364
8409
|
/**
|
|
8365
8410
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
8366
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-from-range.md
|
|
8367
8412
|
*/
|
|
8368
8413
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
8369
8414
|
/**
|
|
8370
8415
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
8371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8416
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-index-of.md
|
|
8372
8417
|
*/
|
|
8373
8418
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
8374
8419
|
/**
|
|
8375
8420
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
8376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8421
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
8377
8422
|
*/
|
|
8378
8423
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8379
8424
|
/**
|
|
8380
8425
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
8381
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8426
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-last-methods.md
|
|
8382
8427
|
*/
|
|
8383
8428
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
8384
8429
|
/**
|
|
8385
8430
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
8386
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-slice.md
|
|
8387
8432
|
*/
|
|
8388
8433
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
8389
8434
|
/**
|
|
8390
8435
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
8391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8436
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-some.md
|
|
8392
8437
|
*/
|
|
8393
8438
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
8394
8439
|
/**
|
|
8395
8440
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
8396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8441
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-at.md
|
|
8397
8442
|
*/
|
|
8398
8443
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
8399
8444
|
/**
|
|
8400
8445
|
* Prefer `await` over promise chaining.
|
|
8401
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8446
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-await.md
|
|
8402
8447
|
*/
|
|
8403
8448
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
8404
8449
|
/**
|
|
8405
8450
|
* Prefer `BigInt` literals over the constructor.
|
|
8406
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8451
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-bigint-literals.md
|
|
8407
8452
|
*/
|
|
8408
8453
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
8409
8454
|
/**
|
|
8410
8455
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
8411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8456
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
8412
8457
|
*/
|
|
8413
8458
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
8414
8459
|
/**
|
|
8415
8460
|
* Prefer block statements over IIFEs used only for scoping.
|
|
8416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8461
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
8417
8462
|
*/
|
|
8418
8463
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
8419
8464
|
/**
|
|
8420
8465
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
8421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-boolean-return.md
|
|
8422
8467
|
*/
|
|
8423
8468
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8424
8469
|
/**
|
|
8425
8470
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
8426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8471
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-class-fields.md
|
|
8427
8472
|
*/
|
|
8428
8473
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
8429
8474
|
/**
|
|
8430
8475
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
8431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8476
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-classlist-toggle.md
|
|
8432
8477
|
*/
|
|
8433
8478
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
8434
8479
|
/**
|
|
8435
8480
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
8436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8481
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-code-point.md
|
|
8437
8482
|
*/
|
|
8438
8483
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
8439
8484
|
/**
|
|
8440
8485
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
8441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8486
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-continue.md
|
|
8442
8487
|
*/
|
|
8443
8488
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
8444
8489
|
/**
|
|
8445
8490
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
8446
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8491
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-date-now.md
|
|
8447
8492
|
*/
|
|
8448
8493
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
8449
8494
|
/**
|
|
8450
8495
|
* Prefer default parameters over reassignment.
|
|
8451
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8496
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-default-parameters.md
|
|
8452
8497
|
*/
|
|
8453
8498
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
8454
8499
|
/**
|
|
8455
8500
|
* Prefer direct iteration over default iterator method calls.
|
|
8456
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8501
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-direct-iteration.md
|
|
8457
8502
|
*/
|
|
8458
8503
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
8459
8504
|
/**
|
|
8460
8505
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
8461
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8506
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dispose.md
|
|
8462
8507
|
*/
|
|
8463
8508
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
8464
8509
|
/**
|
|
8465
8510
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
8466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8511
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-append.md
|
|
8467
8512
|
*/
|
|
8468
8513
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
8469
8514
|
/**
|
|
8470
8515
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
8471
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8516
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
8472
8517
|
* @deprecated
|
|
8473
8518
|
*/
|
|
8474
8519
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
8475
8520
|
/**
|
|
8476
8521
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
8477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
8478
8523
|
*/
|
|
8479
8524
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
8480
8525
|
/**
|
|
8481
8526
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
8482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-remove.md
|
|
8483
8528
|
*/
|
|
8484
8529
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
8485
8530
|
/**
|
|
8486
8531
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
8487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
8488
8533
|
*/
|
|
8489
8534
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
8490
8535
|
/**
|
|
8491
8536
|
* Prefer `.textContent` over `.innerText`.
|
|
8492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
8493
8538
|
*/
|
|
8494
8539
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
8495
8540
|
/**
|
|
8496
8541
|
* Prefer early returns over full-function conditional wrapping.
|
|
8497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-early-return.md
|
|
8498
8543
|
*/
|
|
8499
8544
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
8500
8545
|
/**
|
|
8501
8546
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
8502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-else-if.md
|
|
8503
8548
|
*/
|
|
8504
8549
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
8505
8550
|
/**
|
|
8506
8551
|
* Prefer `Error.isError()` when checking for errors.
|
|
8507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-error-is-error.md
|
|
8508
8553
|
*/
|
|
8509
8554
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
8510
8555
|
/**
|
|
8511
8556
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
8512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-event-target.md
|
|
8513
8558
|
*/
|
|
8514
8559
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
8515
8560
|
/**
|
|
8516
8561
|
* Prefer explicit viewport units.
|
|
8517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
8518
8563
|
*/
|
|
8519
8564
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
8520
8565
|
/**
|
|
8521
8566
|
* Prefer `export…from` when re-exporting.
|
|
8522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-export-from.md
|
|
8523
8568
|
*/
|
|
8524
8569
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
8525
8570
|
/**
|
|
8526
8571
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
8527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
8528
8573
|
*/
|
|
8529
8574
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8530
8575
|
/**
|
|
8531
8576
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
8532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
8533
8578
|
*/
|
|
8534
8579
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
8535
8580
|
/**
|
|
8536
8581
|
* Prefer global numeric constants over `Number` static properties.
|
|
8537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-global-number-constants.md
|
|
8538
8583
|
*/
|
|
8539
8584
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
8540
8585
|
/**
|
|
8541
8586
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
8542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-global-this.md
|
|
8543
8588
|
*/
|
|
8544
8589
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
8545
8590
|
/**
|
|
8546
8591
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
8547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-group-by.md
|
|
8548
8593
|
*/
|
|
8549
8594
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
8550
8595
|
/**
|
|
8551
8596
|
* Prefer `.has()` when checking existence.
|
|
8552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-has-check.md
|
|
8553
8598
|
*/
|
|
8554
8599
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
8555
8600
|
/**
|
|
8556
8601
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
8557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
8558
8603
|
*/
|
|
8559
8604
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
8560
8605
|
/**
|
|
8561
8606
|
* Prefer HTTPS over HTTP.
|
|
8562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-https.md
|
|
8563
8608
|
*/
|
|
8564
|
-
'unicorn/prefer-https'?: Linter.RuleEntry<
|
|
8609
|
+
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
8565
8610
|
/**
|
|
8566
8611
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
8567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
8568
8613
|
*/
|
|
8569
8614
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
8570
8615
|
/**
|
|
8571
8616
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
8572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-import-meta-properties.md
|
|
8573
8618
|
*/
|
|
8574
8619
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
8575
8620
|
/**
|
|
8576
8621
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
8577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-includes.md
|
|
8578
8623
|
*/
|
|
8579
8624
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
8580
8625
|
/**
|
|
8581
8626
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
8582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
8583
8628
|
*/
|
|
8584
8629
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
8585
8630
|
/**
|
|
8586
8631
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
8587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
8588
8633
|
*/
|
|
8589
8634
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
8590
8635
|
/**
|
|
8591
8636
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
8592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-concat.md
|
|
8593
8638
|
*/
|
|
8594
8639
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
8595
8640
|
/**
|
|
8596
8641
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
8597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-helpers.md
|
|
8598
8643
|
*/
|
|
8599
8644
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
8600
8645
|
/**
|
|
8601
8646
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
8602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-to-array.md
|
|
8603
8648
|
*/
|
|
8604
8649
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8605
8650
|
/**
|
|
8606
8651
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
8607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8652
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
8608
8653
|
*/
|
|
8609
8654
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
8610
8655
|
/**
|
|
8611
8656
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
8612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8657
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
8613
8658
|
* @deprecated
|
|
8614
8659
|
*/
|
|
8615
8660
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
8616
8661
|
/**
|
|
8617
8662
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
8618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
8619
8664
|
*/
|
|
8620
8665
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
8621
8666
|
/**
|
|
8622
8667
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
8623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-location-assign.md
|
|
8624
8669
|
*/
|
|
8625
8670
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
8626
8671
|
/**
|
|
8627
8672
|
* Prefer using a logical operator over a ternary.
|
|
8628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
8629
8674
|
*/
|
|
8630
8675
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
8631
8676
|
/**
|
|
8632
8677
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
8633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-map-from-entries.md
|
|
8634
8679
|
*/
|
|
8635
8680
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
8636
8681
|
/**
|
|
8637
8682
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
8638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-abs.md
|
|
8639
8684
|
*/
|
|
8640
8685
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
8641
8686
|
/**
|
|
8642
8687
|
* Prefer `Math` constants over their approximate numeric values.
|
|
8643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-constants.md
|
|
8644
8689
|
*/
|
|
8645
8690
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
8646
8691
|
/**
|
|
8647
8692
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
8648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-min-max.md
|
|
8649
8694
|
*/
|
|
8650
8695
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8651
8696
|
/**
|
|
8652
8697
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
8653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-trunc.md
|
|
8654
8699
|
*/
|
|
8655
8700
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
8656
8701
|
/**
|
|
8657
8702
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
8658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-minimal-ternary.md
|
|
8659
8704
|
*/
|
|
8660
8705
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
8661
8706
|
/**
|
|
8662
8707
|
* Prefer modern DOM APIs.
|
|
8663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
8664
8709
|
*/
|
|
8665
8710
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
8666
8711
|
/**
|
|
8667
8712
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
8668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-modern-math-apis.md
|
|
8669
8714
|
*/
|
|
8670
8715
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
8671
8716
|
/**
|
|
8672
8717
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
8673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-module.md
|
|
8674
8719
|
*/
|
|
8675
8720
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
8676
8721
|
/**
|
|
8677
8722
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
8678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
8679
8724
|
*/
|
|
8680
8725
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
8681
8726
|
/**
|
|
8682
8727
|
* Prefer negative index over `.length - index` when possible.
|
|
8683
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-negative-index.md
|
|
8684
8729
|
*/
|
|
8685
8730
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
8686
8731
|
/**
|
|
8687
8732
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
8688
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-node-protocol.md
|
|
8689
8734
|
*/
|
|
8690
8735
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
8691
8736
|
/**
|
|
8692
8737
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
8693
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-number-coercion.md
|
|
8694
8739
|
*/
|
|
8695
8740
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
8696
8741
|
/**
|
|
8697
8742
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
8698
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
8699
8744
|
*/
|
|
8700
8745
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
8701
8746
|
/**
|
|
8702
8747
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
8703
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-number-properties.md
|
|
8704
8749
|
*/
|
|
8705
8750
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
8706
8751
|
/**
|
|
8707
8752
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
8708
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-define-properties.md
|
|
8709
8754
|
*/
|
|
8710
8755
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
8711
8756
|
/**
|
|
8712
8757
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
8713
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8758
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
8714
8759
|
*/
|
|
8715
8760
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
8716
8761
|
/**
|
|
8717
8762
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
8718
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-from-entries.md
|
|
8719
8764
|
*/
|
|
8720
8765
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
8721
8766
|
/**
|
|
8722
8767
|
* Prefer the most specific `Object` iterable method.
|
|
8723
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
8724
8769
|
*/
|
|
8725
8770
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8726
8771
|
/**
|
|
8727
8772
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
8728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-observer-apis.md
|
|
8729
8774
|
*/
|
|
8730
8775
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
8731
8776
|
/**
|
|
8732
8777
|
* Prefer omitting the `catch` binding parameter.
|
|
8733
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
8734
8779
|
*/
|
|
8735
8780
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
8736
8781
|
/**
|
|
8737
8782
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
8738
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-path2d.md
|
|
8739
8784
|
*/
|
|
8740
8785
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
8741
8786
|
/**
|
|
8742
8787
|
* Prefer private class fields over the underscore-prefix convention.
|
|
8743
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-private-class-fields.md
|
|
8744
8789
|
*/
|
|
8745
8790
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
8746
8791
|
/**
|
|
8747
8792
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
8748
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-promise-try.md
|
|
8749
8794
|
*/
|
|
8750
8795
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
8751
8796
|
/**
|
|
8752
8797
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
8753
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
8754
8799
|
*/
|
|
8755
8800
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
8756
8801
|
/**
|
|
8757
8802
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
8758
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-prototype-methods.md
|
|
8759
8804
|
*/
|
|
8760
8805
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
8761
8806
|
/**
|
|
8762
8807
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
8763
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8808
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-query-selector.md
|
|
8764
8809
|
*/
|
|
8765
8810
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
8766
8811
|
/**
|
|
8767
8812
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
8768
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-queue-microtask.md
|
|
8769
8814
|
*/
|
|
8770
8815
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
8771
8816
|
/**
|
|
8772
8817
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
8773
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8818
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-reflect-apply.md
|
|
8774
8819
|
*/
|
|
8775
8820
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
8776
8821
|
/**
|
|
8777
8822
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
8778
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-regexp-escape.md
|
|
8779
8824
|
*/
|
|
8780
8825
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
8781
8826
|
/**
|
|
8782
8827
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
8783
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8828
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-regexp-test.md
|
|
8784
8829
|
*/
|
|
8785
8830
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
8786
8831
|
/**
|
|
8787
8832
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
8788
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-response-static-json.md
|
|
8789
8834
|
*/
|
|
8790
8835
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
8791
8836
|
/**
|
|
8792
8837
|
* Prefer `:scope` when using element query selector methods.
|
|
8793
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-scoped-selector.md
|
|
8794
8839
|
*/
|
|
8795
8840
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
8796
8841
|
/**
|
|
8797
8842
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
8798
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-set-has.md
|
|
8799
8844
|
*/
|
|
8800
8845
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
8801
8846
|
/**
|
|
8802
8847
|
* Prefer `Set` methods for Set operations.
|
|
8803
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-set-methods.md
|
|
8804
8849
|
*/
|
|
8805
8850
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
8806
8851
|
/**
|
|
8807
8852
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
8808
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-set-size.md
|
|
8809
8854
|
*/
|
|
8810
8855
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
8811
8856
|
/**
|
|
8812
8857
|
* Prefer arrow function properties over methods with a single return.
|
|
8813
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-short-arrow-method.md
|
|
8814
8859
|
*/
|
|
8815
8860
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
8816
8861
|
/**
|
|
8817
8862
|
* Prefer simple conditions first in logical expressions.
|
|
8818
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8863
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-simple-condition-first.md
|
|
8819
8864
|
*/
|
|
8820
8865
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
8821
8866
|
/**
|
|
8822
8867
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
8823
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
8824
8869
|
*/
|
|
8825
8870
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
8826
8871
|
/**
|
|
8827
8872
|
* Prefer simplified conditions.
|
|
8828
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-simplified-conditions.md
|
|
8829
8874
|
*/
|
|
8830
8875
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
8831
8876
|
/**
|
|
8832
8877
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
8833
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8878
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-array-predicate.md
|
|
8834
8879
|
*/
|
|
8835
8880
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
8836
8881
|
/**
|
|
8837
8882
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
8838
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8883
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-call.md
|
|
8839
8884
|
*/
|
|
8840
8885
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
8841
8886
|
/**
|
|
8842
8887
|
* Prefer a single object destructuring declaration per local const source.
|
|
8843
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8888
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
8844
8889
|
*/
|
|
8845
8890
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8846
8891
|
/**
|
|
8847
8892
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
8848
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8893
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-replace.md
|
|
8849
8894
|
*/
|
|
8850
8895
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
8851
8896
|
/**
|
|
8852
8897
|
* Prefer declaring variables in the smallest possible scope.
|
|
8853
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8898
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-smaller-scope.md
|
|
8854
8899
|
*/
|
|
8855
8900
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
8856
8901
|
/**
|
|
8857
8902
|
* Prefer `String#split()` with a limit.
|
|
8858
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8903
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-split-limit.md
|
|
8859
8904
|
*/
|
|
8860
8905
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
8861
8906
|
/**
|
|
8862
8907
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
8863
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8908
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-spread.md
|
|
8864
8909
|
*/
|
|
8865
8910
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
8866
8911
|
/**
|
|
8867
8912
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
8868
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8913
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-match-all.md
|
|
8869
8914
|
*/
|
|
8870
8915
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
8871
8916
|
/**
|
|
8872
8917
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
8873
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8918
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
8874
8919
|
*/
|
|
8875
8920
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
8876
8921
|
/**
|
|
8877
8922
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
8878
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8923
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-raw.md
|
|
8879
8924
|
*/
|
|
8880
8925
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
8881
8926
|
/**
|
|
8882
8927
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
8883
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8928
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-repeat.md
|
|
8884
8929
|
*/
|
|
8885
8930
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
8886
8931
|
/**
|
|
8887
8932
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
8888
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8933
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-replace-all.md
|
|
8889
8934
|
*/
|
|
8890
8935
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
8891
8936
|
/**
|
|
8892
8937
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
8893
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8938
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-slice.md
|
|
8894
8939
|
*/
|
|
8895
8940
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
8896
8941
|
/**
|
|
8897
8942
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
8898
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8943
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
8899
8944
|
*/
|
|
8900
8945
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
8901
8946
|
/**
|
|
8902
8947
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
8903
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8948
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
8904
8949
|
*/
|
|
8905
8950
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
8906
8951
|
/**
|
|
8907
8952
|
* Prefer using `structuredClone` to create a deep clone.
|
|
8908
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8953
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-structured-clone.md
|
|
8909
8954
|
*/
|
|
8910
8955
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
8911
8956
|
/**
|
|
8912
8957
|
* Prefer `switch` over multiple `else-if`.
|
|
8913
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8958
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-switch.md
|
|
8914
8959
|
*/
|
|
8915
8960
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
8916
8961
|
/**
|
|
8917
8962
|
* Prefer `Temporal` over `Date`.
|
|
8918
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8963
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-temporal.md
|
|
8919
8964
|
*/
|
|
8920
8965
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
8921
8966
|
/**
|
|
8922
8967
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
8923
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8968
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-ternary.md
|
|
8924
8969
|
*/
|
|
8925
8970
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
8926
8971
|
/**
|
|
8927
8972
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
8928
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8973
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-then-catch.md
|
|
8929
8974
|
*/
|
|
8930
8975
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
8931
8976
|
/**
|
|
8932
8977
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
8933
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8978
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-toggle-attribute.md
|
|
8934
8979
|
*/
|
|
8935
8980
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
8936
8981
|
/**
|
|
8937
8982
|
* Prefer top-level await over top-level promises and async function calls.
|
|
8938
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8983
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-top-level-await.md
|
|
8939
8984
|
*/
|
|
8940
8985
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
8941
8986
|
/**
|
|
8942
8987
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
8943
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8988
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-type-error.md
|
|
8944
8989
|
*/
|
|
8945
8990
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
8946
8991
|
/**
|
|
8947
8992
|
* Require type literals to be last in union types.
|
|
8948
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8993
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-type-literal-last.md
|
|
8949
8994
|
*/
|
|
8950
8995
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
8951
8996
|
/**
|
|
8952
8997
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
8953
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8998
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-uint8array-base64.md
|
|
8954
8999
|
*/
|
|
8955
9000
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
8956
9001
|
/**
|
|
8957
9002
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
8958
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9003
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-unary-minus.md
|
|
8959
9004
|
*/
|
|
8960
9005
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
8961
9006
|
/**
|
|
8962
9007
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
8963
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9008
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
8964
9009
|
*/
|
|
8965
9010
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
8966
9011
|
/**
|
|
8967
9012
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
8968
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9013
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-url-can-parse.md
|
|
8969
9014
|
*/
|
|
8970
9015
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
8971
9016
|
/**
|
|
8972
9017
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
8973
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-url-href.md
|
|
8974
9019
|
*/
|
|
8975
9020
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
8976
9021
|
/**
|
|
8977
9022
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
8978
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9023
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-url-search-parameters.md
|
|
8979
9024
|
*/
|
|
8980
9025
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
8981
9026
|
/**
|
|
8982
9027
|
* Prefer putting the condition in the while statement.
|
|
8983
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9028
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-while-loop-condition.md
|
|
8984
9029
|
*/
|
|
8985
9030
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
8986
9031
|
/**
|
|
8987
9032
|
* Renamed to `unicorn/name-replacements`.
|
|
8988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9033
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
8989
9034
|
* @deprecated
|
|
8990
9035
|
*/
|
|
8991
9036
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
8992
9037
|
/**
|
|
8993
9038
|
* Enforce consistent relative URL style.
|
|
8994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/relative-url-style.md
|
|
8995
9040
|
*/
|
|
8996
9041
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
8997
9042
|
/**
|
|
8998
9043
|
* Enforce using the separator argument with `Array#join()`.
|
|
8999
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-array-join-separator.md
|
|
9000
9045
|
*/
|
|
9001
9046
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
9002
9047
|
/**
|
|
9003
9048
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
9004
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-array-sort-compare.md
|
|
9005
9050
|
*/
|
|
9006
9051
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
9007
9052
|
/**
|
|
9008
9053
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
9009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-css-escape.md
|
|
9010
9055
|
*/
|
|
9011
9056
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
9012
9057
|
/**
|
|
9013
9058
|
* Require configured YAML frontmatter fields.
|
|
9014
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-frontmatter-fields.md
|
|
9015
9060
|
*/
|
|
9016
9061
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
9017
9062
|
/**
|
|
9018
9063
|
* Require non-empty module attributes for imports and exports
|
|
9019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-module-attributes.md
|
|
9020
9065
|
*/
|
|
9021
9066
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
9022
9067
|
/**
|
|
9023
9068
|
* Require non-empty specifier list in import and export statements.
|
|
9024
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-module-specifiers.md
|
|
9025
9070
|
*/
|
|
9026
9071
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
9027
9072
|
/**
|
|
9028
9073
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
9029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
9030
9075
|
*/
|
|
9031
9076
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
9032
9077
|
/**
|
|
9033
9078
|
* Require passive event listeners for high-frequency events.
|
|
9034
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-passive-events.md
|
|
9035
9080
|
*/
|
|
9036
9081
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
9037
9082
|
/**
|
|
9038
9083
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
9039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-post-message-target-origin.md
|
|
9040
9085
|
*/
|
|
9041
9086
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
9042
9087
|
/**
|
|
9043
9088
|
* Require boolean-returning Proxy traps to return booleans.
|
|
9044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
9045
9090
|
*/
|
|
9046
9091
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
9092
|
+
/**
|
|
9093
|
+
* Enforce a consistent style for single-line block comments.
|
|
9094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/single-line-block-comment-style.md
|
|
9095
|
+
*/
|
|
9096
|
+
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
9047
9097
|
/**
|
|
9048
9098
|
* Enforce better string content.
|
|
9049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/string-content.md
|
|
9050
9100
|
*/
|
|
9051
9101
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
9052
9102
|
/**
|
|
9053
9103
|
* Enforce consistent brace style for `case` clauses.
|
|
9054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/switch-case-braces.md
|
|
9055
9105
|
*/
|
|
9056
9106
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
9057
9107
|
/**
|
|
9058
9108
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
9059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/switch-case-break-position.md
|
|
9060
9110
|
*/
|
|
9061
9111
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
9062
9112
|
/**
|
|
9063
9113
|
* Fix whitespace-insensitive template indentation.
|
|
9064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/template-indent.md
|
|
9065
9115
|
*/
|
|
9066
9116
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
9067
9117
|
/**
|
|
9068
9118
|
* Enforce consistent case for text encoding identifiers.
|
|
9069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/text-encoding-identifier-case.md
|
|
9070
9120
|
*/
|
|
9071
9121
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
9072
9122
|
/**
|
|
9073
9123
|
* Require `new` when creating an error.
|
|
9074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/throw-new-error.md
|
|
9075
9125
|
*/
|
|
9076
9126
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
9077
9127
|
/**
|
|
9078
9128
|
* Limit the complexity of `try` blocks.
|
|
9079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/try-complexity.md
|
|
9080
9130
|
*/
|
|
9081
9131
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
9082
9132
|
/**
|
|
@@ -10558,6 +10608,11 @@ interface RuleOptions {
|
|
|
10558
10608
|
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-spacing.html
|
|
10559
10609
|
*/
|
|
10560
10610
|
'yaml/key-spacing'?: Linter.RuleEntry<YamlKeySpacing>;
|
|
10611
|
+
/**
|
|
10612
|
+
* disallow boolean mapping keys
|
|
10613
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-boolean-key.html
|
|
10614
|
+
*/
|
|
10615
|
+
'yaml/no-boolean-key'?: Linter.RuleEntry<[]>;
|
|
10561
10616
|
/**
|
|
10562
10617
|
* disallow empty document
|
|
10563
10618
|
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-document.html
|
|
@@ -11279,12 +11334,16 @@ type JsdocCheckLineAlignment = [] | [("always" | "never" | "any")] | [("always"
|
|
|
11279
11334
|
// ----- jsdoc/check-param-names -----
|
|
11280
11335
|
type JsdocCheckParamNames = [] | [{
|
|
11281
11336
|
allowExtraTrailingParamDocs?: boolean;
|
|
11337
|
+
badParamNames?: boolean;
|
|
11338
|
+
badParamOrder?: boolean;
|
|
11282
11339
|
checkDestructured?: boolean;
|
|
11283
11340
|
checkRestProperty?: boolean;
|
|
11284
11341
|
checkTypesPattern?: string;
|
|
11285
11342
|
disableExtraPropertyReporting?: boolean;
|
|
11286
11343
|
disableMissingParamChecks?: boolean;
|
|
11344
|
+
duplicateParams?: boolean;
|
|
11287
11345
|
enableFixer?: boolean;
|
|
11346
|
+
extraParams?: boolean;
|
|
11288
11347
|
useDefaultObjectProperties?: boolean;
|
|
11289
11348
|
}];
|
|
11290
11349
|
// ----- jsdoc/check-property-names -----
|
|
@@ -12014,15 +12073,19 @@ type JsoncSortKeys = ([{
|
|
|
12014
12073
|
hasProperties?: string[];
|
|
12015
12074
|
order: ((string | {
|
|
12016
12075
|
keyPattern?: string;
|
|
12017
|
-
order?: {
|
|
12076
|
+
order?: ({
|
|
12018
12077
|
type?: ("asc" | "desc");
|
|
12019
12078
|
caseSensitive?: boolean;
|
|
12020
12079
|
natural?: boolean;
|
|
12021
|
-
}
|
|
12080
|
+
} | {
|
|
12081
|
+
type: "ignore";
|
|
12082
|
+
});
|
|
12022
12083
|
})[] | {
|
|
12023
12084
|
type?: ("asc" | "desc");
|
|
12024
12085
|
caseSensitive?: boolean;
|
|
12025
12086
|
natural?: boolean;
|
|
12087
|
+
} | {
|
|
12088
|
+
type: "ignore";
|
|
12026
12089
|
});
|
|
12027
12090
|
minKeys?: number;
|
|
12028
12091
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -12031,15 +12094,19 @@ type JsoncSortKeys = ([{
|
|
|
12031
12094
|
hasProperties?: string[];
|
|
12032
12095
|
order: ((string | {
|
|
12033
12096
|
keyPattern?: string;
|
|
12034
|
-
order?: {
|
|
12097
|
+
order?: ({
|
|
12035
12098
|
type?: ("asc" | "desc");
|
|
12036
12099
|
caseSensitive?: boolean;
|
|
12037
12100
|
natural?: boolean;
|
|
12038
|
-
}
|
|
12101
|
+
} | {
|
|
12102
|
+
type: "ignore";
|
|
12103
|
+
});
|
|
12039
12104
|
})[] | {
|
|
12040
12105
|
type?: ("asc" | "desc");
|
|
12041
12106
|
caseSensitive?: boolean;
|
|
12042
12107
|
natural?: boolean;
|
|
12108
|
+
} | {
|
|
12109
|
+
type: "ignore";
|
|
12043
12110
|
});
|
|
12044
12111
|
minKeys?: number;
|
|
12045
12112
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -13496,6 +13563,10 @@ type NodePreferGlobalUrlSearchParams = [] | [("always" | "never")];
|
|
|
13496
13563
|
type NodePreferNodeProtocol = [] | [{
|
|
13497
13564
|
version?: string;
|
|
13498
13565
|
}];
|
|
13566
|
+
// ----- node/prefer-process-get-builtin-module -----
|
|
13567
|
+
type NodePreferProcessGetBuiltinModule = [] | [{
|
|
13568
|
+
version?: string;
|
|
13569
|
+
}];
|
|
13499
13570
|
// ----- node/shebang -----
|
|
13500
13571
|
type NodeShebang = [] | [{
|
|
13501
13572
|
convertPath?: ({
|
|
@@ -16668,7 +16739,6 @@ type SolidEventHandlers = [] | [{
|
|
|
16668
16739
|
// ----- solid/jsx-no-duplicate-props -----
|
|
16669
16740
|
type SolidJsxNoDuplicateProps = [] | [{
|
|
16670
16741
|
ignoreCase?: boolean;
|
|
16671
|
-
[k: string]: unknown | undefined;
|
|
16672
16742
|
}];
|
|
16673
16743
|
// ----- solid/jsx-no-undef -----
|
|
16674
16744
|
type SolidJsxNoUndef = [] | [{
|
|
@@ -19485,7 +19555,9 @@ type UnicodeBom = [] | [("always" | "never")];
|
|
|
19485
19555
|
// ----- unicorn/catch-error-name -----
|
|
19486
19556
|
type UnicornCatchErrorName = [] | [{
|
|
19487
19557
|
name?: string;
|
|
19488
|
-
ignore?:
|
|
19558
|
+
ignore?: (string | {
|
|
19559
|
+
[k: string]: unknown | undefined;
|
|
19560
|
+
})[];
|
|
19489
19561
|
}];
|
|
19490
19562
|
// ----- unicorn/class-reference-in-static-methods -----
|
|
19491
19563
|
type UnicornClassReferenceInStaticMethods = [] | [{
|
|
@@ -19505,11 +19577,19 @@ type UnicornCommentContent = [] | [{
|
|
|
19505
19577
|
}];
|
|
19506
19578
|
// ----- unicorn/consistent-boolean-name -----
|
|
19507
19579
|
type UnicornConsistentBooleanName = [] | [{
|
|
19508
|
-
|
|
19580
|
+
checkVariables?: ("always" | "prohibit" | "never");
|
|
19581
|
+
checkArguments?: ("always" | "prohibit" | "never");
|
|
19582
|
+
checkFunctions?: ("always" | "prohibit" | "never");
|
|
19583
|
+
checkMethods?: ("always" | "prohibit" | "never");
|
|
19584
|
+
checkFields?: ("always" | "prohibit" | "never");
|
|
19509
19585
|
prefixes?: {
|
|
19510
19586
|
[k: string]: boolean | undefined;
|
|
19511
19587
|
};
|
|
19588
|
+
wrappers?: {
|
|
19589
|
+
[k: string]: string | undefined;
|
|
19590
|
+
};
|
|
19512
19591
|
ignore?: unknown[];
|
|
19592
|
+
[k: string]: unknown;
|
|
19513
19593
|
}];
|
|
19514
19594
|
// ----- unicorn/consistent-class-member-order -----
|
|
19515
19595
|
type UnicornConsistentClassMemberOrder = [] | [{
|
|
@@ -19543,6 +19623,7 @@ type UnicornConsistentFunctionScoping = [] | [{
|
|
|
19543
19623
|
// ----- unicorn/consistent-function-style -----
|
|
19544
19624
|
type UnicornConsistentFunctionStyle = [] | [{
|
|
19545
19625
|
default?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
19626
|
+
defaultExport?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
19546
19627
|
namedFunctions?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
19547
19628
|
namedExports?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
19548
19629
|
callbacks?: ("function-expression" | "arrow-function" | "ignore");
|
|
@@ -19566,7 +19647,9 @@ type UnicornEscapeCase = [] | [("uppercase" | "lowercase")];
|
|
|
19566
19647
|
// ----- unicorn/expiring-todo-comments -----
|
|
19567
19648
|
type UnicornExpiringTodoComments = [] | [{
|
|
19568
19649
|
terms?: string[];
|
|
19569
|
-
ignore?:
|
|
19650
|
+
ignore?: (string | {
|
|
19651
|
+
[k: string]: unknown | undefined;
|
|
19652
|
+
})[];
|
|
19570
19653
|
checkDates?: boolean;
|
|
19571
19654
|
checkDatesOnPullRequests?: boolean;
|
|
19572
19655
|
allowWarningComments?: boolean;
|
|
@@ -19581,7 +19664,9 @@ type UnicornExplicitTimerDelay = [] | [("always" | "never")];
|
|
|
19581
19664
|
// ----- unicorn/filename-case -----
|
|
19582
19665
|
type UnicornFilenameCase = [] | [({
|
|
19583
19666
|
case?: ("camelCase" | "camelCaseWithAcronyms" | "snakeCase" | "kebabCase" | "pascalCase");
|
|
19584
|
-
ignore?:
|
|
19667
|
+
ignore?: (string | {
|
|
19668
|
+
[k: string]: unknown | undefined;
|
|
19669
|
+
})[];
|
|
19585
19670
|
multipleFileExtensions?: boolean;
|
|
19586
19671
|
checkDirectories?: boolean;
|
|
19587
19672
|
} | {
|
|
@@ -19592,7 +19677,9 @@ type UnicornFilenameCase = [] | [({
|
|
|
19592
19677
|
kebabCase?: boolean;
|
|
19593
19678
|
pascalCase?: boolean;
|
|
19594
19679
|
};
|
|
19595
|
-
ignore?:
|
|
19680
|
+
ignore?: (string | {
|
|
19681
|
+
[k: string]: unknown | undefined;
|
|
19682
|
+
})[];
|
|
19596
19683
|
multipleFileExtensions?: boolean;
|
|
19597
19684
|
checkDirectories?: boolean;
|
|
19598
19685
|
})];
|
|
@@ -19629,6 +19716,8 @@ type UnicornIsolatedFunctions = [] | [{
|
|
|
19629
19716
|
selectors?: string[];
|
|
19630
19717
|
comments?: string[];
|
|
19631
19718
|
}];
|
|
19719
|
+
// ----- unicorn/iteration-fallback-style -----
|
|
19720
|
+
type UnicornIterationFallbackStyle = [] | [("guard" | "fallback")];
|
|
19632
19721
|
// ----- unicorn/logical-assignment-operators -----
|
|
19633
19722
|
type UnicornLogicalAssignmentOperators = (([] | ["always"] | ["always", {
|
|
19634
19723
|
enforceForIfStatements?: boolean;
|
|
@@ -19649,7 +19738,9 @@ type UnicornNameReplacements = [] | [{
|
|
|
19649
19738
|
replacements?: _UnicornNameReplacements_NameReplacements;
|
|
19650
19739
|
extendDefaultAllowList?: boolean;
|
|
19651
19740
|
allowList?: _UnicornNameReplacements_BooleanObject;
|
|
19652
|
-
ignore?:
|
|
19741
|
+
ignore?: (string | {
|
|
19742
|
+
[k: string]: unknown | undefined;
|
|
19743
|
+
})[];
|
|
19653
19744
|
}];
|
|
19654
19745
|
type _UnicornNameReplacementsReplacements = (false | _UnicornNameReplacements_BooleanObject) | undefined;
|
|
19655
19746
|
interface _UnicornNameReplacements_NameReplacements {
|
|
@@ -19697,7 +19788,7 @@ type UnicornNoInvalidArgumentCount = [] | [{
|
|
|
19697
19788
|
}];
|
|
19698
19789
|
// ----- unicorn/no-keyword-prefix -----
|
|
19699
19790
|
type UnicornNoKeywordPrefix = [] | [{
|
|
19700
|
-
disallowedPrefixes?: []
|
|
19791
|
+
disallowedPrefixes?: string[];
|
|
19701
19792
|
checkProperties?: boolean;
|
|
19702
19793
|
onlyCamelCase?: boolean;
|
|
19703
19794
|
}];
|
|
@@ -19708,7 +19799,9 @@ type UnicornNoNegatedComparison = [] | [{
|
|
|
19708
19799
|
// ----- unicorn/no-non-function-verb-prefix -----
|
|
19709
19800
|
type UnicornNoNonFunctionVerbPrefix = [] | [{
|
|
19710
19801
|
verbs?: string[];
|
|
19711
|
-
ignore?:
|
|
19802
|
+
ignore?: (string | {
|
|
19803
|
+
[k: string]: unknown | undefined;
|
|
19804
|
+
})[];
|
|
19712
19805
|
}];
|
|
19713
19806
|
// ----- unicorn/no-null -----
|
|
19714
19807
|
type UnicornNoNull = [] | [{
|
|
@@ -19721,7 +19814,7 @@ type UnicornNoTypeofUndefined = [] | [{
|
|
|
19721
19814
|
}];
|
|
19722
19815
|
// ----- unicorn/no-unnecessary-polyfills -----
|
|
19723
19816
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
19724
|
-
targets?: (string |
|
|
19817
|
+
targets?: (string | string[] | {
|
|
19725
19818
|
[k: string]: unknown | undefined;
|
|
19726
19819
|
});
|
|
19727
19820
|
}];
|
|
@@ -19775,11 +19868,11 @@ type UnicornPreferArrayFind = [] | [{
|
|
|
19775
19868
|
}];
|
|
19776
19869
|
// ----- unicorn/prefer-array-flat -----
|
|
19777
19870
|
type UnicornPreferArrayFlat = [] | [{
|
|
19778
|
-
functions?:
|
|
19871
|
+
functions?: string[];
|
|
19779
19872
|
}];
|
|
19780
19873
|
// ----- unicorn/prefer-at -----
|
|
19781
19874
|
type UnicornPreferAt = [] | [{
|
|
19782
|
-
getLastElementFunctions?:
|
|
19875
|
+
getLastElementFunctions?: string[];
|
|
19783
19876
|
checkAllIndexAccess?: boolean;
|
|
19784
19877
|
}];
|
|
19785
19878
|
// ----- unicorn/prefer-continue -----
|
|
@@ -19803,6 +19896,12 @@ type UnicornPreferExplicitViewportUnits = [] | [{
|
|
|
19803
19896
|
type UnicornPreferExportFrom = [] | [{
|
|
19804
19897
|
checkUsedVariables?: boolean;
|
|
19805
19898
|
}];
|
|
19899
|
+
// ----- unicorn/prefer-https -----
|
|
19900
|
+
type UnicornPreferHttps = [] | [{
|
|
19901
|
+
ignore?: (string | {
|
|
19902
|
+
[k: string]: unknown | undefined;
|
|
19903
|
+
})[];
|
|
19904
|
+
}];
|
|
19806
19905
|
// ----- unicorn/prefer-includes-over-repeated-comparisons -----
|
|
19807
19906
|
type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
19808
19907
|
minimumComparisons?: number;
|
|
@@ -19819,7 +19918,7 @@ type UnicornPreferNumberProperties = [] | [{
|
|
|
19819
19918
|
}];
|
|
19820
19919
|
// ----- unicorn/prefer-object-from-entries -----
|
|
19821
19920
|
type UnicornPreferObjectFromEntries = [] | [{
|
|
19822
|
-
functions?:
|
|
19921
|
+
functions?: string[];
|
|
19823
19922
|
}];
|
|
19824
19923
|
// ----- unicorn/prefer-query-selector -----
|
|
19825
19924
|
type UnicornPreferQuerySelector = [] | [{
|
|
@@ -19838,7 +19937,7 @@ type UnicornPreferSetHas = [] | [{
|
|
|
19838
19937
|
type UnicornPreferShortArrowMethod = [] | [("always" | "consistent-as-needed")];
|
|
19839
19938
|
// ----- unicorn/prefer-single-call -----
|
|
19840
19939
|
type UnicornPreferSingleCall = [] | [{
|
|
19841
|
-
ignore?:
|
|
19940
|
+
ignore?: string[];
|
|
19842
19941
|
}];
|
|
19843
19942
|
// ----- unicorn/prefer-string-repeat -----
|
|
19844
19943
|
type UnicornPreferStringRepeat = [] | [{
|
|
@@ -19846,7 +19945,7 @@ type UnicornPreferStringRepeat = [] | [{
|
|
|
19846
19945
|
}];
|
|
19847
19946
|
// ----- unicorn/prefer-structured-clone -----
|
|
19848
19947
|
type UnicornPreferStructuredClone = [] | [{
|
|
19849
|
-
functions?:
|
|
19948
|
+
functions?: string[];
|
|
19850
19949
|
}];
|
|
19851
19950
|
// ----- unicorn/prefer-switch -----
|
|
19852
19951
|
type UnicornPreferSwitch = [] | [{
|
|
@@ -19871,6 +19970,12 @@ type UnicornRequireCssEscape = [] | [{
|
|
|
19871
19970
|
type UnicornRequireFrontmatterFields = [] | [{
|
|
19872
19971
|
fields?: string[];
|
|
19873
19972
|
}];
|
|
19973
|
+
// ----- unicorn/single-line-block-comment-style -----
|
|
19974
|
+
type UnicornSingleLineBlockCommentStyle = [] | [("multiline" | "single-line")] | [("multiline" | "single-line"), {
|
|
19975
|
+
ignore?: (string | {
|
|
19976
|
+
[k: string]: unknown | undefined;
|
|
19977
|
+
})[];
|
|
19978
|
+
}];
|
|
19874
19979
|
// ----- unicorn/string-content -----
|
|
19875
19980
|
type UnicornStringContent = [] | [{
|
|
19876
19981
|
patterns?: {
|
|
@@ -21444,15 +21549,19 @@ type YamlSortKeys = ([{
|
|
|
21444
21549
|
hasProperties?: string[];
|
|
21445
21550
|
order: ((string | {
|
|
21446
21551
|
keyPattern?: string;
|
|
21447
|
-
order?: {
|
|
21552
|
+
order?: ({
|
|
21448
21553
|
type?: ("asc" | "desc");
|
|
21449
21554
|
caseSensitive?: boolean;
|
|
21450
21555
|
natural?: boolean;
|
|
21451
|
-
}
|
|
21556
|
+
} | {
|
|
21557
|
+
type: "ignore";
|
|
21558
|
+
});
|
|
21452
21559
|
})[] | {
|
|
21453
21560
|
type?: ("asc" | "desc");
|
|
21454
21561
|
caseSensitive?: boolean;
|
|
21455
21562
|
natural?: boolean;
|
|
21563
|
+
} | {
|
|
21564
|
+
type: "ignore";
|
|
21456
21565
|
});
|
|
21457
21566
|
minKeys?: number;
|
|
21458
21567
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -21461,15 +21570,19 @@ type YamlSortKeys = ([{
|
|
|
21461
21570
|
hasProperties?: string[];
|
|
21462
21571
|
order: ((string | {
|
|
21463
21572
|
keyPattern?: string;
|
|
21464
|
-
order?: {
|
|
21573
|
+
order?: ({
|
|
21465
21574
|
type?: ("asc" | "desc");
|
|
21466
21575
|
caseSensitive?: boolean;
|
|
21467
21576
|
natural?: boolean;
|
|
21468
|
-
}
|
|
21577
|
+
} | {
|
|
21578
|
+
type: "ignore";
|
|
21579
|
+
});
|
|
21469
21580
|
})[] | {
|
|
21470
21581
|
type?: ("asc" | "desc");
|
|
21471
21582
|
caseSensitive?: boolean;
|
|
21472
21583
|
natural?: boolean;
|
|
21584
|
+
} | {
|
|
21585
|
+
type: "ignore";
|
|
21473
21586
|
});
|
|
21474
21587
|
minKeys?: number;
|
|
21475
21588
|
allowLineSeparatedGroups?: boolean;
|