@zinkawaii/eslint-config 0.5.2 → 0.5.3
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 +468 -365
- package/dist/index.mjs +2 -1
- package/package.json +16 -12
package/dist/index.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ import { StylisticCustomizeOptions } from "@stylistic/eslint-plugin";
|
|
|
4
4
|
import { ParserOptions } from "@typescript-eslint/parser";
|
|
5
5
|
import { FlatGitignoreOptions } from "eslint-config-flat-gitignore";
|
|
6
6
|
import { Options } from "eslint-processor-vue-blocks";
|
|
7
|
-
//#region ../../node_modules/.pnpm/@antfu+eslint-config@9.
|
|
7
|
+
//#region ../../node_modules/.pnpm/@antfu+eslint-config@9.3.0_patch_hash=e18a55e559b0d78f736bf174f8ff0a4f55fc5daa0e0c49744_b6c895ac9cfd9f11a188ccbd81d64b8d/node_modules/@antfu/eslint-config/dist/index.d.mts
|
|
8
8
|
//#region src/typegen.d.ts
|
|
9
9
|
interface RuleOptions {
|
|
10
10
|
/**
|
|
@@ -1006,6 +1006,10 @@ interface RuleOptions {
|
|
|
1006
1006
|
* Prefer Array.prototype.toSpliced() over copying and splicing arrays
|
|
1007
1007
|
*/
|
|
1008
1008
|
'e18e/prefer-array-to-spliced'?: Linter.RuleEntry<[]>;
|
|
1009
|
+
/**
|
|
1010
|
+
* Prefer `charCodeAt()` over indexed string access for single-character comparisons inside loops
|
|
1011
|
+
*/
|
|
1012
|
+
'e18e/prefer-charcode-at-in-loop'?: Linter.RuleEntry<[]>;
|
|
1009
1013
|
/**
|
|
1010
1014
|
* Prefer Date.now() over new Date().getTime() and +new Date()
|
|
1011
1015
|
*/
|
|
@@ -1046,6 +1050,10 @@ interface RuleOptions {
|
|
|
1046
1050
|
* prefer `RegExp.test()` over `String.match()` and `RegExp.exec()` when only checking for match existence
|
|
1047
1051
|
*/
|
|
1048
1052
|
'e18e/prefer-regex-test'?: Linter.RuleEntry<[]>;
|
|
1053
|
+
/**
|
|
1054
|
+
* Prefer `indexOf(needle)` and `slice(...)` over `split()[N]` when splitting a string into two pieces.
|
|
1055
|
+
*/
|
|
1056
|
+
'e18e/prefer-slice-over-split-index'?: Linter.RuleEntry<[]>;
|
|
1049
1057
|
/**
|
|
1050
1058
|
* Prefer spread syntax over Array.concat(), Array.from(), Object.assign({}, ...), and Function.apply()
|
|
1051
1059
|
*/
|
|
@@ -1062,6 +1070,10 @@ interface RuleOptions {
|
|
|
1062
1070
|
* Prefer String.fromCharCode() over String.fromCodePoint() for code points below 0x10000
|
|
1063
1071
|
*/
|
|
1064
1072
|
'e18e/prefer-string-fromcharcode'?: Linter.RuleEntry<[]>;
|
|
1073
|
+
/**
|
|
1074
|
+
* Prefer `{throwIfNoEntry: false}` over relying on a thrown error for missing fs entries from sync stat calls
|
|
1075
|
+
*/
|
|
1076
|
+
'e18e/prefer-throw-if-no-entry'?: Linter.RuleEntry<[]>;
|
|
1065
1077
|
/**
|
|
1066
1078
|
* Prefer passing function and arguments directly to setTimeout/setInterval instead of wrapping in an arrow function or using bind
|
|
1067
1079
|
*/
|
|
@@ -2433,6 +2445,11 @@ interface RuleOptions {
|
|
|
2433
2445
|
* @see https://nextjs.org/docs/messages/no-img-element
|
|
2434
2446
|
*/
|
|
2435
2447
|
'next/no-img-element'?: Linter.RuleEntry<[]>;
|
|
2448
|
+
/**
|
|
2449
|
+
* Prevent usage of `location.assign` or `location.href` assignment to navigate to internal Next.js pages.
|
|
2450
|
+
* @see https://nextjs.org/docs/messages/no-location-assign-relative-destination
|
|
2451
|
+
*/
|
|
2452
|
+
'next/no-location-assign-relative-destination'?: Linter.RuleEntry<[]>;
|
|
2436
2453
|
/**
|
|
2437
2454
|
* Prevent page-only custom fonts.
|
|
2438
2455
|
* @see https://nextjs.org/docs/messages/no-page-custom-font
|
|
@@ -3688,6 +3705,11 @@ interface RuleOptions {
|
|
|
3688
3705
|
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-enforce-settings.test.ts
|
|
3689
3706
|
*/
|
|
3690
3707
|
'pnpm/yaml-enforce-settings'?: Linter.RuleEntry<PnpmYamlEnforceSettings>;
|
|
3708
|
+
/**
|
|
3709
|
+
* Disallow the anonymous `catalog:` in `pnpm-workspace.yaml` in favor of named catalogs
|
|
3710
|
+
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-no-anonymous-catalog.test.ts
|
|
3711
|
+
*/
|
|
3712
|
+
'pnpm/yaml-no-anonymous-catalog'?: Linter.RuleEntry<[]>;
|
|
3691
3713
|
/**
|
|
3692
3714
|
* Disallow duplicate catalog items in `pnpm-workspace.yaml`
|
|
3693
3715
|
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-no-duplicate-catalog-item.test.ts
|
|
@@ -7271,1715 +7293,1740 @@ interface RuleOptions {
|
|
|
7271
7293
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
7272
7294
|
/**
|
|
7273
7295
|
* Prefer better DOM traversal APIs.
|
|
7274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/better-dom-traversing.md
|
|
7275
7297
|
*/
|
|
7276
7298
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
7277
7299
|
/**
|
|
7278
7300
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
7279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
7280
7302
|
* @deprecated
|
|
7281
7303
|
*/
|
|
7282
7304
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
7283
7305
|
/**
|
|
7284
7306
|
* Enforce a specific parameter name in catch clauses.
|
|
7285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7307
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/catch-error-name.md
|
|
7286
7308
|
*/
|
|
7287
7309
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
7288
7310
|
/**
|
|
7289
7311
|
* Enforce consistent class references in static methods.
|
|
7290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7312
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/class-reference-in-static-methods.md
|
|
7291
7313
|
*/
|
|
7292
7314
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
7293
7315
|
/**
|
|
7294
7316
|
* Enforce better comment content.
|
|
7295
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/comment-content.md
|
|
7296
7318
|
*/
|
|
7297
7319
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
7320
|
+
/**
|
|
7321
|
+
* Enforce a consistent return style for multiline arrow function bodies.
|
|
7322
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-arrow-return-style.md
|
|
7323
|
+
*/
|
|
7324
|
+
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
7298
7325
|
/**
|
|
7299
7326
|
* Enforce consistent assertion style with `node:assert`.
|
|
7300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7327
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-assert.md
|
|
7301
7328
|
*/
|
|
7302
7329
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
7303
7330
|
/**
|
|
7304
7331
|
* Enforce consistent naming for boolean names.
|
|
7305
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7332
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-boolean-name.md
|
|
7306
7333
|
*/
|
|
7307
7334
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
7308
7335
|
/**
|
|
7309
7336
|
* Enforce consistent class member order.
|
|
7310
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7337
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-class-member-order.md
|
|
7311
7338
|
*/
|
|
7312
7339
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
7313
7340
|
/**
|
|
7314
7341
|
* Enforce consistent spelling of compound words in identifiers.
|
|
7315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7342
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-compound-words.md
|
|
7316
7343
|
*/
|
|
7317
7344
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
7318
7345
|
/**
|
|
7319
7346
|
* Enforce consistent conditional object spread style.
|
|
7320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7347
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
7321
7348
|
*/
|
|
7322
7349
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
7323
7350
|
/**
|
|
7324
7351
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
7325
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-date-clone.md
|
|
7326
7353
|
*/
|
|
7327
7354
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
7328
7355
|
/**
|
|
7329
7356
|
* Use destructured variables over properties.
|
|
7330
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7357
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-destructuring.md
|
|
7331
7358
|
*/
|
|
7332
7359
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
7333
7360
|
/**
|
|
7334
7361
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
7335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-empty-array-spread.md
|
|
7336
7363
|
*/
|
|
7337
7364
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
7338
7365
|
/**
|
|
7339
7366
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
7340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7367
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-existence-index-check.md
|
|
7341
7368
|
*/
|
|
7342
7369
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
7343
7370
|
/**
|
|
7344
7371
|
* Enforce consistent decorator position on exported classes.
|
|
7345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7372
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-export-decorator-position.md
|
|
7346
7373
|
*/
|
|
7347
7374
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
7348
7375
|
/**
|
|
7349
7376
|
* Move function definitions to the highest possible scope.
|
|
7350
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7377
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-function-scoping.md
|
|
7351
7378
|
*/
|
|
7352
7379
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
7353
7380
|
/**
|
|
7354
7381
|
* Enforce function syntax by role.
|
|
7355
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-function-style.md
|
|
7356
7383
|
*/
|
|
7357
7384
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
7358
7385
|
/**
|
|
7359
7386
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
7360
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7387
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-json-file-read.md
|
|
7361
7388
|
*/
|
|
7362
7389
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
7363
7390
|
/**
|
|
7364
7391
|
* Enforce consistent optional chaining for same-base member access.
|
|
7365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-optional-chaining.md
|
|
7366
7393
|
*/
|
|
7367
7394
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
7368
7395
|
/**
|
|
7369
7396
|
* Enforce consistent style for escaping `${` in template literals.
|
|
7370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7397
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-template-literal-escape.md
|
|
7371
7398
|
*/
|
|
7372
7399
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
7373
7400
|
/**
|
|
7374
7401
|
* Enforce consistent labels on tuple type elements.
|
|
7375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-tuple-labels.md
|
|
7376
7403
|
*/
|
|
7377
7404
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
7378
7405
|
/**
|
|
7379
7406
|
* Enforce correct `Error` subclassing.
|
|
7380
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/custom-error-definition.md
|
|
7381
7408
|
*/
|
|
7382
7409
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
7383
7410
|
/**
|
|
7384
7411
|
* Enforce consistent default export declarations.
|
|
7385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/default-export-style.md
|
|
7386
7413
|
*/
|
|
7387
7414
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
7388
7415
|
/**
|
|
7389
7416
|
* Enforce consistent style for DOM element dataset access.
|
|
7390
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/dom-node-dataset.md
|
|
7391
7418
|
*/
|
|
7392
7419
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
7393
7420
|
/**
|
|
7394
7421
|
* Enforce no spaces between braces.
|
|
7395
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/empty-brace-spaces.md
|
|
7396
7423
|
*/
|
|
7397
7424
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
7398
7425
|
/**
|
|
7399
7426
|
* Enforce passing a `message` value when creating a built-in error.
|
|
7400
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/error-message.md
|
|
7401
7428
|
*/
|
|
7402
7429
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
7403
7430
|
/**
|
|
7404
7431
|
* Require escape sequences to use uppercase or lowercase values.
|
|
7405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/escape-case.md
|
|
7406
7433
|
*/
|
|
7407
7434
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
7408
7435
|
/**
|
|
7409
7436
|
* Add expiration conditions to TODO comments.
|
|
7410
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/expiring-todo-comments.md
|
|
7411
7438
|
*/
|
|
7412
7439
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
7413
7440
|
/**
|
|
7414
7441
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
7415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/explicit-length-check.md
|
|
7416
7443
|
*/
|
|
7417
7444
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
7418
7445
|
/**
|
|
7419
7446
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
7420
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/explicit-timer-delay.md
|
|
7421
7448
|
*/
|
|
7422
7449
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
7423
7450
|
/**
|
|
7424
7451
|
* Enforce a case style for filenames and directory names.
|
|
7425
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/filename-case.md
|
|
7426
7453
|
*/
|
|
7427
7454
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
7428
7455
|
/**
|
|
7429
7456
|
* Require identifiers to match a specified regular expression.
|
|
7430
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/id-match.md
|
|
7431
7458
|
*/
|
|
7432
7459
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
7433
7460
|
/**
|
|
7434
7461
|
* Enforce specific import styles per module.
|
|
7435
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/import-style.md
|
|
7436
7463
|
*/
|
|
7437
7464
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
7438
7465
|
/**
|
|
7439
7466
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
7440
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/isolated-functions.md
|
|
7441
7468
|
*/
|
|
7442
7469
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
7470
|
+
/**
|
|
7471
|
+
* Enforce a consistent style for optional loop sources.
|
|
7472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/iteration-fallback-style.md
|
|
7473
|
+
*/
|
|
7474
|
+
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
7443
7475
|
/**
|
|
7444
7476
|
* Require or disallow logical assignment operator shorthand
|
|
7445
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/logical-assignment-operators.md
|
|
7446
7478
|
*/
|
|
7447
7479
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
7448
7480
|
/**
|
|
7449
7481
|
* Limit the depth of nested calls.
|
|
7450
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/max-nested-calls.md
|
|
7451
7483
|
*/
|
|
7452
7484
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
7453
7485
|
/**
|
|
7454
7486
|
* Enforce replacements for variable, property, and filenames.
|
|
7455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/name-replacements.md
|
|
7456
7488
|
*/
|
|
7457
7489
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
7458
7490
|
/**
|
|
7459
7491
|
* Enforce correct use of `new` for builtin constructors.
|
|
7460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/new-for-builtins.md
|
|
7461
7493
|
*/
|
|
7462
7494
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
7463
7495
|
/**
|
|
7464
7496
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
7465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
7466
7498
|
*/
|
|
7467
7499
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
7468
7500
|
/**
|
|
7469
7501
|
* Disallow recursive access to `this` within getters and setters.
|
|
7470
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-accessor-recursion.md
|
|
7471
7503
|
*/
|
|
7472
7504
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
7473
7505
|
/**
|
|
7474
7506
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
7475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
7476
7508
|
*/
|
|
7477
7509
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
7478
7510
|
/**
|
|
7479
7511
|
* Disallow anonymous functions and classes as the default export.
|
|
7480
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-anonymous-default-export.md
|
|
7481
7513
|
*/
|
|
7482
7514
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
7483
7515
|
/**
|
|
7484
7516
|
* Prevent passing a function reference directly to iterator methods.
|
|
7485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-callback-reference.md
|
|
7486
7518
|
*/
|
|
7487
7519
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
7488
7520
|
/**
|
|
7489
7521
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
7490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-concat-in-loop.md
|
|
7491
7523
|
*/
|
|
7492
7524
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
7493
7525
|
/**
|
|
7494
7526
|
* Disallow using reference values as `Array#fill()` values.
|
|
7495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
7496
7528
|
*/
|
|
7497
7529
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
7498
7530
|
/**
|
|
7499
7531
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
7500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-from-fill.md
|
|
7501
7533
|
*/
|
|
7502
7534
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
7503
7535
|
/**
|
|
7504
7536
|
* Disallow front-of-array mutation.
|
|
7505
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-front-mutation.md
|
|
7506
7538
|
*/
|
|
7507
7539
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
7508
7540
|
/**
|
|
7509
7541
|
* Disallow using the `this` argument in array methods.
|
|
7510
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-method-this-argument.md
|
|
7511
7543
|
*/
|
|
7512
7544
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
7513
7545
|
/**
|
|
7514
7546
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
7515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
7516
7548
|
* @deprecated
|
|
7517
7549
|
*/
|
|
7518
7550
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
7519
7551
|
/**
|
|
7520
7552
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
7521
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7553
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-reduce.md
|
|
7522
7554
|
*/
|
|
7523
7555
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
7524
7556
|
/**
|
|
7525
7557
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
7526
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-reverse.md
|
|
7527
7559
|
*/
|
|
7528
7560
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
7529
7561
|
/**
|
|
7530
7562
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
7531
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-sort.md
|
|
7532
7564
|
*/
|
|
7533
7565
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
7534
7566
|
/**
|
|
7535
7567
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
7536
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
7537
7569
|
*/
|
|
7538
7570
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
7539
7571
|
/**
|
|
7540
7572
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
7541
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-splice.md
|
|
7542
7574
|
*/
|
|
7543
7575
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
7544
7576
|
/**
|
|
7545
7577
|
* Disallow asterisk prefixes in documentation comments.
|
|
7546
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7578
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
7547
7579
|
*/
|
|
7548
7580
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
7549
7581
|
/**
|
|
7550
7582
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
7551
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7583
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-async-promise-finally.md
|
|
7552
7584
|
*/
|
|
7553
7585
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
7554
7586
|
/**
|
|
7555
7587
|
* Disallow member access from await expression.
|
|
7556
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-await-expression-member.md
|
|
7557
7589
|
*/
|
|
7558
7590
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
7559
7591
|
/**
|
|
7560
7592
|
* Disallow using `await` in `Promise` method parameters.
|
|
7561
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-await-in-promise-methods.md
|
|
7562
7594
|
*/
|
|
7563
7595
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7596
|
+
/**
|
|
7597
|
+
* Disallow barrel files.
|
|
7598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-barrel-files.md
|
|
7599
|
+
*/
|
|
7600
|
+
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
7564
7601
|
/**
|
|
7565
7602
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
7566
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-blob-to-file.md
|
|
7567
7604
|
*/
|
|
7568
7605
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
7569
7606
|
/**
|
|
7570
7607
|
* Disallow boolean-returning sort comparators.
|
|
7571
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
7572
7609
|
*/
|
|
7573
7610
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7574
7611
|
/**
|
|
7575
7612
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
7576
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-break-in-nested-loop.md
|
|
7577
7614
|
*/
|
|
7578
7615
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
7579
7616
|
/**
|
|
7580
7617
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
7581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-canvas-to-image.md
|
|
7582
7619
|
*/
|
|
7583
7620
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
7584
7621
|
/**
|
|
7585
7622
|
* Disallow chained comparisons such as `a < b < c`.
|
|
7586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-chained-comparison.md
|
|
7587
7624
|
*/
|
|
7588
7625
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
7589
7626
|
/**
|
|
7590
7627
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
7591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-collection-bracket-access.md
|
|
7592
7629
|
*/
|
|
7593
7630
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
7594
7631
|
/**
|
|
7595
7632
|
* Disallow dynamic object property existence checks.
|
|
7596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-computed-property-existence-check.md
|
|
7597
7634
|
*/
|
|
7598
7635
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
7599
7636
|
/**
|
|
7600
7637
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
7601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-confusing-array-splice.md
|
|
7602
7639
|
*/
|
|
7603
7640
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
7604
7641
|
/**
|
|
7605
7642
|
* Disallow confusing uses of `Array#with()`.
|
|
7606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-confusing-array-with.md
|
|
7607
7644
|
*/
|
|
7608
7645
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
7609
7646
|
/**
|
|
7610
7647
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
7611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-console-spaces.md
|
|
7612
7649
|
*/
|
|
7613
7650
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
7614
7651
|
/**
|
|
7615
7652
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
7616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-constant-zero-expression.md
|
|
7617
7654
|
*/
|
|
7618
7655
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
7619
7656
|
/**
|
|
7620
7657
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
7621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
7622
7659
|
*/
|
|
7623
7660
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
7624
7661
|
/**
|
|
7625
7662
|
* Do not use `document.cookie` directly.
|
|
7626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-document-cookie.md
|
|
7627
7664
|
*/
|
|
7628
7665
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
7629
7666
|
/**
|
|
7630
7667
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
7631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-double-comparison.md
|
|
7632
7669
|
*/
|
|
7633
7670
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
7634
7671
|
/**
|
|
7635
7672
|
* Disallow duplicate adjacent branches in if chains.
|
|
7636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-if-branches.md
|
|
7637
7674
|
*/
|
|
7638
7675
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
7639
7676
|
/**
|
|
7640
7677
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
7641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
7642
7679
|
*/
|
|
7643
7680
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
7644
7681
|
/**
|
|
7645
7682
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
7646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-loops.md
|
|
7647
7684
|
*/
|
|
7648
7685
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
7649
7686
|
/**
|
|
7650
7687
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
7651
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-set-values.md
|
|
7652
7689
|
*/
|
|
7653
7690
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
7654
7691
|
/**
|
|
7655
7692
|
* Disallow empty files.
|
|
7656
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-empty-file.md
|
|
7657
7694
|
*/
|
|
7658
7695
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
7659
7696
|
/**
|
|
7660
7697
|
* Disallow assigning to built-in error properties.
|
|
7661
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-error-property-assignment.md
|
|
7662
7699
|
*/
|
|
7663
7700
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7664
7701
|
/**
|
|
7665
7702
|
* Disallow exports in scripts.
|
|
7666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-exports-in-scripts.md
|
|
7667
7704
|
*/
|
|
7668
7705
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
7669
7706
|
/**
|
|
7670
7707
|
* Prefer `for…of` over the `forEach` method.
|
|
7671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-for-each.md
|
|
7672
7709
|
*/
|
|
7673
7710
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
7674
7711
|
/**
|
|
7675
7712
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
7676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-for-loop.md
|
|
7677
7714
|
*/
|
|
7678
7715
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
7679
7716
|
/**
|
|
7680
7717
|
* Disallow assigning properties on the global object.
|
|
7681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-global-object-property-assignment.md
|
|
7682
7719
|
*/
|
|
7683
7720
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7684
7721
|
/**
|
|
7685
7722
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
7686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
7687
7724
|
* @deprecated
|
|
7688
7725
|
*/
|
|
7689
7726
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
7690
7727
|
/**
|
|
7691
7728
|
* Disallow immediate mutation after variable assignment.
|
|
7692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-immediate-mutation.md
|
|
7693
7730
|
*/
|
|
7694
7731
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
7695
7732
|
/**
|
|
7696
7733
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
7697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-impossible-length-comparison.md
|
|
7698
7735
|
*/
|
|
7699
7736
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
7700
7737
|
/**
|
|
7701
7738
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
7702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7739
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-incorrect-query-selector.md
|
|
7703
7740
|
*/
|
|
7704
7741
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
7705
7742
|
/**
|
|
7706
7743
|
* Disallow incorrect template literal interpolation syntax.
|
|
7707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
7708
7745
|
*/
|
|
7709
7746
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
7710
7747
|
/**
|
|
7711
7748
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
7712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7749
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
7713
7750
|
* @deprecated
|
|
7714
7751
|
*/
|
|
7715
7752
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
7716
7753
|
/**
|
|
7717
7754
|
* Disallow `instanceof` with built-in objects
|
|
7718
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-instanceof-builtins.md
|
|
7719
7756
|
*/
|
|
7720
7757
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
7721
7758
|
/**
|
|
7722
7759
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
7723
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-argument-count.md
|
|
7724
7761
|
*/
|
|
7725
7762
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
7726
7763
|
/**
|
|
7727
7764
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
7728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-character-comparison.md
|
|
7729
7766
|
*/
|
|
7730
7767
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
7731
7768
|
/**
|
|
7732
7769
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
7733
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-fetch-options.md
|
|
7734
7771
|
*/
|
|
7735
7772
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7736
7773
|
/**
|
|
7737
7774
|
* Disallow invalid `accept` values on file inputs.
|
|
7738
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
7739
7776
|
*/
|
|
7740
7777
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
7741
7778
|
/**
|
|
7742
7779
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
7743
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
7744
7781
|
*/
|
|
7745
7782
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
7746
7783
|
/**
|
|
7747
7784
|
* Disallow invalid implementations of well-known symbol methods.
|
|
7748
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
7749
7786
|
*/
|
|
7750
7787
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
7751
7788
|
/**
|
|
7752
7789
|
* Disallow identifiers starting with `new` or `class`.
|
|
7753
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-keyword-prefix.md
|
|
7754
7791
|
*/
|
|
7755
7792
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
7756
7793
|
/**
|
|
7757
7794
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
7758
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-late-current-target-access.md
|
|
7759
7796
|
*/
|
|
7760
7797
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
7761
7798
|
/**
|
|
7762
7799
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
7763
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-late-event-control.md
|
|
7764
7801
|
*/
|
|
7765
7802
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
7766
7803
|
/**
|
|
7767
7804
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
7768
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
7769
7806
|
* @deprecated
|
|
7770
7807
|
*/
|
|
7771
7808
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
7772
7809
|
/**
|
|
7773
7810
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
7774
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-lonely-if.md
|
|
7775
7812
|
*/
|
|
7776
7813
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
7777
7814
|
/**
|
|
7778
7815
|
* Disallow mutating a loop iterable during iteration.
|
|
7779
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
7780
7817
|
*/
|
|
7781
7818
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
7782
7819
|
/**
|
|
7783
7820
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
7784
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
7785
7822
|
*/
|
|
7786
7823
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7787
7824
|
/**
|
|
7788
7825
|
* Disallow manually wrapped comments.
|
|
7789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
7790
7827
|
*/
|
|
7791
7828
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
7792
7829
|
/**
|
|
7793
7830
|
* Disallow checking a Map key before accessing a different key.
|
|
7794
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-mismatched-map-key.md
|
|
7795
7832
|
*/
|
|
7796
7833
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
7797
7834
|
/**
|
|
7798
7835
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
7799
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-misrefactored-assignment.md
|
|
7800
7837
|
*/
|
|
7801
7838
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
7802
7839
|
/**
|
|
7803
7840
|
* Disallow references to missing local resources.
|
|
7804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-missing-local-resource.md
|
|
7805
7842
|
*/
|
|
7806
7843
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
7807
7844
|
/**
|
|
7808
7845
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
7809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
7810
7847
|
*/
|
|
7811
7848
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
7812
7849
|
/**
|
|
7813
7850
|
* Disallow named usage of default import and export.
|
|
7814
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-named-default.md
|
|
7815
7852
|
*/
|
|
7816
7853
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
7817
7854
|
/**
|
|
7818
7855
|
* Disallow negated array predicate calls.
|
|
7819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negated-array-predicate.md
|
|
7820
7857
|
*/
|
|
7821
7858
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7822
7859
|
/**
|
|
7823
7860
|
* Disallow negated comparisons.
|
|
7824
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negated-comparison.md
|
|
7825
7862
|
*/
|
|
7826
7863
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
7827
7864
|
/**
|
|
7828
7865
|
* Disallow negated conditions.
|
|
7829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negated-condition.md
|
|
7830
7867
|
*/
|
|
7831
7868
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
7832
7869
|
/**
|
|
7833
7870
|
* Disallow negated expression in equality check.
|
|
7834
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negation-in-equality-check.md
|
|
7835
7872
|
*/
|
|
7836
7873
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
7837
7874
|
/**
|
|
7838
7875
|
* Disallow nested ternary expressions.
|
|
7839
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-nested-ternary.md
|
|
7840
7877
|
*/
|
|
7841
7878
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7842
7879
|
/**
|
|
7843
7880
|
* Disallow `new Array()`.
|
|
7844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-new-array.md
|
|
7845
7882
|
*/
|
|
7846
7883
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
7847
7884
|
/**
|
|
7848
7885
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
7849
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-new-buffer.md
|
|
7850
7887
|
*/
|
|
7851
7888
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
7852
7889
|
/**
|
|
7853
7890
|
* Disallow non-function values with function-style verb prefixes.
|
|
7854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
7855
7892
|
*/
|
|
7856
7893
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
7857
7894
|
/**
|
|
7858
7895
|
* Disallow non-standard properties on built-in objects.
|
|
7859
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
7860
7897
|
*/
|
|
7861
7898
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
7862
7899
|
/**
|
|
7863
7900
|
* Disallow the use of the `null` literal.
|
|
7864
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-null.md
|
|
7865
7902
|
*/
|
|
7866
7903
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
7867
7904
|
/**
|
|
7868
7905
|
* Disallow the use of objects as default parameters.
|
|
7869
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-object-as-default-parameter.md
|
|
7870
7907
|
*/
|
|
7871
7908
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
7872
7909
|
/**
|
|
7873
7910
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
7874
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-object-methods-with-collections.md
|
|
7875
7912
|
*/
|
|
7876
7913
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
7877
7914
|
/**
|
|
7878
7915
|
* Disallow optional chaining on undeclared variables.
|
|
7879
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
7880
7917
|
*/
|
|
7881
7918
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
7882
7919
|
/**
|
|
7883
7920
|
* Disallow `process.exit()`.
|
|
7884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-process-exit.md
|
|
7885
7922
|
*/
|
|
7886
7923
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
7887
7924
|
/**
|
|
7888
7925
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
7889
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-redundant-comparison.md
|
|
7890
7927
|
*/
|
|
7891
7928
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
7892
7929
|
/**
|
|
7893
7930
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
7894
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-return-array-push.md
|
|
7895
7932
|
*/
|
|
7896
7933
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
7897
7934
|
/**
|
|
7898
7935
|
* Disallow selector syntax in DOM names.
|
|
7899
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-selector-as-dom-name.md
|
|
7900
7937
|
*/
|
|
7901
7938
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
7902
7939
|
/**
|
|
7903
7940
|
* Disallow shorthand properties that override related longhand properties.
|
|
7904
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
7905
7942
|
*/
|
|
7906
7943
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
7907
7944
|
/**
|
|
7908
7945
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
7909
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
7910
7947
|
*/
|
|
7911
7948
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7912
7949
|
/**
|
|
7913
7950
|
* Disallow classes that only have static members.
|
|
7914
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-static-only-class.md
|
|
7915
7952
|
*/
|
|
7916
7953
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
7917
7954
|
/**
|
|
7918
7955
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
7919
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-subtraction-comparison.md
|
|
7920
7957
|
*/
|
|
7921
7958
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
7922
7959
|
/**
|
|
7923
7960
|
* Disallow `then` property.
|
|
7924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-thenable.md
|
|
7925
7962
|
*/
|
|
7926
7963
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
7927
7964
|
/**
|
|
7928
7965
|
* Disallow assigning `this` to a variable.
|
|
7929
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-this-assignment.md
|
|
7930
7967
|
*/
|
|
7931
7968
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
7932
7969
|
/**
|
|
7933
7970
|
* Disallow `this` outside of classes.
|
|
7934
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-this-outside-of-class.md
|
|
7935
7972
|
*/
|
|
7936
7973
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
7937
7974
|
/**
|
|
7938
7975
|
* Disallow assigning to top-level variables from inside functions.
|
|
7939
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
7940
7977
|
*/
|
|
7941
7978
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
7942
7979
|
/**
|
|
7943
7980
|
* Disallow top-level side effects in exported modules.
|
|
7944
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-top-level-side-effects.md
|
|
7945
7982
|
*/
|
|
7946
7983
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
7947
7984
|
/**
|
|
7948
7985
|
* Disallow `all` as a transition property.
|
|
7949
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-transition-all.md
|
|
7950
7987
|
*/
|
|
7951
7988
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
7952
7989
|
/**
|
|
7953
7990
|
* Disallow comparing `undefined` using `typeof`.
|
|
7954
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-typeof-undefined.md
|
|
7955
7992
|
*/
|
|
7956
7993
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
7957
7994
|
/**
|
|
7958
7995
|
* Disallow referencing methods without calling them.
|
|
7959
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-uncalled-method.md
|
|
7960
7997
|
*/
|
|
7961
7998
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
7962
7999
|
/**
|
|
7963
8000
|
* Require class members to be declared.
|
|
7964
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-undeclared-class-members.md
|
|
7965
8002
|
*/
|
|
7966
8003
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
7967
8004
|
/**
|
|
7968
8005
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
7969
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
7970
8007
|
*/
|
|
7971
8008
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7972
8009
|
/**
|
|
7973
8010
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
7974
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
7975
8012
|
*/
|
|
7976
8013
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7977
8014
|
/**
|
|
7978
8015
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
7979
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
7980
8017
|
*/
|
|
7981
8018
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
7982
8019
|
/**
|
|
7983
8020
|
* Disallow awaiting non-promise values.
|
|
7984
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8021
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-await.md
|
|
7985
8022
|
*/
|
|
7986
8023
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
7987
8024
|
/**
|
|
7988
8025
|
* Disallow unnecessary comparisons against boolean literals.
|
|
7989
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
7990
8027
|
*/
|
|
7991
8028
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
7992
8029
|
/**
|
|
7993
8030
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
7994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
7995
8032
|
*/
|
|
7996
8033
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7997
8034
|
/**
|
|
7998
8035
|
* Disallow unnecessary `globalThis` references.
|
|
7999
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-global-this.md
|
|
8000
8037
|
*/
|
|
8001
8038
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
8002
8039
|
/**
|
|
8003
8040
|
* Disallow unnecessary nested ternary expressions.
|
|
8004
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8041
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
8005
8042
|
*/
|
|
8006
8043
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
8007
8044
|
/**
|
|
8008
8045
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
8009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8046
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
8010
8047
|
*/
|
|
8011
8048
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
8012
8049
|
/**
|
|
8013
8050
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
8014
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8051
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
8015
8052
|
*/
|
|
8016
8053
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
8017
8054
|
/**
|
|
8018
8055
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
8019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8056
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-splice.md
|
|
8020
8057
|
*/
|
|
8021
8058
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
8022
8059
|
/**
|
|
8023
8060
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
8024
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
8025
8062
|
*/
|
|
8026
8063
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
8027
8064
|
/**
|
|
8028
8065
|
* Disallow unreadable array destructuring.
|
|
8029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8066
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
8030
8067
|
*/
|
|
8031
8068
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
8032
8069
|
/**
|
|
8033
8070
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
8034
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8071
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
8035
8072
|
*/
|
|
8036
8073
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
8037
8074
|
/**
|
|
8038
8075
|
* Disallow unreadable IIFEs.
|
|
8039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8076
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-iife.md
|
|
8040
8077
|
*/
|
|
8041
8078
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
8042
8079
|
/**
|
|
8043
8080
|
* Disallow unreadable `new` expressions.
|
|
8044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-new-expression.md
|
|
8045
8082
|
*/
|
|
8046
8083
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
8047
8084
|
/**
|
|
8048
8085
|
* Disallow unreadable object destructuring.
|
|
8049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8086
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
8050
8087
|
*/
|
|
8051
8088
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8052
8089
|
/**
|
|
8053
8090
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
8054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8091
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
8055
8092
|
*/
|
|
8056
8093
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
8057
8094
|
/**
|
|
8058
8095
|
* Disallow unsafe DOM HTML APIs.
|
|
8059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8096
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-dom-html.md
|
|
8060
8097
|
*/
|
|
8061
8098
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
8062
8099
|
/**
|
|
8063
8100
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
8064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8101
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
8065
8102
|
*/
|
|
8066
8103
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
8067
8104
|
/**
|
|
8068
8105
|
* Disallow unsafe values as property keys.
|
|
8069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8106
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-property-key.md
|
|
8070
8107
|
*/
|
|
8071
8108
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
8109
|
+
/**
|
|
8110
|
+
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
8111
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
8112
|
+
*/
|
|
8113
|
+
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
8072
8114
|
/**
|
|
8073
8115
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
8074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8116
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
8075
8117
|
*/
|
|
8076
8118
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
8077
8119
|
/**
|
|
8078
8120
|
* Disallow ignoring the return value of selected array methods.
|
|
8079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8121
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unused-array-method-return.md
|
|
8080
8122
|
*/
|
|
8081
8123
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
8082
8124
|
/**
|
|
8083
8125
|
* Disallow unused object properties.
|
|
8084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8126
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unused-properties.md
|
|
8085
8127
|
*/
|
|
8086
8128
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
8087
8129
|
/**
|
|
8088
8130
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
8089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8131
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-boolean-cast.md
|
|
8090
8132
|
*/
|
|
8091
8133
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
8092
8134
|
/**
|
|
8093
8135
|
* Disallow useless type coercions of values that are already of the target type.
|
|
8094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8136
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-coercion.md
|
|
8095
8137
|
*/
|
|
8096
8138
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
8097
8139
|
/**
|
|
8098
8140
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
8099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8141
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-collection-argument.md
|
|
8100
8142
|
*/
|
|
8101
8143
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
8102
8144
|
/**
|
|
8103
8145
|
* Disallow useless compound assignments such as `x += 0`.
|
|
8104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8146
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-compound-assignment.md
|
|
8105
8147
|
*/
|
|
8106
8148
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
8107
8149
|
/**
|
|
8108
8150
|
* Disallow useless concatenation of literals.
|
|
8109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8151
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-concat.md
|
|
8110
8152
|
*/
|
|
8111
8153
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
8112
8154
|
/**
|
|
8113
8155
|
* Disallow useless `continue` statements.
|
|
8114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8156
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-continue.md
|
|
8115
8157
|
*/
|
|
8116
8158
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
8117
8159
|
/**
|
|
8118
8160
|
* Disallow unnecessary existence checks before deletion.
|
|
8119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8161
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-delete-check.md
|
|
8120
8162
|
*/
|
|
8121
8163
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
8122
8164
|
/**
|
|
8123
8165
|
* Disallow `else` after a statement that exits.
|
|
8124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8166
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-else.md
|
|
8125
8167
|
*/
|
|
8126
8168
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
8127
8169
|
/**
|
|
8128
8170
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
8129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8171
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
8130
8172
|
*/
|
|
8131
8173
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
8132
8174
|
/**
|
|
8133
8175
|
* Disallow useless fallback when spreading in object literals.
|
|
8134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8176
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
8135
8177
|
*/
|
|
8136
8178
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
8137
8179
|
/**
|
|
8138
8180
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
8139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8181
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
8140
8182
|
*/
|
|
8141
8183
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8142
8184
|
/**
|
|
8143
8185
|
* Disallow useless array length check.
|
|
8144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8186
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-length-check.md
|
|
8145
8187
|
*/
|
|
8146
8188
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
8147
8189
|
/**
|
|
8148
8190
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
8149
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8191
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-logical-operand.md
|
|
8150
8192
|
*/
|
|
8151
8193
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
8152
8194
|
/**
|
|
8153
8195
|
* Disallow useless overrides of class methods.
|
|
8154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8196
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-override.md
|
|
8155
8197
|
*/
|
|
8156
8198
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
8157
8199
|
/**
|
|
8158
8200
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
8159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8201
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
8160
8202
|
*/
|
|
8161
8203
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
8162
8204
|
/**
|
|
8163
8205
|
* Disallow redundant re-exports.
|
|
8164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8206
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-re-export.md
|
|
8165
8207
|
*/
|
|
8166
8208
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
8167
8209
|
/**
|
|
8168
8210
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
8169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8211
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-recursion.md
|
|
8170
8212
|
*/
|
|
8171
8213
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
8172
8214
|
/**
|
|
8173
8215
|
* Disallow unnecessary spread.
|
|
8174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8216
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-spread.md
|
|
8175
8217
|
*/
|
|
8176
8218
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
8177
8219
|
/**
|
|
8178
8220
|
* Disallow useless case in switch statements.
|
|
8179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-switch-case.md
|
|
8180
8222
|
*/
|
|
8181
8223
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
8182
8224
|
/**
|
|
8183
8225
|
* Disallow useless template literal expressions.
|
|
8184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8226
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-template-literals.md
|
|
8185
8227
|
*/
|
|
8186
8228
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
8187
8229
|
/**
|
|
8188
8230
|
* Disallow useless `undefined`.
|
|
8189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8231
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-undefined.md
|
|
8190
8232
|
*/
|
|
8191
8233
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
8192
8234
|
/**
|
|
8193
8235
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
8194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8236
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
8195
8237
|
*/
|
|
8196
8238
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
8197
8239
|
/**
|
|
8198
8240
|
* Disallow number literals with zero fractions or dangling dots.
|
|
8199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-zero-fractions.md
|
|
8200
8242
|
*/
|
|
8201
8243
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
8202
8244
|
/**
|
|
8203
8245
|
* Enforce proper case for numeric literals.
|
|
8204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/number-literal-case.md
|
|
8205
8247
|
*/
|
|
8206
8248
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
8207
8249
|
/**
|
|
8208
8250
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
8209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/numeric-separators-style.md
|
|
8210
8252
|
*/
|
|
8211
8253
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
8212
8254
|
/**
|
|
8213
8255
|
* Require assignment operator shorthand where possible.
|
|
8214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/operator-assignment.md
|
|
8215
8257
|
*/
|
|
8216
8258
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
8217
8259
|
/**
|
|
8218
8260
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
8219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-abort-signal-any.md
|
|
8220
8262
|
*/
|
|
8221
8263
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
8222
8264
|
/**
|
|
8223
8265
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
8224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
8225
8267
|
*/
|
|
8226
8268
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
8227
8269
|
/**
|
|
8228
8270
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
8229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-add-event-listener.md
|
|
8230
8272
|
*/
|
|
8231
8273
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
8232
8274
|
/**
|
|
8233
8275
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
8234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
8235
8277
|
*/
|
|
8236
8278
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
8237
8279
|
/**
|
|
8238
8280
|
* Prefer `AggregateError` when throwing collected errors.
|
|
8239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-aggregate-error.md
|
|
8240
8282
|
*/
|
|
8241
8283
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
8242
8284
|
/**
|
|
8243
8285
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
8244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-find.md
|
|
8245
8287
|
*/
|
|
8246
8288
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
8247
8289
|
/**
|
|
8248
8290
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
8249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-flat.md
|
|
8250
8292
|
*/
|
|
8251
8293
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
8252
8294
|
/**
|
|
8253
8295
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
8254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-flat-map.md
|
|
8255
8297
|
*/
|
|
8256
8298
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8257
8299
|
/**
|
|
8258
8300
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
8259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-from-async.md
|
|
8260
8302
|
*/
|
|
8261
8303
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
8262
8304
|
/**
|
|
8263
8305
|
* Prefer using the `Array.from()` mapping function argument.
|
|
8264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-from-map.md
|
|
8265
8307
|
*/
|
|
8266
8308
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
8267
8309
|
/**
|
|
8268
8310
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
8269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-from-range.md
|
|
8270
8312
|
*/
|
|
8271
8313
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
8272
8314
|
/**
|
|
8273
8315
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
8274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-index-of.md
|
|
8275
8317
|
*/
|
|
8276
8318
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
8277
8319
|
/**
|
|
8278
8320
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
8279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
8280
8322
|
*/
|
|
8281
8323
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8282
8324
|
/**
|
|
8283
8325
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
8284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-last-methods.md
|
|
8285
8327
|
*/
|
|
8286
8328
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
8287
8329
|
/**
|
|
8288
8330
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
8289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-slice.md
|
|
8290
8332
|
*/
|
|
8291
8333
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
8292
8334
|
/**
|
|
8293
8335
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
8294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8336
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-some.md
|
|
8295
8337
|
*/
|
|
8296
8338
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
8297
8339
|
/**
|
|
8298
8340
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
8299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-at.md
|
|
8300
8342
|
*/
|
|
8301
8343
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
8302
8344
|
/**
|
|
8303
8345
|
* Prefer `await` over promise chaining.
|
|
8304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-await.md
|
|
8305
8347
|
*/
|
|
8306
8348
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
8307
8349
|
/**
|
|
8308
8350
|
* Prefer `BigInt` literals over the constructor.
|
|
8309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8351
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-bigint-literals.md
|
|
8310
8352
|
*/
|
|
8311
8353
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
8312
8354
|
/**
|
|
8313
8355
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
8314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
8315
8357
|
*/
|
|
8316
8358
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
8317
8359
|
/**
|
|
8318
8360
|
* Prefer block statements over IIFEs used only for scoping.
|
|
8319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8361
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
8320
8362
|
*/
|
|
8321
8363
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
8322
8364
|
/**
|
|
8323
8365
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
8324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8366
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-boolean-return.md
|
|
8325
8367
|
*/
|
|
8326
8368
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8327
8369
|
/**
|
|
8328
8370
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
8329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8371
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-class-fields.md
|
|
8330
8372
|
*/
|
|
8331
8373
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
8332
8374
|
/**
|
|
8333
8375
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
8334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-classlist-toggle.md
|
|
8335
8377
|
*/
|
|
8336
8378
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
8337
8379
|
/**
|
|
8338
8380
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
8339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-code-point.md
|
|
8340
8382
|
*/
|
|
8341
8383
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
8342
8384
|
/**
|
|
8343
8385
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
8344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-continue.md
|
|
8345
8387
|
*/
|
|
8346
8388
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
8347
8389
|
/**
|
|
8348
8390
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
8349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-date-now.md
|
|
8350
8392
|
*/
|
|
8351
8393
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
8352
8394
|
/**
|
|
8353
8395
|
* Prefer default parameters over reassignment.
|
|
8354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-default-parameters.md
|
|
8355
8397
|
*/
|
|
8356
8398
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
8357
8399
|
/**
|
|
8358
8400
|
* Prefer direct iteration over default iterator method calls.
|
|
8359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-direct-iteration.md
|
|
8360
8402
|
*/
|
|
8361
8403
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
8362
8404
|
/**
|
|
8363
8405
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
8364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dispose.md
|
|
8365
8407
|
*/
|
|
8366
8408
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
8367
8409
|
/**
|
|
8368
8410
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
8369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-append.md
|
|
8370
8412
|
*/
|
|
8371
8413
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
8372
8414
|
/**
|
|
8373
8415
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
8374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8416
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
8375
8417
|
* @deprecated
|
|
8376
8418
|
*/
|
|
8377
8419
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
8378
8420
|
/**
|
|
8379
8421
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
8380
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
8381
8423
|
*/
|
|
8382
8424
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
8383
8425
|
/**
|
|
8384
8426
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
8385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-remove.md
|
|
8386
8428
|
*/
|
|
8387
8429
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
8388
8430
|
/**
|
|
8389
8431
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
8390
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
8391
8433
|
*/
|
|
8392
8434
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
8393
8435
|
/**
|
|
8394
8436
|
* Prefer `.textContent` over `.innerText`.
|
|
8395
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
8396
8438
|
*/
|
|
8397
8439
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
8398
8440
|
/**
|
|
8399
8441
|
* Prefer early returns over full-function conditional wrapping.
|
|
8400
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-early-return.md
|
|
8401
8443
|
*/
|
|
8402
8444
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
8403
8445
|
/**
|
|
8404
8446
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
8405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-else-if.md
|
|
8406
8448
|
*/
|
|
8407
8449
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
8408
8450
|
/**
|
|
8409
8451
|
* Prefer `Error.isError()` when checking for errors.
|
|
8410
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-error-is-error.md
|
|
8411
8453
|
*/
|
|
8412
8454
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
8413
8455
|
/**
|
|
8414
8456
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
8415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-event-target.md
|
|
8416
8458
|
*/
|
|
8417
8459
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
8418
8460
|
/**
|
|
8419
8461
|
* Prefer explicit viewport units.
|
|
8420
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
8421
8463
|
*/
|
|
8422
8464
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
8423
8465
|
/**
|
|
8424
8466
|
* Prefer `export…from` when re-exporting.
|
|
8425
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-export-from.md
|
|
8426
8468
|
*/
|
|
8427
8469
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
8428
8470
|
/**
|
|
8429
8471
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
8430
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
8431
8473
|
*/
|
|
8432
8474
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8433
8475
|
/**
|
|
8434
8476
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
8435
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
8436
8478
|
*/
|
|
8437
8479
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
8438
8480
|
/**
|
|
8439
8481
|
* Prefer global numeric constants over `Number` static properties.
|
|
8440
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-global-number-constants.md
|
|
8441
8483
|
*/
|
|
8442
8484
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
8443
8485
|
/**
|
|
8444
8486
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
8445
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-global-this.md
|
|
8446
8488
|
*/
|
|
8447
8489
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
8448
8490
|
/**
|
|
8449
8491
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
8450
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-group-by.md
|
|
8451
8493
|
*/
|
|
8452
8494
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
8453
8495
|
/**
|
|
8454
8496
|
* Prefer `.has()` when checking existence.
|
|
8455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-has-check.md
|
|
8456
8498
|
*/
|
|
8457
8499
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
8458
8500
|
/**
|
|
8459
8501
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
8460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
8461
8503
|
*/
|
|
8462
8504
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
8463
8505
|
/**
|
|
8464
8506
|
* Prefer HTTPS over HTTP.
|
|
8465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-https.md
|
|
8466
8508
|
*/
|
|
8467
|
-
'unicorn/prefer-https'?: Linter.RuleEntry<
|
|
8509
|
+
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
8468
8510
|
/**
|
|
8469
8511
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
8470
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
8471
8513
|
*/
|
|
8472
8514
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
8473
8515
|
/**
|
|
8474
8516
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
8475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-import-meta-properties.md
|
|
8476
8518
|
*/
|
|
8477
8519
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
8478
8520
|
/**
|
|
8479
8521
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
8480
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-includes.md
|
|
8481
8523
|
*/
|
|
8482
8524
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
8483
8525
|
/**
|
|
8484
8526
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
8485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
8486
8528
|
*/
|
|
8487
8529
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
8488
8530
|
/**
|
|
8489
8531
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
8490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
8491
8533
|
*/
|
|
8492
8534
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
8493
8535
|
/**
|
|
8494
8536
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
8495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-concat.md
|
|
8496
8538
|
*/
|
|
8497
8539
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
8498
8540
|
/**
|
|
8499
8541
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
8500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-helpers.md
|
|
8501
8543
|
*/
|
|
8502
8544
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
8503
8545
|
/**
|
|
8504
8546
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
8505
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-to-array.md
|
|
8506
8548
|
*/
|
|
8507
8549
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8508
8550
|
/**
|
|
8509
8551
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
8510
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
8511
8553
|
*/
|
|
8512
8554
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
8513
8555
|
/**
|
|
8514
8556
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
8515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
8516
8558
|
* @deprecated
|
|
8517
8559
|
*/
|
|
8518
8560
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
8519
8561
|
/**
|
|
8520
8562
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
8521
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
8522
8564
|
*/
|
|
8523
8565
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
8524
8566
|
/**
|
|
8525
8567
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
8526
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-location-assign.md
|
|
8527
8569
|
*/
|
|
8528
8570
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
8529
8571
|
/**
|
|
8530
8572
|
* Prefer using a logical operator over a ternary.
|
|
8531
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
8532
8574
|
*/
|
|
8533
8575
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
8534
8576
|
/**
|
|
8535
8577
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
8536
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8578
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-map-from-entries.md
|
|
8537
8579
|
*/
|
|
8538
8580
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
8539
8581
|
/**
|
|
8540
8582
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
8541
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8583
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-abs.md
|
|
8542
8584
|
*/
|
|
8543
8585
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
8544
8586
|
/**
|
|
8545
8587
|
* Prefer `Math` constants over their approximate numeric values.
|
|
8546
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-constants.md
|
|
8547
8589
|
*/
|
|
8548
8590
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
8549
8591
|
/**
|
|
8550
8592
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
8551
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-min-max.md
|
|
8552
8594
|
*/
|
|
8553
8595
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8554
8596
|
/**
|
|
8555
8597
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
8556
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-trunc.md
|
|
8557
8599
|
*/
|
|
8558
8600
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
8559
8601
|
/**
|
|
8560
8602
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
8561
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-minimal-ternary.md
|
|
8562
8604
|
*/
|
|
8563
8605
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
8564
8606
|
/**
|
|
8565
8607
|
* Prefer modern DOM APIs.
|
|
8566
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
8567
8609
|
*/
|
|
8568
8610
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
8569
8611
|
/**
|
|
8570
8612
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
8571
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-modern-math-apis.md
|
|
8572
8614
|
*/
|
|
8573
8615
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
8574
8616
|
/**
|
|
8575
8617
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
8576
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-module.md
|
|
8577
8619
|
*/
|
|
8578
8620
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
8579
8621
|
/**
|
|
8580
8622
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
8581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
8582
8624
|
*/
|
|
8583
8625
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
8584
8626
|
/**
|
|
8585
8627
|
* Prefer negative index over `.length - index` when possible.
|
|
8586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-negative-index.md
|
|
8587
8629
|
*/
|
|
8588
8630
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
8589
8631
|
/**
|
|
8590
8632
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
8591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-node-protocol.md
|
|
8592
8634
|
*/
|
|
8593
8635
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
8594
8636
|
/**
|
|
8595
8637
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
8596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-number-coercion.md
|
|
8597
8639
|
*/
|
|
8598
8640
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
8599
8641
|
/**
|
|
8600
8642
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
8601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
8602
8644
|
*/
|
|
8603
8645
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
8604
8646
|
/**
|
|
8605
8647
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
8606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-number-properties.md
|
|
8607
8649
|
*/
|
|
8608
8650
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
8609
8651
|
/**
|
|
8610
8652
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
8611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-define-properties.md
|
|
8612
8654
|
*/
|
|
8613
8655
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
8614
8656
|
/**
|
|
8615
8657
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
8616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
8617
8659
|
*/
|
|
8618
8660
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
8619
8661
|
/**
|
|
8620
8662
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
8621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-from-entries.md
|
|
8622
8664
|
*/
|
|
8623
8665
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
8624
8666
|
/**
|
|
8625
8667
|
* Prefer the most specific `Object` iterable method.
|
|
8626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
8627
8669
|
*/
|
|
8628
8670
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8629
8671
|
/**
|
|
8630
8672
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
8631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-observer-apis.md
|
|
8632
8674
|
*/
|
|
8633
8675
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
8634
8676
|
/**
|
|
8635
8677
|
* Prefer omitting the `catch` binding parameter.
|
|
8636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
8637
8679
|
*/
|
|
8638
8680
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
8639
8681
|
/**
|
|
8640
8682
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
8641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-path2d.md
|
|
8642
8684
|
*/
|
|
8643
8685
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
8644
8686
|
/**
|
|
8645
8687
|
* Prefer private class fields over the underscore-prefix convention.
|
|
8646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-private-class-fields.md
|
|
8647
8689
|
*/
|
|
8648
8690
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
8649
8691
|
/**
|
|
8650
8692
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
8651
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-promise-try.md
|
|
8652
8694
|
*/
|
|
8653
8695
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
8654
8696
|
/**
|
|
8655
8697
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
8656
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
8657
8699
|
*/
|
|
8658
8700
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
8659
8701
|
/**
|
|
8660
8702
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
8661
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-prototype-methods.md
|
|
8662
8704
|
*/
|
|
8663
8705
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
8664
8706
|
/**
|
|
8665
8707
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
8666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-query-selector.md
|
|
8667
8709
|
*/
|
|
8668
8710
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
8669
8711
|
/**
|
|
8670
8712
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
8671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-queue-microtask.md
|
|
8672
8714
|
*/
|
|
8673
8715
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
8674
8716
|
/**
|
|
8675
8717
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
8676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-reflect-apply.md
|
|
8677
8719
|
*/
|
|
8678
8720
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
8679
8721
|
/**
|
|
8680
8722
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
8681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-regexp-escape.md
|
|
8682
8724
|
*/
|
|
8683
8725
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
8684
8726
|
/**
|
|
8685
8727
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
8686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-regexp-test.md
|
|
8687
8729
|
*/
|
|
8688
8730
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
8689
8731
|
/**
|
|
8690
8732
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
8691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-response-static-json.md
|
|
8692
8734
|
*/
|
|
8693
8735
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
8694
8736
|
/**
|
|
8695
8737
|
* Prefer `:scope` when using element query selector methods.
|
|
8696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-scoped-selector.md
|
|
8697
8739
|
*/
|
|
8698
8740
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
8699
8741
|
/**
|
|
8700
8742
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
8701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-set-has.md
|
|
8702
8744
|
*/
|
|
8703
8745
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
8704
8746
|
/**
|
|
8705
8747
|
* Prefer `Set` methods for Set operations.
|
|
8706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-set-methods.md
|
|
8707
8749
|
*/
|
|
8708
8750
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
8709
8751
|
/**
|
|
8710
8752
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
8711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-set-size.md
|
|
8712
8754
|
*/
|
|
8713
8755
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
8714
8756
|
/**
|
|
8715
8757
|
* Prefer arrow function properties over methods with a single return.
|
|
8716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8758
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-short-arrow-method.md
|
|
8717
8759
|
*/
|
|
8718
8760
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
8719
8761
|
/**
|
|
8720
8762
|
* Prefer simple conditions first in logical expressions.
|
|
8721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-simple-condition-first.md
|
|
8722
8764
|
*/
|
|
8723
8765
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
8724
8766
|
/**
|
|
8725
8767
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
8726
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
8727
8769
|
*/
|
|
8728
8770
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
8729
8771
|
/**
|
|
8730
8772
|
* Prefer simplified conditions.
|
|
8731
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-simplified-conditions.md
|
|
8732
8774
|
*/
|
|
8733
8775
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
8734
8776
|
/**
|
|
8735
8777
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
8736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-array-predicate.md
|
|
8737
8779
|
*/
|
|
8738
8780
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
8739
8781
|
/**
|
|
8740
8782
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
8741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-call.md
|
|
8742
8784
|
*/
|
|
8743
8785
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
8744
8786
|
/**
|
|
8745
8787
|
* Prefer a single object destructuring declaration per local const source.
|
|
8746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
8747
8789
|
*/
|
|
8748
8790
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8749
8791
|
/**
|
|
8750
8792
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
8751
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-replace.md
|
|
8752
8794
|
*/
|
|
8753
8795
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
8754
8796
|
/**
|
|
8755
8797
|
* Prefer declaring variables in the smallest possible scope.
|
|
8756
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-smaller-scope.md
|
|
8757
8799
|
*/
|
|
8758
8800
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
8759
8801
|
/**
|
|
8760
8802
|
* Prefer `String#split()` with a limit.
|
|
8761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-split-limit.md
|
|
8762
8804
|
*/
|
|
8763
8805
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
8764
8806
|
/**
|
|
8765
8807
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
8766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8808
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-spread.md
|
|
8767
8809
|
*/
|
|
8768
8810
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
8769
8811
|
/**
|
|
8770
8812
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
8771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-match-all.md
|
|
8772
8814
|
*/
|
|
8773
8815
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
8774
8816
|
/**
|
|
8775
8817
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
8776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8818
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
8777
8819
|
*/
|
|
8778
8820
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
8779
8821
|
/**
|
|
8780
8822
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
8781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-raw.md
|
|
8782
8824
|
*/
|
|
8783
8825
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
8784
8826
|
/**
|
|
8785
8827
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
8786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8828
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-repeat.md
|
|
8787
8829
|
*/
|
|
8788
8830
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
8789
8831
|
/**
|
|
8790
8832
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
8791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-replace-all.md
|
|
8792
8834
|
*/
|
|
8793
8835
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
8794
8836
|
/**
|
|
8795
8837
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
8796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-slice.md
|
|
8797
8839
|
*/
|
|
8798
8840
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
8799
8841
|
/**
|
|
8800
8842
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
8801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
8802
8844
|
*/
|
|
8803
8845
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
8804
8846
|
/**
|
|
8805
8847
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
8806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
8807
8849
|
*/
|
|
8808
8850
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
8809
8851
|
/**
|
|
8810
8852
|
* Prefer using `structuredClone` to create a deep clone.
|
|
8811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-structured-clone.md
|
|
8812
8854
|
*/
|
|
8813
8855
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
8814
8856
|
/**
|
|
8815
8857
|
* Prefer `switch` over multiple `else-if`.
|
|
8816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-switch.md
|
|
8817
8859
|
*/
|
|
8818
8860
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
8819
8861
|
/**
|
|
8820
8862
|
* Prefer `Temporal` over `Date`.
|
|
8821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8863
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-temporal.md
|
|
8822
8864
|
*/
|
|
8823
8865
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
8824
8866
|
/**
|
|
8825
8867
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
8826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-ternary.md
|
|
8827
8869
|
*/
|
|
8828
8870
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
8829
8871
|
/**
|
|
8830
8872
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
8831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-then-catch.md
|
|
8832
8874
|
*/
|
|
8833
8875
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
8834
8876
|
/**
|
|
8835
8877
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
8836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8878
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-toggle-attribute.md
|
|
8837
8879
|
*/
|
|
8838
8880
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
8839
8881
|
/**
|
|
8840
8882
|
* Prefer top-level await over top-level promises and async function calls.
|
|
8841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8883
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-top-level-await.md
|
|
8842
8884
|
*/
|
|
8843
8885
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
8844
8886
|
/**
|
|
8845
8887
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
8846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8888
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-type-error.md
|
|
8847
8889
|
*/
|
|
8848
8890
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
8849
8891
|
/**
|
|
8850
8892
|
* Require type literals to be last in union types.
|
|
8851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8893
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-type-literal-last.md
|
|
8852
8894
|
*/
|
|
8853
8895
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
8854
8896
|
/**
|
|
8855
8897
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
8856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8898
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-uint8array-base64.md
|
|
8857
8899
|
*/
|
|
8858
8900
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
8859
8901
|
/**
|
|
8860
8902
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
8861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8903
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-unary-minus.md
|
|
8862
8904
|
*/
|
|
8863
8905
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
8864
8906
|
/**
|
|
8865
8907
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
8866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8908
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
8867
8909
|
*/
|
|
8868
8910
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
8869
8911
|
/**
|
|
8870
8912
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
8871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8913
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-url-can-parse.md
|
|
8872
8914
|
*/
|
|
8873
8915
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
8874
8916
|
/**
|
|
8875
8917
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
8876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8918
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-url-href.md
|
|
8877
8919
|
*/
|
|
8878
8920
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
8879
8921
|
/**
|
|
8880
8922
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
8881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8923
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-url-search-parameters.md
|
|
8882
8924
|
*/
|
|
8883
8925
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
8884
8926
|
/**
|
|
8885
8927
|
* Prefer putting the condition in the while statement.
|
|
8886
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8928
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-while-loop-condition.md
|
|
8887
8929
|
*/
|
|
8888
8930
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
8889
8931
|
/**
|
|
8890
8932
|
* Renamed to `unicorn/name-replacements`.
|
|
8891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8933
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
8892
8934
|
* @deprecated
|
|
8893
8935
|
*/
|
|
8894
8936
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
8895
8937
|
/**
|
|
8896
8938
|
* Enforce consistent relative URL style.
|
|
8897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/relative-url-style.md
|
|
8898
8940
|
*/
|
|
8899
8941
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
8900
8942
|
/**
|
|
8901
8943
|
* Enforce using the separator argument with `Array#join()`.
|
|
8902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-array-join-separator.md
|
|
8903
8945
|
*/
|
|
8904
8946
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
8905
8947
|
/**
|
|
8906
8948
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
8907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8949
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-array-sort-compare.md
|
|
8908
8950
|
*/
|
|
8909
8951
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
8910
8952
|
/**
|
|
8911
8953
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
8912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8954
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-css-escape.md
|
|
8913
8955
|
*/
|
|
8914
8956
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
8915
8957
|
/**
|
|
8916
8958
|
* Require configured YAML frontmatter fields.
|
|
8917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-frontmatter-fields.md
|
|
8918
8960
|
*/
|
|
8919
8961
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
8920
8962
|
/**
|
|
8921
8963
|
* Require non-empty module attributes for imports and exports
|
|
8922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-module-attributes.md
|
|
8923
8965
|
*/
|
|
8924
8966
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
8925
8967
|
/**
|
|
8926
8968
|
* Require non-empty specifier list in import and export statements.
|
|
8927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8969
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-module-specifiers.md
|
|
8928
8970
|
*/
|
|
8929
8971
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
8930
8972
|
/**
|
|
8931
8973
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
8932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
8933
8975
|
*/
|
|
8934
8976
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
8935
8977
|
/**
|
|
8936
8978
|
* Require passive event listeners for high-frequency events.
|
|
8937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8979
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-passive-events.md
|
|
8938
8980
|
*/
|
|
8939
8981
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
8940
8982
|
/**
|
|
8941
8983
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
8942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-post-message-target-origin.md
|
|
8943
8985
|
*/
|
|
8944
8986
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
8945
8987
|
/**
|
|
8946
8988
|
* Require boolean-returning Proxy traps to return booleans.
|
|
8947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
8948
8990
|
*/
|
|
8949
8991
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8992
|
+
/**
|
|
8993
|
+
* Enforce a consistent style for single-line block comments.
|
|
8994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/single-line-block-comment-style.md
|
|
8995
|
+
*/
|
|
8996
|
+
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
8950
8997
|
/**
|
|
8951
8998
|
* Enforce better string content.
|
|
8952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/string-content.md
|
|
8953
9000
|
*/
|
|
8954
9001
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
8955
9002
|
/**
|
|
8956
9003
|
* Enforce consistent brace style for `case` clauses.
|
|
8957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9004
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/switch-case-braces.md
|
|
8958
9005
|
*/
|
|
8959
9006
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
8960
9007
|
/**
|
|
8961
9008
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
8962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9009
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/switch-case-break-position.md
|
|
8963
9010
|
*/
|
|
8964
9011
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
8965
9012
|
/**
|
|
8966
9013
|
* Fix whitespace-insensitive template indentation.
|
|
8967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/template-indent.md
|
|
8968
9015
|
*/
|
|
8969
9016
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
8970
9017
|
/**
|
|
8971
9018
|
* Enforce consistent case for text encoding identifiers.
|
|
8972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/text-encoding-identifier-case.md
|
|
8973
9020
|
*/
|
|
8974
9021
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
8975
9022
|
/**
|
|
8976
9023
|
* Require `new` when creating an error.
|
|
8977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/throw-new-error.md
|
|
8978
9025
|
*/
|
|
8979
9026
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
8980
9027
|
/**
|
|
8981
9028
|
* Limit the complexity of `try` blocks.
|
|
8982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9029
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/try-complexity.md
|
|
8983
9030
|
*/
|
|
8984
9031
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
8985
9032
|
/**
|
|
@@ -10461,6 +10508,11 @@ interface RuleOptions {
|
|
|
10461
10508
|
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-spacing.html
|
|
10462
10509
|
*/
|
|
10463
10510
|
'yaml/key-spacing'?: Linter.RuleEntry<YamlKeySpacing>;
|
|
10511
|
+
/**
|
|
10512
|
+
* disallow boolean mapping keys
|
|
10513
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-boolean-key.html
|
|
10514
|
+
*/
|
|
10515
|
+
'yaml/no-boolean-key'?: Linter.RuleEntry<[]>;
|
|
10464
10516
|
/**
|
|
10465
10517
|
* disallow empty document
|
|
10466
10518
|
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-document.html
|
|
@@ -12107,15 +12159,19 @@ type JsoncSortKeys = ([{
|
|
|
12107
12159
|
hasProperties?: string[];
|
|
12108
12160
|
order: ((string | {
|
|
12109
12161
|
keyPattern?: string;
|
|
12110
|
-
order?: {
|
|
12162
|
+
order?: ({
|
|
12111
12163
|
type?: ("asc" | "desc");
|
|
12112
12164
|
caseSensitive?: boolean;
|
|
12113
12165
|
natural?: boolean;
|
|
12114
|
-
}
|
|
12166
|
+
} | {
|
|
12167
|
+
type: "ignore";
|
|
12168
|
+
});
|
|
12115
12169
|
})[] | {
|
|
12116
12170
|
type?: ("asc" | "desc");
|
|
12117
12171
|
caseSensitive?: boolean;
|
|
12118
12172
|
natural?: boolean;
|
|
12173
|
+
} | {
|
|
12174
|
+
type: "ignore";
|
|
12119
12175
|
});
|
|
12120
12176
|
minKeys?: number;
|
|
12121
12177
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -12124,15 +12180,19 @@ type JsoncSortKeys = ([{
|
|
|
12124
12180
|
hasProperties?: string[];
|
|
12125
12181
|
order: ((string | {
|
|
12126
12182
|
keyPattern?: string;
|
|
12127
|
-
order?: {
|
|
12183
|
+
order?: ({
|
|
12128
12184
|
type?: ("asc" | "desc");
|
|
12129
12185
|
caseSensitive?: boolean;
|
|
12130
12186
|
natural?: boolean;
|
|
12131
|
-
}
|
|
12187
|
+
} | {
|
|
12188
|
+
type: "ignore";
|
|
12189
|
+
});
|
|
12132
12190
|
})[] | {
|
|
12133
12191
|
type?: ("asc" | "desc");
|
|
12134
12192
|
caseSensitive?: boolean;
|
|
12135
12193
|
natural?: boolean;
|
|
12194
|
+
} | {
|
|
12195
|
+
type: "ignore";
|
|
12136
12196
|
});
|
|
12137
12197
|
minKeys?: number;
|
|
12138
12198
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -19564,7 +19624,9 @@ type UnicodeBom = [] | [("always" | "never")];
|
|
|
19564
19624
|
// ----- unicorn/catch-error-name -----
|
|
19565
19625
|
type UnicornCatchErrorName = [] | [{
|
|
19566
19626
|
name?: string;
|
|
19567
|
-
ignore?:
|
|
19627
|
+
ignore?: (string | {
|
|
19628
|
+
[k: string]: unknown | undefined;
|
|
19629
|
+
})[];
|
|
19568
19630
|
}];
|
|
19569
19631
|
// ----- unicorn/class-reference-in-static-methods -----
|
|
19570
19632
|
type UnicornClassReferenceInStaticMethods = [] | [{
|
|
@@ -19584,11 +19646,19 @@ type UnicornCommentContent = [] | [{
|
|
|
19584
19646
|
}];
|
|
19585
19647
|
// ----- unicorn/consistent-boolean-name -----
|
|
19586
19648
|
type UnicornConsistentBooleanName = [] | [{
|
|
19587
|
-
|
|
19649
|
+
checkVariables?: ("always" | "prohibit" | "never");
|
|
19650
|
+
checkArguments?: ("always" | "prohibit" | "never");
|
|
19651
|
+
checkFunctions?: ("always" | "prohibit" | "never");
|
|
19652
|
+
checkMethods?: ("always" | "prohibit" | "never");
|
|
19653
|
+
checkFields?: ("always" | "prohibit" | "never");
|
|
19588
19654
|
prefixes?: {
|
|
19589
19655
|
[k: string]: boolean | undefined;
|
|
19590
19656
|
};
|
|
19657
|
+
wrappers?: {
|
|
19658
|
+
[k: string]: string | undefined;
|
|
19659
|
+
};
|
|
19591
19660
|
ignore?: unknown[];
|
|
19661
|
+
[k: string]: unknown;
|
|
19592
19662
|
}];
|
|
19593
19663
|
// ----- unicorn/consistent-class-member-order -----
|
|
19594
19664
|
type UnicornConsistentClassMemberOrder = [] | [{
|
|
@@ -19622,6 +19692,7 @@ type UnicornConsistentFunctionScoping = [] | [{
|
|
|
19622
19692
|
// ----- unicorn/consistent-function-style -----
|
|
19623
19693
|
type UnicornConsistentFunctionStyle = [] | [{
|
|
19624
19694
|
default?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
19695
|
+
defaultExport?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
19625
19696
|
namedFunctions?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
19626
19697
|
namedExports?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
19627
19698
|
callbacks?: ("function-expression" | "arrow-function" | "ignore");
|
|
@@ -19645,7 +19716,9 @@ type UnicornEscapeCase = [] | [("uppercase" | "lowercase")];
|
|
|
19645
19716
|
// ----- unicorn/expiring-todo-comments -----
|
|
19646
19717
|
type UnicornExpiringTodoComments = [] | [{
|
|
19647
19718
|
terms?: string[];
|
|
19648
|
-
ignore?:
|
|
19719
|
+
ignore?: (string | {
|
|
19720
|
+
[k: string]: unknown | undefined;
|
|
19721
|
+
})[];
|
|
19649
19722
|
checkDates?: boolean;
|
|
19650
19723
|
checkDatesOnPullRequests?: boolean;
|
|
19651
19724
|
allowWarningComments?: boolean;
|
|
@@ -19660,7 +19733,9 @@ type UnicornExplicitTimerDelay = [] | [("always" | "never")];
|
|
|
19660
19733
|
// ----- unicorn/filename-case -----
|
|
19661
19734
|
type UnicornFilenameCase = [] | [({
|
|
19662
19735
|
case?: ("camelCase" | "camelCaseWithAcronyms" | "snakeCase" | "kebabCase" | "pascalCase");
|
|
19663
|
-
ignore?:
|
|
19736
|
+
ignore?: (string | {
|
|
19737
|
+
[k: string]: unknown | undefined;
|
|
19738
|
+
})[];
|
|
19664
19739
|
multipleFileExtensions?: boolean;
|
|
19665
19740
|
checkDirectories?: boolean;
|
|
19666
19741
|
} | {
|
|
@@ -19671,7 +19746,9 @@ type UnicornFilenameCase = [] | [({
|
|
|
19671
19746
|
kebabCase?: boolean;
|
|
19672
19747
|
pascalCase?: boolean;
|
|
19673
19748
|
};
|
|
19674
|
-
ignore?:
|
|
19749
|
+
ignore?: (string | {
|
|
19750
|
+
[k: string]: unknown | undefined;
|
|
19751
|
+
})[];
|
|
19675
19752
|
multipleFileExtensions?: boolean;
|
|
19676
19753
|
checkDirectories?: boolean;
|
|
19677
19754
|
})];
|
|
@@ -19708,6 +19785,8 @@ type UnicornIsolatedFunctions = [] | [{
|
|
|
19708
19785
|
selectors?: string[];
|
|
19709
19786
|
comments?: string[];
|
|
19710
19787
|
}];
|
|
19788
|
+
// ----- unicorn/iteration-fallback-style -----
|
|
19789
|
+
type UnicornIterationFallbackStyle = [] | [("guard" | "fallback")];
|
|
19711
19790
|
// ----- unicorn/logical-assignment-operators -----
|
|
19712
19791
|
type UnicornLogicalAssignmentOperators = (([] | ["always"] | ["always", {
|
|
19713
19792
|
enforceForIfStatements?: boolean;
|
|
@@ -19728,7 +19807,9 @@ type UnicornNameReplacements = [] | [{
|
|
|
19728
19807
|
replacements?: _UnicornNameReplacements_NameReplacements;
|
|
19729
19808
|
extendDefaultAllowList?: boolean;
|
|
19730
19809
|
allowList?: _UnicornNameReplacements_BooleanObject;
|
|
19731
|
-
ignore?:
|
|
19810
|
+
ignore?: (string | {
|
|
19811
|
+
[k: string]: unknown | undefined;
|
|
19812
|
+
})[];
|
|
19732
19813
|
}];
|
|
19733
19814
|
type _UnicornNameReplacementsReplacements = (false | _UnicornNameReplacements_BooleanObject) | undefined;
|
|
19734
19815
|
interface _UnicornNameReplacements_NameReplacements {
|
|
@@ -19776,7 +19857,7 @@ type UnicornNoInvalidArgumentCount = [] | [{
|
|
|
19776
19857
|
}];
|
|
19777
19858
|
// ----- unicorn/no-keyword-prefix -----
|
|
19778
19859
|
type UnicornNoKeywordPrefix = [] | [{
|
|
19779
|
-
disallowedPrefixes?: []
|
|
19860
|
+
disallowedPrefixes?: string[];
|
|
19780
19861
|
checkProperties?: boolean;
|
|
19781
19862
|
onlyCamelCase?: boolean;
|
|
19782
19863
|
}];
|
|
@@ -19787,7 +19868,9 @@ type UnicornNoNegatedComparison = [] | [{
|
|
|
19787
19868
|
// ----- unicorn/no-non-function-verb-prefix -----
|
|
19788
19869
|
type UnicornNoNonFunctionVerbPrefix = [] | [{
|
|
19789
19870
|
verbs?: string[];
|
|
19790
|
-
ignore?:
|
|
19871
|
+
ignore?: (string | {
|
|
19872
|
+
[k: string]: unknown | undefined;
|
|
19873
|
+
})[];
|
|
19791
19874
|
}];
|
|
19792
19875
|
// ----- unicorn/no-null -----
|
|
19793
19876
|
type UnicornNoNull = [] | [{
|
|
@@ -19800,7 +19883,7 @@ type UnicornNoTypeofUndefined = [] | [{
|
|
|
19800
19883
|
}];
|
|
19801
19884
|
// ----- unicorn/no-unnecessary-polyfills -----
|
|
19802
19885
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
19803
|
-
targets?: (string |
|
|
19886
|
+
targets?: (string | string[] | {
|
|
19804
19887
|
[k: string]: unknown | undefined;
|
|
19805
19888
|
});
|
|
19806
19889
|
}];
|
|
@@ -19854,11 +19937,11 @@ type UnicornPreferArrayFind = [] | [{
|
|
|
19854
19937
|
}];
|
|
19855
19938
|
// ----- unicorn/prefer-array-flat -----
|
|
19856
19939
|
type UnicornPreferArrayFlat = [] | [{
|
|
19857
|
-
functions?:
|
|
19940
|
+
functions?: string[];
|
|
19858
19941
|
}];
|
|
19859
19942
|
// ----- unicorn/prefer-at -----
|
|
19860
19943
|
type UnicornPreferAt = [] | [{
|
|
19861
|
-
getLastElementFunctions?:
|
|
19944
|
+
getLastElementFunctions?: string[];
|
|
19862
19945
|
checkAllIndexAccess?: boolean;
|
|
19863
19946
|
}];
|
|
19864
19947
|
// ----- unicorn/prefer-continue -----
|
|
@@ -19882,6 +19965,12 @@ type UnicornPreferExplicitViewportUnits = [] | [{
|
|
|
19882
19965
|
type UnicornPreferExportFrom = [] | [{
|
|
19883
19966
|
checkUsedVariables?: boolean;
|
|
19884
19967
|
}];
|
|
19968
|
+
// ----- unicorn/prefer-https -----
|
|
19969
|
+
type UnicornPreferHttps = [] | [{
|
|
19970
|
+
ignore?: (string | {
|
|
19971
|
+
[k: string]: unknown | undefined;
|
|
19972
|
+
})[];
|
|
19973
|
+
}];
|
|
19885
19974
|
// ----- unicorn/prefer-includes-over-repeated-comparisons -----
|
|
19886
19975
|
type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
19887
19976
|
minimumComparisons?: number;
|
|
@@ -19898,7 +19987,7 @@ type UnicornPreferNumberProperties = [] | [{
|
|
|
19898
19987
|
}];
|
|
19899
19988
|
// ----- unicorn/prefer-object-from-entries -----
|
|
19900
19989
|
type UnicornPreferObjectFromEntries = [] | [{
|
|
19901
|
-
functions?:
|
|
19990
|
+
functions?: string[];
|
|
19902
19991
|
}];
|
|
19903
19992
|
// ----- unicorn/prefer-query-selector -----
|
|
19904
19993
|
type UnicornPreferQuerySelector = [] | [{
|
|
@@ -19917,7 +20006,7 @@ type UnicornPreferSetHas = [] | [{
|
|
|
19917
20006
|
type UnicornPreferShortArrowMethod = [] | [("always" | "consistent-as-needed")];
|
|
19918
20007
|
// ----- unicorn/prefer-single-call -----
|
|
19919
20008
|
type UnicornPreferSingleCall = [] | [{
|
|
19920
|
-
ignore?:
|
|
20009
|
+
ignore?: string[];
|
|
19921
20010
|
}];
|
|
19922
20011
|
// ----- unicorn/prefer-string-repeat -----
|
|
19923
20012
|
type UnicornPreferStringRepeat = [] | [{
|
|
@@ -19925,7 +20014,7 @@ type UnicornPreferStringRepeat = [] | [{
|
|
|
19925
20014
|
}];
|
|
19926
20015
|
// ----- unicorn/prefer-structured-clone -----
|
|
19927
20016
|
type UnicornPreferStructuredClone = [] | [{
|
|
19928
|
-
functions?:
|
|
20017
|
+
functions?: string[];
|
|
19929
20018
|
}];
|
|
19930
20019
|
// ----- unicorn/prefer-switch -----
|
|
19931
20020
|
type UnicornPreferSwitch = [] | [{
|
|
@@ -19950,6 +20039,12 @@ type UnicornRequireCssEscape = [] | [{
|
|
|
19950
20039
|
type UnicornRequireFrontmatterFields = [] | [{
|
|
19951
20040
|
fields?: string[];
|
|
19952
20041
|
}];
|
|
20042
|
+
// ----- unicorn/single-line-block-comment-style -----
|
|
20043
|
+
type UnicornSingleLineBlockCommentStyle = [] | [("multiline" | "single-line")] | [("multiline" | "single-line"), {
|
|
20044
|
+
ignore?: (string | {
|
|
20045
|
+
[k: string]: unknown | undefined;
|
|
20046
|
+
})[];
|
|
20047
|
+
}];
|
|
19953
20048
|
// ----- unicorn/string-content -----
|
|
19954
20049
|
type UnicornStringContent = [] | [{
|
|
19955
20050
|
patterns?: {
|
|
@@ -21523,15 +21618,19 @@ type YamlSortKeys = ([{
|
|
|
21523
21618
|
hasProperties?: string[];
|
|
21524
21619
|
order: ((string | {
|
|
21525
21620
|
keyPattern?: string;
|
|
21526
|
-
order?: {
|
|
21621
|
+
order?: ({
|
|
21527
21622
|
type?: ("asc" | "desc");
|
|
21528
21623
|
caseSensitive?: boolean;
|
|
21529
21624
|
natural?: boolean;
|
|
21530
|
-
}
|
|
21625
|
+
} | {
|
|
21626
|
+
type: "ignore";
|
|
21627
|
+
});
|
|
21531
21628
|
})[] | {
|
|
21532
21629
|
type?: ("asc" | "desc");
|
|
21533
21630
|
caseSensitive?: boolean;
|
|
21534
21631
|
natural?: boolean;
|
|
21632
|
+
} | {
|
|
21633
|
+
type: "ignore";
|
|
21535
21634
|
});
|
|
21536
21635
|
minKeys?: number;
|
|
21537
21636
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -21540,15 +21639,19 @@ type YamlSortKeys = ([{
|
|
|
21540
21639
|
hasProperties?: string[];
|
|
21541
21640
|
order: ((string | {
|
|
21542
21641
|
keyPattern?: string;
|
|
21543
|
-
order?: {
|
|
21642
|
+
order?: ({
|
|
21544
21643
|
type?: ("asc" | "desc");
|
|
21545
21644
|
caseSensitive?: boolean;
|
|
21546
21645
|
natural?: boolean;
|
|
21547
|
-
}
|
|
21646
|
+
} | {
|
|
21647
|
+
type: "ignore";
|
|
21648
|
+
});
|
|
21548
21649
|
})[] | {
|
|
21549
21650
|
type?: ("asc" | "desc");
|
|
21550
21651
|
caseSensitive?: boolean;
|
|
21551
21652
|
natural?: boolean;
|
|
21653
|
+
} | {
|
|
21654
|
+
type: "ignore";
|
|
21552
21655
|
});
|
|
21553
21656
|
minKeys?: number;
|
|
21554
21657
|
allowLineSeparatedGroups?: boolean;
|