@2digits/eslint-config 5.5.14 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +465 -365
- package/dist/index.mjs +1 -1
- package/package.json +29 -29
package/dist/index.d.mts
CHANGED
|
@@ -1934,6 +1934,11 @@ Backward pagination arguments
|
|
|
1934
1934
|
* @see https://nextjs.org/docs/messages/no-img-element
|
|
1935
1935
|
*/
|
|
1936
1936
|
'next/no-img-element'?: Linter.RuleEntry<[]>;
|
|
1937
|
+
/**
|
|
1938
|
+
* Prevent usage of `location.assign` or `location.href` assignment to navigate to internal Next.js pages.
|
|
1939
|
+
* @see https://nextjs.org/docs/messages/no-location-assign-relative-destination
|
|
1940
|
+
*/
|
|
1941
|
+
'next/no-location-assign-relative-destination'?: Linter.RuleEntry<[]>;
|
|
1937
1942
|
/**
|
|
1938
1943
|
* Prevent page-only custom fonts.
|
|
1939
1944
|
* @see https://nextjs.org/docs/messages/no-page-custom-font
|
|
@@ -2856,7 +2861,7 @@ Backward pagination arguments
|
|
|
2856
2861
|
*/
|
|
2857
2862
|
'node/no-new-require'?: Linter.RuleEntry<[]>;
|
|
2858
2863
|
/**
|
|
2859
|
-
* disallow string concatenation with `__dirname` and `
|
|
2864
|
+
* disallow string concatenation with `__dirname`, `__filename`, and `import.meta` paths
|
|
2860
2865
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-path-concat.md
|
|
2861
2866
|
*/
|
|
2862
2867
|
'node/no-path-concat'?: Linter.RuleEntry<[]>;
|
|
@@ -2965,11 +2970,21 @@ Backward pagination arguments
|
|
|
2965
2970
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url-search-params.md
|
|
2966
2971
|
*/
|
|
2967
2972
|
'node/prefer-global/url-search-params'?: Linter.RuleEntry<NodePreferGlobalUrlSearchParams>;
|
|
2973
|
+
/**
|
|
2974
|
+
* enforce using `node:assert/strict` instead of `node:assert`.
|
|
2975
|
+
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-import/assert-strict.md
|
|
2976
|
+
*/
|
|
2977
|
+
'node/prefer-import/assert-strict'?: Linter.RuleEntry<[]>;
|
|
2968
2978
|
/**
|
|
2969
2979
|
* enforce using the `node:` protocol when importing Node.js builtin modules.
|
|
2970
2980
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-node-protocol.md
|
|
2971
2981
|
*/
|
|
2972
2982
|
'node/prefer-node-protocol'?: Linter.RuleEntry<NodePreferNodeProtocol>;
|
|
2983
|
+
/**
|
|
2984
|
+
* enforce using `process.getBuiltinModule()` to load Node.js built-in modules
|
|
2985
|
+
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-process-get-builtin-module.md
|
|
2986
|
+
*/
|
|
2987
|
+
'node/prefer-process-get-builtin-module'?: Linter.RuleEntry<NodePreferProcessGetBuiltinModule>;
|
|
2973
2988
|
/**
|
|
2974
2989
|
* enforce `require("dns").promises`
|
|
2975
2990
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-promises/dns.md
|
|
@@ -7306,1715 +7321,1740 @@ Backward pagination arguments
|
|
|
7306
7321
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
7307
7322
|
/**
|
|
7308
7323
|
* Prefer better DOM traversal APIs.
|
|
7309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/better-dom-traversing.md
|
|
7310
7325
|
*/
|
|
7311
7326
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
7312
7327
|
/**
|
|
7313
7328
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
7314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
7315
7330
|
* @deprecated
|
|
7316
7331
|
*/
|
|
7317
7332
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
7318
7333
|
/**
|
|
7319
7334
|
* Enforce a specific parameter name in catch clauses.
|
|
7320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7335
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/catch-error-name.md
|
|
7321
7336
|
*/
|
|
7322
7337
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
7323
7338
|
/**
|
|
7324
7339
|
* Enforce consistent class references in static methods.
|
|
7325
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/class-reference-in-static-methods.md
|
|
7326
7341
|
*/
|
|
7327
7342
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
7328
7343
|
/**
|
|
7329
7344
|
* Enforce better comment content.
|
|
7330
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7345
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/comment-content.md
|
|
7331
7346
|
*/
|
|
7332
7347
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
7348
|
+
/**
|
|
7349
|
+
* Enforce a consistent return style for multiline arrow function bodies.
|
|
7350
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-arrow-return-style.md
|
|
7351
|
+
*/
|
|
7352
|
+
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
7333
7353
|
/**
|
|
7334
7354
|
* Enforce consistent assertion style with `node:assert`.
|
|
7335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-assert.md
|
|
7336
7356
|
*/
|
|
7337
7357
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
7338
7358
|
/**
|
|
7339
7359
|
* Enforce consistent naming for boolean names.
|
|
7340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7360
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-boolean-name.md
|
|
7341
7361
|
*/
|
|
7342
7362
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
7343
7363
|
/**
|
|
7344
7364
|
* Enforce consistent class member order.
|
|
7345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-class-member-order.md
|
|
7346
7366
|
*/
|
|
7347
7367
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
7348
7368
|
/**
|
|
7349
7369
|
* Enforce consistent spelling of compound words in identifiers.
|
|
7350
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-compound-words.md
|
|
7351
7371
|
*/
|
|
7352
7372
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
7353
7373
|
/**
|
|
7354
7374
|
* Enforce consistent conditional object spread style.
|
|
7355
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7375
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
7356
7376
|
*/
|
|
7357
7377
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
7358
7378
|
/**
|
|
7359
7379
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
7360
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7380
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-date-clone.md
|
|
7361
7381
|
*/
|
|
7362
7382
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
7363
7383
|
/**
|
|
7364
7384
|
* Use destructured variables over properties.
|
|
7365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7385
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-destructuring.md
|
|
7366
7386
|
*/
|
|
7367
7387
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
7368
7388
|
/**
|
|
7369
7389
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
7370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7390
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-empty-array-spread.md
|
|
7371
7391
|
*/
|
|
7372
7392
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
7373
7393
|
/**
|
|
7374
7394
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
7375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-existence-index-check.md
|
|
7376
7396
|
*/
|
|
7377
7397
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
7378
7398
|
/**
|
|
7379
7399
|
* Enforce consistent decorator position on exported classes.
|
|
7380
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-export-decorator-position.md
|
|
7381
7401
|
*/
|
|
7382
7402
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
7383
7403
|
/**
|
|
7384
7404
|
* Move function definitions to the highest possible scope.
|
|
7385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-function-scoping.md
|
|
7386
7406
|
*/
|
|
7387
7407
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
7388
7408
|
/**
|
|
7389
7409
|
* Enforce function syntax by role.
|
|
7390
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7410
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-function-style.md
|
|
7391
7411
|
*/
|
|
7392
7412
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
7393
7413
|
/**
|
|
7394
7414
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
7395
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7415
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-json-file-read.md
|
|
7396
7416
|
*/
|
|
7397
7417
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
7398
7418
|
/**
|
|
7399
7419
|
* Enforce consistent optional chaining for same-base member access.
|
|
7400
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7420
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-optional-chaining.md
|
|
7401
7421
|
*/
|
|
7402
7422
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
7403
7423
|
/**
|
|
7404
7424
|
* Enforce consistent style for escaping `${` in template literals.
|
|
7405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7425
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-template-literal-escape.md
|
|
7406
7426
|
*/
|
|
7407
7427
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
7408
7428
|
/**
|
|
7409
7429
|
* Enforce consistent labels on tuple type elements.
|
|
7410
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7430
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-tuple-labels.md
|
|
7411
7431
|
*/
|
|
7412
7432
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
7413
7433
|
/**
|
|
7414
7434
|
* Enforce correct `Error` subclassing.
|
|
7415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7435
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/custom-error-definition.md
|
|
7416
7436
|
*/
|
|
7417
7437
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
7418
7438
|
/**
|
|
7419
7439
|
* Enforce consistent default export declarations.
|
|
7420
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7440
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/default-export-style.md
|
|
7421
7441
|
*/
|
|
7422
7442
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
7423
7443
|
/**
|
|
7424
7444
|
* Enforce consistent style for DOM element dataset access.
|
|
7425
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7445
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/dom-node-dataset.md
|
|
7426
7446
|
*/
|
|
7427
7447
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
7428
7448
|
/**
|
|
7429
7449
|
* Enforce no spaces between braces.
|
|
7430
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/empty-brace-spaces.md
|
|
7431
7451
|
*/
|
|
7432
7452
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
7433
7453
|
/**
|
|
7434
7454
|
* Enforce passing a `message` value when creating a built-in error.
|
|
7435
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/error-message.md
|
|
7436
7456
|
*/
|
|
7437
7457
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
7438
7458
|
/**
|
|
7439
7459
|
* Require escape sequences to use uppercase or lowercase values.
|
|
7440
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7460
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/escape-case.md
|
|
7441
7461
|
*/
|
|
7442
7462
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
7443
7463
|
/**
|
|
7444
7464
|
* Add expiration conditions to TODO comments.
|
|
7445
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7465
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/expiring-todo-comments.md
|
|
7446
7466
|
*/
|
|
7447
7467
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
7448
7468
|
/**
|
|
7449
7469
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
7450
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7470
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/explicit-length-check.md
|
|
7451
7471
|
*/
|
|
7452
7472
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
7453
7473
|
/**
|
|
7454
7474
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
7455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7475
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/explicit-timer-delay.md
|
|
7456
7476
|
*/
|
|
7457
7477
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
7458
7478
|
/**
|
|
7459
7479
|
* Enforce a case style for filenames and directory names.
|
|
7460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7480
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/filename-case.md
|
|
7461
7481
|
*/
|
|
7462
7482
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
7463
7483
|
/**
|
|
7464
7484
|
* Require identifiers to match a specified regular expression.
|
|
7465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/id-match.md
|
|
7466
7486
|
*/
|
|
7467
7487
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
7468
7488
|
/**
|
|
7469
7489
|
* Enforce specific import styles per module.
|
|
7470
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7490
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/import-style.md
|
|
7471
7491
|
*/
|
|
7472
7492
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
7473
7493
|
/**
|
|
7474
7494
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
7475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/isolated-functions.md
|
|
7476
7496
|
*/
|
|
7477
7497
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
7498
|
+
/**
|
|
7499
|
+
* Enforce a consistent style for optional loop sources.
|
|
7500
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/iteration-fallback-style.md
|
|
7501
|
+
*/
|
|
7502
|
+
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
7478
7503
|
/**
|
|
7479
7504
|
* Require or disallow logical assignment operator shorthand
|
|
7480
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7505
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/logical-assignment-operators.md
|
|
7481
7506
|
*/
|
|
7482
7507
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
7483
7508
|
/**
|
|
7484
7509
|
* Limit the depth of nested calls.
|
|
7485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7510
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/max-nested-calls.md
|
|
7486
7511
|
*/
|
|
7487
7512
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
7488
7513
|
/**
|
|
7489
7514
|
* Enforce replacements for variable, property, and filenames.
|
|
7490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/name-replacements.md
|
|
7491
7516
|
*/
|
|
7492
7517
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
7493
7518
|
/**
|
|
7494
7519
|
* Enforce correct use of `new` for builtin constructors.
|
|
7495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7520
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/new-for-builtins.md
|
|
7496
7521
|
*/
|
|
7497
7522
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
7498
7523
|
/**
|
|
7499
7524
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
7500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7525
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
7501
7526
|
*/
|
|
7502
7527
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
7503
7528
|
/**
|
|
7504
7529
|
* Disallow recursive access to `this` within getters and setters.
|
|
7505
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7530
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-accessor-recursion.md
|
|
7506
7531
|
*/
|
|
7507
7532
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
7508
7533
|
/**
|
|
7509
7534
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
7510
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7535
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
7511
7536
|
*/
|
|
7512
7537
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
7513
7538
|
/**
|
|
7514
7539
|
* Disallow anonymous functions and classes as the default export.
|
|
7515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-anonymous-default-export.md
|
|
7516
7541
|
*/
|
|
7517
7542
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
7518
7543
|
/**
|
|
7519
7544
|
* Prevent passing a function reference directly to iterator methods.
|
|
7520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7545
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-callback-reference.md
|
|
7521
7546
|
*/
|
|
7522
7547
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
7523
7548
|
/**
|
|
7524
7549
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
7525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7550
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-concat-in-loop.md
|
|
7526
7551
|
*/
|
|
7527
7552
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
7528
7553
|
/**
|
|
7529
7554
|
* Disallow using reference values as `Array#fill()` values.
|
|
7530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7555
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
7531
7556
|
*/
|
|
7532
7557
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
7533
7558
|
/**
|
|
7534
7559
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
7535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7560
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-from-fill.md
|
|
7536
7561
|
*/
|
|
7537
7562
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
7538
7563
|
/**
|
|
7539
7564
|
* Disallow front-of-array mutation.
|
|
7540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7565
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-front-mutation.md
|
|
7541
7566
|
*/
|
|
7542
7567
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
7543
7568
|
/**
|
|
7544
7569
|
* Disallow using the `this` argument in array methods.
|
|
7545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7570
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-method-this-argument.md
|
|
7546
7571
|
*/
|
|
7547
7572
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
7548
7573
|
/**
|
|
7549
7574
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
7550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7575
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
7551
7576
|
* @deprecated
|
|
7552
7577
|
*/
|
|
7553
7578
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
7554
7579
|
/**
|
|
7555
7580
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
7556
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7581
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-reduce.md
|
|
7557
7582
|
*/
|
|
7558
7583
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
7559
7584
|
/**
|
|
7560
7585
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
7561
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7586
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-reverse.md
|
|
7562
7587
|
*/
|
|
7563
7588
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
7564
7589
|
/**
|
|
7565
7590
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
7566
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7591
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-sort.md
|
|
7567
7592
|
*/
|
|
7568
7593
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
7569
7594
|
/**
|
|
7570
7595
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
7571
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7596
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
7572
7597
|
*/
|
|
7573
7598
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
7574
7599
|
/**
|
|
7575
7600
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
7576
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7601
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-splice.md
|
|
7577
7602
|
*/
|
|
7578
7603
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
7579
7604
|
/**
|
|
7580
7605
|
* Disallow asterisk prefixes in documentation comments.
|
|
7581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7606
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
7582
7607
|
*/
|
|
7583
7608
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
7584
7609
|
/**
|
|
7585
7610
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
7586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7611
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-async-promise-finally.md
|
|
7587
7612
|
*/
|
|
7588
7613
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
7589
7614
|
/**
|
|
7590
7615
|
* Disallow member access from await expression.
|
|
7591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-await-expression-member.md
|
|
7592
7617
|
*/
|
|
7593
7618
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
7594
7619
|
/**
|
|
7595
7620
|
* Disallow using `await` in `Promise` method parameters.
|
|
7596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7621
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-await-in-promise-methods.md
|
|
7597
7622
|
*/
|
|
7598
7623
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7624
|
+
/**
|
|
7625
|
+
* Disallow barrel files.
|
|
7626
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-barrel-files.md
|
|
7627
|
+
*/
|
|
7628
|
+
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
7599
7629
|
/**
|
|
7600
7630
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
7601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-blob-to-file.md
|
|
7602
7632
|
*/
|
|
7603
7633
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
7604
7634
|
/**
|
|
7605
7635
|
* Disallow boolean-returning sort comparators.
|
|
7606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
7607
7637
|
*/
|
|
7608
7638
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7609
7639
|
/**
|
|
7610
7640
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
7611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-break-in-nested-loop.md
|
|
7612
7642
|
*/
|
|
7613
7643
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
7614
7644
|
/**
|
|
7615
7645
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
7616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-canvas-to-image.md
|
|
7617
7647
|
*/
|
|
7618
7648
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
7619
7649
|
/**
|
|
7620
7650
|
* Disallow chained comparisons such as `a < b < c`.
|
|
7621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-chained-comparison.md
|
|
7622
7652
|
*/
|
|
7623
7653
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
7624
7654
|
/**
|
|
7625
7655
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
7626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-collection-bracket-access.md
|
|
7627
7657
|
*/
|
|
7628
7658
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
7629
7659
|
/**
|
|
7630
7660
|
* Disallow dynamic object property existence checks.
|
|
7631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-computed-property-existence-check.md
|
|
7632
7662
|
*/
|
|
7633
7663
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
7634
7664
|
/**
|
|
7635
7665
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
7636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-confusing-array-splice.md
|
|
7637
7667
|
*/
|
|
7638
7668
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
7639
7669
|
/**
|
|
7640
7670
|
* Disallow confusing uses of `Array#with()`.
|
|
7641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-confusing-array-with.md
|
|
7642
7672
|
*/
|
|
7643
7673
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
7644
7674
|
/**
|
|
7645
7675
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
7646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-console-spaces.md
|
|
7647
7677
|
*/
|
|
7648
7678
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
7649
7679
|
/**
|
|
7650
7680
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
7651
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-constant-zero-expression.md
|
|
7652
7682
|
*/
|
|
7653
7683
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
7654
7684
|
/**
|
|
7655
7685
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
7656
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
7657
7687
|
*/
|
|
7658
7688
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
7659
7689
|
/**
|
|
7660
7690
|
* Do not use `document.cookie` directly.
|
|
7661
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-document-cookie.md
|
|
7662
7692
|
*/
|
|
7663
7693
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
7664
7694
|
/**
|
|
7665
7695
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
7666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-double-comparison.md
|
|
7667
7697
|
*/
|
|
7668
7698
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
7669
7699
|
/**
|
|
7670
7700
|
* Disallow duplicate adjacent branches in if chains.
|
|
7671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-if-branches.md
|
|
7672
7702
|
*/
|
|
7673
7703
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
7674
7704
|
/**
|
|
7675
7705
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
7676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
7677
7707
|
*/
|
|
7678
7708
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
7679
7709
|
/**
|
|
7680
7710
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
7681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7711
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-loops.md
|
|
7682
7712
|
*/
|
|
7683
7713
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
7684
7714
|
/**
|
|
7685
7715
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
7686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-set-values.md
|
|
7687
7717
|
*/
|
|
7688
7718
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
7689
7719
|
/**
|
|
7690
7720
|
* Disallow empty files.
|
|
7691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-empty-file.md
|
|
7692
7722
|
*/
|
|
7693
7723
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
7694
7724
|
/**
|
|
7695
7725
|
* Disallow assigning to built-in error properties.
|
|
7696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-error-property-assignment.md
|
|
7697
7727
|
*/
|
|
7698
7728
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7699
7729
|
/**
|
|
7700
7730
|
* Disallow exports in scripts.
|
|
7701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7731
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-exports-in-scripts.md
|
|
7702
7732
|
*/
|
|
7703
7733
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
7704
7734
|
/**
|
|
7705
7735
|
* Prefer `for…of` over the `forEach` method.
|
|
7706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-for-each.md
|
|
7707
7737
|
*/
|
|
7708
7738
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
7709
7739
|
/**
|
|
7710
7740
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
7711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-for-loop.md
|
|
7712
7742
|
*/
|
|
7713
7743
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
7714
7744
|
/**
|
|
7715
7745
|
* Disallow assigning properties on the global object.
|
|
7716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-global-object-property-assignment.md
|
|
7717
7747
|
*/
|
|
7718
7748
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7719
7749
|
/**
|
|
7720
7750
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
7721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
7722
7752
|
* @deprecated
|
|
7723
7753
|
*/
|
|
7724
7754
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
7725
7755
|
/**
|
|
7726
7756
|
* Disallow immediate mutation after variable assignment.
|
|
7727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-immediate-mutation.md
|
|
7728
7758
|
*/
|
|
7729
7759
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
7730
7760
|
/**
|
|
7731
7761
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
7732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-impossible-length-comparison.md
|
|
7733
7763
|
*/
|
|
7734
7764
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
7735
7765
|
/**
|
|
7736
7766
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
7737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-incorrect-query-selector.md
|
|
7738
7768
|
*/
|
|
7739
7769
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
7740
7770
|
/**
|
|
7741
7771
|
* Disallow incorrect template literal interpolation syntax.
|
|
7742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
7743
7773
|
*/
|
|
7744
7774
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
7745
7775
|
/**
|
|
7746
7776
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
7747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
7748
7778
|
* @deprecated
|
|
7749
7779
|
*/
|
|
7750
7780
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
7751
7781
|
/**
|
|
7752
7782
|
* Disallow `instanceof` with built-in objects
|
|
7753
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-instanceof-builtins.md
|
|
7754
7784
|
*/
|
|
7755
7785
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
7756
7786
|
/**
|
|
7757
7787
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
7758
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-argument-count.md
|
|
7759
7789
|
*/
|
|
7760
7790
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
7761
7791
|
/**
|
|
7762
7792
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
7763
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-character-comparison.md
|
|
7764
7794
|
*/
|
|
7765
7795
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
7766
7796
|
/**
|
|
7767
7797
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
7768
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-fetch-options.md
|
|
7769
7799
|
*/
|
|
7770
7800
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7771
7801
|
/**
|
|
7772
7802
|
* Disallow invalid `accept` values on file inputs.
|
|
7773
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
7774
7804
|
*/
|
|
7775
7805
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
7776
7806
|
/**
|
|
7777
7807
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
7778
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7808
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
7779
7809
|
*/
|
|
7780
7810
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
7781
7811
|
/**
|
|
7782
7812
|
* Disallow invalid implementations of well-known symbol methods.
|
|
7783
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
7784
7814
|
*/
|
|
7785
7815
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
7786
7816
|
/**
|
|
7787
7817
|
* Disallow identifiers starting with `new` or `class`.
|
|
7788
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7818
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-keyword-prefix.md
|
|
7789
7819
|
*/
|
|
7790
7820
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
7791
7821
|
/**
|
|
7792
7822
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
7793
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-late-current-target-access.md
|
|
7794
7824
|
*/
|
|
7795
7825
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
7796
7826
|
/**
|
|
7797
7827
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
7798
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7828
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-late-event-control.md
|
|
7799
7829
|
*/
|
|
7800
7830
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
7801
7831
|
/**
|
|
7802
7832
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
7803
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
7804
7834
|
* @deprecated
|
|
7805
7835
|
*/
|
|
7806
7836
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
7807
7837
|
/**
|
|
7808
7838
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
7809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7839
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-lonely-if.md
|
|
7810
7840
|
*/
|
|
7811
7841
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
7812
7842
|
/**
|
|
7813
7843
|
* Disallow mutating a loop iterable during iteration.
|
|
7814
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7844
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
7815
7845
|
*/
|
|
7816
7846
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
7817
7847
|
/**
|
|
7818
7848
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
7819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7849
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
7820
7850
|
*/
|
|
7821
7851
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7822
7852
|
/**
|
|
7823
7853
|
* Disallow manually wrapped comments.
|
|
7824
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7854
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
7825
7855
|
*/
|
|
7826
7856
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
7827
7857
|
/**
|
|
7828
7858
|
* Disallow checking a Map key before accessing a different key.
|
|
7829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7859
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-mismatched-map-key.md
|
|
7830
7860
|
*/
|
|
7831
7861
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
7832
7862
|
/**
|
|
7833
7863
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
7834
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7864
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-misrefactored-assignment.md
|
|
7835
7865
|
*/
|
|
7836
7866
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
7837
7867
|
/**
|
|
7838
7868
|
* Disallow references to missing local resources.
|
|
7839
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7869
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-missing-local-resource.md
|
|
7840
7870
|
*/
|
|
7841
7871
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
7842
7872
|
/**
|
|
7843
7873
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
7844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7874
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
7845
7875
|
*/
|
|
7846
7876
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
7847
7877
|
/**
|
|
7848
7878
|
* Disallow named usage of default import and export.
|
|
7849
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-named-default.md
|
|
7850
7880
|
*/
|
|
7851
7881
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
7852
7882
|
/**
|
|
7853
7883
|
* Disallow negated array predicate calls.
|
|
7854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7884
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negated-array-predicate.md
|
|
7855
7885
|
*/
|
|
7856
7886
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7857
7887
|
/**
|
|
7858
7888
|
* Disallow negated comparisons.
|
|
7859
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negated-comparison.md
|
|
7860
7890
|
*/
|
|
7861
7891
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
7862
7892
|
/**
|
|
7863
7893
|
* Disallow negated conditions.
|
|
7864
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negated-condition.md
|
|
7865
7895
|
*/
|
|
7866
7896
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
7867
7897
|
/**
|
|
7868
7898
|
* Disallow negated expression in equality check.
|
|
7869
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7899
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negation-in-equality-check.md
|
|
7870
7900
|
*/
|
|
7871
7901
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
7872
7902
|
/**
|
|
7873
7903
|
* Disallow nested ternary expressions.
|
|
7874
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7904
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-nested-ternary.md
|
|
7875
7905
|
*/
|
|
7876
7906
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7877
7907
|
/**
|
|
7878
7908
|
* Disallow `new Array()`.
|
|
7879
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7909
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-new-array.md
|
|
7880
7910
|
*/
|
|
7881
7911
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
7882
7912
|
/**
|
|
7883
7913
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
7884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-new-buffer.md
|
|
7885
7915
|
*/
|
|
7886
7916
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
7887
7917
|
/**
|
|
7888
7918
|
* Disallow non-function values with function-style verb prefixes.
|
|
7889
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
7890
7920
|
*/
|
|
7891
7921
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
7892
7922
|
/**
|
|
7893
7923
|
* Disallow non-standard properties on built-in objects.
|
|
7894
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
7895
7925
|
*/
|
|
7896
7926
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
7897
7927
|
/**
|
|
7898
7928
|
* Disallow the use of the `null` literal.
|
|
7899
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-null.md
|
|
7900
7930
|
*/
|
|
7901
7931
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
7902
7932
|
/**
|
|
7903
7933
|
* Disallow the use of objects as default parameters.
|
|
7904
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-object-as-default-parameter.md
|
|
7905
7935
|
*/
|
|
7906
7936
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
7907
7937
|
/**
|
|
7908
7938
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
7909
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-object-methods-with-collections.md
|
|
7910
7940
|
*/
|
|
7911
7941
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
7912
7942
|
/**
|
|
7913
7943
|
* Disallow optional chaining on undeclared variables.
|
|
7914
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
7915
7945
|
*/
|
|
7916
7946
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
7917
7947
|
/**
|
|
7918
7948
|
* Disallow `process.exit()`.
|
|
7919
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7949
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-process-exit.md
|
|
7920
7950
|
*/
|
|
7921
7951
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
7922
7952
|
/**
|
|
7923
7953
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
7924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7954
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-redundant-comparison.md
|
|
7925
7955
|
*/
|
|
7926
7956
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
7927
7957
|
/**
|
|
7928
7958
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
7929
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-return-array-push.md
|
|
7930
7960
|
*/
|
|
7931
7961
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
7932
7962
|
/**
|
|
7933
7963
|
* Disallow selector syntax in DOM names.
|
|
7934
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-selector-as-dom-name.md
|
|
7935
7965
|
*/
|
|
7936
7966
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
7937
7967
|
/**
|
|
7938
7968
|
* Disallow shorthand properties that override related longhand properties.
|
|
7939
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7969
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
7940
7970
|
*/
|
|
7941
7971
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
7942
7972
|
/**
|
|
7943
7973
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
7944
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
7945
7975
|
*/
|
|
7946
7976
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7947
7977
|
/**
|
|
7948
7978
|
* Disallow classes that only have static members.
|
|
7949
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7979
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-static-only-class.md
|
|
7950
7980
|
*/
|
|
7951
7981
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
7952
7982
|
/**
|
|
7953
7983
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
7954
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-subtraction-comparison.md
|
|
7955
7985
|
*/
|
|
7956
7986
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
7957
7987
|
/**
|
|
7958
7988
|
* Disallow `then` property.
|
|
7959
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-thenable.md
|
|
7960
7990
|
*/
|
|
7961
7991
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
7962
7992
|
/**
|
|
7963
7993
|
* Disallow assigning `this` to a variable.
|
|
7964
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-this-assignment.md
|
|
7965
7995
|
*/
|
|
7966
7996
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
7967
7997
|
/**
|
|
7968
7998
|
* Disallow `this` outside of classes.
|
|
7969
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-this-outside-of-class.md
|
|
7970
8000
|
*/
|
|
7971
8001
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
7972
8002
|
/**
|
|
7973
8003
|
* Disallow assigning to top-level variables from inside functions.
|
|
7974
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8004
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
7975
8005
|
*/
|
|
7976
8006
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
7977
8007
|
/**
|
|
7978
8008
|
* Disallow top-level side effects in exported modules.
|
|
7979
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8009
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-top-level-side-effects.md
|
|
7980
8010
|
*/
|
|
7981
8011
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
7982
8012
|
/**
|
|
7983
8013
|
* Disallow `all` as a transition property.
|
|
7984
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-transition-all.md
|
|
7985
8015
|
*/
|
|
7986
8016
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
7987
8017
|
/**
|
|
7988
8018
|
* Disallow comparing `undefined` using `typeof`.
|
|
7989
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-typeof-undefined.md
|
|
7990
8020
|
*/
|
|
7991
8021
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
7992
8022
|
/**
|
|
7993
8023
|
* Disallow referencing methods without calling them.
|
|
7994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-uncalled-method.md
|
|
7995
8025
|
*/
|
|
7996
8026
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
7997
8027
|
/**
|
|
7998
8028
|
* Require class members to be declared.
|
|
7999
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8029
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-undeclared-class-members.md
|
|
8000
8030
|
*/
|
|
8001
8031
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
8002
8032
|
/**
|
|
8003
8033
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
8004
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
8005
8035
|
*/
|
|
8006
8036
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
8007
8037
|
/**
|
|
8008
8038
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
8009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
8010
8040
|
*/
|
|
8011
8041
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8012
8042
|
/**
|
|
8013
8043
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
8014
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
8015
8045
|
*/
|
|
8016
8046
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
8017
8047
|
/**
|
|
8018
8048
|
* Disallow awaiting non-promise values.
|
|
8019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-await.md
|
|
8020
8050
|
*/
|
|
8021
8051
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
8022
8052
|
/**
|
|
8023
8053
|
* Disallow unnecessary comparisons against boolean literals.
|
|
8024
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
8025
8055
|
*/
|
|
8026
8056
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
8027
8057
|
/**
|
|
8028
8058
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
8029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
8030
8060
|
*/
|
|
8031
8061
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
8032
8062
|
/**
|
|
8033
8063
|
* Disallow unnecessary `globalThis` references.
|
|
8034
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-global-this.md
|
|
8035
8065
|
*/
|
|
8036
8066
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
8037
8067
|
/**
|
|
8038
8068
|
* Disallow unnecessary nested ternary expressions.
|
|
8039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
8040
8070
|
*/
|
|
8041
8071
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
8042
8072
|
/**
|
|
8043
8073
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
8044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
8045
8075
|
*/
|
|
8046
8076
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
8047
8077
|
/**
|
|
8048
8078
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
8049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
8050
8080
|
*/
|
|
8051
8081
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
8052
8082
|
/**
|
|
8053
8083
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
8054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-splice.md
|
|
8055
8085
|
*/
|
|
8056
8086
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
8057
8087
|
/**
|
|
8058
8088
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
8059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
8060
8090
|
*/
|
|
8061
8091
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
8062
8092
|
/**
|
|
8063
8093
|
* Disallow unreadable array destructuring.
|
|
8064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
8065
8095
|
*/
|
|
8066
8096
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
8067
8097
|
/**
|
|
8068
8098
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
8069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
8070
8100
|
*/
|
|
8071
8101
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
8072
8102
|
/**
|
|
8073
8103
|
* Disallow unreadable IIFEs.
|
|
8074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-iife.md
|
|
8075
8105
|
*/
|
|
8076
8106
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
8077
8107
|
/**
|
|
8078
8108
|
* Disallow unreadable `new` expressions.
|
|
8079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-new-expression.md
|
|
8080
8110
|
*/
|
|
8081
8111
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
8082
8112
|
/**
|
|
8083
8113
|
* Disallow unreadable object destructuring.
|
|
8084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
8085
8115
|
*/
|
|
8086
8116
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8087
8117
|
/**
|
|
8088
8118
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
8089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
8090
8120
|
*/
|
|
8091
8121
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
8092
8122
|
/**
|
|
8093
8123
|
* Disallow unsafe DOM HTML APIs.
|
|
8094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-dom-html.md
|
|
8095
8125
|
*/
|
|
8096
8126
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
8097
8127
|
/**
|
|
8098
8128
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
8099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
8100
8130
|
*/
|
|
8101
8131
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
8102
8132
|
/**
|
|
8103
8133
|
* Disallow unsafe values as property keys.
|
|
8104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-property-key.md
|
|
8105
8135
|
*/
|
|
8106
8136
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
8137
|
+
/**
|
|
8138
|
+
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
8139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
8140
|
+
*/
|
|
8141
|
+
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
8107
8142
|
/**
|
|
8108
8143
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
8109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
8110
8145
|
*/
|
|
8111
8146
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
8112
8147
|
/**
|
|
8113
8148
|
* Disallow ignoring the return value of selected array methods.
|
|
8114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unused-array-method-return.md
|
|
8115
8150
|
*/
|
|
8116
8151
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
8117
8152
|
/**
|
|
8118
8153
|
* Disallow unused object properties.
|
|
8119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unused-properties.md
|
|
8120
8155
|
*/
|
|
8121
8156
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
8122
8157
|
/**
|
|
8123
8158
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
8124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-boolean-cast.md
|
|
8125
8160
|
*/
|
|
8126
8161
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
8127
8162
|
/**
|
|
8128
8163
|
* Disallow useless type coercions of values that are already of the target type.
|
|
8129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-coercion.md
|
|
8130
8165
|
*/
|
|
8131
8166
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
8132
8167
|
/**
|
|
8133
8168
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
8134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-collection-argument.md
|
|
8135
8170
|
*/
|
|
8136
8171
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
8137
8172
|
/**
|
|
8138
8173
|
* Disallow useless compound assignments such as `x += 0`.
|
|
8139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-compound-assignment.md
|
|
8140
8175
|
*/
|
|
8141
8176
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
8142
8177
|
/**
|
|
8143
8178
|
* Disallow useless concatenation of literals.
|
|
8144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-concat.md
|
|
8145
8180
|
*/
|
|
8146
8181
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
8147
8182
|
/**
|
|
8148
8183
|
* Disallow useless `continue` statements.
|
|
8149
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-continue.md
|
|
8150
8185
|
*/
|
|
8151
8186
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
8152
8187
|
/**
|
|
8153
8188
|
* Disallow unnecessary existence checks before deletion.
|
|
8154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-delete-check.md
|
|
8155
8190
|
*/
|
|
8156
8191
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
8157
8192
|
/**
|
|
8158
8193
|
* Disallow `else` after a statement that exits.
|
|
8159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-else.md
|
|
8160
8195
|
*/
|
|
8161
8196
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
8162
8197
|
/**
|
|
8163
8198
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
8164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
8165
8200
|
*/
|
|
8166
8201
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
8167
8202
|
/**
|
|
8168
8203
|
* Disallow useless fallback when spreading in object literals.
|
|
8169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
8170
8205
|
*/
|
|
8171
8206
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
8172
8207
|
/**
|
|
8173
8208
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
8174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
8175
8210
|
*/
|
|
8176
8211
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8177
8212
|
/**
|
|
8178
8213
|
* Disallow useless array length check.
|
|
8179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-length-check.md
|
|
8180
8215
|
*/
|
|
8181
8216
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
8182
8217
|
/**
|
|
8183
8218
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
8184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-logical-operand.md
|
|
8185
8220
|
*/
|
|
8186
8221
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
8187
8222
|
/**
|
|
8188
8223
|
* Disallow useless overrides of class methods.
|
|
8189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-override.md
|
|
8190
8225
|
*/
|
|
8191
8226
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
8192
8227
|
/**
|
|
8193
8228
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
8194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
8195
8230
|
*/
|
|
8196
8231
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
8197
8232
|
/**
|
|
8198
8233
|
* Disallow redundant re-exports.
|
|
8199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-re-export.md
|
|
8200
8235
|
*/
|
|
8201
8236
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
8202
8237
|
/**
|
|
8203
8238
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
8204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-recursion.md
|
|
8205
8240
|
*/
|
|
8206
8241
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
8207
8242
|
/**
|
|
8208
8243
|
* Disallow unnecessary spread.
|
|
8209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-spread.md
|
|
8210
8245
|
*/
|
|
8211
8246
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
8212
8247
|
/**
|
|
8213
8248
|
* Disallow useless case in switch statements.
|
|
8214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-switch-case.md
|
|
8215
8250
|
*/
|
|
8216
8251
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
8217
8252
|
/**
|
|
8218
8253
|
* Disallow useless template literal expressions.
|
|
8219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-template-literals.md
|
|
8220
8255
|
*/
|
|
8221
8256
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
8222
8257
|
/**
|
|
8223
8258
|
* Disallow useless `undefined`.
|
|
8224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-undefined.md
|
|
8225
8260
|
*/
|
|
8226
8261
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
8227
8262
|
/**
|
|
8228
8263
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
8229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
8230
8265
|
*/
|
|
8231
8266
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
8232
8267
|
/**
|
|
8233
8268
|
* Disallow number literals with zero fractions or dangling dots.
|
|
8234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-zero-fractions.md
|
|
8235
8270
|
*/
|
|
8236
8271
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
8237
8272
|
/**
|
|
8238
8273
|
* Enforce proper case for numeric literals.
|
|
8239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/number-literal-case.md
|
|
8240
8275
|
*/
|
|
8241
8276
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
8242
8277
|
/**
|
|
8243
8278
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
8244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/numeric-separators-style.md
|
|
8245
8280
|
*/
|
|
8246
8281
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
8247
8282
|
/**
|
|
8248
8283
|
* Require assignment operator shorthand where possible.
|
|
8249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/operator-assignment.md
|
|
8250
8285
|
*/
|
|
8251
8286
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
8252
8287
|
/**
|
|
8253
8288
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
8254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-abort-signal-any.md
|
|
8255
8290
|
*/
|
|
8256
8291
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
8257
8292
|
/**
|
|
8258
8293
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
8259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
8260
8295
|
*/
|
|
8261
8296
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
8262
8297
|
/**
|
|
8263
8298
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
8264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-add-event-listener.md
|
|
8265
8300
|
*/
|
|
8266
8301
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
8267
8302
|
/**
|
|
8268
8303
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
8269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
8270
8305
|
*/
|
|
8271
8306
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
8272
8307
|
/**
|
|
8273
8308
|
* Prefer `AggregateError` when throwing collected errors.
|
|
8274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-aggregate-error.md
|
|
8275
8310
|
*/
|
|
8276
8311
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
8277
8312
|
/**
|
|
8278
8313
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
8279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-find.md
|
|
8280
8315
|
*/
|
|
8281
8316
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
8282
8317
|
/**
|
|
8283
8318
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
8284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-flat.md
|
|
8285
8320
|
*/
|
|
8286
8321
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
8287
8322
|
/**
|
|
8288
8323
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
8289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-flat-map.md
|
|
8290
8325
|
*/
|
|
8291
8326
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8292
8327
|
/**
|
|
8293
8328
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
8294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-from-async.md
|
|
8295
8330
|
*/
|
|
8296
8331
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
8297
8332
|
/**
|
|
8298
8333
|
* Prefer using the `Array.from()` mapping function argument.
|
|
8299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-from-map.md
|
|
8300
8335
|
*/
|
|
8301
8336
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
8302
8337
|
/**
|
|
8303
8338
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
8304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-from-range.md
|
|
8305
8340
|
*/
|
|
8306
8341
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
8307
8342
|
/**
|
|
8308
8343
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
8309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8344
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-index-of.md
|
|
8310
8345
|
*/
|
|
8311
8346
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
8312
8347
|
/**
|
|
8313
8348
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
8314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
8315
8350
|
*/
|
|
8316
8351
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8317
8352
|
/**
|
|
8318
8353
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
8319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8354
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-last-methods.md
|
|
8320
8355
|
*/
|
|
8321
8356
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
8322
8357
|
/**
|
|
8323
8358
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
8324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-slice.md
|
|
8325
8360
|
*/
|
|
8326
8361
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
8327
8362
|
/**
|
|
8328
8363
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
8329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-some.md
|
|
8330
8365
|
*/
|
|
8331
8366
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
8332
8367
|
/**
|
|
8333
8368
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
8334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-at.md
|
|
8335
8370
|
*/
|
|
8336
8371
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
8337
8372
|
/**
|
|
8338
8373
|
* Prefer `await` over promise chaining.
|
|
8339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-await.md
|
|
8340
8375
|
*/
|
|
8341
8376
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
8342
8377
|
/**
|
|
8343
8378
|
* Prefer `BigInt` literals over the constructor.
|
|
8344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-bigint-literals.md
|
|
8345
8380
|
*/
|
|
8346
8381
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
8347
8382
|
/**
|
|
8348
8383
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
8349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8384
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
8350
8385
|
*/
|
|
8351
8386
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
8352
8387
|
/**
|
|
8353
8388
|
* Prefer block statements over IIFEs used only for scoping.
|
|
8354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
8355
8390
|
*/
|
|
8356
8391
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
8357
8392
|
/**
|
|
8358
8393
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
8359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8394
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-boolean-return.md
|
|
8360
8395
|
*/
|
|
8361
8396
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8362
8397
|
/**
|
|
8363
8398
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
8364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-class-fields.md
|
|
8365
8400
|
*/
|
|
8366
8401
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
8367
8402
|
/**
|
|
8368
8403
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
8369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8404
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-classlist-toggle.md
|
|
8370
8405
|
*/
|
|
8371
8406
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
8372
8407
|
/**
|
|
8373
8408
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
8374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8409
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-code-point.md
|
|
8375
8410
|
*/
|
|
8376
8411
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
8377
8412
|
/**
|
|
8378
8413
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
8379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8414
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-continue.md
|
|
8380
8415
|
*/
|
|
8381
8416
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
8382
8417
|
/**
|
|
8383
8418
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
8384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-date-now.md
|
|
8385
8420
|
*/
|
|
8386
8421
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
8387
8422
|
/**
|
|
8388
8423
|
* Prefer default parameters over reassignment.
|
|
8389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-default-parameters.md
|
|
8390
8425
|
*/
|
|
8391
8426
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
8392
8427
|
/**
|
|
8393
8428
|
* Prefer direct iteration over default iterator method calls.
|
|
8394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-direct-iteration.md
|
|
8395
8430
|
*/
|
|
8396
8431
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
8397
8432
|
/**
|
|
8398
8433
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
8399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dispose.md
|
|
8400
8435
|
*/
|
|
8401
8436
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
8402
8437
|
/**
|
|
8403
8438
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
8404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-append.md
|
|
8405
8440
|
*/
|
|
8406
8441
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
8407
8442
|
/**
|
|
8408
8443
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
8409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
8410
8445
|
* @deprecated
|
|
8411
8446
|
*/
|
|
8412
8447
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
8413
8448
|
/**
|
|
8414
8449
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
8415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
8416
8451
|
*/
|
|
8417
8452
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
8418
8453
|
/**
|
|
8419
8454
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
8420
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-remove.md
|
|
8421
8456
|
*/
|
|
8422
8457
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
8423
8458
|
/**
|
|
8424
8459
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
8425
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8460
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
8426
8461
|
*/
|
|
8427
8462
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
8428
8463
|
/**
|
|
8429
8464
|
* Prefer `.textContent` over `.innerText`.
|
|
8430
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8465
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
8431
8466
|
*/
|
|
8432
8467
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
8433
8468
|
/**
|
|
8434
8469
|
* Prefer early returns over full-function conditional wrapping.
|
|
8435
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8470
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-early-return.md
|
|
8436
8471
|
*/
|
|
8437
8472
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
8438
8473
|
/**
|
|
8439
8474
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
8440
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8475
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-else-if.md
|
|
8441
8476
|
*/
|
|
8442
8477
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
8443
8478
|
/**
|
|
8444
8479
|
* Prefer `Error.isError()` when checking for errors.
|
|
8445
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8480
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-error-is-error.md
|
|
8446
8481
|
*/
|
|
8447
8482
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
8448
8483
|
/**
|
|
8449
8484
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
8450
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-event-target.md
|
|
8451
8486
|
*/
|
|
8452
8487
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
8453
8488
|
/**
|
|
8454
8489
|
* Prefer explicit viewport units.
|
|
8455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8490
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
8456
8491
|
*/
|
|
8457
8492
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
8458
8493
|
/**
|
|
8459
8494
|
* Prefer `export…from` when re-exporting.
|
|
8460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-export-from.md
|
|
8461
8496
|
*/
|
|
8462
8497
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
8463
8498
|
/**
|
|
8464
8499
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
8465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8500
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
8466
8501
|
*/
|
|
8467
8502
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8468
8503
|
/**
|
|
8469
8504
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
8470
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8505
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
8471
8506
|
*/
|
|
8472
8507
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
8473
8508
|
/**
|
|
8474
8509
|
* Prefer global numeric constants over `Number` static properties.
|
|
8475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8510
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-global-number-constants.md
|
|
8476
8511
|
*/
|
|
8477
8512
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
8478
8513
|
/**
|
|
8479
8514
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
8480
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-global-this.md
|
|
8481
8516
|
*/
|
|
8482
8517
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
8483
8518
|
/**
|
|
8484
8519
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
8485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8520
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-group-by.md
|
|
8486
8521
|
*/
|
|
8487
8522
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
8488
8523
|
/**
|
|
8489
8524
|
* Prefer `.has()` when checking existence.
|
|
8490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8525
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-has-check.md
|
|
8491
8526
|
*/
|
|
8492
8527
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
8493
8528
|
/**
|
|
8494
8529
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
8495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8530
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
8496
8531
|
*/
|
|
8497
8532
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
8498
8533
|
/**
|
|
8499
8534
|
* Prefer HTTPS over HTTP.
|
|
8500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8535
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-https.md
|
|
8501
8536
|
*/
|
|
8502
|
-
'unicorn/prefer-https'?: Linter.RuleEntry<
|
|
8537
|
+
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
8503
8538
|
/**
|
|
8504
8539
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
8505
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
8506
8541
|
*/
|
|
8507
8542
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
8508
8543
|
/**
|
|
8509
8544
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
8510
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8545
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-import-meta-properties.md
|
|
8511
8546
|
*/
|
|
8512
8547
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
8513
8548
|
/**
|
|
8514
8549
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
8515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8550
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-includes.md
|
|
8516
8551
|
*/
|
|
8517
8552
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
8518
8553
|
/**
|
|
8519
8554
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
8520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8555
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
8521
8556
|
*/
|
|
8522
8557
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
8523
8558
|
/**
|
|
8524
8559
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
8525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8560
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
8526
8561
|
*/
|
|
8527
8562
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
8528
8563
|
/**
|
|
8529
8564
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
8530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8565
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-concat.md
|
|
8531
8566
|
*/
|
|
8532
8567
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
8533
8568
|
/**
|
|
8534
8569
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
8535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8570
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-helpers.md
|
|
8536
8571
|
*/
|
|
8537
8572
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
8538
8573
|
/**
|
|
8539
8574
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
8540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8575
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-to-array.md
|
|
8541
8576
|
*/
|
|
8542
8577
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8543
8578
|
/**
|
|
8544
8579
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
8545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8580
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
8546
8581
|
*/
|
|
8547
8582
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
8548
8583
|
/**
|
|
8549
8584
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
8550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8585
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
8551
8586
|
* @deprecated
|
|
8552
8587
|
*/
|
|
8553
8588
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
8554
8589
|
/**
|
|
8555
8590
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
8556
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8591
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
8557
8592
|
*/
|
|
8558
8593
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
8559
8594
|
/**
|
|
8560
8595
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
8561
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8596
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-location-assign.md
|
|
8562
8597
|
*/
|
|
8563
8598
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
8564
8599
|
/**
|
|
8565
8600
|
* Prefer using a logical operator over a ternary.
|
|
8566
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8601
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
8567
8602
|
*/
|
|
8568
8603
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
8569
8604
|
/**
|
|
8570
8605
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
8571
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8606
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-map-from-entries.md
|
|
8572
8607
|
*/
|
|
8573
8608
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
8574
8609
|
/**
|
|
8575
8610
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
8576
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8611
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-abs.md
|
|
8577
8612
|
*/
|
|
8578
8613
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
8579
8614
|
/**
|
|
8580
8615
|
* Prefer `Math` constants over their approximate numeric values.
|
|
8581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-constants.md
|
|
8582
8617
|
*/
|
|
8583
8618
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
8584
8619
|
/**
|
|
8585
8620
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
8586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8621
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-min-max.md
|
|
8587
8622
|
*/
|
|
8588
8623
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8589
8624
|
/**
|
|
8590
8625
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
8591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8626
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-trunc.md
|
|
8592
8627
|
*/
|
|
8593
8628
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
8594
8629
|
/**
|
|
8595
8630
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
8596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-minimal-ternary.md
|
|
8597
8632
|
*/
|
|
8598
8633
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
8599
8634
|
/**
|
|
8600
8635
|
* Prefer modern DOM APIs.
|
|
8601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
8602
8637
|
*/
|
|
8603
8638
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
8604
8639
|
/**
|
|
8605
8640
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
8606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-modern-math-apis.md
|
|
8607
8642
|
*/
|
|
8608
8643
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
8609
8644
|
/**
|
|
8610
8645
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
8611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-module.md
|
|
8612
8647
|
*/
|
|
8613
8648
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
8614
8649
|
/**
|
|
8615
8650
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
8616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
8617
8652
|
*/
|
|
8618
8653
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
8619
8654
|
/**
|
|
8620
8655
|
* Prefer negative index over `.length - index` when possible.
|
|
8621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-negative-index.md
|
|
8622
8657
|
*/
|
|
8623
8658
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
8624
8659
|
/**
|
|
8625
8660
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
8626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-node-protocol.md
|
|
8627
8662
|
*/
|
|
8628
8663
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
8629
8664
|
/**
|
|
8630
8665
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
8631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-number-coercion.md
|
|
8632
8667
|
*/
|
|
8633
8668
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
8634
8669
|
/**
|
|
8635
8670
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
8636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
8637
8672
|
*/
|
|
8638
8673
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
8639
8674
|
/**
|
|
8640
8675
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
8641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-number-properties.md
|
|
8642
8677
|
*/
|
|
8643
8678
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
8644
8679
|
/**
|
|
8645
8680
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
8646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-define-properties.md
|
|
8647
8682
|
*/
|
|
8648
8683
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
8649
8684
|
/**
|
|
8650
8685
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
8651
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
8652
8687
|
*/
|
|
8653
8688
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
8654
8689
|
/**
|
|
8655
8690
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
8656
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-from-entries.md
|
|
8657
8692
|
*/
|
|
8658
8693
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
8659
8694
|
/**
|
|
8660
8695
|
* Prefer the most specific `Object` iterable method.
|
|
8661
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
8662
8697
|
*/
|
|
8663
8698
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8664
8699
|
/**
|
|
8665
8700
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
8666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-observer-apis.md
|
|
8667
8702
|
*/
|
|
8668
8703
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
8669
8704
|
/**
|
|
8670
8705
|
* Prefer omitting the `catch` binding parameter.
|
|
8671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
8672
8707
|
*/
|
|
8673
8708
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
8674
8709
|
/**
|
|
8675
8710
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
8676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8711
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-path2d.md
|
|
8677
8712
|
*/
|
|
8678
8713
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
8679
8714
|
/**
|
|
8680
8715
|
* Prefer private class fields over the underscore-prefix convention.
|
|
8681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-private-class-fields.md
|
|
8682
8717
|
*/
|
|
8683
8718
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
8684
8719
|
/**
|
|
8685
8720
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
8686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-promise-try.md
|
|
8687
8722
|
*/
|
|
8688
8723
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
8689
8724
|
/**
|
|
8690
8725
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
8691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
8692
8727
|
*/
|
|
8693
8728
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
8694
8729
|
/**
|
|
8695
8730
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
8696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8731
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-prototype-methods.md
|
|
8697
8732
|
*/
|
|
8698
8733
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
8699
8734
|
/**
|
|
8700
8735
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
8701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-query-selector.md
|
|
8702
8737
|
*/
|
|
8703
8738
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
8704
8739
|
/**
|
|
8705
8740
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
8706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-queue-microtask.md
|
|
8707
8742
|
*/
|
|
8708
8743
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
8709
8744
|
/**
|
|
8710
8745
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
8711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-reflect-apply.md
|
|
8712
8747
|
*/
|
|
8713
8748
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
8714
8749
|
/**
|
|
8715
8750
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
8716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-regexp-escape.md
|
|
8717
8752
|
*/
|
|
8718
8753
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
8719
8754
|
/**
|
|
8720
8755
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
8721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8756
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-regexp-test.md
|
|
8722
8757
|
*/
|
|
8723
8758
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
8724
8759
|
/**
|
|
8725
8760
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
8726
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8761
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-response-static-json.md
|
|
8727
8762
|
*/
|
|
8728
8763
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
8729
8764
|
/**
|
|
8730
8765
|
* Prefer `:scope` when using element query selector methods.
|
|
8731
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-scoped-selector.md
|
|
8732
8767
|
*/
|
|
8733
8768
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
8734
8769
|
/**
|
|
8735
8770
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
8736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-set-has.md
|
|
8737
8772
|
*/
|
|
8738
8773
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
8739
8774
|
/**
|
|
8740
8775
|
* Prefer `Set` methods for Set operations.
|
|
8741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-set-methods.md
|
|
8742
8777
|
*/
|
|
8743
8778
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
8744
8779
|
/**
|
|
8745
8780
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
8746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-set-size.md
|
|
8747
8782
|
*/
|
|
8748
8783
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
8749
8784
|
/**
|
|
8750
8785
|
* Prefer arrow function properties over methods with a single return.
|
|
8751
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-short-arrow-method.md
|
|
8752
8787
|
*/
|
|
8753
8788
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
8754
8789
|
/**
|
|
8755
8790
|
* Prefer simple conditions first in logical expressions.
|
|
8756
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-simple-condition-first.md
|
|
8757
8792
|
*/
|
|
8758
8793
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
8759
8794
|
/**
|
|
8760
8795
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
8761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
8762
8797
|
*/
|
|
8763
8798
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
8764
8799
|
/**
|
|
8765
8800
|
* Prefer simplified conditions.
|
|
8766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-simplified-conditions.md
|
|
8767
8802
|
*/
|
|
8768
8803
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
8769
8804
|
/**
|
|
8770
8805
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
8771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8806
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-array-predicate.md
|
|
8772
8807
|
*/
|
|
8773
8808
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
8774
8809
|
/**
|
|
8775
8810
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
8776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-call.md
|
|
8777
8812
|
*/
|
|
8778
8813
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
8779
8814
|
/**
|
|
8780
8815
|
* Prefer a single object destructuring declaration per local const source.
|
|
8781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
8782
8817
|
*/
|
|
8783
8818
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8784
8819
|
/**
|
|
8785
8820
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
8786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-replace.md
|
|
8787
8822
|
*/
|
|
8788
8823
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
8789
8824
|
/**
|
|
8790
8825
|
* Prefer declaring variables in the smallest possible scope.
|
|
8791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-smaller-scope.md
|
|
8792
8827
|
*/
|
|
8793
8828
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
8794
8829
|
/**
|
|
8795
8830
|
* Prefer `String#split()` with a limit.
|
|
8796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-split-limit.md
|
|
8797
8832
|
*/
|
|
8798
8833
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
8799
8834
|
/**
|
|
8800
8835
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
8801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-spread.md
|
|
8802
8837
|
*/
|
|
8803
8838
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
8804
8839
|
/**
|
|
8805
8840
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
8806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-match-all.md
|
|
8807
8842
|
*/
|
|
8808
8843
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
8809
8844
|
/**
|
|
8810
8845
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
8811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
8812
8847
|
*/
|
|
8813
8848
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
8814
8849
|
/**
|
|
8815
8850
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
8816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-raw.md
|
|
8817
8852
|
*/
|
|
8818
8853
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
8819
8854
|
/**
|
|
8820
8855
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
8821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-repeat.md
|
|
8822
8857
|
*/
|
|
8823
8858
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
8824
8859
|
/**
|
|
8825
8860
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
8826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-replace-all.md
|
|
8827
8862
|
*/
|
|
8828
8863
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
8829
8864
|
/**
|
|
8830
8865
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
8831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-slice.md
|
|
8832
8867
|
*/
|
|
8833
8868
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
8834
8869
|
/**
|
|
8835
8870
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
8836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
8837
8872
|
*/
|
|
8838
8873
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
8839
8874
|
/**
|
|
8840
8875
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
8841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
8842
8877
|
*/
|
|
8843
8878
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
8844
8879
|
/**
|
|
8845
8880
|
* Prefer using `structuredClone` to create a deep clone.
|
|
8846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-structured-clone.md
|
|
8847
8882
|
*/
|
|
8848
8883
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
8849
8884
|
/**
|
|
8850
8885
|
* Prefer `switch` over multiple `else-if`.
|
|
8851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-switch.md
|
|
8852
8887
|
*/
|
|
8853
8888
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
8854
8889
|
/**
|
|
8855
8890
|
* Prefer `Temporal` over `Date`.
|
|
8856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-temporal.md
|
|
8857
8892
|
*/
|
|
8858
8893
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
8859
8894
|
/**
|
|
8860
8895
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
8861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-ternary.md
|
|
8862
8897
|
*/
|
|
8863
8898
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
8864
8899
|
/**
|
|
8865
8900
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
8866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-then-catch.md
|
|
8867
8902
|
*/
|
|
8868
8903
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
8869
8904
|
/**
|
|
8870
8905
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
8871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-toggle-attribute.md
|
|
8872
8907
|
*/
|
|
8873
8908
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
8874
8909
|
/**
|
|
8875
8910
|
* Prefer top-level await over top-level promises and async function calls.
|
|
8876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-top-level-await.md
|
|
8877
8912
|
*/
|
|
8878
8913
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
8879
8914
|
/**
|
|
8880
8915
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
8881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-type-error.md
|
|
8882
8917
|
*/
|
|
8883
8918
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
8884
8919
|
/**
|
|
8885
8920
|
* Require type literals to be last in union types.
|
|
8886
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-type-literal-last.md
|
|
8887
8922
|
*/
|
|
8888
8923
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
8889
8924
|
/**
|
|
8890
8925
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
8891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-uint8array-base64.md
|
|
8892
8927
|
*/
|
|
8893
8928
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
8894
8929
|
/**
|
|
8895
8930
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
8896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-unary-minus.md
|
|
8897
8932
|
*/
|
|
8898
8933
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
8899
8934
|
/**
|
|
8900
8935
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
8901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
8902
8937
|
*/
|
|
8903
8938
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
8904
8939
|
/**
|
|
8905
8940
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
8906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-url-can-parse.md
|
|
8907
8942
|
*/
|
|
8908
8943
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
8909
8944
|
/**
|
|
8910
8945
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
8911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-url-href.md
|
|
8912
8947
|
*/
|
|
8913
8948
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
8914
8949
|
/**
|
|
8915
8950
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
8916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-url-search-parameters.md
|
|
8917
8952
|
*/
|
|
8918
8953
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
8919
8954
|
/**
|
|
8920
8955
|
* Prefer putting the condition in the while statement.
|
|
8921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-while-loop-condition.md
|
|
8922
8957
|
*/
|
|
8923
8958
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
8924
8959
|
/**
|
|
8925
8960
|
* Renamed to `unicorn/name-replacements`.
|
|
8926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
8927
8962
|
* @deprecated
|
|
8928
8963
|
*/
|
|
8929
8964
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
8930
8965
|
/**
|
|
8931
8966
|
* Enforce consistent relative URL style.
|
|
8932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/relative-url-style.md
|
|
8933
8968
|
*/
|
|
8934
8969
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
8935
8970
|
/**
|
|
8936
8971
|
* Enforce using the separator argument with `Array#join()`.
|
|
8937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-array-join-separator.md
|
|
8938
8973
|
*/
|
|
8939
8974
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
8940
8975
|
/**
|
|
8941
8976
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
8942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-array-sort-compare.md
|
|
8943
8978
|
*/
|
|
8944
8979
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
8945
8980
|
/**
|
|
8946
8981
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
8947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-css-escape.md
|
|
8948
8983
|
*/
|
|
8949
8984
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
8950
8985
|
/**
|
|
8951
8986
|
* Require configured YAML frontmatter fields.
|
|
8952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-frontmatter-fields.md
|
|
8953
8988
|
*/
|
|
8954
8989
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
8955
8990
|
/**
|
|
8956
8991
|
* Require non-empty module attributes for imports and exports
|
|
8957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-module-attributes.md
|
|
8958
8993
|
*/
|
|
8959
8994
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
8960
8995
|
/**
|
|
8961
8996
|
* Require non-empty specifier list in import and export statements.
|
|
8962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-module-specifiers.md
|
|
8963
8998
|
*/
|
|
8964
8999
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
8965
9000
|
/**
|
|
8966
9001
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
8967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
8968
9003
|
*/
|
|
8969
9004
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
8970
9005
|
/**
|
|
8971
9006
|
* Require passive event listeners for high-frequency events.
|
|
8972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-passive-events.md
|
|
8973
9008
|
*/
|
|
8974
9009
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
8975
9010
|
/**
|
|
8976
9011
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
8977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-post-message-target-origin.md
|
|
8978
9013
|
*/
|
|
8979
9014
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
8980
9015
|
/**
|
|
8981
9016
|
* Require boolean-returning Proxy traps to return booleans.
|
|
8982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9017
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
8983
9018
|
*/
|
|
8984
9019
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
9020
|
+
/**
|
|
9021
|
+
* Enforce a consistent style for single-line block comments.
|
|
9022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/single-line-block-comment-style.md
|
|
9023
|
+
*/
|
|
9024
|
+
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
8985
9025
|
/**
|
|
8986
9026
|
* Enforce better string content.
|
|
8987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/string-content.md
|
|
8988
9028
|
*/
|
|
8989
9029
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
8990
9030
|
/**
|
|
8991
9031
|
* Enforce consistent brace style for `case` clauses.
|
|
8992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/switch-case-braces.md
|
|
8993
9033
|
*/
|
|
8994
9034
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
8995
9035
|
/**
|
|
8996
9036
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
8997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/switch-case-break-position.md
|
|
8998
9038
|
*/
|
|
8999
9039
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
9000
9040
|
/**
|
|
9001
9041
|
* Fix whitespace-insensitive template indentation.
|
|
9002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/template-indent.md
|
|
9003
9043
|
*/
|
|
9004
9044
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
9005
9045
|
/**
|
|
9006
9046
|
* Enforce consistent case for text encoding identifiers.
|
|
9007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/text-encoding-identifier-case.md
|
|
9008
9048
|
*/
|
|
9009
9049
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
9010
9050
|
/**
|
|
9011
9051
|
* Require `new` when creating an error.
|
|
9012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/throw-new-error.md
|
|
9013
9053
|
*/
|
|
9014
9054
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
9015
9055
|
/**
|
|
9016
9056
|
* Limit the complexity of `try` blocks.
|
|
9017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/try-complexity.md
|
|
9018
9058
|
*/
|
|
9019
9059
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
9020
9060
|
/**
|
|
@@ -9526,6 +9566,11 @@ Backward pagination arguments
|
|
|
9526
9566
|
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-spacing.html
|
|
9527
9567
|
*/
|
|
9528
9568
|
'yml/key-spacing'?: Linter.RuleEntry<YmlKeySpacing>;
|
|
9569
|
+
/**
|
|
9570
|
+
* disallow boolean mapping keys
|
|
9571
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-boolean-key.html
|
|
9572
|
+
*/
|
|
9573
|
+
'yml/no-boolean-key'?: Linter.RuleEntry<[]>;
|
|
9529
9574
|
/**
|
|
9530
9575
|
* disallow empty document
|
|
9531
9576
|
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-document.html
|
|
@@ -11594,15 +11639,19 @@ type JsoncSortKeys = ([{
|
|
|
11594
11639
|
hasProperties?: string[];
|
|
11595
11640
|
order: ((string | {
|
|
11596
11641
|
keyPattern?: string;
|
|
11597
|
-
order?: {
|
|
11642
|
+
order?: ({
|
|
11598
11643
|
type?: ("asc" | "desc");
|
|
11599
11644
|
caseSensitive?: boolean;
|
|
11600
11645
|
natural?: boolean;
|
|
11601
|
-
}
|
|
11646
|
+
} | {
|
|
11647
|
+
type: "ignore";
|
|
11648
|
+
});
|
|
11602
11649
|
})[] | {
|
|
11603
11650
|
type?: ("asc" | "desc");
|
|
11604
11651
|
caseSensitive?: boolean;
|
|
11605
11652
|
natural?: boolean;
|
|
11653
|
+
} | {
|
|
11654
|
+
type: "ignore";
|
|
11606
11655
|
});
|
|
11607
11656
|
minKeys?: number;
|
|
11608
11657
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -11611,15 +11660,19 @@ type JsoncSortKeys = ([{
|
|
|
11611
11660
|
hasProperties?: string[];
|
|
11612
11661
|
order: ((string | {
|
|
11613
11662
|
keyPattern?: string;
|
|
11614
|
-
order?: {
|
|
11663
|
+
order?: ({
|
|
11615
11664
|
type?: ("asc" | "desc");
|
|
11616
11665
|
caseSensitive?: boolean;
|
|
11617
11666
|
natural?: boolean;
|
|
11618
|
-
}
|
|
11667
|
+
} | {
|
|
11668
|
+
type: "ignore";
|
|
11669
|
+
});
|
|
11619
11670
|
})[] | {
|
|
11620
11671
|
type?: ("asc" | "desc");
|
|
11621
11672
|
caseSensitive?: boolean;
|
|
11622
11673
|
natural?: boolean;
|
|
11674
|
+
} | {
|
|
11675
|
+
type: "ignore";
|
|
11623
11676
|
});
|
|
11624
11677
|
minKeys?: number;
|
|
11625
11678
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -12868,6 +12921,10 @@ type NodePreferGlobalUrlSearchParams = [] | [("always" | "never")];
|
|
|
12868
12921
|
type NodePreferNodeProtocol = [] | [{
|
|
12869
12922
|
version?: string;
|
|
12870
12923
|
}];
|
|
12924
|
+
// ----- node/prefer-process-get-builtin-module -----
|
|
12925
|
+
type NodePreferProcessGetBuiltinModule = [] | [{
|
|
12926
|
+
version?: string;
|
|
12927
|
+
}];
|
|
12871
12928
|
// ----- node/shebang -----
|
|
12872
12929
|
type NodeShebang = [] | [{
|
|
12873
12930
|
convertPath?: ({
|
|
@@ -15938,7 +15995,9 @@ type UnicodeBom = [] | [("always" | "never")];
|
|
|
15938
15995
|
// ----- unicorn/catch-error-name -----
|
|
15939
15996
|
type UnicornCatchErrorName = [] | [{
|
|
15940
15997
|
name?: string;
|
|
15941
|
-
ignore?:
|
|
15998
|
+
ignore?: (string | {
|
|
15999
|
+
[k: string]: unknown | undefined;
|
|
16000
|
+
})[];
|
|
15942
16001
|
}];
|
|
15943
16002
|
// ----- unicorn/class-reference-in-static-methods -----
|
|
15944
16003
|
type UnicornClassReferenceInStaticMethods = [] | [{
|
|
@@ -15958,11 +16017,19 @@ type UnicornCommentContent = [] | [{
|
|
|
15958
16017
|
}];
|
|
15959
16018
|
// ----- unicorn/consistent-boolean-name -----
|
|
15960
16019
|
type UnicornConsistentBooleanName = [] | [{
|
|
15961
|
-
|
|
16020
|
+
checkVariables?: ("always" | "prohibit" | "never");
|
|
16021
|
+
checkArguments?: ("always" | "prohibit" | "never");
|
|
16022
|
+
checkFunctions?: ("always" | "prohibit" | "never");
|
|
16023
|
+
checkMethods?: ("always" | "prohibit" | "never");
|
|
16024
|
+
checkFields?: ("always" | "prohibit" | "never");
|
|
15962
16025
|
prefixes?: {
|
|
15963
16026
|
[k: string]: boolean | undefined;
|
|
15964
16027
|
};
|
|
16028
|
+
wrappers?: {
|
|
16029
|
+
[k: string]: string | undefined;
|
|
16030
|
+
};
|
|
15965
16031
|
ignore?: unknown[];
|
|
16032
|
+
[k: string]: unknown;
|
|
15966
16033
|
}];
|
|
15967
16034
|
// ----- unicorn/consistent-class-member-order -----
|
|
15968
16035
|
type UnicornConsistentClassMemberOrder = [] | [{
|
|
@@ -15996,6 +16063,7 @@ type UnicornConsistentFunctionScoping = [] | [{
|
|
|
15996
16063
|
// ----- unicorn/consistent-function-style -----
|
|
15997
16064
|
type UnicornConsistentFunctionStyle = [] | [{
|
|
15998
16065
|
default?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
16066
|
+
defaultExport?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
15999
16067
|
namedFunctions?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
16000
16068
|
namedExports?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
16001
16069
|
callbacks?: ("function-expression" | "arrow-function" | "ignore");
|
|
@@ -16019,7 +16087,9 @@ type UnicornEscapeCase = [] | [("uppercase" | "lowercase")];
|
|
|
16019
16087
|
// ----- unicorn/expiring-todo-comments -----
|
|
16020
16088
|
type UnicornExpiringTodoComments = [] | [{
|
|
16021
16089
|
terms?: string[];
|
|
16022
|
-
ignore?:
|
|
16090
|
+
ignore?: (string | {
|
|
16091
|
+
[k: string]: unknown | undefined;
|
|
16092
|
+
})[];
|
|
16023
16093
|
checkDates?: boolean;
|
|
16024
16094
|
checkDatesOnPullRequests?: boolean;
|
|
16025
16095
|
allowWarningComments?: boolean;
|
|
@@ -16034,7 +16104,9 @@ type UnicornExplicitTimerDelay = [] | [("always" | "never")];
|
|
|
16034
16104
|
// ----- unicorn/filename-case -----
|
|
16035
16105
|
type UnicornFilenameCase = [] | [({
|
|
16036
16106
|
case?: ("camelCase" | "camelCaseWithAcronyms" | "snakeCase" | "kebabCase" | "pascalCase");
|
|
16037
|
-
ignore?:
|
|
16107
|
+
ignore?: (string | {
|
|
16108
|
+
[k: string]: unknown | undefined;
|
|
16109
|
+
})[];
|
|
16038
16110
|
multipleFileExtensions?: boolean;
|
|
16039
16111
|
checkDirectories?: boolean;
|
|
16040
16112
|
} | {
|
|
@@ -16045,7 +16117,9 @@ type UnicornFilenameCase = [] | [({
|
|
|
16045
16117
|
kebabCase?: boolean;
|
|
16046
16118
|
pascalCase?: boolean;
|
|
16047
16119
|
};
|
|
16048
|
-
ignore?:
|
|
16120
|
+
ignore?: (string | {
|
|
16121
|
+
[k: string]: unknown | undefined;
|
|
16122
|
+
})[];
|
|
16049
16123
|
multipleFileExtensions?: boolean;
|
|
16050
16124
|
checkDirectories?: boolean;
|
|
16051
16125
|
})];
|
|
@@ -16082,6 +16156,8 @@ type UnicornIsolatedFunctions = [] | [{
|
|
|
16082
16156
|
selectors?: string[];
|
|
16083
16157
|
comments?: string[];
|
|
16084
16158
|
}];
|
|
16159
|
+
// ----- unicorn/iteration-fallback-style -----
|
|
16160
|
+
type UnicornIterationFallbackStyle = [] | [("guard" | "fallback")];
|
|
16085
16161
|
// ----- unicorn/logical-assignment-operators -----
|
|
16086
16162
|
type UnicornLogicalAssignmentOperators = (([] | ["always"] | ["always", {
|
|
16087
16163
|
enforceForIfStatements?: boolean;
|
|
@@ -16102,7 +16178,9 @@ type UnicornNameReplacements = [] | [{
|
|
|
16102
16178
|
replacements?: _UnicornNameReplacements_NameReplacements;
|
|
16103
16179
|
extendDefaultAllowList?: boolean;
|
|
16104
16180
|
allowList?: _UnicornNameReplacements_BooleanObject;
|
|
16105
|
-
ignore?:
|
|
16181
|
+
ignore?: (string | {
|
|
16182
|
+
[k: string]: unknown | undefined;
|
|
16183
|
+
})[];
|
|
16106
16184
|
}];
|
|
16107
16185
|
type _UnicornNameReplacementsReplacements = (false | _UnicornNameReplacements_BooleanObject) | undefined;
|
|
16108
16186
|
interface _UnicornNameReplacements_NameReplacements {
|
|
@@ -16150,7 +16228,7 @@ type UnicornNoInvalidArgumentCount = [] | [{
|
|
|
16150
16228
|
}];
|
|
16151
16229
|
// ----- unicorn/no-keyword-prefix -----
|
|
16152
16230
|
type UnicornNoKeywordPrefix = [] | [{
|
|
16153
|
-
disallowedPrefixes?: []
|
|
16231
|
+
disallowedPrefixes?: string[];
|
|
16154
16232
|
checkProperties?: boolean;
|
|
16155
16233
|
onlyCamelCase?: boolean;
|
|
16156
16234
|
}];
|
|
@@ -16161,7 +16239,9 @@ type UnicornNoNegatedComparison = [] | [{
|
|
|
16161
16239
|
// ----- unicorn/no-non-function-verb-prefix -----
|
|
16162
16240
|
type UnicornNoNonFunctionVerbPrefix = [] | [{
|
|
16163
16241
|
verbs?: string[];
|
|
16164
|
-
ignore?:
|
|
16242
|
+
ignore?: (string | {
|
|
16243
|
+
[k: string]: unknown | undefined;
|
|
16244
|
+
})[];
|
|
16165
16245
|
}];
|
|
16166
16246
|
// ----- unicorn/no-null -----
|
|
16167
16247
|
type UnicornNoNull = [] | [{
|
|
@@ -16174,7 +16254,7 @@ type UnicornNoTypeofUndefined = [] | [{
|
|
|
16174
16254
|
}];
|
|
16175
16255
|
// ----- unicorn/no-unnecessary-polyfills -----
|
|
16176
16256
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
16177
|
-
targets?: (string |
|
|
16257
|
+
targets?: (string | string[] | {
|
|
16178
16258
|
[k: string]: unknown | undefined;
|
|
16179
16259
|
});
|
|
16180
16260
|
}];
|
|
@@ -16228,11 +16308,11 @@ type UnicornPreferArrayFind = [] | [{
|
|
|
16228
16308
|
}];
|
|
16229
16309
|
// ----- unicorn/prefer-array-flat -----
|
|
16230
16310
|
type UnicornPreferArrayFlat = [] | [{
|
|
16231
|
-
functions?:
|
|
16311
|
+
functions?: string[];
|
|
16232
16312
|
}];
|
|
16233
16313
|
// ----- unicorn/prefer-at -----
|
|
16234
16314
|
type UnicornPreferAt = [] | [{
|
|
16235
|
-
getLastElementFunctions?:
|
|
16315
|
+
getLastElementFunctions?: string[];
|
|
16236
16316
|
checkAllIndexAccess?: boolean;
|
|
16237
16317
|
}];
|
|
16238
16318
|
// ----- unicorn/prefer-continue -----
|
|
@@ -16256,6 +16336,12 @@ type UnicornPreferExplicitViewportUnits = [] | [{
|
|
|
16256
16336
|
type UnicornPreferExportFrom = [] | [{
|
|
16257
16337
|
checkUsedVariables?: boolean;
|
|
16258
16338
|
}];
|
|
16339
|
+
// ----- unicorn/prefer-https -----
|
|
16340
|
+
type UnicornPreferHttps = [] | [{
|
|
16341
|
+
ignore?: (string | {
|
|
16342
|
+
[k: string]: unknown | undefined;
|
|
16343
|
+
})[];
|
|
16344
|
+
}];
|
|
16259
16345
|
// ----- unicorn/prefer-includes-over-repeated-comparisons -----
|
|
16260
16346
|
type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
16261
16347
|
minimumComparisons?: number;
|
|
@@ -16272,7 +16358,7 @@ type UnicornPreferNumberProperties = [] | [{
|
|
|
16272
16358
|
}];
|
|
16273
16359
|
// ----- unicorn/prefer-object-from-entries -----
|
|
16274
16360
|
type UnicornPreferObjectFromEntries = [] | [{
|
|
16275
|
-
functions?:
|
|
16361
|
+
functions?: string[];
|
|
16276
16362
|
}];
|
|
16277
16363
|
// ----- unicorn/prefer-query-selector -----
|
|
16278
16364
|
type UnicornPreferQuerySelector = [] | [{
|
|
@@ -16291,7 +16377,7 @@ type UnicornPreferSetHas = [] | [{
|
|
|
16291
16377
|
type UnicornPreferShortArrowMethod = [] | [("always" | "consistent-as-needed")];
|
|
16292
16378
|
// ----- unicorn/prefer-single-call -----
|
|
16293
16379
|
type UnicornPreferSingleCall = [] | [{
|
|
16294
|
-
ignore?:
|
|
16380
|
+
ignore?: string[];
|
|
16295
16381
|
}];
|
|
16296
16382
|
// ----- unicorn/prefer-string-repeat -----
|
|
16297
16383
|
type UnicornPreferStringRepeat = [] | [{
|
|
@@ -16299,7 +16385,7 @@ type UnicornPreferStringRepeat = [] | [{
|
|
|
16299
16385
|
}];
|
|
16300
16386
|
// ----- unicorn/prefer-structured-clone -----
|
|
16301
16387
|
type UnicornPreferStructuredClone = [] | [{
|
|
16302
|
-
functions?:
|
|
16388
|
+
functions?: string[];
|
|
16303
16389
|
}];
|
|
16304
16390
|
// ----- unicorn/prefer-switch -----
|
|
16305
16391
|
type UnicornPreferSwitch = [] | [{
|
|
@@ -16324,6 +16410,12 @@ type UnicornRequireCssEscape = [] | [{
|
|
|
16324
16410
|
type UnicornRequireFrontmatterFields = [] | [{
|
|
16325
16411
|
fields?: string[];
|
|
16326
16412
|
}];
|
|
16413
|
+
// ----- unicorn/single-line-block-comment-style -----
|
|
16414
|
+
type UnicornSingleLineBlockCommentStyle = [] | [("multiline" | "single-line")] | [("multiline" | "single-line"), {
|
|
16415
|
+
ignore?: (string | {
|
|
16416
|
+
[k: string]: unknown | undefined;
|
|
16417
|
+
})[];
|
|
16418
|
+
}];
|
|
16327
16419
|
// ----- unicorn/string-content -----
|
|
16328
16420
|
type UnicornStringContent = [] | [{
|
|
16329
16421
|
patterns?: {
|
|
@@ -16632,15 +16724,19 @@ type YmlSortKeys = ([{
|
|
|
16632
16724
|
hasProperties?: string[];
|
|
16633
16725
|
order: ((string | {
|
|
16634
16726
|
keyPattern?: string;
|
|
16635
|
-
order?: {
|
|
16727
|
+
order?: ({
|
|
16636
16728
|
type?: ("asc" | "desc");
|
|
16637
16729
|
caseSensitive?: boolean;
|
|
16638
16730
|
natural?: boolean;
|
|
16639
|
-
}
|
|
16731
|
+
} | {
|
|
16732
|
+
type: "ignore";
|
|
16733
|
+
});
|
|
16640
16734
|
})[] | {
|
|
16641
16735
|
type?: ("asc" | "desc");
|
|
16642
16736
|
caseSensitive?: boolean;
|
|
16643
16737
|
natural?: boolean;
|
|
16738
|
+
} | {
|
|
16739
|
+
type: "ignore";
|
|
16644
16740
|
});
|
|
16645
16741
|
minKeys?: number;
|
|
16646
16742
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -16649,15 +16745,19 @@ type YmlSortKeys = ([{
|
|
|
16649
16745
|
hasProperties?: string[];
|
|
16650
16746
|
order: ((string | {
|
|
16651
16747
|
keyPattern?: string;
|
|
16652
|
-
order?: {
|
|
16748
|
+
order?: ({
|
|
16653
16749
|
type?: ("asc" | "desc");
|
|
16654
16750
|
caseSensitive?: boolean;
|
|
16655
16751
|
natural?: boolean;
|
|
16656
|
-
}
|
|
16752
|
+
} | {
|
|
16753
|
+
type: "ignore";
|
|
16754
|
+
});
|
|
16657
16755
|
})[] | {
|
|
16658
16756
|
type?: ("asc" | "desc");
|
|
16659
16757
|
caseSensitive?: boolean;
|
|
16660
16758
|
natural?: boolean;
|
|
16759
|
+
} | {
|
|
16760
|
+
type: "ignore";
|
|
16661
16761
|
});
|
|
16662
16762
|
minKeys?: number;
|
|
16663
16763
|
allowLineSeparatedGroups?: boolean;
|