@2digits/eslint-config 5.6.4 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +381 -348
- package/dist/index.mjs +1 -1
- package/package.json +20 -20
package/dist/index.d.mts
CHANGED
|
@@ -513,7 +513,7 @@ interface RuleOptions {
|
|
|
513
513
|
* disallow using top-level permissions.
|
|
514
514
|
* @see https://eslint-plugin-github-action.ntnyq.com/rules/no-top-level-permissions.html
|
|
515
515
|
*/
|
|
516
|
-
'github-action/no-top-level-permissions'?: Linter.RuleEntry<
|
|
516
|
+
'github-action/no-top-level-permissions'?: Linter.RuleEntry<GithubActionNoTopLevelPermissions>;
|
|
517
517
|
/**
|
|
518
518
|
* disallow unpinned uses references.
|
|
519
519
|
* @see https://eslint-plugin-github-action.ntnyq.com/rules/no-unpinned-uses.html
|
|
@@ -524,6 +524,11 @@ interface RuleOptions {
|
|
|
524
524
|
* @see https://eslint-plugin-github-action.ntnyq.com/rules/prefer-cancel-in-progress.html
|
|
525
525
|
*/
|
|
526
526
|
'github-action/prefer-cancel-in-progress'?: Linter.RuleEntry<[]>;
|
|
527
|
+
/**
|
|
528
|
+
* disallow setting fail-fast to false.
|
|
529
|
+
* @see https://eslint-plugin-github-action.ntnyq.com/rules/prefer-fail-fast.html
|
|
530
|
+
*/
|
|
531
|
+
'github-action/prefer-fail-fast'?: Linter.RuleEntry<[]>;
|
|
527
532
|
/**
|
|
528
533
|
* enforce workflow file extension.
|
|
529
534
|
* @see https://eslint-plugin-github-action.ntnyq.com/rules/prefer-file-extension.html
|
|
@@ -1173,6 +1178,10 @@ Backward pagination arguments
|
|
|
1173
1178
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-undefined-types.md#repos-sticky-header
|
|
1174
1179
|
*/
|
|
1175
1180
|
'jsdoc/no-undefined-types'?: Linter.RuleEntry<JsdocNoUndefinedTypes>;
|
|
1181
|
+
/**
|
|
1182
|
+
* Reports redundant @type tags that match or broaden the naturally inferred TypeScript type.
|
|
1183
|
+
*/
|
|
1184
|
+
'jsdoc/no-unnecessary-type-assertion'?: Linter.RuleEntry<JsdocNoUnnecessaryTypeAssertion>;
|
|
1176
1185
|
/**
|
|
1177
1186
|
* Normalizes labeled links in `@see` tags to a canonical `{@link}` form.
|
|
1178
1187
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/normalize-see-links.md#repos-sticky-header
|
|
@@ -3084,6 +3093,11 @@ Backward pagination arguments
|
|
|
3084
3093
|
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/json/json-valid-catalog.test.ts
|
|
3085
3094
|
*/
|
|
3086
3095
|
'pnpm/json-valid-catalog'?: Linter.RuleEntry<PnpmJsonValidCatalog>;
|
|
3096
|
+
/**
|
|
3097
|
+
* Require blank lines around multi-line entries in `pnpm-workspace.yaml`, and disallow them between single-line entries
|
|
3098
|
+
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-blank-lines.test.ts
|
|
3099
|
+
*/
|
|
3100
|
+
'pnpm/yaml-blank-lines'?: Linter.RuleEntry<[]>;
|
|
3087
3101
|
/**
|
|
3088
3102
|
* Enforce settings in `pnpm-workspace.yaml`
|
|
3089
3103
|
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-enforce-settings.test.ts
|
|
@@ -7321,1740 +7335,1740 @@ Backward pagination arguments
|
|
|
7321
7335
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
7322
7336
|
/**
|
|
7323
7337
|
* Prefer better DOM traversal APIs.
|
|
7324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/better-dom-traversing.md
|
|
7325
7339
|
*/
|
|
7326
7340
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
7327
7341
|
/**
|
|
7328
7342
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
7329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
7330
7344
|
* @deprecated
|
|
7331
7345
|
*/
|
|
7332
7346
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
7333
7347
|
/**
|
|
7334
7348
|
* Enforce a specific parameter name in catch clauses.
|
|
7335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/catch-error-name.md
|
|
7336
7350
|
*/
|
|
7337
7351
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
7338
7352
|
/**
|
|
7339
7353
|
* Enforce consistent class references in static methods.
|
|
7340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7354
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/class-reference-in-static-methods.md
|
|
7341
7355
|
*/
|
|
7342
7356
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
7343
7357
|
/**
|
|
7344
7358
|
* Enforce better comment content.
|
|
7345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/comment-content.md
|
|
7346
7360
|
*/
|
|
7347
7361
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
7348
7362
|
/**
|
|
7349
7363
|
* Enforce a consistent return style for multiline arrow function bodies.
|
|
7350
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-arrow-return-style.md
|
|
7351
7365
|
*/
|
|
7352
7366
|
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
7353
7367
|
/**
|
|
7354
7368
|
* Enforce consistent assertion style with `node:assert`.
|
|
7355
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-assert.md
|
|
7356
7370
|
*/
|
|
7357
7371
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
7358
7372
|
/**
|
|
7359
7373
|
* Enforce consistent naming for boolean names.
|
|
7360
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-boolean-name.md
|
|
7361
7375
|
*/
|
|
7362
7376
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
7363
7377
|
/**
|
|
7364
7378
|
* Enforce consistent class member order.
|
|
7365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-class-member-order.md
|
|
7366
7380
|
*/
|
|
7367
7381
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
7368
7382
|
/**
|
|
7369
7383
|
* Enforce consistent spelling of compound words in identifiers.
|
|
7370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7384
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-compound-words.md
|
|
7371
7385
|
*/
|
|
7372
7386
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
7373
7387
|
/**
|
|
7374
7388
|
* Enforce consistent conditional object spread style.
|
|
7375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
7376
7390
|
*/
|
|
7377
7391
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
7378
7392
|
/**
|
|
7379
7393
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
7380
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7394
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-date-clone.md
|
|
7381
7395
|
*/
|
|
7382
7396
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
7383
7397
|
/**
|
|
7384
7398
|
* Use destructured variables over properties.
|
|
7385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-destructuring.md
|
|
7386
7400
|
*/
|
|
7387
7401
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
7388
7402
|
/**
|
|
7389
7403
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
7390
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7404
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-empty-array-spread.md
|
|
7391
7405
|
*/
|
|
7392
7406
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
7393
7407
|
/**
|
|
7394
7408
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
7395
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7409
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-existence-index-check.md
|
|
7396
7410
|
*/
|
|
7397
7411
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
7398
7412
|
/**
|
|
7399
7413
|
* Enforce consistent decorator position on exported classes.
|
|
7400
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7414
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-export-decorator-position.md
|
|
7401
7415
|
*/
|
|
7402
7416
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
7403
7417
|
/**
|
|
7404
7418
|
* Move function definitions to the highest possible scope.
|
|
7405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-function-scoping.md
|
|
7406
7420
|
*/
|
|
7407
7421
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
7408
7422
|
/**
|
|
7409
7423
|
* Enforce function syntax by role.
|
|
7410
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-function-style.md
|
|
7411
7425
|
*/
|
|
7412
7426
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
7413
7427
|
/**
|
|
7414
7428
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
7415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-json-file-read.md
|
|
7416
7430
|
*/
|
|
7417
7431
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
7418
7432
|
/**
|
|
7419
7433
|
* Enforce consistent optional chaining for same-base member access.
|
|
7420
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-optional-chaining.md
|
|
7421
7435
|
*/
|
|
7422
7436
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
7423
7437
|
/**
|
|
7424
7438
|
* Enforce consistent style for escaping `${` in template literals.
|
|
7425
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-template-literal-escape.md
|
|
7426
7440
|
*/
|
|
7427
7441
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
7428
7442
|
/**
|
|
7429
7443
|
* Enforce consistent labels on tuple type elements.
|
|
7430
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-tuple-labels.md
|
|
7431
7445
|
*/
|
|
7432
7446
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
7433
7447
|
/**
|
|
7434
7448
|
* Enforce correct `Error` subclassing.
|
|
7435
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/custom-error-definition.md
|
|
7436
7450
|
*/
|
|
7437
7451
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
7438
7452
|
/**
|
|
7439
7453
|
* Enforce consistent default export declarations.
|
|
7440
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/default-export-style.md
|
|
7441
7455
|
*/
|
|
7442
7456
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
7443
7457
|
/**
|
|
7444
7458
|
* Enforce consistent style for DOM element dataset access.
|
|
7445
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/dom-node-dataset.md
|
|
7446
7460
|
*/
|
|
7447
7461
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
7448
7462
|
/**
|
|
7449
7463
|
* Enforce no spaces between braces.
|
|
7450
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/empty-brace-spaces.md
|
|
7451
7465
|
*/
|
|
7452
7466
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
7453
7467
|
/**
|
|
7454
7468
|
* Enforce passing a `message` value when creating a built-in error.
|
|
7455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/error-message.md
|
|
7456
7470
|
*/
|
|
7457
7471
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
7458
7472
|
/**
|
|
7459
7473
|
* Require escape sequences to use uppercase or lowercase values.
|
|
7460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/escape-case.md
|
|
7461
7475
|
*/
|
|
7462
7476
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
7463
7477
|
/**
|
|
7464
7478
|
* Add expiration conditions to TODO comments.
|
|
7465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/expiring-todo-comments.md
|
|
7466
7480
|
*/
|
|
7467
7481
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
7468
7482
|
/**
|
|
7469
7483
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
7470
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/explicit-length-check.md
|
|
7471
7485
|
*/
|
|
7472
7486
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
7473
7487
|
/**
|
|
7474
7488
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
7475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/explicit-timer-delay.md
|
|
7476
7490
|
*/
|
|
7477
7491
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
7478
7492
|
/**
|
|
7479
7493
|
* Enforce a case style for filenames and directory names.
|
|
7480
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/filename-case.md
|
|
7481
7495
|
*/
|
|
7482
7496
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
7483
7497
|
/**
|
|
7484
7498
|
* Require identifiers to match a specified regular expression.
|
|
7485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/id-match.md
|
|
7486
7500
|
*/
|
|
7487
7501
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
7488
7502
|
/**
|
|
7489
7503
|
* Enforce specific import styles per module.
|
|
7490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/import-style.md
|
|
7491
7505
|
*/
|
|
7492
7506
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
7493
7507
|
/**
|
|
7494
7508
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
7495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/isolated-functions.md
|
|
7496
7510
|
*/
|
|
7497
7511
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
7498
7512
|
/**
|
|
7499
7513
|
* Enforce a consistent style for optional loop sources.
|
|
7500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/iteration-fallback-style.md
|
|
7501
7515
|
*/
|
|
7502
7516
|
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
7503
7517
|
/**
|
|
7504
7518
|
* Require or disallow logical assignment operator shorthand
|
|
7505
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/logical-assignment-operators.md
|
|
7506
7520
|
*/
|
|
7507
7521
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
7508
7522
|
/**
|
|
7509
7523
|
* Limit the depth of nested calls.
|
|
7510
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/max-nested-calls.md
|
|
7511
7525
|
*/
|
|
7512
7526
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
7513
7527
|
/**
|
|
7514
7528
|
* Enforce replacements for variable, property, and filenames.
|
|
7515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/name-replacements.md
|
|
7516
7530
|
*/
|
|
7517
7531
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
7518
7532
|
/**
|
|
7519
7533
|
* Enforce correct use of `new` for builtin constructors.
|
|
7520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/new-for-builtins.md
|
|
7521
7535
|
*/
|
|
7522
7536
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
7523
7537
|
/**
|
|
7524
7538
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
7525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
7526
7540
|
*/
|
|
7527
7541
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
7528
7542
|
/**
|
|
7529
7543
|
* Disallow recursive access to `this` within getters and setters.
|
|
7530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-accessor-recursion.md
|
|
7531
7545
|
*/
|
|
7532
7546
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
7533
7547
|
/**
|
|
7534
7548
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
7535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
7536
7550
|
*/
|
|
7537
7551
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
7538
7552
|
/**
|
|
7539
7553
|
* Disallow anonymous functions and classes as the default export.
|
|
7540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-anonymous-default-export.md
|
|
7541
7555
|
*/
|
|
7542
7556
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
7543
7557
|
/**
|
|
7544
7558
|
* Prevent passing a function reference directly to iterator methods.
|
|
7545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-callback-reference.md
|
|
7546
7560
|
*/
|
|
7547
7561
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
7548
7562
|
/**
|
|
7549
7563
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
7550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-concat-in-loop.md
|
|
7551
7565
|
*/
|
|
7552
7566
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
7553
7567
|
/**
|
|
7554
7568
|
* Disallow using reference values as `Array#fill()` values.
|
|
7555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
7556
7570
|
*/
|
|
7557
7571
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
7558
7572
|
/**
|
|
7559
7573
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
7560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-from-fill.md
|
|
7561
7575
|
*/
|
|
7562
7576
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
7563
7577
|
/**
|
|
7564
7578
|
* Disallow front-of-array mutation.
|
|
7565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-front-mutation.md
|
|
7566
7580
|
*/
|
|
7567
7581
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
7568
7582
|
/**
|
|
7569
7583
|
* Disallow using the `this` argument in array methods.
|
|
7570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-method-this-argument.md
|
|
7571
7585
|
*/
|
|
7572
7586
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
7573
7587
|
/**
|
|
7574
7588
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
7575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
7576
7590
|
* @deprecated
|
|
7577
7591
|
*/
|
|
7578
7592
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
7579
7593
|
/**
|
|
7580
7594
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
7581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7595
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-reduce.md
|
|
7582
7596
|
*/
|
|
7583
7597
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
7584
7598
|
/**
|
|
7585
7599
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
7586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-reverse.md
|
|
7587
7601
|
*/
|
|
7588
7602
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
7589
7603
|
/**
|
|
7590
7604
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
7591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-sort.md
|
|
7592
7606
|
*/
|
|
7593
7607
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
7594
7608
|
/**
|
|
7595
7609
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
7596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
7597
7611
|
*/
|
|
7598
7612
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
7599
7613
|
/**
|
|
7600
7614
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
7601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-splice.md
|
|
7602
7616
|
*/
|
|
7603
7617
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
7604
7618
|
/**
|
|
7605
7619
|
* Disallow asterisk prefixes in documentation comments.
|
|
7606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
7607
7621
|
*/
|
|
7608
7622
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
7609
7623
|
/**
|
|
7610
7624
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
7611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-async-promise-finally.md
|
|
7612
7626
|
*/
|
|
7613
7627
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
7614
7628
|
/**
|
|
7615
7629
|
* Disallow member access from await expression.
|
|
7616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-await-expression-member.md
|
|
7617
7631
|
*/
|
|
7618
7632
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
7619
7633
|
/**
|
|
7620
7634
|
* Disallow using `await` in `Promise` method parameters.
|
|
7621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-await-in-promise-methods.md
|
|
7622
7636
|
*/
|
|
7623
7637
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7624
7638
|
/**
|
|
7625
7639
|
* Disallow barrel files.
|
|
7626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7640
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-barrel-files.md
|
|
7627
7641
|
*/
|
|
7628
7642
|
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
7629
7643
|
/**
|
|
7630
7644
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
7631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7645
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-blob-to-file.md
|
|
7632
7646
|
*/
|
|
7633
7647
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
7634
7648
|
/**
|
|
7635
7649
|
* Disallow boolean-returning sort comparators.
|
|
7636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
7637
7651
|
*/
|
|
7638
7652
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7639
7653
|
/**
|
|
7640
7654
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
7641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-break-in-nested-loop.md
|
|
7642
7656
|
*/
|
|
7643
7657
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
7644
7658
|
/**
|
|
7645
7659
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
7646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-canvas-to-image.md
|
|
7647
7661
|
*/
|
|
7648
7662
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
7649
7663
|
/**
|
|
7650
7664
|
* Disallow chained comparisons such as `a < b < c`.
|
|
7651
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-chained-comparison.md
|
|
7652
7666
|
*/
|
|
7653
7667
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
7654
7668
|
/**
|
|
7655
7669
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
7656
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-collection-bracket-access.md
|
|
7657
7671
|
*/
|
|
7658
7672
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
7659
7673
|
/**
|
|
7660
7674
|
* Disallow dynamic object property existence checks.
|
|
7661
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-computed-property-existence-check.md
|
|
7662
7676
|
*/
|
|
7663
7677
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
7664
7678
|
/**
|
|
7665
7679
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
7666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-confusing-array-splice.md
|
|
7667
7681
|
*/
|
|
7668
7682
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
7669
7683
|
/**
|
|
7670
7684
|
* Disallow confusing uses of `Array#with()`.
|
|
7671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-confusing-array-with.md
|
|
7672
7686
|
*/
|
|
7673
7687
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
7674
7688
|
/**
|
|
7675
7689
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
7676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-console-spaces.md
|
|
7677
7691
|
*/
|
|
7678
7692
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
7679
7693
|
/**
|
|
7680
7694
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
7681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-constant-zero-expression.md
|
|
7682
7696
|
*/
|
|
7683
7697
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
7684
7698
|
/**
|
|
7685
7699
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
7686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
7687
7701
|
*/
|
|
7688
7702
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
7689
7703
|
/**
|
|
7690
7704
|
* Do not use `document.cookie` directly.
|
|
7691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-document-cookie.md
|
|
7692
7706
|
*/
|
|
7693
7707
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
7694
7708
|
/**
|
|
7695
7709
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
7696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-double-comparison.md
|
|
7697
7711
|
*/
|
|
7698
7712
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
7699
7713
|
/**
|
|
7700
7714
|
* Disallow duplicate adjacent branches in if chains.
|
|
7701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-if-branches.md
|
|
7702
7716
|
*/
|
|
7703
7717
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
7704
7718
|
/**
|
|
7705
7719
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
7706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
7707
7721
|
*/
|
|
7708
7722
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
7709
7723
|
/**
|
|
7710
7724
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
7711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-loops.md
|
|
7712
7726
|
*/
|
|
7713
7727
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
7714
7728
|
/**
|
|
7715
7729
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
7716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-set-values.md
|
|
7717
7731
|
*/
|
|
7718
7732
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
7719
7733
|
/**
|
|
7720
7734
|
* Disallow empty files.
|
|
7721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-empty-file.md
|
|
7722
7736
|
*/
|
|
7723
7737
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
7724
7738
|
/**
|
|
7725
7739
|
* Disallow assigning to built-in error properties.
|
|
7726
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-error-property-assignment.md
|
|
7727
7741
|
*/
|
|
7728
7742
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7729
7743
|
/**
|
|
7730
7744
|
* Disallow exports in scripts.
|
|
7731
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-exports-in-scripts.md
|
|
7732
7746
|
*/
|
|
7733
7747
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
7734
7748
|
/**
|
|
7735
7749
|
* Prefer `for…of` over the `forEach` method.
|
|
7736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-for-each.md
|
|
7737
7751
|
*/
|
|
7738
7752
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
7739
7753
|
/**
|
|
7740
7754
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
7741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-for-loop.md
|
|
7742
7756
|
*/
|
|
7743
7757
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
7744
7758
|
/**
|
|
7745
7759
|
* Disallow assigning properties on the global object.
|
|
7746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-global-object-property-assignment.md
|
|
7747
7761
|
*/
|
|
7748
7762
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7749
7763
|
/**
|
|
7750
7764
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
7751
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
7752
7766
|
* @deprecated
|
|
7753
7767
|
*/
|
|
7754
7768
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
7755
7769
|
/**
|
|
7756
7770
|
* Disallow immediate mutation after variable assignment.
|
|
7757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-immediate-mutation.md
|
|
7758
7772
|
*/
|
|
7759
7773
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
7760
7774
|
/**
|
|
7761
7775
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
7762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-impossible-length-comparison.md
|
|
7763
7777
|
*/
|
|
7764
7778
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
7765
7779
|
/**
|
|
7766
7780
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
7767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-incorrect-query-selector.md
|
|
7768
7782
|
*/
|
|
7769
7783
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
7770
7784
|
/**
|
|
7771
7785
|
* Disallow incorrect template literal interpolation syntax.
|
|
7772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
7773
7787
|
*/
|
|
7774
7788
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
7775
7789
|
/**
|
|
7776
7790
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
7777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
7778
7792
|
* @deprecated
|
|
7779
7793
|
*/
|
|
7780
7794
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
7781
7795
|
/**
|
|
7782
7796
|
* Disallow `instanceof` with built-in objects
|
|
7783
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-instanceof-builtins.md
|
|
7784
7798
|
*/
|
|
7785
7799
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
7786
7800
|
/**
|
|
7787
7801
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
7788
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-argument-count.md
|
|
7789
7803
|
*/
|
|
7790
7804
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
7791
7805
|
/**
|
|
7792
7806
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
7793
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-character-comparison.md
|
|
7794
7808
|
*/
|
|
7795
7809
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
7796
7810
|
/**
|
|
7797
7811
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
7798
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-fetch-options.md
|
|
7799
7813
|
*/
|
|
7800
7814
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7801
7815
|
/**
|
|
7802
7816
|
* Disallow invalid `accept` values on file inputs.
|
|
7803
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
7804
7818
|
*/
|
|
7805
7819
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
7806
7820
|
/**
|
|
7807
7821
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
7808
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
7809
7823
|
*/
|
|
7810
7824
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
7811
7825
|
/**
|
|
7812
7826
|
* Disallow invalid implementations of well-known symbol methods.
|
|
7813
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
7814
7828
|
*/
|
|
7815
7829
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
7816
7830
|
/**
|
|
7817
7831
|
* Disallow identifiers starting with `new` or `class`.
|
|
7818
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7832
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-keyword-prefix.md
|
|
7819
7833
|
*/
|
|
7820
7834
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
7821
7835
|
/**
|
|
7822
7836
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
7823
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-late-current-target-access.md
|
|
7824
7838
|
*/
|
|
7825
7839
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
7826
7840
|
/**
|
|
7827
7841
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
7828
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-late-event-control.md
|
|
7829
7843
|
*/
|
|
7830
7844
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
7831
7845
|
/**
|
|
7832
7846
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
7833
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
7834
7848
|
* @deprecated
|
|
7835
7849
|
*/
|
|
7836
7850
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
7837
7851
|
/**
|
|
7838
7852
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
7839
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-lonely-if.md
|
|
7840
7854
|
*/
|
|
7841
7855
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
7842
7856
|
/**
|
|
7843
7857
|
* Disallow mutating a loop iterable during iteration.
|
|
7844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
7845
7859
|
*/
|
|
7846
7860
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
7847
7861
|
/**
|
|
7848
7862
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
7849
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7863
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
7850
7864
|
*/
|
|
7851
7865
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7852
7866
|
/**
|
|
7853
7867
|
* Disallow manually wrapped comments.
|
|
7854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
7855
7869
|
*/
|
|
7856
7870
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
7857
7871
|
/**
|
|
7858
7872
|
* Disallow checking a Map key before accessing a different key.
|
|
7859
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-mismatched-map-key.md
|
|
7860
7874
|
*/
|
|
7861
7875
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
7862
7876
|
/**
|
|
7863
7877
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
7864
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7878
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-misrefactored-assignment.md
|
|
7865
7879
|
*/
|
|
7866
7880
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
7867
7881
|
/**
|
|
7868
7882
|
* Disallow references to missing local resources.
|
|
7869
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7883
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-missing-local-resource.md
|
|
7870
7884
|
*/
|
|
7871
7885
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
7872
7886
|
/**
|
|
7873
7887
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
7874
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7888
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
7875
7889
|
*/
|
|
7876
7890
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
7877
7891
|
/**
|
|
7878
7892
|
* Disallow named usage of default import and export.
|
|
7879
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7893
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-named-default.md
|
|
7880
7894
|
*/
|
|
7881
7895
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
7882
7896
|
/**
|
|
7883
7897
|
* Disallow negated array predicate calls.
|
|
7884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7898
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negated-array-predicate.md
|
|
7885
7899
|
*/
|
|
7886
7900
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7887
7901
|
/**
|
|
7888
7902
|
* Disallow negated comparisons.
|
|
7889
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7903
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negated-comparison.md
|
|
7890
7904
|
*/
|
|
7891
7905
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
7892
7906
|
/**
|
|
7893
7907
|
* Disallow negated conditions.
|
|
7894
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7908
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negated-condition.md
|
|
7895
7909
|
*/
|
|
7896
7910
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
7897
7911
|
/**
|
|
7898
7912
|
* Disallow negated expression in equality check.
|
|
7899
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7913
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negation-in-equality-check.md
|
|
7900
7914
|
*/
|
|
7901
7915
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
7902
7916
|
/**
|
|
7903
7917
|
* Disallow nested ternary expressions.
|
|
7904
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7918
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-nested-ternary.md
|
|
7905
7919
|
*/
|
|
7906
7920
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7907
7921
|
/**
|
|
7908
7922
|
* Disallow `new Array()`.
|
|
7909
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7923
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-new-array.md
|
|
7910
7924
|
*/
|
|
7911
7925
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
7912
7926
|
/**
|
|
7913
7927
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
7914
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7928
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-new-buffer.md
|
|
7915
7929
|
*/
|
|
7916
7930
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
7917
7931
|
/**
|
|
7918
7932
|
* Disallow non-function values with function-style verb prefixes.
|
|
7919
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7933
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
7920
7934
|
*/
|
|
7921
7935
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
7922
7936
|
/**
|
|
7923
7937
|
* Disallow non-standard properties on built-in objects.
|
|
7924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7938
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
7925
7939
|
*/
|
|
7926
7940
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
7927
7941
|
/**
|
|
7928
7942
|
* Disallow the use of the `null` literal.
|
|
7929
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7943
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-null.md
|
|
7930
7944
|
*/
|
|
7931
7945
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
7932
7946
|
/**
|
|
7933
7947
|
* Disallow the use of objects as default parameters.
|
|
7934
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7948
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-object-as-default-parameter.md
|
|
7935
7949
|
*/
|
|
7936
7950
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
7937
7951
|
/**
|
|
7938
7952
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
7939
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7953
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-object-methods-with-collections.md
|
|
7940
7954
|
*/
|
|
7941
7955
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
7942
7956
|
/**
|
|
7943
7957
|
* Disallow optional chaining on undeclared variables.
|
|
7944
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7958
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
7945
7959
|
*/
|
|
7946
7960
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
7947
7961
|
/**
|
|
7948
7962
|
* Disallow `process.exit()`.
|
|
7949
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7963
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-process-exit.md
|
|
7950
7964
|
*/
|
|
7951
7965
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
7952
7966
|
/**
|
|
7953
7967
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
7954
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7968
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-redundant-comparison.md
|
|
7955
7969
|
*/
|
|
7956
7970
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
7957
7971
|
/**
|
|
7958
7972
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
7959
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7973
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-return-array-push.md
|
|
7960
7974
|
*/
|
|
7961
7975
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
7962
7976
|
/**
|
|
7963
7977
|
* Disallow selector syntax in DOM names.
|
|
7964
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7978
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-selector-as-dom-name.md
|
|
7965
7979
|
*/
|
|
7966
7980
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
7967
7981
|
/**
|
|
7968
7982
|
* Disallow shorthand properties that override related longhand properties.
|
|
7969
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7983
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
7970
7984
|
*/
|
|
7971
7985
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
7972
7986
|
/**
|
|
7973
7987
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
7974
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7988
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
7975
7989
|
*/
|
|
7976
7990
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7977
7991
|
/**
|
|
7978
7992
|
* Disallow classes that only have static members.
|
|
7979
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7993
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-static-only-class.md
|
|
7980
7994
|
*/
|
|
7981
7995
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
7982
7996
|
/**
|
|
7983
7997
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
7984
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7998
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-subtraction-comparison.md
|
|
7985
7999
|
*/
|
|
7986
8000
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
7987
8001
|
/**
|
|
7988
8002
|
* Disallow `then` property.
|
|
7989
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8003
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-thenable.md
|
|
7990
8004
|
*/
|
|
7991
8005
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
7992
8006
|
/**
|
|
7993
8007
|
* Disallow assigning `this` to a variable.
|
|
7994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8008
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-this-assignment.md
|
|
7995
8009
|
*/
|
|
7996
8010
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
7997
8011
|
/**
|
|
7998
8012
|
* Disallow `this` outside of classes.
|
|
7999
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8013
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-this-outside-of-class.md
|
|
8000
8014
|
*/
|
|
8001
8015
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
8002
8016
|
/**
|
|
8003
8017
|
* Disallow assigning to top-level variables from inside functions.
|
|
8004
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
8005
8019
|
*/
|
|
8006
8020
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
8007
8021
|
/**
|
|
8008
8022
|
* Disallow top-level side effects in exported modules.
|
|
8009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8023
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-top-level-side-effects.md
|
|
8010
8024
|
*/
|
|
8011
8025
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
8012
8026
|
/**
|
|
8013
8027
|
* Disallow `all` as a transition property.
|
|
8014
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8028
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-transition-all.md
|
|
8015
8029
|
*/
|
|
8016
8030
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
8017
8031
|
/**
|
|
8018
8032
|
* Disallow comparing `undefined` using `typeof`.
|
|
8019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8033
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-typeof-undefined.md
|
|
8020
8034
|
*/
|
|
8021
8035
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
8022
8036
|
/**
|
|
8023
8037
|
* Disallow referencing methods without calling them.
|
|
8024
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8038
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-uncalled-method.md
|
|
8025
8039
|
*/
|
|
8026
8040
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
8027
8041
|
/**
|
|
8028
8042
|
* Require class members to be declared.
|
|
8029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8043
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-undeclared-class-members.md
|
|
8030
8044
|
*/
|
|
8031
8045
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
8032
8046
|
/**
|
|
8033
8047
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
8034
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8048
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
8035
8049
|
*/
|
|
8036
8050
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
8037
8051
|
/**
|
|
8038
8052
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
8039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8053
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
8040
8054
|
*/
|
|
8041
8055
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8042
8056
|
/**
|
|
8043
8057
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
8044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8058
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
8045
8059
|
*/
|
|
8046
8060
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
8047
8061
|
/**
|
|
8048
8062
|
* Disallow awaiting non-promise values.
|
|
8049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8063
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-await.md
|
|
8050
8064
|
*/
|
|
8051
8065
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
8052
8066
|
/**
|
|
8053
8067
|
* Disallow unnecessary comparisons against boolean literals.
|
|
8054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8068
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
8055
8069
|
*/
|
|
8056
8070
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
8057
8071
|
/**
|
|
8058
8072
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
8059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8073
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
8060
8074
|
*/
|
|
8061
8075
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
8062
8076
|
/**
|
|
8063
8077
|
* Disallow unnecessary `globalThis` references.
|
|
8064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8078
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-global-this.md
|
|
8065
8079
|
*/
|
|
8066
8080
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
8067
8081
|
/**
|
|
8068
8082
|
* Disallow unnecessary nested ternary expressions.
|
|
8069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8083
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
8070
8084
|
*/
|
|
8071
8085
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
8072
8086
|
/**
|
|
8073
8087
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
8074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8088
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
8075
8089
|
*/
|
|
8076
8090
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
8077
8091
|
/**
|
|
8078
8092
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
8079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8093
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
8080
8094
|
*/
|
|
8081
8095
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
8082
8096
|
/**
|
|
8083
8097
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
8084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8098
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-splice.md
|
|
8085
8099
|
*/
|
|
8086
8100
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
8087
8101
|
/**
|
|
8088
8102
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
8089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8103
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
8090
8104
|
*/
|
|
8091
8105
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
8092
8106
|
/**
|
|
8093
8107
|
* Disallow unreadable array destructuring.
|
|
8094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8108
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
8095
8109
|
*/
|
|
8096
8110
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
8097
8111
|
/**
|
|
8098
8112
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
8099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8113
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
8100
8114
|
*/
|
|
8101
8115
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
8102
8116
|
/**
|
|
8103
8117
|
* Disallow unreadable IIFEs.
|
|
8104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8118
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-iife.md
|
|
8105
8119
|
*/
|
|
8106
8120
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
8107
8121
|
/**
|
|
8108
8122
|
* Disallow unreadable `new` expressions.
|
|
8109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8123
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-new-expression.md
|
|
8110
8124
|
*/
|
|
8111
8125
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
8112
8126
|
/**
|
|
8113
8127
|
* Disallow unreadable object destructuring.
|
|
8114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8128
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
8115
8129
|
*/
|
|
8116
8130
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8117
8131
|
/**
|
|
8118
8132
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
8119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8133
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
8120
8134
|
*/
|
|
8121
8135
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
8122
8136
|
/**
|
|
8123
8137
|
* Disallow unsafe DOM HTML APIs.
|
|
8124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8138
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-dom-html.md
|
|
8125
8139
|
*/
|
|
8126
8140
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
8127
8141
|
/**
|
|
8128
8142
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
8129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8143
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
8130
8144
|
*/
|
|
8131
8145
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
8132
8146
|
/**
|
|
8133
8147
|
* Disallow unsafe values as property keys.
|
|
8134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8148
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-property-key.md
|
|
8135
8149
|
*/
|
|
8136
8150
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
8137
8151
|
/**
|
|
8138
8152
|
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
8139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8153
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
8140
8154
|
*/
|
|
8141
8155
|
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
8142
8156
|
/**
|
|
8143
8157
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
8144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8158
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
8145
8159
|
*/
|
|
8146
8160
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
8147
8161
|
/**
|
|
8148
8162
|
* Disallow ignoring the return value of selected array methods.
|
|
8149
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8163
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unused-array-method-return.md
|
|
8150
8164
|
*/
|
|
8151
8165
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
8152
8166
|
/**
|
|
8153
8167
|
* Disallow unused object properties.
|
|
8154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8168
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unused-properties.md
|
|
8155
8169
|
*/
|
|
8156
8170
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
8157
8171
|
/**
|
|
8158
8172
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
8159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8173
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-boolean-cast.md
|
|
8160
8174
|
*/
|
|
8161
8175
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
8162
8176
|
/**
|
|
8163
8177
|
* Disallow useless type coercions of values that are already of the target type.
|
|
8164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8178
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-coercion.md
|
|
8165
8179
|
*/
|
|
8166
8180
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
8167
8181
|
/**
|
|
8168
8182
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
8169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8183
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-collection-argument.md
|
|
8170
8184
|
*/
|
|
8171
8185
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
8172
8186
|
/**
|
|
8173
8187
|
* Disallow useless compound assignments such as `x += 0`.
|
|
8174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8188
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-compound-assignment.md
|
|
8175
8189
|
*/
|
|
8176
8190
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
8177
8191
|
/**
|
|
8178
8192
|
* Disallow useless concatenation of literals.
|
|
8179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8193
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-concat.md
|
|
8180
8194
|
*/
|
|
8181
8195
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
8182
8196
|
/**
|
|
8183
8197
|
* Disallow useless `continue` statements.
|
|
8184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8198
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-continue.md
|
|
8185
8199
|
*/
|
|
8186
8200
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
8187
8201
|
/**
|
|
8188
8202
|
* Disallow unnecessary existence checks before deletion.
|
|
8189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8203
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-delete-check.md
|
|
8190
8204
|
*/
|
|
8191
8205
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
8192
8206
|
/**
|
|
8193
8207
|
* Disallow `else` after a statement that exits.
|
|
8194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8208
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-else.md
|
|
8195
8209
|
*/
|
|
8196
8210
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
8197
8211
|
/**
|
|
8198
8212
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
8199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8213
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
8200
8214
|
*/
|
|
8201
8215
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
8202
8216
|
/**
|
|
8203
8217
|
* Disallow useless fallback when spreading in object literals.
|
|
8204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8218
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
8205
8219
|
*/
|
|
8206
8220
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
8207
8221
|
/**
|
|
8208
8222
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
8209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8223
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
8210
8224
|
*/
|
|
8211
8225
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8212
8226
|
/**
|
|
8213
8227
|
* Disallow useless array length check.
|
|
8214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8228
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-length-check.md
|
|
8215
8229
|
*/
|
|
8216
8230
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
8217
8231
|
/**
|
|
8218
8232
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
8219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-logical-operand.md
|
|
8220
8234
|
*/
|
|
8221
8235
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
8222
8236
|
/**
|
|
8223
8237
|
* Disallow useless overrides of class methods.
|
|
8224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8238
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-override.md
|
|
8225
8239
|
*/
|
|
8226
8240
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
8227
8241
|
/**
|
|
8228
8242
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
8229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8243
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
8230
8244
|
*/
|
|
8231
8245
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
8232
8246
|
/**
|
|
8233
8247
|
* Disallow redundant re-exports.
|
|
8234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8248
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-re-export.md
|
|
8235
8249
|
*/
|
|
8236
8250
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
8237
8251
|
/**
|
|
8238
8252
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
8239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8253
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-recursion.md
|
|
8240
8254
|
*/
|
|
8241
8255
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
8242
8256
|
/**
|
|
8243
8257
|
* Disallow unnecessary spread.
|
|
8244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8258
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-spread.md
|
|
8245
8259
|
*/
|
|
8246
8260
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
8247
8261
|
/**
|
|
8248
8262
|
* Disallow useless case in switch statements.
|
|
8249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-switch-case.md
|
|
8250
8264
|
*/
|
|
8251
8265
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
8252
8266
|
/**
|
|
8253
8267
|
* Disallow useless template literal expressions.
|
|
8254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8268
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-template-literals.md
|
|
8255
8269
|
*/
|
|
8256
8270
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
8257
8271
|
/**
|
|
8258
8272
|
* Disallow useless `undefined`.
|
|
8259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-undefined.md
|
|
8260
8274
|
*/
|
|
8261
8275
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
8262
8276
|
/**
|
|
8263
8277
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
8264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8278
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
8265
8279
|
*/
|
|
8266
8280
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
8267
8281
|
/**
|
|
8268
8282
|
* Disallow number literals with zero fractions or dangling dots.
|
|
8269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-zero-fractions.md
|
|
8270
8284
|
*/
|
|
8271
8285
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
8272
8286
|
/**
|
|
8273
8287
|
* Enforce proper case for numeric literals.
|
|
8274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8288
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/number-literal-case.md
|
|
8275
8289
|
*/
|
|
8276
8290
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
8277
8291
|
/**
|
|
8278
8292
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
8279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8293
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/numeric-separators-style.md
|
|
8280
8294
|
*/
|
|
8281
8295
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
8282
8296
|
/**
|
|
8283
8297
|
* Require assignment operator shorthand where possible.
|
|
8284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/operator-assignment.md
|
|
8285
8299
|
*/
|
|
8286
8300
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
8287
8301
|
/**
|
|
8288
8302
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
8289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-abort-signal-any.md
|
|
8290
8304
|
*/
|
|
8291
8305
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
8292
8306
|
/**
|
|
8293
8307
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
8294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
8295
8309
|
*/
|
|
8296
8310
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
8297
8311
|
/**
|
|
8298
8312
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
8299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-add-event-listener.md
|
|
8300
8314
|
*/
|
|
8301
8315
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
8302
8316
|
/**
|
|
8303
8317
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
8304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
8305
8319
|
*/
|
|
8306
8320
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
8307
8321
|
/**
|
|
8308
8322
|
* Prefer `AggregateError` when throwing collected errors.
|
|
8309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-aggregate-error.md
|
|
8310
8324
|
*/
|
|
8311
8325
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
8312
8326
|
/**
|
|
8313
8327
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
8314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-find.md
|
|
8315
8329
|
*/
|
|
8316
8330
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
8317
8331
|
/**
|
|
8318
8332
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
8319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-flat.md
|
|
8320
8334
|
*/
|
|
8321
8335
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
8322
8336
|
/**
|
|
8323
8337
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
8324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-flat-map.md
|
|
8325
8339
|
*/
|
|
8326
8340
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8327
8341
|
/**
|
|
8328
8342
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
8329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-from-async.md
|
|
8330
8344
|
*/
|
|
8331
8345
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
8332
8346
|
/**
|
|
8333
8347
|
* Prefer using the `Array.from()` mapping function argument.
|
|
8334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-from-map.md
|
|
8335
8349
|
*/
|
|
8336
8350
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
8337
8351
|
/**
|
|
8338
8352
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
8339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-from-range.md
|
|
8340
8354
|
*/
|
|
8341
8355
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
8342
8356
|
/**
|
|
8343
8357
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
8344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-index-of.md
|
|
8345
8359
|
*/
|
|
8346
8360
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
8347
8361
|
/**
|
|
8348
8362
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
8349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
8350
8364
|
*/
|
|
8351
8365
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8352
8366
|
/**
|
|
8353
8367
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
8354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-last-methods.md
|
|
8355
8369
|
*/
|
|
8356
8370
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
8357
8371
|
/**
|
|
8358
8372
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
8359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-slice.md
|
|
8360
8374
|
*/
|
|
8361
8375
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
8362
8376
|
/**
|
|
8363
8377
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
8364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-some.md
|
|
8365
8379
|
*/
|
|
8366
8380
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
8367
8381
|
/**
|
|
8368
8382
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
8369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-at.md
|
|
8370
8384
|
*/
|
|
8371
8385
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
8372
8386
|
/**
|
|
8373
8387
|
* Prefer `await` over promise chaining.
|
|
8374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-await.md
|
|
8375
8389
|
*/
|
|
8376
8390
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
8377
8391
|
/**
|
|
8378
8392
|
* Prefer `BigInt` literals over the constructor.
|
|
8379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-bigint-literals.md
|
|
8380
8394
|
*/
|
|
8381
8395
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
8382
8396
|
/**
|
|
8383
8397
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
8384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
8385
8399
|
*/
|
|
8386
8400
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
8387
8401
|
/**
|
|
8388
8402
|
* Prefer block statements over IIFEs used only for scoping.
|
|
8389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
8390
8404
|
*/
|
|
8391
8405
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
8392
8406
|
/**
|
|
8393
8407
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
8394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-boolean-return.md
|
|
8395
8409
|
*/
|
|
8396
8410
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8397
8411
|
/**
|
|
8398
8412
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
8399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-class-fields.md
|
|
8400
8414
|
*/
|
|
8401
8415
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
8402
8416
|
/**
|
|
8403
8417
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
8404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-classlist-toggle.md
|
|
8405
8419
|
*/
|
|
8406
8420
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
8407
8421
|
/**
|
|
8408
8422
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
8409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-code-point.md
|
|
8410
8424
|
*/
|
|
8411
8425
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
8412
8426
|
/**
|
|
8413
8427
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
8414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-continue.md
|
|
8415
8429
|
*/
|
|
8416
8430
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
8417
8431
|
/**
|
|
8418
8432
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
8419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-date-now.md
|
|
8420
8434
|
*/
|
|
8421
8435
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
8422
8436
|
/**
|
|
8423
8437
|
* Prefer default parameters over reassignment.
|
|
8424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-default-parameters.md
|
|
8425
8439
|
*/
|
|
8426
8440
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
8427
8441
|
/**
|
|
8428
8442
|
* Prefer direct iteration over default iterator method calls.
|
|
8429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-direct-iteration.md
|
|
8430
8444
|
*/
|
|
8431
8445
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
8432
8446
|
/**
|
|
8433
8447
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
8434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dispose.md
|
|
8435
8449
|
*/
|
|
8436
8450
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
8437
8451
|
/**
|
|
8438
8452
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
8439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-append.md
|
|
8440
8454
|
*/
|
|
8441
8455
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
8442
8456
|
/**
|
|
8443
8457
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
8444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
8445
8459
|
* @deprecated
|
|
8446
8460
|
*/
|
|
8447
8461
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
8448
8462
|
/**
|
|
8449
8463
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
8450
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
8451
8465
|
*/
|
|
8452
8466
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
8453
8467
|
/**
|
|
8454
8468
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
8455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-remove.md
|
|
8456
8470
|
*/
|
|
8457
8471
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
8458
8472
|
/**
|
|
8459
8473
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
8460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
8461
8475
|
*/
|
|
8462
8476
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
8463
8477
|
/**
|
|
8464
8478
|
* Prefer `.textContent` over `.innerText`.
|
|
8465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
8466
8480
|
*/
|
|
8467
8481
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
8468
8482
|
/**
|
|
8469
8483
|
* Prefer early returns over full-function conditional wrapping.
|
|
8470
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-early-return.md
|
|
8471
8485
|
*/
|
|
8472
8486
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
8473
8487
|
/**
|
|
8474
8488
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
8475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-else-if.md
|
|
8476
8490
|
*/
|
|
8477
8491
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
8478
8492
|
/**
|
|
8479
8493
|
* Prefer `Error.isError()` when checking for errors.
|
|
8480
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-error-is-error.md
|
|
8481
8495
|
*/
|
|
8482
8496
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
8483
8497
|
/**
|
|
8484
8498
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
8485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-event-target.md
|
|
8486
8500
|
*/
|
|
8487
8501
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
8488
8502
|
/**
|
|
8489
8503
|
* Prefer explicit viewport units.
|
|
8490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
8491
8505
|
*/
|
|
8492
8506
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
8493
8507
|
/**
|
|
8494
8508
|
* Prefer `export…from` when re-exporting.
|
|
8495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-export-from.md
|
|
8496
8510
|
*/
|
|
8497
8511
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
8498
8512
|
/**
|
|
8499
8513
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
8500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
8501
8515
|
*/
|
|
8502
8516
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8503
8517
|
/**
|
|
8504
8518
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
8505
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
8506
8520
|
*/
|
|
8507
8521
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
8508
8522
|
/**
|
|
8509
8523
|
* Prefer global numeric constants over `Number` static properties.
|
|
8510
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-global-number-constants.md
|
|
8511
8525
|
*/
|
|
8512
8526
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
8513
8527
|
/**
|
|
8514
8528
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
8515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-global-this.md
|
|
8516
8530
|
*/
|
|
8517
8531
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
8518
8532
|
/**
|
|
8519
8533
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
8520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-group-by.md
|
|
8521
8535
|
*/
|
|
8522
8536
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
8523
8537
|
/**
|
|
8524
8538
|
* Prefer `.has()` when checking existence.
|
|
8525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-has-check.md
|
|
8526
8540
|
*/
|
|
8527
8541
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
8528
8542
|
/**
|
|
8529
8543
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
8530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
8531
8545
|
*/
|
|
8532
8546
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
8533
8547
|
/**
|
|
8534
8548
|
* Prefer HTTPS over HTTP.
|
|
8535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-https.md
|
|
8536
8550
|
*/
|
|
8537
8551
|
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
8538
8552
|
/**
|
|
8539
8553
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
8540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
8541
8555
|
*/
|
|
8542
8556
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
8543
8557
|
/**
|
|
8544
8558
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
8545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-import-meta-properties.md
|
|
8546
8560
|
*/
|
|
8547
8561
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
8548
8562
|
/**
|
|
8549
8563
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
8550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-includes.md
|
|
8551
8565
|
*/
|
|
8552
8566
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
8553
8567
|
/**
|
|
8554
8568
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
8555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
8556
8570
|
*/
|
|
8557
8571
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
8558
8572
|
/**
|
|
8559
8573
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
8560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
8561
8575
|
*/
|
|
8562
8576
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
8563
8577
|
/**
|
|
8564
8578
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
8565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-concat.md
|
|
8566
8580
|
*/
|
|
8567
8581
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
8568
8582
|
/**
|
|
8569
8583
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
8570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-helpers.md
|
|
8571
8585
|
*/
|
|
8572
8586
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
8573
8587
|
/**
|
|
8574
8588
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
8575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-to-array.md
|
|
8576
8590
|
*/
|
|
8577
8591
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8578
8592
|
/**
|
|
8579
8593
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
8580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
8581
8595
|
*/
|
|
8582
8596
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
8583
8597
|
/**
|
|
8584
8598
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
8585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
8586
8600
|
* @deprecated
|
|
8587
8601
|
*/
|
|
8588
8602
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
8589
8603
|
/**
|
|
8590
8604
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
8591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
8592
8606
|
*/
|
|
8593
8607
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
8594
8608
|
/**
|
|
8595
8609
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
8596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-location-assign.md
|
|
8597
8611
|
*/
|
|
8598
8612
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
8599
8613
|
/**
|
|
8600
8614
|
* Prefer using a logical operator over a ternary.
|
|
8601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
8602
8616
|
*/
|
|
8603
8617
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
8604
8618
|
/**
|
|
8605
8619
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
8606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-map-from-entries.md
|
|
8607
8621
|
*/
|
|
8608
8622
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
8609
8623
|
/**
|
|
8610
8624
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
8611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-abs.md
|
|
8612
8626
|
*/
|
|
8613
8627
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
8614
8628
|
/**
|
|
8615
8629
|
* Prefer `Math` constants over their approximate numeric values.
|
|
8616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-constants.md
|
|
8617
8631
|
*/
|
|
8618
8632
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
8619
8633
|
/**
|
|
8620
8634
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
8621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-min-max.md
|
|
8622
8636
|
*/
|
|
8623
8637
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8624
8638
|
/**
|
|
8625
8639
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
8626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8640
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-trunc.md
|
|
8627
8641
|
*/
|
|
8628
8642
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
8629
8643
|
/**
|
|
8630
8644
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
8631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8645
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-minimal-ternary.md
|
|
8632
8646
|
*/
|
|
8633
8647
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
8634
8648
|
/**
|
|
8635
8649
|
* Prefer modern DOM APIs.
|
|
8636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
8637
8651
|
*/
|
|
8638
8652
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
8639
8653
|
/**
|
|
8640
8654
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
8641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-modern-math-apis.md
|
|
8642
8656
|
*/
|
|
8643
8657
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
8644
8658
|
/**
|
|
8645
8659
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
8646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-module.md
|
|
8647
8661
|
*/
|
|
8648
8662
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
8649
8663
|
/**
|
|
8650
8664
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
8651
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
8652
8666
|
*/
|
|
8653
8667
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
8654
8668
|
/**
|
|
8655
8669
|
* Prefer negative index over `.length - index` when possible.
|
|
8656
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-negative-index.md
|
|
8657
8671
|
*/
|
|
8658
8672
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
8659
8673
|
/**
|
|
8660
8674
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
8661
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-node-protocol.md
|
|
8662
8676
|
*/
|
|
8663
8677
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
8664
8678
|
/**
|
|
8665
8679
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
8666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-number-coercion.md
|
|
8667
8681
|
*/
|
|
8668
8682
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
8669
8683
|
/**
|
|
8670
8684
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
8671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
8672
8686
|
*/
|
|
8673
8687
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
8674
8688
|
/**
|
|
8675
8689
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
8676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-number-properties.md
|
|
8677
8691
|
*/
|
|
8678
8692
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
8679
8693
|
/**
|
|
8680
8694
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
8681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-define-properties.md
|
|
8682
8696
|
*/
|
|
8683
8697
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
8684
8698
|
/**
|
|
8685
8699
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
8686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
8687
8701
|
*/
|
|
8688
8702
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
8689
8703
|
/**
|
|
8690
8704
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
8691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-from-entries.md
|
|
8692
8706
|
*/
|
|
8693
8707
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
8694
8708
|
/**
|
|
8695
8709
|
* Prefer the most specific `Object` iterable method.
|
|
8696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
8697
8711
|
*/
|
|
8698
8712
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8699
8713
|
/**
|
|
8700
8714
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
8701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-observer-apis.md
|
|
8702
8716
|
*/
|
|
8703
8717
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
8704
8718
|
/**
|
|
8705
8719
|
* Prefer omitting the `catch` binding parameter.
|
|
8706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
8707
8721
|
*/
|
|
8708
8722
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
8709
8723
|
/**
|
|
8710
8724
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
8711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-path2d.md
|
|
8712
8726
|
*/
|
|
8713
8727
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
8714
8728
|
/**
|
|
8715
8729
|
* Prefer private class fields over the underscore-prefix convention.
|
|
8716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-private-class-fields.md
|
|
8717
8731
|
*/
|
|
8718
8732
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
8719
8733
|
/**
|
|
8720
8734
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
8721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-promise-try.md
|
|
8722
8736
|
*/
|
|
8723
8737
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
8724
8738
|
/**
|
|
8725
8739
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
8726
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
8727
8741
|
*/
|
|
8728
8742
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
8729
8743
|
/**
|
|
8730
8744
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
8731
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-prototype-methods.md
|
|
8732
8746
|
*/
|
|
8733
8747
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
8734
8748
|
/**
|
|
8735
8749
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
8736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-query-selector.md
|
|
8737
8751
|
*/
|
|
8738
8752
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
8739
8753
|
/**
|
|
8740
8754
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
8741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-queue-microtask.md
|
|
8742
8756
|
*/
|
|
8743
8757
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
8744
8758
|
/**
|
|
8745
8759
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
8746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-reflect-apply.md
|
|
8747
8761
|
*/
|
|
8748
8762
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
8749
8763
|
/**
|
|
8750
8764
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
8751
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-regexp-escape.md
|
|
8752
8766
|
*/
|
|
8753
8767
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
8754
8768
|
/**
|
|
8755
8769
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
8756
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-regexp-test.md
|
|
8757
8771
|
*/
|
|
8758
8772
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
8759
8773
|
/**
|
|
8760
8774
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
8761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-response-static-json.md
|
|
8762
8776
|
*/
|
|
8763
8777
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
8764
8778
|
/**
|
|
8765
8779
|
* Prefer `:scope` when using element query selector methods.
|
|
8766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-scoped-selector.md
|
|
8767
8781
|
*/
|
|
8768
8782
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
8769
8783
|
/**
|
|
8770
8784
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
8771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-set-has.md
|
|
8772
8786
|
*/
|
|
8773
8787
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
8774
8788
|
/**
|
|
8775
8789
|
* Prefer `Set` methods for Set operations.
|
|
8776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-set-methods.md
|
|
8777
8791
|
*/
|
|
8778
8792
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
8779
8793
|
/**
|
|
8780
8794
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
8781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-set-size.md
|
|
8782
8796
|
*/
|
|
8783
8797
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
8784
8798
|
/**
|
|
8785
8799
|
* Prefer arrow function properties over methods with a single return.
|
|
8786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-short-arrow-method.md
|
|
8787
8801
|
*/
|
|
8788
8802
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
8789
8803
|
/**
|
|
8790
8804
|
* Prefer simple conditions first in logical expressions.
|
|
8791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-simple-condition-first.md
|
|
8792
8806
|
*/
|
|
8793
8807
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
8794
8808
|
/**
|
|
8795
8809
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
8796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
8797
8811
|
*/
|
|
8798
8812
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
8799
8813
|
/**
|
|
8800
8814
|
* Prefer simplified conditions.
|
|
8801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-simplified-conditions.md
|
|
8802
8816
|
*/
|
|
8803
8817
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
8804
8818
|
/**
|
|
8805
8819
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
8806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-array-predicate.md
|
|
8807
8821
|
*/
|
|
8808
8822
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
8809
8823
|
/**
|
|
8810
8824
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
8811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-call.md
|
|
8812
8826
|
*/
|
|
8813
8827
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
8814
8828
|
/**
|
|
8815
8829
|
* Prefer a single object destructuring declaration per local const source.
|
|
8816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
8817
8831
|
*/
|
|
8818
8832
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8819
8833
|
/**
|
|
8820
8834
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
8821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-replace.md
|
|
8822
8836
|
*/
|
|
8823
8837
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
8824
8838
|
/**
|
|
8825
8839
|
* Prefer declaring variables in the smallest possible scope.
|
|
8826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-smaller-scope.md
|
|
8827
8841
|
*/
|
|
8828
8842
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
8829
8843
|
/**
|
|
8830
8844
|
* Prefer `String#split()` with a limit.
|
|
8831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-split-limit.md
|
|
8832
8846
|
*/
|
|
8833
8847
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
8834
8848
|
/**
|
|
8835
8849
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
8836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-spread.md
|
|
8837
8851
|
*/
|
|
8838
8852
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
8839
8853
|
/**
|
|
8840
8854
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
8841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-match-all.md
|
|
8842
8856
|
*/
|
|
8843
8857
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
8844
8858
|
/**
|
|
8845
8859
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
8846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
8847
8861
|
*/
|
|
8848
8862
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
8849
8863
|
/**
|
|
8850
8864
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
8851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-raw.md
|
|
8852
8866
|
*/
|
|
8853
8867
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
8854
8868
|
/**
|
|
8855
8869
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
8856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-repeat.md
|
|
8857
8871
|
*/
|
|
8858
8872
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
8859
8873
|
/**
|
|
8860
8874
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
8861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-replace-all.md
|
|
8862
8876
|
*/
|
|
8863
8877
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
8864
8878
|
/**
|
|
8865
8879
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
8866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-slice.md
|
|
8867
8881
|
*/
|
|
8868
8882
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
8869
8883
|
/**
|
|
8870
8884
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
8871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
8872
8886
|
*/
|
|
8873
8887
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
8874
8888
|
/**
|
|
8875
8889
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
8876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
8877
8891
|
*/
|
|
8878
8892
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
8879
8893
|
/**
|
|
8880
8894
|
* Prefer using `structuredClone` to create a deep clone.
|
|
8881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-structured-clone.md
|
|
8882
8896
|
*/
|
|
8883
8897
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
8884
8898
|
/**
|
|
8885
8899
|
* Prefer `switch` over multiple `else-if`.
|
|
8886
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-switch.md
|
|
8887
8901
|
*/
|
|
8888
8902
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
8889
8903
|
/**
|
|
8890
8904
|
* Prefer `Temporal` over `Date`.
|
|
8891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-temporal.md
|
|
8892
8906
|
*/
|
|
8893
8907
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
8894
8908
|
/**
|
|
8895
8909
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
8896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-ternary.md
|
|
8897
8911
|
*/
|
|
8898
8912
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
8899
8913
|
/**
|
|
8900
8914
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
8901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8915
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-then-catch.md
|
|
8902
8916
|
*/
|
|
8903
8917
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
8904
8918
|
/**
|
|
8905
8919
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
8906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8920
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-toggle-attribute.md
|
|
8907
8921
|
*/
|
|
8908
8922
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
8909
8923
|
/**
|
|
8910
8924
|
* Prefer top-level await over top-level promises and async function calls.
|
|
8911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-top-level-await.md
|
|
8912
8926
|
*/
|
|
8913
8927
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
8914
8928
|
/**
|
|
8915
8929
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
8916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8930
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-type-error.md
|
|
8917
8931
|
*/
|
|
8918
8932
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
8919
8933
|
/**
|
|
8920
8934
|
* Require type literals to be last in union types.
|
|
8921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-type-literal-last.md
|
|
8922
8936
|
*/
|
|
8923
8937
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
8924
8938
|
/**
|
|
8925
8939
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
8926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-uint8array-base64.md
|
|
8927
8941
|
*/
|
|
8928
8942
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
8929
8943
|
/**
|
|
8930
8944
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
8931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-unary-minus.md
|
|
8932
8946
|
*/
|
|
8933
8947
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
8934
8948
|
/**
|
|
8935
8949
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
8936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
8937
8951
|
*/
|
|
8938
8952
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
8939
8953
|
/**
|
|
8940
8954
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
8941
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-url-can-parse.md
|
|
8942
8956
|
*/
|
|
8943
8957
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
8944
8958
|
/**
|
|
8945
8959
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
8946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-url-href.md
|
|
8947
8961
|
*/
|
|
8948
8962
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
8949
8963
|
/**
|
|
8950
8964
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
8951
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-url-search-parameters.md
|
|
8952
8966
|
*/
|
|
8953
8967
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
8954
8968
|
/**
|
|
8955
8969
|
* Prefer putting the condition in the while statement.
|
|
8956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-while-loop-condition.md
|
|
8957
8971
|
*/
|
|
8958
8972
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
8959
8973
|
/**
|
|
8960
8974
|
* Renamed to `unicorn/name-replacements`.
|
|
8961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
8962
8976
|
* @deprecated
|
|
8963
8977
|
*/
|
|
8964
8978
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
8965
8979
|
/**
|
|
8966
8980
|
* Enforce consistent relative URL style.
|
|
8967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/relative-url-style.md
|
|
8968
8982
|
*/
|
|
8969
8983
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
8970
8984
|
/**
|
|
8971
8985
|
* Enforce using the separator argument with `Array#join()`.
|
|
8972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-array-join-separator.md
|
|
8973
8987
|
*/
|
|
8974
8988
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
8975
8989
|
/**
|
|
8976
8990
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
8977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-array-sort-compare.md
|
|
8978
8992
|
*/
|
|
8979
8993
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
8980
8994
|
/**
|
|
8981
8995
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
8982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-css-escape.md
|
|
8983
8997
|
*/
|
|
8984
8998
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
8985
8999
|
/**
|
|
8986
9000
|
* Require configured YAML frontmatter fields.
|
|
8987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-frontmatter-fields.md
|
|
8988
9002
|
*/
|
|
8989
9003
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
8990
9004
|
/**
|
|
8991
9005
|
* Require non-empty module attributes for imports and exports
|
|
8992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-module-attributes.md
|
|
8993
9007
|
*/
|
|
8994
9008
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
8995
9009
|
/**
|
|
8996
9010
|
* Require non-empty specifier list in import and export statements.
|
|
8997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-module-specifiers.md
|
|
8998
9012
|
*/
|
|
8999
9013
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
9000
9014
|
/**
|
|
9001
9015
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
9002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
9003
9017
|
*/
|
|
9004
9018
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
9005
9019
|
/**
|
|
9006
9020
|
* Require passive event listeners for high-frequency events.
|
|
9007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9021
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-passive-events.md
|
|
9008
9022
|
*/
|
|
9009
9023
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
9010
9024
|
/**
|
|
9011
9025
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
9012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-post-message-target-origin.md
|
|
9013
9027
|
*/
|
|
9014
9028
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
9015
9029
|
/**
|
|
9016
9030
|
* Require boolean-returning Proxy traps to return booleans.
|
|
9017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
9018
9032
|
*/
|
|
9019
9033
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
9020
9034
|
/**
|
|
9021
9035
|
* Enforce a consistent style for single-line block comments.
|
|
9022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/single-line-block-comment-style.md
|
|
9023
9037
|
*/
|
|
9024
9038
|
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
9025
9039
|
/**
|
|
9026
9040
|
* Enforce better string content.
|
|
9027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9041
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/string-content.md
|
|
9028
9042
|
*/
|
|
9029
9043
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
9030
9044
|
/**
|
|
9031
9045
|
* Enforce consistent brace style for `case` clauses.
|
|
9032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9046
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/switch-case-braces.md
|
|
9033
9047
|
*/
|
|
9034
9048
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
9035
9049
|
/**
|
|
9036
9050
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
9037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9051
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/switch-case-break-position.md
|
|
9038
9052
|
*/
|
|
9039
9053
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
9040
9054
|
/**
|
|
9041
9055
|
* Fix whitespace-insensitive template indentation.
|
|
9042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9056
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/template-indent.md
|
|
9043
9057
|
*/
|
|
9044
9058
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
9045
9059
|
/**
|
|
9046
9060
|
* Enforce consistent case for text encoding identifiers.
|
|
9047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/text-encoding-identifier-case.md
|
|
9048
9062
|
*/
|
|
9049
9063
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
9050
9064
|
/**
|
|
9051
9065
|
* Require `new` when creating an error.
|
|
9052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9066
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/throw-new-error.md
|
|
9053
9067
|
*/
|
|
9054
9068
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
9055
9069
|
/**
|
|
9056
9070
|
* Limit the complexity of `try` blocks.
|
|
9057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9071
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/try-complexity.md
|
|
9058
9072
|
*/
|
|
9059
9073
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
9060
9074
|
/**
|
|
@@ -9802,6 +9816,11 @@ Backward pagination arguments
|
|
|
9802
9816
|
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/prefer-loose-object.md
|
|
9803
9817
|
*/
|
|
9804
9818
|
'zod/prefer-loose-object'?: Linter.RuleEntry<[]>;
|
|
9819
|
+
/**
|
|
9820
|
+
* Prefer `.size(n)` over `.min(n).max(n)` with the same value on a set or map schema
|
|
9821
|
+
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/prefer-map-set-size-over-min-max.md
|
|
9822
|
+
*/
|
|
9823
|
+
'zod/prefer-map-set-size-over-min-max'?: Linter.RuleEntry<[]>;
|
|
9805
9824
|
/**
|
|
9806
9825
|
* Enforce usage of `.meta()` over `.describe()`
|
|
9807
9826
|
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/prefer-meta.md
|
|
@@ -10599,6 +10618,11 @@ type GithubActionJobIdCasing = [] | [(("camelCase" | "kebab-case" | "PascalCase"
|
|
|
10599
10618
|
})];
|
|
10600
10619
|
// ----- github-action/max-jobs-per-action -----
|
|
10601
10620
|
type GithubActionMaxJobsPerAction = [] | [number];
|
|
10621
|
+
// ----- github-action/no-top-level-permissions -----
|
|
10622
|
+
type GithubActionNoTopLevelPermissions = [] | [{
|
|
10623
|
+
allowEmpty?: _GithubActionNoTopLevelPermissions_AllowEmptyPermissionsBlock;
|
|
10624
|
+
}];
|
|
10625
|
+
type _GithubActionNoTopLevelPermissions_AllowEmptyPermissionsBlock = boolean;
|
|
10602
10626
|
// ----- github-action/prefer-file-extension -----
|
|
10603
10627
|
type GithubActionPreferFileExtension = [] | [(("yml" | "yaml") | {
|
|
10604
10628
|
extension?: ("yml" | "yaml");
|
|
@@ -11099,6 +11123,13 @@ type JsdocNoUndefinedTypes = [] | [{
|
|
|
11099
11123
|
disableReporting?: boolean;
|
|
11100
11124
|
markVariablesAsUsed?: boolean;
|
|
11101
11125
|
}];
|
|
11126
|
+
// ----- jsdoc/no-unnecessary-type-assertion -----
|
|
11127
|
+
type JsdocNoUnnecessaryTypeAssertion = [] | [{
|
|
11128
|
+
checkLiteralConstAssertions?: boolean;
|
|
11129
|
+
enableFixer?: boolean;
|
|
11130
|
+
treatAnyAsRedundant?: boolean;
|
|
11131
|
+
typesToIgnore?: string[];
|
|
11132
|
+
}];
|
|
11102
11133
|
// ----- jsdoc/normalize-see-links -----
|
|
11103
11134
|
type JsdocNormalizeSeeLinks = [] | [{
|
|
11104
11135
|
canonicalForm?: ("pipe" | "prefix");
|
|
@@ -15603,7 +15634,9 @@ type TsNoMeaninglessVoidOperator = [] | [{
|
|
|
15603
15634
|
}];
|
|
15604
15635
|
// ----- ts/no-misused-promises -----
|
|
15605
15636
|
type TsNoMisusedPromises = [] | [{
|
|
15606
|
-
checksConditionals?: boolean
|
|
15637
|
+
checksConditionals?: (boolean | {
|
|
15638
|
+
flagUnions?: ("all" | "strict" | "none");
|
|
15639
|
+
});
|
|
15607
15640
|
checksSpreads?: boolean;
|
|
15608
15641
|
checksVoidReturn?: (boolean | {
|
|
15609
15642
|
arguments?: boolean;
|