@kitschpatrol/eslint-config 8.7.0 → 8.9.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/bin/cli.js +2 -2
- package/dist/index.d.ts +661 -437
- package/dist/index.js +1 -1
- package/package.json +24 -24
package/dist/index.d.ts
CHANGED
|
@@ -1056,7 +1056,7 @@ interface RuleOptions {
|
|
|
1056
1056
|
*/
|
|
1057
1057
|
'html/no-redundant-role'?: Linter.RuleEntry<[]>;
|
|
1058
1058
|
/**
|
|
1059
|
-
* Disallow specified
|
|
1059
|
+
* Disallow specified attribute values
|
|
1060
1060
|
*
|
|
1061
1061
|
* @see https://html-eslint.org/docs/rules/no-restricted-attr-values
|
|
1062
1062
|
*/
|
|
@@ -1786,6 +1786,11 @@ interface RuleOptions {
|
|
|
1786
1786
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-undefined-types.md#repos-sticky-header
|
|
1787
1787
|
*/
|
|
1788
1788
|
'jsdoc/no-undefined-types'?: Linter.RuleEntry<JsdocNoUndefinedTypes>;
|
|
1789
|
+
/**
|
|
1790
|
+
* Reports redundant @type tags that match or broaden the naturally inferred
|
|
1791
|
+
* TypeScript type.
|
|
1792
|
+
*/
|
|
1793
|
+
'jsdoc/no-unnecessary-type-assertion'?: Linter.RuleEntry<JsdocNoUnnecessaryTypeAssertion>;
|
|
1789
1794
|
/**
|
|
1790
1795
|
* Normalizes labeled links in `@see` tags to a canonical `{@link}` form.
|
|
1791
1796
|
*
|
|
@@ -2033,6 +2038,13 @@ interface RuleOptions {
|
|
|
2033
2038
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/text-escaping.md#repos-sticky-header
|
|
2034
2039
|
*/
|
|
2035
2040
|
'jsdoc/text-escaping'?: Linter.RuleEntry<JsdocTextEscaping>;
|
|
2041
|
+
/**
|
|
2042
|
+
* Disallows (or requires descriptions for) `@ts-<directive>` comments,
|
|
2043
|
+
* mirroring `@typescript-eslint/ban-ts-comment`.
|
|
2044
|
+
*
|
|
2045
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-ban-ts-comment.md#repos-sticky-header
|
|
2046
|
+
*/
|
|
2047
|
+
'jsdoc/ts-ban-ts-comment'?: Linter.RuleEntry<JsdocTsBanTsComment>;
|
|
2036
2048
|
/**
|
|
2037
2049
|
* Prefers either function properties or method signatures
|
|
2038
2050
|
*
|
|
@@ -2116,6 +2128,13 @@ interface RuleOptions {
|
|
|
2116
2128
|
* @see https://eslint-plugin-package-json.dev/rules/order-properties
|
|
2117
2129
|
*/
|
|
2118
2130
|
'json-package/order-properties'?: Linter.RuleEntry<JsonPackageOrderProperties>;
|
|
2131
|
+
/**
|
|
2132
|
+
* Require that dependencies declared with workspace protocol use a rolling
|
|
2133
|
+
* workspace spec instead of a specific semver range.
|
|
2134
|
+
*
|
|
2135
|
+
* @see https://eslint-plugin-package-json.dev/rules/prefer-rolling-workspace-spec
|
|
2136
|
+
*/
|
|
2137
|
+
'json-package/prefer-rolling-workspace-spec'?: Linter.RuleEntry<JsonPackagePreferRollingWorkspaceSpec>;
|
|
2119
2138
|
/**
|
|
2120
2139
|
* Enforce either object or shorthand declaration for repository.
|
|
2121
2140
|
*
|
|
@@ -5211,9 +5230,9 @@ interface RuleOptions {
|
|
|
5211
5230
|
*/
|
|
5212
5231
|
'react/globals'?: Linter.RuleEntry<[]>;
|
|
5213
5232
|
/**
|
|
5214
|
-
* Validates against
|
|
5215
|
-
* into frozen contexts such as JSX props,
|
|
5216
|
-
* values.
|
|
5233
|
+
* Validates against mutating props, state, and other immutable values,
|
|
5234
|
+
* including through functions passed into frozen contexts such as JSX props,
|
|
5235
|
+
* hook arguments, and hook return values.
|
|
5217
5236
|
*
|
|
5218
5237
|
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
5219
5238
|
*/
|
|
@@ -5674,9 +5693,9 @@ interface RuleOptions {
|
|
|
5674
5693
|
*/
|
|
5675
5694
|
'react/x-globals'?: Linter.RuleEntry<[]>;
|
|
5676
5695
|
/**
|
|
5677
|
-
* Validates against
|
|
5678
|
-
* into frozen contexts such as JSX props,
|
|
5679
|
-
* values.
|
|
5696
|
+
* Validates against mutating props, state, and other immutable values,
|
|
5697
|
+
* including through functions passed into frozen contexts such as JSX props,
|
|
5698
|
+
* hook arguments, and hook return values.
|
|
5680
5699
|
*
|
|
5681
5700
|
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
5682
5701
|
*/
|
|
@@ -8670,6 +8689,12 @@ interface RuleOptions {
|
|
|
8670
8689
|
* @see https://typescript-eslint.io/rules/no-for-in-array
|
|
8671
8690
|
*/
|
|
8672
8691
|
'ts/no-for-in-array'?: Linter.RuleEntry<[]>;
|
|
8692
|
+
/**
|
|
8693
|
+
* Disallow type operations that resolve to the "empty object" type
|
|
8694
|
+
*
|
|
8695
|
+
* @see https://typescript-eslint.io/rules/no-generated-empty-object-type
|
|
8696
|
+
*/
|
|
8697
|
+
'ts/no-generated-empty-object-type'?: Linter.RuleEntry<[]>;
|
|
8673
8698
|
/**
|
|
8674
8699
|
* Disallow the use of `eval()`-like functions
|
|
8675
8700
|
*
|
|
@@ -9263,519 +9288,543 @@ interface RuleOptions {
|
|
|
9263
9288
|
/**
|
|
9264
9289
|
* Prefer better DOM traversal APIs.
|
|
9265
9290
|
*
|
|
9266
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/better-dom-traversing.md
|
|
9267
9292
|
*/
|
|
9268
9293
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
9269
9294
|
/**
|
|
9270
9295
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
9271
9296
|
*
|
|
9272
9297
|
* @deprecated
|
|
9273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
9274
9299
|
*/
|
|
9275
9300
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
9276
9301
|
/**
|
|
9277
9302
|
* Enforce a specific parameter name in catch clauses.
|
|
9278
9303
|
*
|
|
9279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/catch-error-name.md
|
|
9280
9305
|
*/
|
|
9281
9306
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
9282
9307
|
/**
|
|
9283
9308
|
* Enforce consistent class references in static methods.
|
|
9284
9309
|
*
|
|
9285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9310
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/class-reference-in-static-methods.md
|
|
9286
9311
|
*/
|
|
9287
9312
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
9288
9313
|
/**
|
|
9289
9314
|
* Enforce better comment content.
|
|
9290
9315
|
*
|
|
9291
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/comment-content.md
|
|
9292
9317
|
*/
|
|
9293
9318
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
9294
9319
|
/**
|
|
9295
9320
|
* Enforce a consistent return style for multiline arrow function bodies.
|
|
9296
9321
|
*
|
|
9297
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9322
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-arrow-return-style.md
|
|
9298
9323
|
*/
|
|
9299
9324
|
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
9300
9325
|
/**
|
|
9301
9326
|
* Enforce consistent assertion style with `node:assert`.
|
|
9302
9327
|
*
|
|
9303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-assert.md
|
|
9304
9329
|
*/
|
|
9305
9330
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
9306
9331
|
/**
|
|
9307
9332
|
* Enforce consistent naming for boolean names.
|
|
9308
9333
|
*
|
|
9309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-boolean-name.md
|
|
9310
9335
|
*/
|
|
9311
9336
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
9312
9337
|
/**
|
|
9313
9338
|
* Enforce consistent class member order.
|
|
9314
9339
|
*
|
|
9315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-class-member-order.md
|
|
9316
9341
|
*/
|
|
9317
9342
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
9318
9343
|
/**
|
|
9319
9344
|
* Enforce consistent spelling of compound words in identifiers.
|
|
9320
9345
|
*
|
|
9321
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-compound-words.md
|
|
9322
9347
|
*/
|
|
9323
9348
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
9324
9349
|
/**
|
|
9325
9350
|
* Enforce consistent conditional object spread style.
|
|
9326
9351
|
*
|
|
9327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
9328
9353
|
*/
|
|
9329
9354
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
9330
9355
|
/**
|
|
9331
9356
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
9332
9357
|
*
|
|
9333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-date-clone.md
|
|
9334
9359
|
*/
|
|
9335
9360
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
9336
9361
|
/**
|
|
9337
9362
|
* Use destructured variables over properties.
|
|
9338
9363
|
*
|
|
9339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-destructuring.md
|
|
9340
9365
|
*/
|
|
9341
9366
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
9342
9367
|
/**
|
|
9343
9368
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
9344
9369
|
*
|
|
9345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-empty-array-spread.md
|
|
9346
9371
|
*/
|
|
9347
9372
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
9348
9373
|
/**
|
|
9349
9374
|
* Enforce consistent style for element existence checks with `indexOf()`,
|
|
9350
9375
|
* `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
9351
9376
|
*
|
|
9352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9377
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-existence-index-check.md
|
|
9353
9378
|
*/
|
|
9354
9379
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
9355
9380
|
/**
|
|
9356
9381
|
* Enforce consistent decorator position on exported classes.
|
|
9357
9382
|
*
|
|
9358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-export-decorator-position.md
|
|
9359
9384
|
*/
|
|
9360
9385
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
9361
9386
|
/**
|
|
9362
9387
|
* Move function definitions to the highest possible scope.
|
|
9363
9388
|
*
|
|
9364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-function-scoping.md
|
|
9365
9390
|
*/
|
|
9366
9391
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
9367
9392
|
/**
|
|
9368
9393
|
* Enforce function syntax by role.
|
|
9369
9394
|
*
|
|
9370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-function-style.md
|
|
9371
9396
|
*/
|
|
9372
9397
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
9373
9398
|
/**
|
|
9374
9399
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
9375
9400
|
*
|
|
9376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-json-file-read.md
|
|
9377
9402
|
*/
|
|
9378
9403
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
9379
9404
|
/**
|
|
9380
9405
|
* Enforce consistent optional chaining for same-base member access.
|
|
9381
9406
|
*
|
|
9382
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-optional-chaining.md
|
|
9383
9408
|
*/
|
|
9384
9409
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
9385
9410
|
/**
|
|
9386
9411
|
* Enforce consistent style for escaping `${` in template literals.
|
|
9387
9412
|
*
|
|
9388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-template-literal-escape.md
|
|
9389
9414
|
*/
|
|
9390
9415
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
9391
9416
|
/**
|
|
9392
9417
|
* Enforce consistent labels on tuple type elements.
|
|
9393
9418
|
*
|
|
9394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/consistent-tuple-labels.md
|
|
9395
9420
|
*/
|
|
9396
9421
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
9397
9422
|
/**
|
|
9398
9423
|
* Enforce correct `Error` subclassing.
|
|
9399
9424
|
*
|
|
9400
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9425
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/custom-error-definition.md
|
|
9401
9426
|
*/
|
|
9402
9427
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
9403
9428
|
/**
|
|
9404
9429
|
* Enforce consistent default export declarations.
|
|
9405
9430
|
*
|
|
9406
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/default-export-style.md
|
|
9407
9432
|
*/
|
|
9408
9433
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
9409
9434
|
/**
|
|
9410
9435
|
* Enforce consistent style for DOM element dataset access.
|
|
9411
9436
|
*
|
|
9412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/dom-node-dataset.md
|
|
9413
9438
|
*/
|
|
9414
9439
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
9415
9440
|
/**
|
|
9416
9441
|
* Enforce no spaces between braces.
|
|
9417
9442
|
*
|
|
9418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/empty-brace-spaces.md
|
|
9419
9444
|
*/
|
|
9420
9445
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
9421
9446
|
/**
|
|
9422
9447
|
* Enforce passing a `message` value when creating a built-in error.
|
|
9423
9448
|
*
|
|
9424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/error-message.md
|
|
9425
9450
|
*/
|
|
9426
9451
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
9427
9452
|
/**
|
|
9428
9453
|
* Require escape sequences to use uppercase or lowercase values.
|
|
9429
9454
|
*
|
|
9430
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/escape-case.md
|
|
9431
9456
|
*/
|
|
9432
9457
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
9433
9458
|
/**
|
|
9434
9459
|
* Add expiration conditions to TODO comments.
|
|
9435
9460
|
*
|
|
9436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9461
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/expiring-todo-comments.md
|
|
9437
9462
|
*/
|
|
9438
9463
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
9439
9464
|
/**
|
|
9440
9465
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
9441
9466
|
*
|
|
9442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/explicit-length-check.md
|
|
9443
9468
|
*/
|
|
9444
9469
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
9445
9470
|
/**
|
|
9446
9471
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and
|
|
9447
9472
|
* `setInterval()`.
|
|
9448
9473
|
*
|
|
9449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/explicit-timer-delay.md
|
|
9450
9475
|
*/
|
|
9451
9476
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
9452
9477
|
/**
|
|
9453
9478
|
* Enforce a case style for filenames and directory names.
|
|
9454
9479
|
*
|
|
9455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9480
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/filename-case.md
|
|
9456
9481
|
*/
|
|
9457
9482
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
9458
9483
|
/**
|
|
9459
9484
|
* Require identifiers to match a specified regular expression.
|
|
9460
9485
|
*
|
|
9461
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9486
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/id-match.md
|
|
9462
9487
|
*/
|
|
9463
9488
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
9464
9489
|
/**
|
|
9465
9490
|
* Enforce specific import styles per module.
|
|
9466
9491
|
*
|
|
9467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/import-style.md
|
|
9468
9493
|
*/
|
|
9469
9494
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
9470
9495
|
/**
|
|
9471
9496
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
9472
9497
|
*
|
|
9473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9498
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/isolated-functions.md
|
|
9474
9499
|
*/
|
|
9475
9500
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
9476
9501
|
/**
|
|
9477
9502
|
* Enforce a consistent style for optional loop sources.
|
|
9478
9503
|
*
|
|
9479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/iteration-fallback-style.md
|
|
9480
9505
|
*/
|
|
9481
9506
|
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
9482
9507
|
/**
|
|
9483
9508
|
* Require or disallow logical assignment operator shorthand
|
|
9484
9509
|
*
|
|
9485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9510
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/logical-assignment-operators.md
|
|
9486
9511
|
*/
|
|
9487
9512
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
9488
9513
|
/**
|
|
9489
9514
|
* Limit the depth of nested calls.
|
|
9490
9515
|
*
|
|
9491
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9516
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/max-nested-calls.md
|
|
9492
9517
|
*/
|
|
9493
9518
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
9494
9519
|
/**
|
|
9495
9520
|
* Enforce replacements for variable, property, and filenames.
|
|
9496
9521
|
*
|
|
9497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/name-replacements.md
|
|
9498
9523
|
*/
|
|
9499
9524
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
9500
9525
|
/**
|
|
9501
9526
|
* Enforce correct use of `new` for builtin constructors.
|
|
9502
9527
|
*
|
|
9503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9528
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/new-for-builtins.md
|
|
9504
9529
|
*/
|
|
9505
9530
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
9506
9531
|
/**
|
|
9507
9532
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
9508
9533
|
*
|
|
9509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
9510
9535
|
*/
|
|
9511
9536
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
9512
9537
|
/**
|
|
9513
9538
|
* Disallow recursive access to `this` within getters and setters.
|
|
9514
9539
|
*
|
|
9515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-accessor-recursion.md
|
|
9516
9541
|
*/
|
|
9517
9542
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
9518
9543
|
/**
|
|
9519
9544
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
9520
9545
|
*
|
|
9521
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
9522
9547
|
*/
|
|
9523
9548
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
9524
9549
|
/**
|
|
9525
9550
|
* Disallow anonymous functions and classes as the default export.
|
|
9526
9551
|
*
|
|
9527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-anonymous-default-export.md
|
|
9528
9553
|
*/
|
|
9529
9554
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
9530
9555
|
/**
|
|
9531
9556
|
* Prevent passing a function reference directly to iterator methods.
|
|
9532
9557
|
*
|
|
9533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-callback-reference.md
|
|
9534
9559
|
*/
|
|
9535
9560
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
9536
9561
|
/**
|
|
9537
9562
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
9538
9563
|
*
|
|
9539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-concat-in-loop.md
|
|
9540
9565
|
*/
|
|
9541
9566
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
9542
9567
|
/**
|
|
9543
9568
|
* Disallow using reference values as `Array#fill()` values.
|
|
9544
9569
|
*
|
|
9545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9570
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
9546
9571
|
*/
|
|
9547
9572
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
9548
9573
|
/**
|
|
9549
9574
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
9550
9575
|
*
|
|
9551
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9576
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-from-fill.md
|
|
9552
9577
|
*/
|
|
9553
9578
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
9554
9579
|
/**
|
|
9555
9580
|
* Disallow front-of-array mutation.
|
|
9556
9581
|
*
|
|
9557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-front-mutation.md
|
|
9558
9583
|
*/
|
|
9559
9584
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
9560
9585
|
/**
|
|
9561
9586
|
* Disallow using the `this` argument in array methods.
|
|
9562
9587
|
*
|
|
9563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-method-this-argument.md
|
|
9564
9589
|
*/
|
|
9565
9590
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
9566
9591
|
/**
|
|
9567
9592
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
9568
9593
|
*
|
|
9569
9594
|
* @deprecated
|
|
9570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9595
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
9571
9596
|
*/
|
|
9572
9597
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
9573
9598
|
/**
|
|
9574
9599
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
9575
9600
|
*
|
|
9576
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9601
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-reduce.md
|
|
9577
9602
|
*/
|
|
9578
9603
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
9579
9604
|
/**
|
|
9580
9605
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
9581
9606
|
*
|
|
9582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-reverse.md
|
|
9583
9608
|
*/
|
|
9584
9609
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
9585
9610
|
/**
|
|
9586
9611
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
9587
9612
|
*
|
|
9588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-sort.md
|
|
9589
9614
|
*/
|
|
9590
9615
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
9591
9616
|
/**
|
|
9592
9617
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
9593
9618
|
*
|
|
9594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
9595
9620
|
*/
|
|
9596
9621
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
9597
9622
|
/**
|
|
9598
9623
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
9599
9624
|
*
|
|
9600
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-array-splice.md
|
|
9601
9626
|
*/
|
|
9602
9627
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
9603
9628
|
/**
|
|
9604
9629
|
* Disallow asterisk prefixes in documentation comments.
|
|
9605
9630
|
*
|
|
9606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
9607
9632
|
*/
|
|
9608
9633
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
9634
|
+
/**
|
|
9635
|
+
* Disallow asynchronous callbacks in synchronous iterator helpers.
|
|
9636
|
+
*
|
|
9637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-async-iterator-callback.md
|
|
9638
|
+
*/
|
|
9639
|
+
'unicorn/no-async-iterator-callback'?: Linter.RuleEntry<[]>;
|
|
9609
9640
|
/**
|
|
9610
9641
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
9611
9642
|
*
|
|
9612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-async-promise-finally.md
|
|
9613
9644
|
*/
|
|
9614
9645
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
9615
9646
|
/**
|
|
9616
9647
|
* Disallow member access from await expression.
|
|
9617
9648
|
*
|
|
9618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-await-expression-member.md
|
|
9619
9650
|
*/
|
|
9620
9651
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
9621
9652
|
/**
|
|
9622
9653
|
* Disallow using `await` in `Promise` method parameters.
|
|
9623
9654
|
*
|
|
9624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-await-in-promise-methods.md
|
|
9625
9656
|
*/
|
|
9626
9657
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
9627
9658
|
/**
|
|
9628
9659
|
* Disallow barrel files.
|
|
9629
9660
|
*
|
|
9630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-barrel-files.md
|
|
9631
9662
|
*/
|
|
9632
9663
|
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
9633
9664
|
/**
|
|
9634
9665
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
9635
9666
|
*
|
|
9636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9667
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-blob-to-file.md
|
|
9637
9668
|
*/
|
|
9638
9669
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
9639
9670
|
/**
|
|
9640
9671
|
* Disallow boolean-returning sort comparators.
|
|
9641
9672
|
*
|
|
9642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
9643
9674
|
*/
|
|
9644
9675
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
9645
9676
|
/**
|
|
9646
9677
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
9647
9678
|
*
|
|
9648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-break-in-nested-loop.md
|
|
9649
9680
|
*/
|
|
9650
9681
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
9651
9682
|
/**
|
|
9652
9683
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
9653
9684
|
*
|
|
9654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-canvas-to-image.md
|
|
9655
9686
|
*/
|
|
9656
9687
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
9657
9688
|
/**
|
|
9658
9689
|
* Disallow chained comparisons such as `a < b < c`.
|
|
9659
9690
|
*
|
|
9660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-chained-comparison.md
|
|
9661
9692
|
*/
|
|
9662
9693
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
9663
9694
|
/**
|
|
9664
9695
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with
|
|
9665
9696
|
* bracket notation.
|
|
9666
9697
|
*
|
|
9667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-collection-bracket-access.md
|
|
9668
9699
|
*/
|
|
9669
9700
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
9670
9701
|
/**
|
|
9671
9702
|
* Disallow dynamic object property existence checks.
|
|
9672
9703
|
*
|
|
9673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-computed-property-existence-check.md
|
|
9674
9705
|
*/
|
|
9675
9706
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
9676
9707
|
/**
|
|
9677
9708
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
9678
9709
|
*
|
|
9679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-confusing-array-splice.md
|
|
9680
9711
|
*/
|
|
9681
9712
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
9682
9713
|
/**
|
|
9683
9714
|
* Disallow confusing uses of `Array#with()`.
|
|
9684
9715
|
*
|
|
9685
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-confusing-array-with.md
|
|
9686
9717
|
*/
|
|
9687
9718
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
9688
9719
|
/**
|
|
9689
9720
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
9690
9721
|
*
|
|
9691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-console-spaces.md
|
|
9692
9723
|
*/
|
|
9693
9724
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
9694
9725
|
/**
|
|
9695
9726
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
9696
9727
|
*
|
|
9697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-constant-zero-expression.md
|
|
9698
9729
|
*/
|
|
9699
9730
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
9700
9731
|
/**
|
|
9701
9732
|
* Disallow declarations before conditional early exits when they are only
|
|
9702
9733
|
* used after the exit.
|
|
9703
9734
|
*
|
|
9704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
9705
9736
|
*/
|
|
9706
9737
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
9738
|
+
/**
|
|
9739
|
+
* Disallow deprecated CSS features.
|
|
9740
|
+
*
|
|
9741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-deprecated-css-features.md
|
|
9742
|
+
*/
|
|
9743
|
+
'unicorn/no-deprecated-css-features'?: Linter.RuleEntry<UnicornNoDeprecatedCssFeatures>;
|
|
9707
9744
|
/**
|
|
9708
9745
|
* Do not use `document.cookie` directly.
|
|
9709
9746
|
*
|
|
9710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-document-cookie.md
|
|
9711
9748
|
*/
|
|
9712
9749
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
9713
9750
|
/**
|
|
9714
9751
|
* Disallow two comparisons of the same operands that can be combined into
|
|
9715
9752
|
* one.
|
|
9716
9753
|
*
|
|
9717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-double-comparison.md
|
|
9718
9755
|
*/
|
|
9719
9756
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
9757
|
+
/**
|
|
9758
|
+
* Disallow duplicate CSS selectors.
|
|
9759
|
+
*
|
|
9760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-duplicate-css-selectors.md
|
|
9761
|
+
*/
|
|
9762
|
+
'unicorn/no-duplicate-css-selectors'?: Linter.RuleEntry<[]>;
|
|
9763
|
+
/**
|
|
9764
|
+
* Disallow duplicate font family names.
|
|
9765
|
+
*
|
|
9766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-duplicate-font-family-names.md
|
|
9767
|
+
*/
|
|
9768
|
+
'unicorn/no-duplicate-font-family-names'?: Linter.RuleEntry<[]>;
|
|
9720
9769
|
/**
|
|
9721
9770
|
* Disallow duplicate adjacent branches in if chains.
|
|
9722
9771
|
*
|
|
9723
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-duplicate-if-branches.md
|
|
9724
9773
|
*/
|
|
9725
9774
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
9726
9775
|
/**
|
|
9727
9776
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
9728
9777
|
*
|
|
9729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
9730
9779
|
*/
|
|
9731
9780
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
9732
9781
|
/**
|
|
9733
9782
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop
|
|
9734
9783
|
* headers.
|
|
9735
9784
|
*
|
|
9736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-duplicate-loops.md
|
|
9737
9786
|
*/
|
|
9738
9787
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
9739
9788
|
/**
|
|
9740
9789
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
9741
9790
|
*
|
|
9742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-duplicate-set-values.md
|
|
9743
9792
|
*/
|
|
9744
9793
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
9745
9794
|
/**
|
|
9746
9795
|
* Disallow empty files.
|
|
9747
9796
|
*
|
|
9748
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-empty-file.md
|
|
9749
9798
|
*/
|
|
9750
9799
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
9751
9800
|
/**
|
|
9752
9801
|
* Disallow assigning to built-in error properties.
|
|
9753
9802
|
*
|
|
9754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-error-property-assignment.md
|
|
9755
9804
|
*/
|
|
9756
9805
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
9757
9806
|
/**
|
|
9758
9807
|
* Disallow exports in scripts.
|
|
9759
9808
|
*
|
|
9760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-exports-in-scripts.md
|
|
9761
9810
|
*/
|
|
9762
9811
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
9763
9812
|
/**
|
|
9764
9813
|
* Prefer `for…of` over the `forEach` method.
|
|
9765
9814
|
*
|
|
9766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-for-each.md
|
|
9767
9816
|
*/
|
|
9768
9817
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
9769
9818
|
/**
|
|
9770
9819
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
9771
9820
|
*
|
|
9772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-for-loop.md
|
|
9773
9822
|
*/
|
|
9774
9823
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
9775
9824
|
/**
|
|
9776
9825
|
* Disallow assigning properties on the global object.
|
|
9777
9826
|
*
|
|
9778
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-global-object-property-assignment.md
|
|
9779
9828
|
*/
|
|
9780
9829
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
9781
9830
|
/**
|
|
@@ -9783,1635 +9832,1738 @@ interface RuleOptions {
|
|
|
9783
9832
|
* cases.
|
|
9784
9833
|
*
|
|
9785
9834
|
* @deprecated
|
|
9786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
9787
9836
|
*/
|
|
9788
9837
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
9789
9838
|
/**
|
|
9790
9839
|
* Disallow immediate mutation after variable assignment.
|
|
9791
9840
|
*
|
|
9792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-immediate-mutation.md
|
|
9793
9842
|
*/
|
|
9794
9843
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
9795
9844
|
/**
|
|
9796
9845
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
9797
9846
|
*
|
|
9798
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-impossible-length-comparison.md
|
|
9799
9848
|
*/
|
|
9800
9849
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
9801
9850
|
/**
|
|
9802
9851
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
9803
9852
|
*
|
|
9804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-incorrect-query-selector.md
|
|
9805
9854
|
*/
|
|
9806
9855
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
9807
9856
|
/**
|
|
9808
9857
|
* Disallow incorrect template literal interpolation syntax.
|
|
9809
9858
|
*
|
|
9810
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9859
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
9811
9860
|
*/
|
|
9812
9861
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
9813
9862
|
/**
|
|
9814
9863
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
9815
9864
|
*
|
|
9816
9865
|
* @deprecated
|
|
9817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
9818
9867
|
*/
|
|
9819
9868
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
9820
9869
|
/**
|
|
9821
9870
|
* Disallow `instanceof` with built-in objects
|
|
9822
9871
|
*
|
|
9823
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-instanceof-builtins.md
|
|
9824
9873
|
*/
|
|
9825
9874
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
9826
9875
|
/**
|
|
9827
9876
|
* Disallow calling functions and constructors with an invalid number of
|
|
9828
9877
|
* arguments.
|
|
9829
9878
|
*
|
|
9830
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-invalid-argument-count.md
|
|
9831
9880
|
*/
|
|
9832
9881
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
9833
9882
|
/**
|
|
9834
9883
|
* Disallow comparing a single character from a string to a multi-character
|
|
9835
9884
|
* string.
|
|
9836
9885
|
*
|
|
9837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-invalid-character-comparison.md
|
|
9838
9887
|
*/
|
|
9839
9888
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
9840
9889
|
/**
|
|
9841
9890
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
9842
9891
|
*
|
|
9843
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-invalid-fetch-options.md
|
|
9844
9893
|
*/
|
|
9845
9894
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
9846
9895
|
/**
|
|
9847
9896
|
* Disallow invalid `accept` values on file inputs.
|
|
9848
9897
|
*
|
|
9849
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9898
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
9850
9899
|
*/
|
|
9851
9900
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
9901
|
+
/**
|
|
9902
|
+
* Disallow unknown media features and invalid values for known media
|
|
9903
|
+
* features.
|
|
9904
|
+
*
|
|
9905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-invalid-media-features.md
|
|
9906
|
+
*/
|
|
9907
|
+
'unicorn/no-invalid-media-features'?: Linter.RuleEntry<[]>;
|
|
9852
9908
|
/**
|
|
9853
9909
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an
|
|
9854
9910
|
* expression.
|
|
9855
9911
|
*
|
|
9856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
9857
9913
|
*/
|
|
9858
9914
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
9859
9915
|
/**
|
|
9860
9916
|
* Disallow invalid implementations of well-known symbol methods.
|
|
9861
9917
|
*
|
|
9862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9918
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
9863
9919
|
*/
|
|
9864
9920
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
9865
9921
|
/**
|
|
9866
9922
|
* Disallow identifiers starting with `new` or `class`.
|
|
9867
9923
|
*
|
|
9868
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-keyword-prefix.md
|
|
9869
9925
|
*/
|
|
9870
9926
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
9871
9927
|
/**
|
|
9872
9928
|
* Disallow accessing `event.currentTarget` after the synchronous event
|
|
9873
9929
|
* dispatch has finished.
|
|
9874
9930
|
*
|
|
9875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-late-current-target-access.md
|
|
9876
9932
|
*/
|
|
9877
9933
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
9878
9934
|
/**
|
|
9879
9935
|
* Disallow event-control method calls after the synchronous event dispatch
|
|
9880
9936
|
* has finished.
|
|
9881
9937
|
*
|
|
9882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9938
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-late-event-control.md
|
|
9883
9939
|
*/
|
|
9884
9940
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
9885
9941
|
/**
|
|
9886
9942
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
9887
9943
|
*
|
|
9888
9944
|
* @deprecated
|
|
9889
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
9890
9946
|
*/
|
|
9891
9947
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
9892
9948
|
/**
|
|
9893
9949
|
* Disallow `if` statements as the only statement in `if` blocks without
|
|
9894
9950
|
* `else`.
|
|
9895
9951
|
*
|
|
9896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-lonely-if.md
|
|
9897
9953
|
*/
|
|
9898
9954
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
9899
9955
|
/**
|
|
9900
9956
|
* Disallow mutating a loop iterable during iteration.
|
|
9901
9957
|
*
|
|
9902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9958
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
9903
9959
|
*/
|
|
9904
9960
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
9905
9961
|
/**
|
|
9906
9962
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
9907
9963
|
*
|
|
9908
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
9909
9965
|
*/
|
|
9910
9966
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
9911
9967
|
/**
|
|
9912
9968
|
* Disallow manually wrapped comments.
|
|
9913
9969
|
*
|
|
9914
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
9915
9971
|
*/
|
|
9916
9972
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
9917
9973
|
/**
|
|
9918
9974
|
* Disallow checking a Map key before accessing a different key.
|
|
9919
9975
|
*
|
|
9920
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-mismatched-map-key.md
|
|
9921
9977
|
*/
|
|
9922
9978
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
9923
9979
|
/**
|
|
9924
9980
|
* Disallow misrefactored compound assignments where the target is duplicated
|
|
9925
9981
|
* in the right-hand side.
|
|
9926
9982
|
*
|
|
9927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9983
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-misrefactored-assignment.md
|
|
9928
9984
|
*/
|
|
9929
9985
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
9930
9986
|
/**
|
|
9931
9987
|
* Disallow references to missing local resources.
|
|
9932
9988
|
*
|
|
9933
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-missing-local-resource.md
|
|
9934
9990
|
*/
|
|
9935
9991
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
9936
9992
|
/**
|
|
9937
9993
|
* Disallow calling Promise executor resolver functions more than once on the
|
|
9938
9994
|
* same execution path.
|
|
9939
9995
|
*
|
|
9940
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
9941
9997
|
*/
|
|
9942
9998
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
9943
9999
|
/**
|
|
9944
10000
|
* Disallow named usage of default import and export.
|
|
9945
10001
|
*
|
|
9946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-named-default.md
|
|
9947
10003
|
*/
|
|
9948
10004
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
9949
10005
|
/**
|
|
9950
10006
|
* Disallow negated array predicate calls.
|
|
9951
10007
|
*
|
|
9952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10008
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-negated-array-predicate.md
|
|
9953
10009
|
*/
|
|
9954
10010
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
9955
10011
|
/**
|
|
9956
10012
|
* Disallow negated comparisons.
|
|
9957
10013
|
*
|
|
9958
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-negated-comparison.md
|
|
9959
10015
|
*/
|
|
9960
10016
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
9961
10017
|
/**
|
|
9962
10018
|
* Disallow negated conditions.
|
|
9963
10019
|
*
|
|
9964
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10020
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-negated-condition.md
|
|
9965
10021
|
*/
|
|
9966
10022
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
9967
10023
|
/**
|
|
9968
10024
|
* Disallow negated expression in equality check.
|
|
9969
10025
|
*
|
|
9970
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-negation-in-equality-check.md
|
|
9971
10027
|
*/
|
|
9972
10028
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
9973
10029
|
/**
|
|
9974
10030
|
* Disallow nested ternary expressions.
|
|
9975
10031
|
*
|
|
9976
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-nested-ternary.md
|
|
9977
10033
|
*/
|
|
9978
10034
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
10035
|
+
/**
|
|
10036
|
+
* Disallow nesting under selector lists with mixed specificity.
|
|
10037
|
+
*
|
|
10038
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-nesting-with-mixed-specificity.md
|
|
10039
|
+
*/
|
|
10040
|
+
'unicorn/no-nesting-with-mixed-specificity'?: Linter.RuleEntry<[]>;
|
|
9979
10041
|
/**
|
|
9980
10042
|
* Disallow `new Array()`.
|
|
9981
10043
|
*
|
|
9982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-new-array.md
|
|
9983
10045
|
*/
|
|
9984
10046
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
9985
10047
|
/**
|
|
9986
10048
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the
|
|
9987
10049
|
* deprecated `new Buffer()`.
|
|
9988
10050
|
*
|
|
9989
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10051
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-new-buffer.md
|
|
9990
10052
|
*/
|
|
9991
10053
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
9992
10054
|
/**
|
|
9993
10055
|
* Disallow non-function values with function-style verb prefixes.
|
|
9994
10056
|
*
|
|
9995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
9996
10058
|
*/
|
|
9997
10059
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
9998
10060
|
/**
|
|
9999
10061
|
* Disallow non-standard properties on built-in objects.
|
|
10000
10062
|
*
|
|
10001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10063
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
10002
10064
|
*/
|
|
10003
10065
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
10004
10066
|
/**
|
|
10005
10067
|
* Disallow the use of the `null` literal.
|
|
10006
10068
|
*
|
|
10007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-null.md
|
|
10008
10070
|
*/
|
|
10009
10071
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
10010
10072
|
/**
|
|
10011
10073
|
* Disallow the use of objects as default parameters.
|
|
10012
10074
|
*
|
|
10013
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10075
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-object-as-default-parameter.md
|
|
10014
10076
|
*/
|
|
10015
10077
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
10016
10078
|
/**
|
|
10017
10079
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
10018
10080
|
*
|
|
10019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-object-methods-with-collections.md
|
|
10020
10082
|
*/
|
|
10021
10083
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
10022
10084
|
/**
|
|
10023
10085
|
* Disallow optional chaining on undeclared variables.
|
|
10024
10086
|
*
|
|
10025
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
10026
10088
|
*/
|
|
10027
10089
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
10028
10090
|
/**
|
|
10029
10091
|
* Disallow `process.exit()`.
|
|
10030
10092
|
*
|
|
10031
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10093
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-process-exit.md
|
|
10032
10094
|
*/
|
|
10033
10095
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
10034
10096
|
/**
|
|
10035
10097
|
* Disallow comparisons made redundant by an equality check in the same
|
|
10036
10098
|
* logical AND.
|
|
10037
10099
|
*
|
|
10038
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10100
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-redundant-comparison.md
|
|
10039
10101
|
*/
|
|
10040
10102
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
10103
|
+
/**
|
|
10104
|
+
* Disallow nested style rules that do not modify the parent selector.
|
|
10105
|
+
*
|
|
10106
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-redundant-nested-style-rules.md
|
|
10107
|
+
*/
|
|
10108
|
+
'unicorn/no-redundant-nested-style-rules'?: Linter.RuleEntry<[]>;
|
|
10041
10109
|
/**
|
|
10042
10110
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
10043
10111
|
*
|
|
10044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-return-array-push.md
|
|
10045
10113
|
*/
|
|
10046
10114
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
10047
10115
|
/**
|
|
10048
10116
|
* Disallow selector syntax in DOM names.
|
|
10049
10117
|
*
|
|
10050
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10118
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-selector-as-dom-name.md
|
|
10051
10119
|
*/
|
|
10052
10120
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
10053
10121
|
/**
|
|
10054
10122
|
* Disallow shorthand properties that override related longhand properties.
|
|
10055
10123
|
*
|
|
10056
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
10057
10125
|
*/
|
|
10058
10126
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
10059
10127
|
/**
|
|
10060
10128
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
10061
10129
|
*
|
|
10062
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
10063
10131
|
*/
|
|
10064
10132
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
10065
10133
|
/**
|
|
10066
10134
|
* Disallow classes that only have static members.
|
|
10067
10135
|
*
|
|
10068
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10136
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-static-only-class.md
|
|
10069
10137
|
*/
|
|
10070
10138
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
10071
10139
|
/**
|
|
10072
10140
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
10073
10141
|
*
|
|
10074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-subtraction-comparison.md
|
|
10075
10143
|
*/
|
|
10076
10144
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
10077
10145
|
/**
|
|
10078
10146
|
* Disallow `then` property.
|
|
10079
10147
|
*
|
|
10080
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10148
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-thenable.md
|
|
10081
10149
|
*/
|
|
10082
10150
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
10083
10151
|
/**
|
|
10084
10152
|
* Disallow assigning `this` to a variable.
|
|
10085
10153
|
*
|
|
10086
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-this-assignment.md
|
|
10087
10155
|
*/
|
|
10088
10156
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
10089
10157
|
/**
|
|
10090
10158
|
* Disallow `this` outside of classes.
|
|
10091
10159
|
*
|
|
10092
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10160
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-this-outside-of-class.md
|
|
10093
10161
|
*/
|
|
10094
10162
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
10095
10163
|
/**
|
|
10096
10164
|
* Disallow assigning to top-level variables from inside functions.
|
|
10097
10165
|
*
|
|
10098
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10166
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
10099
10167
|
*/
|
|
10100
10168
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
10101
10169
|
/**
|
|
10102
10170
|
* Disallow top-level side effects in exported modules.
|
|
10103
10171
|
*
|
|
10104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-top-level-side-effects.md
|
|
10105
10173
|
*/
|
|
10106
10174
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
10107
10175
|
/**
|
|
10108
10176
|
* Disallow `all` as a transition property.
|
|
10109
10177
|
*
|
|
10110
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10178
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-transition-all.md
|
|
10111
10179
|
*/
|
|
10112
10180
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
10113
10181
|
/**
|
|
10114
10182
|
* Disallow comparing `undefined` using `typeof`.
|
|
10115
10183
|
*
|
|
10116
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-typeof-undefined.md
|
|
10117
10185
|
*/
|
|
10118
10186
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
10119
10187
|
/**
|
|
10120
10188
|
* Disallow referencing methods without calling them.
|
|
10121
10189
|
*
|
|
10122
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-uncalled-method.md
|
|
10123
10191
|
*/
|
|
10124
10192
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
10125
10193
|
/**
|
|
10126
10194
|
* Require class members to be declared.
|
|
10127
10195
|
*
|
|
10128
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10196
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-undeclared-class-members.md
|
|
10129
10197
|
*/
|
|
10130
10198
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
10199
|
+
/**
|
|
10200
|
+
* Disallow unknown and noncanonical CSS annotations.
|
|
10201
|
+
*
|
|
10202
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unknown-css-annotations.md
|
|
10203
|
+
*/
|
|
10204
|
+
'unicorn/no-unknown-css-annotations'?: Linter.RuleEntry<[]>;
|
|
10205
|
+
/**
|
|
10206
|
+
* Disallow unknown pseudo-class and pseudo-element selectors.
|
|
10207
|
+
*
|
|
10208
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unknown-pseudo-selectors.md
|
|
10209
|
+
*/
|
|
10210
|
+
'unicorn/no-unknown-pseudo-selectors'?: Linter.RuleEntry<UnicornNoUnknownPseudoSelectors>;
|
|
10131
10211
|
/**
|
|
10132
10212
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
10133
10213
|
*
|
|
10134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
10135
10215
|
*/
|
|
10136
10216
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
10137
10217
|
/**
|
|
10138
10218
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
10139
10219
|
*
|
|
10140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10220
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
10141
10221
|
*/
|
|
10142
10222
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
10143
10223
|
/**
|
|
10144
10224
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount`
|
|
10145
10225
|
* argument of `Array#{splice,toSpliced}()`.
|
|
10146
10226
|
*
|
|
10147
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10227
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
10148
10228
|
*/
|
|
10149
10229
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
10150
10230
|
/**
|
|
10151
10231
|
* Disallow awaiting non-promise values.
|
|
10152
10232
|
*
|
|
10153
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-await.md
|
|
10154
10234
|
*/
|
|
10155
10235
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
10156
10236
|
/**
|
|
10157
10237
|
* Disallow unnecessary comparisons against boolean literals.
|
|
10158
10238
|
*
|
|
10159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
10160
10240
|
*/
|
|
10161
10241
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
10162
10242
|
/**
|
|
10163
10243
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
10164
10244
|
*
|
|
10165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
10166
10246
|
*/
|
|
10167
10247
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
10168
10248
|
/**
|
|
10169
10249
|
* Disallow unnecessary `globalThis` references.
|
|
10170
10250
|
*
|
|
10171
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-global-this.md
|
|
10172
10252
|
*/
|
|
10173
10253
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
10174
10254
|
/**
|
|
10175
10255
|
* Disallow unnecessary nested ternary expressions.
|
|
10176
10256
|
*
|
|
10177
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10257
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
10178
10258
|
*/
|
|
10179
10259
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
10180
10260
|
/**
|
|
10181
10261
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
10182
10262
|
*
|
|
10183
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
10184
10264
|
*/
|
|
10185
10265
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
10186
10266
|
/**
|
|
10187
10267
|
* Disallow using `.length` or `Infinity` as the `end` argument of
|
|
10188
10268
|
* `{Array,String,TypedArray}#slice()`.
|
|
10189
10269
|
*
|
|
10190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10270
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
10191
10271
|
*/
|
|
10192
10272
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
10193
10273
|
/**
|
|
10194
10274
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
10195
10275
|
*
|
|
10196
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-splice.md
|
|
10197
10277
|
*/
|
|
10198
10278
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
10199
10279
|
/**
|
|
10200
10280
|
* Disallow `String#trim()` before `String#startsWith()` or
|
|
10201
10281
|
* `String#endsWith()`.
|
|
10202
10282
|
*
|
|
10203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
10204
10284
|
*/
|
|
10205
10285
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
10206
10286
|
/**
|
|
10207
10287
|
* Disallow unreadable array destructuring.
|
|
10208
10288
|
*
|
|
10209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
10210
10290
|
*/
|
|
10211
10291
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
10212
10292
|
/**
|
|
10213
10293
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of`
|
|
10214
10294
|
* loop headers.
|
|
10215
10295
|
*
|
|
10216
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
10217
10297
|
*/
|
|
10218
10298
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
10219
10299
|
/**
|
|
10220
10300
|
* Disallow unreadable IIFEs.
|
|
10221
10301
|
*
|
|
10222
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10302
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unreadable-iife.md
|
|
10223
10303
|
*/
|
|
10224
10304
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
10225
10305
|
/**
|
|
10226
10306
|
* Disallow unreadable `new` expressions.
|
|
10227
10307
|
*
|
|
10228
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unreadable-new-expression.md
|
|
10229
10309
|
*/
|
|
10230
10310
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
10231
10311
|
/**
|
|
10232
10312
|
* Disallow unreadable object destructuring.
|
|
10233
10313
|
*
|
|
10234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
10235
10315
|
*/
|
|
10236
10316
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
10237
10317
|
/**
|
|
10238
10318
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
10239
10319
|
*
|
|
10240
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10320
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
10241
10321
|
*/
|
|
10242
10322
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
10243
10323
|
/**
|
|
10244
10324
|
* Disallow unsafe DOM HTML APIs.
|
|
10245
10325
|
*
|
|
10246
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unsafe-dom-html.md
|
|
10247
10327
|
*/
|
|
10248
10328
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
10249
10329
|
/**
|
|
10250
10330
|
* Disallow reading `.value` from `Promise.allSettled()` results without a
|
|
10251
10331
|
* fulfilled status guard.
|
|
10252
10332
|
*
|
|
10253
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
10254
10334
|
*/
|
|
10255
10335
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
10256
10336
|
/**
|
|
10257
10337
|
* Disallow unsafe values as property keys.
|
|
10258
10338
|
*
|
|
10259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unsafe-property-key.md
|
|
10260
10340
|
*/
|
|
10261
10341
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
10262
10342
|
/**
|
|
10263
10343
|
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite`
|
|
10264
10344
|
* APIs.
|
|
10265
10345
|
*
|
|
10266
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
10267
10347
|
*/
|
|
10268
10348
|
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
10269
10349
|
/**
|
|
10270
10350
|
* Disallow non-literal replacement values in `String#replace()` and
|
|
10271
10351
|
* `String#replaceAll()`.
|
|
10272
10352
|
*
|
|
10273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
10274
10354
|
*/
|
|
10275
10355
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
10276
10356
|
/**
|
|
10277
|
-
* Disallow
|
|
10357
|
+
* Disallow unscoped CSS nesting selectors.
|
|
10278
10358
|
*
|
|
10279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unscoped-css-nesting-selector.md
|
|
10360
|
+
*/
|
|
10361
|
+
'unicorn/no-unscoped-css-nesting-selector'?: Linter.RuleEntry<UnicornNoUnscopedCssNestingSelector>;
|
|
10362
|
+
/**
|
|
10363
|
+
* Replaced by `unicorn/no-unused-builtin-method-return` which covers more
|
|
10364
|
+
* cases.
|
|
10365
|
+
*
|
|
10366
|
+
* @deprecated
|
|
10367
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/deleted-and-deprecated-rules.md#no-unused-array-method-return
|
|
10280
10368
|
*/
|
|
10281
10369
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
10370
|
+
/**
|
|
10371
|
+
* Disallow ignoring the return value of selected built-in methods.
|
|
10372
|
+
*
|
|
10373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unused-builtin-method-return.md
|
|
10374
|
+
*/
|
|
10375
|
+
'unicorn/no-unused-builtin-method-return'?: Linter.RuleEntry<[]>;
|
|
10376
|
+
/**
|
|
10377
|
+
* Disallow discarding lazy iterator helpers.
|
|
10378
|
+
*
|
|
10379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unused-iterator-helper.md
|
|
10380
|
+
*/
|
|
10381
|
+
'unicorn/no-unused-iterator-helper'?: Linter.RuleEntry<[]>;
|
|
10282
10382
|
/**
|
|
10283
10383
|
* Disallow unused object properties.
|
|
10284
10384
|
*
|
|
10285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10385
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-unused-properties.md
|
|
10286
10386
|
*/
|
|
10287
10387
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
10288
10388
|
/**
|
|
10289
10389
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
10290
10390
|
*
|
|
10291
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-boolean-cast.md
|
|
10292
10392
|
*/
|
|
10293
10393
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
10294
10394
|
/**
|
|
10295
10395
|
* Disallow useless type coercions of values that are already of the target
|
|
10296
10396
|
* type.
|
|
10297
10397
|
*
|
|
10298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-coercion.md
|
|
10299
10399
|
*/
|
|
10300
10400
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
10301
10401
|
/**
|
|
10302
10402
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or
|
|
10303
10403
|
* `WeakMap`.
|
|
10304
10404
|
*
|
|
10305
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-collection-argument.md
|
|
10306
10406
|
*/
|
|
10307
10407
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
10308
10408
|
/**
|
|
10309
10409
|
* Disallow useless compound assignments such as `x += 0`.
|
|
10310
10410
|
*
|
|
10311
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-compound-assignment.md
|
|
10312
10412
|
*/
|
|
10313
10413
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
10314
10414
|
/**
|
|
10315
10415
|
* Disallow useless concatenation of literals.
|
|
10316
10416
|
*
|
|
10317
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-concat.md
|
|
10318
10418
|
*/
|
|
10319
10419
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
10320
10420
|
/**
|
|
10321
10421
|
* Disallow useless `continue` statements.
|
|
10322
10422
|
*
|
|
10323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-continue.md
|
|
10324
10424
|
*/
|
|
10325
10425
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
10326
10426
|
/**
|
|
10327
10427
|
* Disallow unnecessary existence checks before deletion.
|
|
10328
10428
|
*
|
|
10329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-delete-check.md
|
|
10330
10430
|
*/
|
|
10331
10431
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
10332
10432
|
/**
|
|
10333
10433
|
* Disallow `else` after a statement that exits.
|
|
10334
10434
|
*
|
|
10335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10435
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-else.md
|
|
10336
10436
|
*/
|
|
10337
10437
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
10338
10438
|
/**
|
|
10339
10439
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
10340
10440
|
*
|
|
10341
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10441
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
10342
10442
|
*/
|
|
10343
10443
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
10344
10444
|
/**
|
|
10345
10445
|
* Disallow useless fallback when spreading in object literals.
|
|
10346
10446
|
*
|
|
10347
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
10348
10448
|
*/
|
|
10349
10449
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
10350
10450
|
/**
|
|
10351
10451
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
10352
10452
|
*
|
|
10353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
10354
10454
|
*/
|
|
10355
10455
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
10356
10456
|
/**
|
|
10357
10457
|
* Disallow useless array length check.
|
|
10358
10458
|
*
|
|
10359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-length-check.md
|
|
10360
10460
|
*/
|
|
10361
10461
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
10362
10462
|
/**
|
|
10363
10463
|
* Disallow unnecessary operands in logical expressions involving boolean
|
|
10364
10464
|
* literals.
|
|
10365
10465
|
*
|
|
10366
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-logical-operand.md
|
|
10367
10467
|
*/
|
|
10368
10468
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
10369
10469
|
/**
|
|
10370
10470
|
* Disallow useless overrides of class methods.
|
|
10371
10471
|
*
|
|
10372
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-override.md
|
|
10373
10473
|
*/
|
|
10374
10474
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
10375
10475
|
/**
|
|
10376
10476
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions
|
|
10377
10477
|
* or promise callbacks
|
|
10378
10478
|
*
|
|
10379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
10380
10480
|
*/
|
|
10381
10481
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
10382
10482
|
/**
|
|
10383
10483
|
* Disallow redundant re-exports.
|
|
10384
10484
|
*
|
|
10385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-re-export.md
|
|
10386
10486
|
*/
|
|
10387
10487
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
10388
10488
|
/**
|
|
10389
10489
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
10390
10490
|
*
|
|
10391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10491
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-recursion.md
|
|
10392
10492
|
*/
|
|
10393
10493
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
10494
|
+
/**
|
|
10495
|
+
* Disallow unnecessary `Set` construction around `Set` methods.
|
|
10496
|
+
*
|
|
10497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-set-construction.md
|
|
10498
|
+
*/
|
|
10499
|
+
'unicorn/no-useless-set-construction'?: Linter.RuleEntry<[]>;
|
|
10394
10500
|
/**
|
|
10395
10501
|
* Disallow unnecessary spread.
|
|
10396
10502
|
*
|
|
10397
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-spread.md
|
|
10398
10504
|
*/
|
|
10399
10505
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
10400
10506
|
/**
|
|
10401
10507
|
* Disallow useless case in switch statements.
|
|
10402
10508
|
*
|
|
10403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-switch-case.md
|
|
10404
10510
|
*/
|
|
10405
10511
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
10406
10512
|
/**
|
|
10407
10513
|
* Disallow useless template literal expressions.
|
|
10408
10514
|
*
|
|
10409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-template-literals.md
|
|
10410
10516
|
*/
|
|
10411
10517
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
10412
10518
|
/**
|
|
10413
10519
|
* Disallow useless `undefined`.
|
|
10414
10520
|
*
|
|
10415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-useless-undefined.md
|
|
10416
10522
|
*/
|
|
10417
10523
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
10524
|
+
/**
|
|
10525
|
+
* Disallow returning or exporting resources declared with `using`, including
|
|
10526
|
+
* through capturing functions.
|
|
10527
|
+
*
|
|
10528
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-using-resource-escape.md
|
|
10529
|
+
*/
|
|
10530
|
+
'unicorn/no-using-resource-escape'?: Linter.RuleEntry<[]>;
|
|
10418
10531
|
/**
|
|
10419
10532
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
10420
10533
|
*
|
|
10421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
10422
10535
|
*/
|
|
10423
10536
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
10424
10537
|
/**
|
|
10425
10538
|
* Disallow number literals with zero fractions or dangling dots.
|
|
10426
10539
|
*
|
|
10427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/no-zero-fractions.md
|
|
10428
10541
|
*/
|
|
10429
10542
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
10430
10543
|
/**
|
|
10431
10544
|
* Enforce proper case for numeric literals.
|
|
10432
10545
|
*
|
|
10433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/number-literal-case.md
|
|
10434
10547
|
*/
|
|
10435
10548
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
10436
10549
|
/**
|
|
10437
10550
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
10438
10551
|
*
|
|
10439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/numeric-separators-style.md
|
|
10440
10553
|
*/
|
|
10441
10554
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
10442
10555
|
/**
|
|
10443
10556
|
* Require assignment operator shorthand where possible.
|
|
10444
10557
|
*
|
|
10445
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/operator-assignment.md
|
|
10446
10559
|
*/
|
|
10447
10560
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
10448
10561
|
/**
|
|
10449
10562
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between
|
|
10450
10563
|
* signals.
|
|
10451
10564
|
*
|
|
10452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10565
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-abort-signal-any.md
|
|
10453
10566
|
*/
|
|
10454
10567
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
10455
10568
|
/**
|
|
10456
10569
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController`
|
|
10457
10570
|
* with `setTimeout()`.
|
|
10458
10571
|
*
|
|
10459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
10460
10573
|
*/
|
|
10461
10574
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
10462
10575
|
/**
|
|
10463
10576
|
* Prefer `.addEventListener()` and `.removeEventListener()` over
|
|
10464
10577
|
* `on`-functions.
|
|
10465
10578
|
*
|
|
10466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-add-event-listener.md
|
|
10467
10580
|
*/
|
|
10468
10581
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
10469
10582
|
/**
|
|
10470
10583
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
10471
10584
|
*
|
|
10472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10585
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
10473
10586
|
*/
|
|
10474
10587
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
10475
10588
|
/**
|
|
10476
10589
|
* Prefer `AggregateError` when throwing collected errors.
|
|
10477
10590
|
*
|
|
10478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10591
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-aggregate-error.md
|
|
10479
10592
|
*/
|
|
10480
10593
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
10481
10594
|
/**
|
|
10482
10595
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from
|
|
10483
10596
|
* `.filter(…)`.
|
|
10484
10597
|
*
|
|
10485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-find.md
|
|
10486
10599
|
*/
|
|
10487
10600
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
10488
10601
|
/**
|
|
10489
10602
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
10490
10603
|
*
|
|
10491
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-flat.md
|
|
10492
10605
|
*/
|
|
10493
10606
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
10494
10607
|
/**
|
|
10495
10608
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
10496
10609
|
*
|
|
10497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-flat-map.md
|
|
10498
10611
|
*/
|
|
10499
10612
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
10500
10613
|
/**
|
|
10501
|
-
* Prefer `Array.fromAsync()` over
|
|
10614
|
+
* Prefer `Array.fromAsync()` over array accumulation loops.
|
|
10502
10615
|
*
|
|
10503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-from-async.md
|
|
10504
10617
|
*/
|
|
10505
10618
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
10506
10619
|
/**
|
|
10507
10620
|
* Prefer using the `Array.from()` mapping function argument.
|
|
10508
10621
|
*
|
|
10509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-from-map.md
|
|
10510
10623
|
*/
|
|
10511
10624
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
10512
10625
|
/**
|
|
10513
10626
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
10514
10627
|
*
|
|
10515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-from-range.md
|
|
10516
10629
|
*/
|
|
10517
10630
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
10518
10631
|
/**
|
|
10519
10632
|
* Prefer `Array#{indexOf,lastIndexOf}()` over
|
|
10520
10633
|
* `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
10521
10634
|
*
|
|
10522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-index-of.md
|
|
10523
10636
|
*/
|
|
10524
10637
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
10525
10638
|
/**
|
|
10526
10639
|
* Prefer iterating an array directly or with `Array#keys()` over
|
|
10527
10640
|
* `Array#entries()` when the index or value is unused.
|
|
10528
10641
|
*
|
|
10529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
10530
10643
|
*/
|
|
10531
10644
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
10532
10645
|
/**
|
|
10533
10646
|
* Prefer last-oriented array methods over `Array#reverse()` or
|
|
10534
10647
|
* `Array#toReversed()` followed by a method.
|
|
10535
10648
|
*
|
|
10536
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-last-methods.md
|
|
10537
10650
|
*/
|
|
10538
10651
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
10539
10652
|
/**
|
|
10540
10653
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned
|
|
10541
10654
|
* array.
|
|
10542
10655
|
*
|
|
10543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-slice.md
|
|
10544
10657
|
*/
|
|
10545
10658
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
10546
10659
|
/**
|
|
10547
10660
|
* Prefer `.some(…)` over `.filter(…).length` check and
|
|
10548
10661
|
* `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
10549
10662
|
*
|
|
10550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-array-some.md
|
|
10551
10664
|
*/
|
|
10552
10665
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
10553
10666
|
/**
|
|
10554
10667
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
10555
10668
|
*
|
|
10556
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-at.md
|
|
10557
10670
|
*/
|
|
10558
10671
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
10559
10672
|
/**
|
|
10560
10673
|
* Prefer `await` over promise chaining.
|
|
10561
10674
|
*
|
|
10562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-await.md
|
|
10563
10676
|
*/
|
|
10564
10677
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
10565
10678
|
/**
|
|
10566
10679
|
* Prefer `BigInt` literals over the constructor.
|
|
10567
10680
|
*
|
|
10568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-bigint-literals.md
|
|
10569
10682
|
*/
|
|
10570
10683
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
10571
10684
|
/**
|
|
10572
10685
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and
|
|
10573
10686
|
* `Blob#text()` over `FileReader#readAsText(…)`.
|
|
10574
10687
|
*
|
|
10575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
10576
10689
|
*/
|
|
10577
10690
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
10578
10691
|
/**
|
|
10579
10692
|
* Prefer block statements over IIFEs used only for scoping.
|
|
10580
10693
|
*
|
|
10581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
10582
10695
|
*/
|
|
10583
10696
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
10584
10697
|
/**
|
|
10585
10698
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
10586
10699
|
*
|
|
10587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-boolean-return.md
|
|
10588
10701
|
*/
|
|
10589
10702
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
10590
10703
|
/**
|
|
10591
10704
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
10592
10705
|
*
|
|
10593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-class-fields.md
|
|
10594
10707
|
*/
|
|
10595
10708
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
10596
10709
|
/**
|
|
10597
10710
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
10598
10711
|
*
|
|
10599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-classlist-toggle.md
|
|
10600
10713
|
*/
|
|
10601
10714
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
10602
10715
|
/**
|
|
10603
10716
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and
|
|
10604
10717
|
* `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
10605
10718
|
*
|
|
10606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-code-point.md
|
|
10607
10720
|
*/
|
|
10608
10721
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
10609
10722
|
/**
|
|
10610
|
-
* Prefer
|
|
10723
|
+
* Prefer combining consecutive guards with identical exit statements.
|
|
10724
|
+
*
|
|
10725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-combined-guards.md
|
|
10726
|
+
*/
|
|
10727
|
+
'unicorn/prefer-combined-guards'?: Linter.RuleEntry<[]>;
|
|
10728
|
+
/**
|
|
10729
|
+
* Prefer early continues over conditionals wrapping the remainder of the loop
|
|
10730
|
+
* body.
|
|
10611
10731
|
*
|
|
10612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-continue.md
|
|
10613
10733
|
*/
|
|
10614
10734
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
10615
10735
|
/**
|
|
10616
10736
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
10617
10737
|
*
|
|
10618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-date-now.md
|
|
10619
10739
|
*/
|
|
10620
10740
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
10621
10741
|
/**
|
|
10622
10742
|
* Prefer default parameters over reassignment.
|
|
10623
10743
|
*
|
|
10624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-default-parameters.md
|
|
10625
10745
|
*/
|
|
10626
10746
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
10627
10747
|
/**
|
|
10628
10748
|
* Prefer direct iteration over default iterator method calls.
|
|
10629
10749
|
*
|
|
10630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-direct-iteration.md
|
|
10631
10751
|
*/
|
|
10632
10752
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
10633
10753
|
/**
|
|
10634
10754
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource
|
|
10635
10755
|
* disposal.
|
|
10636
10756
|
*
|
|
10637
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-dispose.md
|
|
10638
10758
|
*/
|
|
10639
10759
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
10640
10760
|
/**
|
|
10641
10761
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
10642
10762
|
*
|
|
10643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-dom-node-append.md
|
|
10644
10764
|
*/
|
|
10645
10765
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
10646
10766
|
/**
|
|
10647
10767
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
10648
10768
|
*
|
|
10649
10769
|
* @deprecated
|
|
10650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
10651
10771
|
*/
|
|
10652
10772
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
10653
10773
|
/**
|
|
10654
10774
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
10655
10775
|
*
|
|
10656
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
10657
10777
|
*/
|
|
10658
10778
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
10659
10779
|
/**
|
|
10660
10780
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
10661
10781
|
*
|
|
10662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-dom-node-remove.md
|
|
10663
10783
|
*/
|
|
10664
10784
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
10665
10785
|
/**
|
|
10666
|
-
* Prefer `.replaceChildren()` when
|
|
10786
|
+
* Prefer `.replaceChildren()` when replacing DOM children.
|
|
10667
10787
|
*
|
|
10668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
10669
10789
|
*/
|
|
10670
10790
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
10671
10791
|
/**
|
|
10672
10792
|
* Prefer `.textContent` over `.innerText`.
|
|
10673
10793
|
*
|
|
10674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10794
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
10675
10795
|
*/
|
|
10676
10796
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
10677
10797
|
/**
|
|
10678
|
-
* Prefer early returns over
|
|
10798
|
+
* Prefer early returns over conditionals wrapping the remainder of the
|
|
10799
|
+
* function body.
|
|
10679
10800
|
*
|
|
10680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-early-return.md
|
|
10681
10802
|
*/
|
|
10682
10803
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
10683
10804
|
/**
|
|
10684
10805
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
10685
10806
|
*
|
|
10686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-else-if.md
|
|
10687
10808
|
*/
|
|
10688
10809
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
10689
10810
|
/**
|
|
10690
10811
|
* Prefer `Error.isError()` when checking for errors.
|
|
10691
10812
|
*
|
|
10692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-error-is-error.md
|
|
10693
10814
|
*/
|
|
10694
10815
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
10695
10816
|
/**
|
|
10696
10817
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
10697
10818
|
*
|
|
10698
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10819
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-event-target.md
|
|
10699
10820
|
*/
|
|
10700
10821
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
10701
10822
|
/**
|
|
10702
10823
|
* Prefer explicit viewport units.
|
|
10703
10824
|
*
|
|
10704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
10705
10826
|
*/
|
|
10706
10827
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
10707
10828
|
/**
|
|
10708
10829
|
* Prefer `export…from` when re-exporting.
|
|
10709
10830
|
*
|
|
10710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-export-from.md
|
|
10711
10832
|
*/
|
|
10712
10833
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
10713
10834
|
/**
|
|
10714
10835
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
10715
10836
|
*
|
|
10716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
10717
10838
|
*/
|
|
10718
10839
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
10719
10840
|
/**
|
|
10720
10841
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
10721
10842
|
*
|
|
10722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
10723
10844
|
*/
|
|
10724
10845
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
10725
10846
|
/**
|
|
10726
10847
|
* Prefer global numeric constants over `Number` static properties.
|
|
10727
10848
|
*
|
|
10728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10849
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-global-number-constants.md
|
|
10729
10850
|
*/
|
|
10730
10851
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
10731
10852
|
/**
|
|
10732
10853
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
10733
10854
|
*
|
|
10734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-global-this.md
|
|
10735
10856
|
*/
|
|
10736
10857
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
10737
10858
|
/**
|
|
10738
|
-
* Prefer `Object.groupBy()` or `Map.groupBy()` over
|
|
10859
|
+
* Prefer `Object.groupBy()` or `Map.groupBy()` over manual grouping.
|
|
10739
10860
|
*
|
|
10740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-group-by.md
|
|
10741
10862
|
*/
|
|
10742
10863
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
10743
10864
|
/**
|
|
10744
10865
|
* Prefer `.has()` when checking existence.
|
|
10745
10866
|
*
|
|
10746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-has-check.md
|
|
10747
10868
|
*/
|
|
10748
10869
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
10749
10870
|
/**
|
|
10750
10871
|
* Prefer moving code shared by all branches of an `if` statement out of the
|
|
10751
10872
|
* branches.
|
|
10752
10873
|
*
|
|
10753
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10874
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
10754
10875
|
*/
|
|
10755
10876
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
10756
10877
|
/**
|
|
10757
10878
|
* Prefer HTTPS over HTTP.
|
|
10758
10879
|
*
|
|
10759
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-https.md
|
|
10760
10881
|
*/
|
|
10761
10882
|
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
10762
10883
|
/**
|
|
10763
10884
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
10764
10885
|
*
|
|
10765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
10766
10887
|
*/
|
|
10767
10888
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
10768
10889
|
/**
|
|
10769
10890
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting
|
|
10770
10891
|
* file paths.
|
|
10771
10892
|
*
|
|
10772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10893
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-import-meta-properties.md
|
|
10773
10894
|
*/
|
|
10774
10895
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
10775
10896
|
/**
|
|
10776
10897
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and
|
|
10777
10898
|
* `Array#some()` when checking for existence or non-existence.
|
|
10778
10899
|
*
|
|
10779
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-includes.md
|
|
10780
10901
|
*/
|
|
10781
10902
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
10782
10903
|
/**
|
|
10783
10904
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
10784
10905
|
*
|
|
10785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
10786
10907
|
*/
|
|
10787
10908
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
10788
10909
|
/**
|
|
10789
10910
|
* Prefer passing iterables directly to constructors instead of filling empty
|
|
10790
10911
|
* collections.
|
|
10791
10912
|
*
|
|
10792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10913
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
10793
10914
|
*/
|
|
10794
10915
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
10795
10916
|
/**
|
|
10796
10917
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
10797
10918
|
*
|
|
10798
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-iterator-concat.md
|
|
10799
10920
|
*/
|
|
10800
10921
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
10801
10922
|
/**
|
|
10802
10923
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
10803
10924
|
*
|
|
10804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-iterator-helpers.md
|
|
10805
10926
|
*/
|
|
10806
10927
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
10807
10928
|
/**
|
|
10808
10929
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
10809
10930
|
*
|
|
10810
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-iterator-to-array.md
|
|
10811
10932
|
*/
|
|
10812
10933
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
10813
10934
|
/**
|
|
10814
10935
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
10815
10936
|
*
|
|
10816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10937
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
10817
10938
|
*/
|
|
10818
10939
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
10940
|
+
/**
|
|
10941
|
+
* Prefer `Iterator.zip()` over parallel-array indexing.
|
|
10942
|
+
*
|
|
10943
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-iterator-zip.md
|
|
10944
|
+
*/
|
|
10945
|
+
'unicorn/prefer-iterator-zip'?: Linter.RuleEntry<[]>;
|
|
10946
|
+
/**
|
|
10947
|
+
* Prefer JSON imports over reading and parsing JSON files.
|
|
10948
|
+
*
|
|
10949
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-json-import.md
|
|
10950
|
+
*/
|
|
10951
|
+
'unicorn/prefer-json-import'?: Linter.RuleEntry<[]>;
|
|
10819
10952
|
/**
|
|
10820
10953
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
10821
10954
|
*
|
|
10822
10955
|
* @deprecated
|
|
10823
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
10824
10957
|
*/
|
|
10825
10958
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
10826
10959
|
/**
|
|
10827
10960
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
10828
10961
|
*
|
|
10829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
10830
10963
|
*/
|
|
10831
10964
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
10832
10965
|
/**
|
|
10833
10966
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
10834
10967
|
*
|
|
10835
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10968
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-location-assign.md
|
|
10836
10969
|
*/
|
|
10837
10970
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
10838
10971
|
/**
|
|
10839
10972
|
* Prefer using a logical operator over a ternary.
|
|
10840
10973
|
*
|
|
10841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
10842
10975
|
*/
|
|
10843
10976
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
10844
10977
|
/**
|
|
10845
10978
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a
|
|
10846
10979
|
* map.
|
|
10847
10980
|
*
|
|
10848
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-map-from-entries.md
|
|
10849
10982
|
*/
|
|
10850
10983
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
10851
10984
|
/**
|
|
10852
10985
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric
|
|
10853
10986
|
* range checks.
|
|
10854
10987
|
*
|
|
10855
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10988
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-math-abs.md
|
|
10856
10989
|
*/
|
|
10857
10990
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
10858
10991
|
/**
|
|
10859
10992
|
* Prefer `Math` constants over their approximate numeric values.
|
|
10860
10993
|
*
|
|
10861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-math-constants.md
|
|
10862
10995
|
*/
|
|
10863
10996
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
10864
10997
|
/**
|
|
10865
10998
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
10866
10999
|
*
|
|
10867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11000
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-math-min-max.md
|
|
10868
11001
|
*/
|
|
10869
11002
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
10870
11003
|
/**
|
|
10871
11004
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
10872
11005
|
*
|
|
10873
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-math-trunc.md
|
|
10874
11007
|
*/
|
|
10875
11008
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
11009
|
+
/**
|
|
11010
|
+
* Prefer modern media feature range syntax.
|
|
11011
|
+
*
|
|
11012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-media-feature-range-syntax.md
|
|
11013
|
+
*/
|
|
11014
|
+
'unicorn/prefer-media-feature-range-syntax'?: Linter.RuleEntry<[]>;
|
|
10876
11015
|
/**
|
|
10877
11016
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
10878
11017
|
*
|
|
10879
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-minimal-ternary.md
|
|
10880
11019
|
*/
|
|
10881
11020
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
10882
11021
|
/**
|
|
10883
11022
|
* Prefer modern DOM APIs.
|
|
10884
11023
|
*
|
|
10885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
10886
11025
|
*/
|
|
10887
11026
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
10888
11027
|
/**
|
|
10889
11028
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
10890
11029
|
*
|
|
10891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11030
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-modern-math-apis.md
|
|
10892
11031
|
*/
|
|
10893
11032
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
10894
11033
|
/**
|
|
10895
11034
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
10896
11035
|
*
|
|
10897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-module.md
|
|
10898
11037
|
*/
|
|
10899
11038
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
10900
11039
|
/**
|
|
10901
11040
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol`
|
|
10902
11041
|
* directly.
|
|
10903
11042
|
*
|
|
10904
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11043
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
10905
11044
|
*/
|
|
10906
11045
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
10907
11046
|
/**
|
|
10908
11047
|
* Prefer negative index over `.length - index` when possible.
|
|
10909
11048
|
*
|
|
10910
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-negative-index.md
|
|
10911
11050
|
*/
|
|
10912
11051
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
10913
11052
|
/**
|
|
10914
11053
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
10915
11054
|
*
|
|
10916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-node-protocol.md
|
|
10917
11056
|
*/
|
|
10918
11057
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
10919
11058
|
/**
|
|
10920
11059
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
10921
11060
|
*
|
|
10922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-number-coercion.md
|
|
10923
11062
|
*/
|
|
10924
11063
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
10925
11064
|
/**
|
|
10926
11065
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
10927
11066
|
*
|
|
10928
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
10929
11068
|
*/
|
|
10930
11069
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
10931
11070
|
/**
|
|
10932
11071
|
* Prefer `Number` static methods over global functions and optionally static
|
|
10933
11072
|
* properties over global constants.
|
|
10934
11073
|
*
|
|
10935
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-number-properties.md
|
|
10936
11075
|
*/
|
|
10937
11076
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
10938
11077
|
/**
|
|
10939
11078
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()`
|
|
10940
11079
|
* calls.
|
|
10941
11080
|
*
|
|
10942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-object-define-properties.md
|
|
10943
11082
|
*/
|
|
10944
11083
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
10945
11084
|
/**
|
|
10946
11085
|
* Prefer object destructuring defaults over default object literals with
|
|
10947
11086
|
* spread.
|
|
10948
11087
|
*
|
|
10949
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11088
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
10950
11089
|
*/
|
|
10951
11090
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
10952
11091
|
/**
|
|
10953
11092
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs
|
|
10954
11093
|
* into an object.
|
|
10955
11094
|
*
|
|
10956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11095
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-object-from-entries.md
|
|
10957
11096
|
*/
|
|
10958
11097
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
10959
11098
|
/**
|
|
10960
11099
|
* Prefer the most specific `Object` iterable method.
|
|
10961
11100
|
*
|
|
10962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11101
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
10963
11102
|
*/
|
|
10964
11103
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
10965
11104
|
/**
|
|
10966
11105
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
10967
11106
|
*
|
|
10968
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-observer-apis.md
|
|
10969
11108
|
*/
|
|
10970
11109
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
10971
11110
|
/**
|
|
10972
11111
|
* Prefer omitting the `catch` binding parameter.
|
|
10973
11112
|
*
|
|
10974
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11113
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
10975
11114
|
*/
|
|
10976
11115
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
10977
11116
|
/**
|
|
10978
11117
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
10979
11118
|
*
|
|
10980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-path2d.md
|
|
10981
11120
|
*/
|
|
10982
11121
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
10983
11122
|
/**
|
|
10984
11123
|
* Prefer private class fields over the underscore-prefix convention.
|
|
10985
11124
|
*
|
|
10986
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-private-class-fields.md
|
|
10987
11126
|
*/
|
|
10988
11127
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
10989
11128
|
/**
|
|
10990
11129
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
10991
11130
|
*
|
|
10992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11131
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-promise-try.md
|
|
10993
11132
|
*/
|
|
10994
11133
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
10995
11134
|
/**
|
|
10996
11135
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from
|
|
10997
11136
|
* `new Promise()`.
|
|
10998
11137
|
*
|
|
10999
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11138
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
11000
11139
|
*/
|
|
11001
11140
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
11002
11141
|
/**
|
|
11003
11142
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
11004
11143
|
*
|
|
11005
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-prototype-methods.md
|
|
11006
11145
|
*/
|
|
11007
11146
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
11008
11147
|
/**
|
|
11009
11148
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query
|
|
11010
11149
|
* methods.
|
|
11011
11150
|
*
|
|
11012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11151
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-query-selector.md
|
|
11013
11152
|
*/
|
|
11014
11153
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
11015
11154
|
/**
|
|
11016
11155
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and
|
|
11017
11156
|
* `setTimeout(…, 0)`.
|
|
11018
11157
|
*
|
|
11019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11158
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-queue-microtask.md
|
|
11020
11159
|
*/
|
|
11021
11160
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
11022
11161
|
/**
|
|
11023
11162
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
11024
11163
|
*
|
|
11025
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-reflect-apply.md
|
|
11026
11165
|
*/
|
|
11027
11166
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
11028
11167
|
/**
|
|
11029
11168
|
* Prefer `RegExp.escape()` for escaping strings to use in regular
|
|
11030
11169
|
* expressions.
|
|
11031
11170
|
*
|
|
11032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11171
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-regexp-escape.md
|
|
11033
11172
|
*/
|
|
11034
11173
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
11035
11174
|
/**
|
|
11036
11175
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and
|
|
11037
11176
|
* `RegExp#exec()`.
|
|
11038
11177
|
*
|
|
11039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11178
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-regexp-test.md
|
|
11040
11179
|
*/
|
|
11041
11180
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
11042
11181
|
/**
|
|
11043
11182
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
11044
11183
|
*
|
|
11045
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-response-static-json.md
|
|
11046
11185
|
*/
|
|
11047
11186
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
11048
11187
|
/**
|
|
11049
11188
|
* Prefer `:scope` when using element query selector methods.
|
|
11050
11189
|
*
|
|
11051
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-scoped-selector.md
|
|
11052
11191
|
*/
|
|
11053
11192
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
11054
11193
|
/**
|
|
11055
11194
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or
|
|
11056
11195
|
* non-existence.
|
|
11057
11196
|
*
|
|
11058
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11197
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-set-has.md
|
|
11059
11198
|
*/
|
|
11060
11199
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
11061
11200
|
/**
|
|
11062
11201
|
* Prefer `Set` methods for Set operations.
|
|
11063
11202
|
*
|
|
11064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11203
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-set-methods.md
|
|
11065
11204
|
*/
|
|
11066
11205
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
11067
11206
|
/**
|
|
11068
11207
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
11069
11208
|
*
|
|
11070
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-set-size.md
|
|
11071
11210
|
*/
|
|
11072
11211
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
11073
11212
|
/**
|
|
11074
11213
|
* Prefer arrow function properties over methods with a single return.
|
|
11075
11214
|
*
|
|
11076
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-short-arrow-method.md
|
|
11077
11216
|
*/
|
|
11078
11217
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
11079
11218
|
/**
|
|
11080
11219
|
* Prefer simple conditions first in logical expressions.
|
|
11081
11220
|
*
|
|
11082
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-simple-condition-first.md
|
|
11083
11222
|
*/
|
|
11084
11223
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
11085
11224
|
/**
|
|
11086
11225
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
11087
11226
|
*
|
|
11088
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11227
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
11089
11228
|
*/
|
|
11090
11229
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
11091
11230
|
/**
|
|
11092
11231
|
* Prefer simplified conditions.
|
|
11093
11232
|
*
|
|
11094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-simplified-conditions.md
|
|
11095
11234
|
*/
|
|
11096
11235
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
11097
11236
|
/**
|
|
11098
11237
|
* Prefer a single `Array#some()` or `Array#every()` with a combined
|
|
11099
11238
|
* predicate.
|
|
11100
11239
|
*
|
|
11101
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-single-array-predicate.md
|
|
11102
11241
|
*/
|
|
11103
11242
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
11104
11243
|
/**
|
|
11105
11244
|
* Enforce combining multiple `Array#{push,unshift}()`,
|
|
11106
11245
|
* `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
11107
11246
|
*
|
|
11108
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11247
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-single-call.md
|
|
11109
11248
|
*/
|
|
11110
11249
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
11111
11250
|
/**
|
|
11112
11251
|
* Prefer a single object destructuring declaration per local const source.
|
|
11113
11252
|
*
|
|
11114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11253
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
11115
11254
|
*/
|
|
11116
11255
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
11117
11256
|
/**
|
|
11118
11257
|
* Enforce combining multiple single-character replacements into a single
|
|
11119
11258
|
* `String#replaceAll()` with a regular expression.
|
|
11120
11259
|
*
|
|
11121
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11260
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-single-replace.md
|
|
11122
11261
|
*/
|
|
11123
11262
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
11124
11263
|
/**
|
|
11125
11264
|
* Prefer declaring variables in the smallest possible scope.
|
|
11126
11265
|
*
|
|
11127
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-smaller-scope.md
|
|
11128
11267
|
*/
|
|
11129
11268
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
11130
11269
|
/**
|
|
11131
11270
|
* Prefer `String#split()` with a limit.
|
|
11132
11271
|
*
|
|
11133
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11272
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-split-limit.md
|
|
11134
11273
|
*/
|
|
11135
11274
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
11136
11275
|
/**
|
|
11137
11276
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`,
|
|
11138
11277
|
* `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
11139
11278
|
*
|
|
11140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-spread.md
|
|
11141
11280
|
*/
|
|
11142
11281
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
11143
11282
|
/**
|
|
11144
11283
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
11145
11284
|
*
|
|
11146
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-string-match-all.md
|
|
11147
11286
|
*/
|
|
11148
11287
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
11149
11288
|
/**
|
|
11150
11289
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string
|
|
11151
11290
|
* padding.
|
|
11152
11291
|
*
|
|
11153
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11292
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
11154
11293
|
*/
|
|
11155
11294
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
11156
11295
|
/**
|
|
11157
11296
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
11158
11297
|
*
|
|
11159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-string-raw.md
|
|
11160
11299
|
*/
|
|
11161
11300
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
11162
11301
|
/**
|
|
11163
11302
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
11164
11303
|
*
|
|
11165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-string-repeat.md
|
|
11166
11305
|
*/
|
|
11167
11306
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
11168
11307
|
/**
|
|
11169
11308
|
* Prefer `String#replaceAll()` over regex searches with the global flag and
|
|
11170
11309
|
* `String#split().join()`.
|
|
11171
11310
|
*
|
|
11172
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-string-replace-all.md
|
|
11173
11312
|
*/
|
|
11174
11313
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
11175
11314
|
/**
|
|
11176
11315
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
11177
11316
|
*
|
|
11178
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-string-slice.md
|
|
11179
11318
|
*/
|
|
11180
11319
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
11181
11320
|
/**
|
|
11182
11321
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes,
|
|
11183
11322
|
* `String#indexOf() === 0`, and slice checks.
|
|
11184
11323
|
*
|
|
11185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
11186
11325
|
*/
|
|
11187
11326
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
11188
11327
|
/**
|
|
11189
11328
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` /
|
|
11190
11329
|
* `String#trimRight()`.
|
|
11191
11330
|
*
|
|
11192
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
11193
11332
|
*/
|
|
11194
11333
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
11195
11334
|
/**
|
|
11196
11335
|
* Prefer using `structuredClone` to create a deep clone.
|
|
11197
11336
|
*
|
|
11198
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11337
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-structured-clone.md
|
|
11199
11338
|
*/
|
|
11200
11339
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
11201
11340
|
/**
|
|
11202
11341
|
* Prefer `switch` over multiple `else-if`.
|
|
11203
11342
|
*
|
|
11204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-switch.md
|
|
11205
11344
|
*/
|
|
11206
11345
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
11207
11346
|
/**
|
|
11208
11347
|
* Prefer `Temporal` over `Date`.
|
|
11209
11348
|
*
|
|
11210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-temporal.md
|
|
11211
11350
|
*/
|
|
11212
11351
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
11352
|
+
/**
|
|
11353
|
+
* Prefer direct Temporal conversion methods.
|
|
11354
|
+
*
|
|
11355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-temporal-conversion.md
|
|
11356
|
+
*/
|
|
11357
|
+
'unicorn/prefer-temporal-conversion'?: Linter.RuleEntry<[]>;
|
|
11213
11358
|
/**
|
|
11214
11359
|
* Prefer ternary expressions over simple `if` statements that return or
|
|
11215
11360
|
* assign values.
|
|
11216
11361
|
*
|
|
11217
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-ternary.md
|
|
11218
11363
|
*/
|
|
11219
11364
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
11220
11365
|
/**
|
|
11221
11366
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
11222
11367
|
*
|
|
11223
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-then-catch.md
|
|
11224
11369
|
*/
|
|
11225
11370
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
11226
11371
|
/**
|
|
11227
11372
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
11228
11373
|
*
|
|
11229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-toggle-attribute.md
|
|
11230
11375
|
*/
|
|
11231
11376
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
11232
11377
|
/**
|
|
11233
11378
|
* Prefer top-level await over top-level promises and async function calls.
|
|
11234
11379
|
*
|
|
11235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11380
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-top-level-await.md
|
|
11236
11381
|
*/
|
|
11237
11382
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
11238
11383
|
/**
|
|
11239
11384
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
11240
11385
|
*
|
|
11241
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-type-error.md
|
|
11242
11387
|
*/
|
|
11243
11388
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
11244
11389
|
/**
|
|
11245
11390
|
* Require type literals to be last in union types.
|
|
11246
11391
|
*
|
|
11247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-type-literal-last.md
|
|
11248
11393
|
*/
|
|
11249
11394
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
11250
11395
|
/**
|
|
11251
|
-
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over
|
|
11252
|
-
*
|
|
11396
|
+
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over legacy
|
|
11397
|
+
* base64 conversions and manual postprocessing.
|
|
11253
11398
|
*
|
|
11254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-uint8array-base64.md
|
|
11255
11400
|
*/
|
|
11256
11401
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
11402
|
+
/**
|
|
11403
|
+
* Prefer `Uint8Array#toHex()` and `Uint8Array.fromHex()` over manual and
|
|
11404
|
+
* Buffer hex conversions.
|
|
11405
|
+
*
|
|
11406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-uint8array-hex.md
|
|
11407
|
+
*/
|
|
11408
|
+
'unicorn/prefer-uint8array-hex'?: Linter.RuleEntry<[]>;
|
|
11257
11409
|
/**
|
|
11258
11410
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
11259
11411
|
*
|
|
11260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-unary-minus.md
|
|
11261
11413
|
*/
|
|
11262
11414
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
11263
11415
|
/**
|
|
11264
11416
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
11265
11417
|
*
|
|
11266
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
11267
11419
|
*/
|
|
11268
11420
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
11269
11421
|
/**
|
|
11270
11422
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for
|
|
11271
11423
|
* validation.
|
|
11272
11424
|
*
|
|
11273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11425
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-url-can-parse.md
|
|
11274
11426
|
*/
|
|
11275
11427
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
11276
11428
|
/**
|
|
11277
11429
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
11278
11430
|
*
|
|
11279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-url-href.md
|
|
11280
11432
|
*/
|
|
11281
11433
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
11282
11434
|
/**
|
|
11283
11435
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
11284
11436
|
*
|
|
11285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-url-search-parameters.md
|
|
11286
11438
|
*/
|
|
11287
11439
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
11288
11440
|
/**
|
|
11289
11441
|
* Prefer putting the condition in the while statement.
|
|
11290
11442
|
*
|
|
11291
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/prefer-while-loop-condition.md
|
|
11292
11444
|
*/
|
|
11293
11445
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
11294
11446
|
/**
|
|
11295
11447
|
* Renamed to `unicorn/name-replacements`.
|
|
11296
11448
|
*
|
|
11297
11449
|
* @deprecated
|
|
11298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
11299
11451
|
*/
|
|
11300
11452
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
11301
11453
|
/**
|
|
11302
11454
|
* Enforce consistent relative URL style.
|
|
11303
11455
|
*
|
|
11304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11456
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/relative-url-style.md
|
|
11305
11457
|
*/
|
|
11306
11458
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
11307
11459
|
/**
|
|
11308
11460
|
* Enforce using the separator argument with `Array#join()`.
|
|
11309
11461
|
*
|
|
11310
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-array-join-separator.md
|
|
11311
11463
|
*/
|
|
11312
11464
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
11313
11465
|
/**
|
|
11314
11466
|
* Require a compare function when calling `Array#sort()` or
|
|
11315
11467
|
* `Array#toSorted()`.
|
|
11316
11468
|
*
|
|
11317
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-array-sort-compare.md
|
|
11318
11470
|
*/
|
|
11319
11471
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
11320
11472
|
/**
|
|
11321
11473
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
11322
11474
|
*
|
|
11323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11475
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-css-escape.md
|
|
11324
11476
|
*/
|
|
11325
11477
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
11326
11478
|
/**
|
|
11327
11479
|
* Require configured YAML frontmatter fields.
|
|
11328
11480
|
*
|
|
11329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11481
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-frontmatter-fields.md
|
|
11330
11482
|
*/
|
|
11331
11483
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
11332
11484
|
/**
|
|
11333
11485
|
* Require non-empty module attributes for imports and exports
|
|
11334
11486
|
*
|
|
11335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-module-attributes.md
|
|
11336
11488
|
*/
|
|
11337
11489
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
11338
11490
|
/**
|
|
11339
11491
|
* Require non-empty specifier list in import and export statements.
|
|
11340
11492
|
*
|
|
11341
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11493
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-module-specifiers.md
|
|
11342
11494
|
*/
|
|
11343
11495
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
11344
11496
|
/**
|
|
11345
11497
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
11346
11498
|
*
|
|
11347
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
11348
11500
|
*/
|
|
11349
11501
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
11350
11502
|
/**
|
|
11351
11503
|
* Require passive event listeners for high-frequency events.
|
|
11352
11504
|
*
|
|
11353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11505
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-passive-events.md
|
|
11354
11506
|
*/
|
|
11355
11507
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
11356
11508
|
/**
|
|
11357
11509
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
11358
11510
|
*
|
|
11359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11511
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-post-message-target-origin.md
|
|
11360
11512
|
*/
|
|
11361
11513
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
11362
11514
|
/**
|
|
11363
11515
|
* Require boolean-returning Proxy traps to return booleans.
|
|
11364
11516
|
*
|
|
11365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
11366
11518
|
*/
|
|
11367
11519
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
11368
11520
|
/**
|
|
11369
11521
|
* Enforce a consistent style for single-line block comments.
|
|
11370
11522
|
*
|
|
11371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11523
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/single-line-block-comment-style.md
|
|
11372
11524
|
*/
|
|
11373
11525
|
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
11374
11526
|
/**
|
|
11375
11527
|
* Enforce better string content.
|
|
11376
11528
|
*
|
|
11377
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/string-content.md
|
|
11378
11530
|
*/
|
|
11379
11531
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
11380
11532
|
/**
|
|
11381
11533
|
* Enforce consistent brace style for `case` clauses.
|
|
11382
11534
|
*
|
|
11383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11535
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/switch-case-braces.md
|
|
11384
11536
|
*/
|
|
11385
11537
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
11386
11538
|
/**
|
|
11387
11539
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case`
|
|
11388
11540
|
* clauses.
|
|
11389
11541
|
*
|
|
11390
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/switch-case-break-position.md
|
|
11391
11543
|
*/
|
|
11392
11544
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
11393
11545
|
/**
|
|
11394
11546
|
* Fix whitespace-insensitive template indentation.
|
|
11395
11547
|
*
|
|
11396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11548
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/template-indent.md
|
|
11397
11549
|
*/
|
|
11398
11550
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
11399
11551
|
/**
|
|
11400
11552
|
* Enforce consistent case for text encoding identifiers.
|
|
11401
11553
|
*
|
|
11402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/text-encoding-identifier-case.md
|
|
11403
11555
|
*/
|
|
11404
11556
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
11405
11557
|
/**
|
|
11406
11558
|
* Require `new` when creating an error.
|
|
11407
11559
|
*
|
|
11408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11560
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/throw-new-error.md
|
|
11409
11561
|
*/
|
|
11410
11562
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
11411
11563
|
/**
|
|
11412
11564
|
* Limit the complexity of `try` blocks.
|
|
11413
11565
|
*
|
|
11414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11566
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v75.0.0/docs/rules/try-complexity.md
|
|
11415
11567
|
*/
|
|
11416
11568
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
11417
11569
|
/**
|
|
@@ -12009,10 +12161,12 @@ type EslintCommentsDisableEnablePair = [] | [{
|
|
|
12009
12161
|
type EslintCommentsNoRestrictedDisable = string[];
|
|
12010
12162
|
// ----- eslint-comments/no-use -----
|
|
12011
12163
|
type EslintCommentsNoUse = [] | [{
|
|
12012
|
-
|
|
12164
|
+
additionalDirectives?: string[];
|
|
12165
|
+
allow?: string[];
|
|
12013
12166
|
}];
|
|
12014
12167
|
// ----- eslint-comments/require-description -----
|
|
12015
12168
|
type EslintCommentsRequireDescription = [] | [{
|
|
12169
|
+
additionalDirectives?: string[];
|
|
12016
12170
|
ignore?: ('eslint' | 'eslint-disable' | 'eslint-disable-line' | 'eslint-disable-next-line' | 'eslint-enable' | 'eslint-env' | 'exported' | 'global' | 'globals')[];
|
|
12017
12171
|
}];
|
|
12018
12172
|
// ----- func-call-spacing -----
|
|
@@ -12778,6 +12932,14 @@ type JsdocNoUndefinedTypes = [] | [{
|
|
|
12778
12932
|
disableReporting?: boolean;
|
|
12779
12933
|
markVariablesAsUsed?: boolean;
|
|
12780
12934
|
}];
|
|
12935
|
+
// ----- jsdoc/no-unnecessary-type-assertion -----
|
|
12936
|
+
type JsdocNoUnnecessaryTypeAssertion = [] | [{
|
|
12937
|
+
checkLiteralConstAssertions?: boolean;
|
|
12938
|
+
enableFixer?: boolean;
|
|
12939
|
+
preferConstToLiteralTuples?: boolean;
|
|
12940
|
+
treatAnyAsRedundant?: boolean;
|
|
12941
|
+
typesToIgnore?: string[];
|
|
12942
|
+
}];
|
|
12781
12943
|
// ----- jsdoc/normalize-see-links -----
|
|
12782
12944
|
type JsdocNormalizeSeeLinks = [] | [{
|
|
12783
12945
|
canonicalForm?: 'pipe' | 'prefix';
|
|
@@ -13051,6 +13213,22 @@ type JsdocTextEscaping = [] | [{
|
|
|
13051
13213
|
escapeHTML?: boolean;
|
|
13052
13214
|
escapeMarkdown?: boolean;
|
|
13053
13215
|
}];
|
|
13216
|
+
// ----- jsdoc/ts-ban-ts-comment -----
|
|
13217
|
+
type JsdocTsBanTsComment = [] | [{
|
|
13218
|
+
minimumDescriptionLength?: number;
|
|
13219
|
+
'ts-check'?: boolean | 'allow-with-description' | {
|
|
13220
|
+
descriptionFormat?: string;
|
|
13221
|
+
};
|
|
13222
|
+
'ts-expect-error'?: boolean | 'allow-with-description' | {
|
|
13223
|
+
descriptionFormat?: string;
|
|
13224
|
+
};
|
|
13225
|
+
'ts-ignore'?: boolean | 'allow-with-description' | {
|
|
13226
|
+
descriptionFormat?: string;
|
|
13227
|
+
};
|
|
13228
|
+
'ts-nocheck'?: boolean | 'allow-with-description' | {
|
|
13229
|
+
descriptionFormat?: string;
|
|
13230
|
+
};
|
|
13231
|
+
}];
|
|
13054
13232
|
// ----- jsdoc/ts-method-signature-style -----
|
|
13055
13233
|
type JsdocTsMethodSignatureStyle = [] | ['method' | 'property'] | ['method' | 'property', {
|
|
13056
13234
|
enableFixer?: boolean;
|
|
@@ -13116,6 +13294,11 @@ type JsonPackageNoLocalDependencies = [] | [{
|
|
|
13116
13294
|
type JsonPackageOrderProperties = [] | [{
|
|
13117
13295
|
order?: 'sort-package-json' | string[];
|
|
13118
13296
|
}];
|
|
13297
|
+
// ----- json-package/prefer-rolling-workspace-spec -----
|
|
13298
|
+
type JsonPackagePreferRollingWorkspaceSpec = [] | [{
|
|
13299
|
+
ignoreDependencies?: string[];
|
|
13300
|
+
ignorePatterns?: string[];
|
|
13301
|
+
}];
|
|
13119
13302
|
// ----- json-package/repository-shorthand -----
|
|
13120
13303
|
type JsonPackageRepositoryShorthand = [] | [{
|
|
13121
13304
|
form?: 'object' | 'shorthand';
|
|
@@ -16298,10 +16481,6 @@ type PerfectionistSortImports = {
|
|
|
16298
16481
|
sortBy?: 'specifier' | 'path';
|
|
16299
16482
|
})[];
|
|
16300
16483
|
newlinesBetween?: 'ignore' | number;
|
|
16301
|
-
tsconfig?: {
|
|
16302
|
-
rootDir: string;
|
|
16303
|
-
filename?: string;
|
|
16304
|
-
};
|
|
16305
16484
|
maxLineLength?: number;
|
|
16306
16485
|
sortSideEffects?: boolean;
|
|
16307
16486
|
environment?: 'node' | 'bun';
|
|
@@ -16336,6 +16515,10 @@ type PerfectionistSortImports = {
|
|
|
16336
16515
|
pattern: string;
|
|
16337
16516
|
flags?: string;
|
|
16338
16517
|
} | string);
|
|
16518
|
+
tsconfig?: {
|
|
16519
|
+
rootDir: string;
|
|
16520
|
+
filename?: string;
|
|
16521
|
+
};
|
|
16339
16522
|
}[];
|
|
16340
16523
|
// ----- perfectionist/sort-interfaces -----
|
|
16341
16524
|
type PerfectionistSortInterfaces = {
|
|
@@ -16920,6 +17103,7 @@ type PerfectionistSortModules = [] | [{
|
|
|
16920
17103
|
order?: 'asc' | 'desc';
|
|
16921
17104
|
})[];
|
|
16922
17105
|
newlinesBetween?: 'ignore' | number;
|
|
17106
|
+
additionalModuleBlockTypes?: string[];
|
|
16923
17107
|
useExperimentalDependencyDetection?: boolean;
|
|
16924
17108
|
newlinesBetweenOverloadSignatures?: 'ignore' | number;
|
|
16925
17109
|
partitionByComment?: boolean | (({
|
|
@@ -16945,6 +17129,10 @@ type PerfectionistSortModules = [] | [{
|
|
|
16945
17129
|
} | string));
|
|
16946
17130
|
};
|
|
16947
17131
|
partitionByNewLine?: boolean;
|
|
17132
|
+
tsconfig?: {
|
|
17133
|
+
rootDir: string;
|
|
17134
|
+
filename?: string;
|
|
17135
|
+
};
|
|
16948
17136
|
}];
|
|
16949
17137
|
// ----- perfectionist/sort-named-exports -----
|
|
16950
17138
|
type PerfectionistSortNamedExports = {
|
|
@@ -17473,6 +17661,13 @@ type PerfectionistSortObjects = {
|
|
|
17473
17661
|
partitionByComputedKey?: boolean;
|
|
17474
17662
|
styledComponents?: boolean;
|
|
17475
17663
|
useExperimentalDependencyDetection?: boolean;
|
|
17664
|
+
ignoreCallbackDependenciesPatterns?: ({
|
|
17665
|
+
pattern: string;
|
|
17666
|
+
flags?: string;
|
|
17667
|
+
} | string)[] | ({
|
|
17668
|
+
pattern: string;
|
|
17669
|
+
flags?: string;
|
|
17670
|
+
} | string);
|
|
17476
17671
|
partitionByComment?: boolean | (({
|
|
17477
17672
|
pattern: string;
|
|
17478
17673
|
flags?: string;
|
|
@@ -17808,6 +18003,13 @@ type PerfectionistSortVariableDeclarations = {
|
|
|
17808
18003
|
matchesAstSelector?: string;
|
|
17809
18004
|
};
|
|
17810
18005
|
useExperimentalDependencyDetection?: boolean;
|
|
18006
|
+
ignoreCallbackDependenciesPatterns?: ({
|
|
18007
|
+
pattern: string;
|
|
18008
|
+
flags?: string;
|
|
18009
|
+
} | string)[] | ({
|
|
18010
|
+
pattern: string;
|
|
18011
|
+
flags?: string;
|
|
18012
|
+
} | string);
|
|
17811
18013
|
partitionByComment?: boolean | (({
|
|
17812
18014
|
pattern: string;
|
|
17813
18015
|
flags?: string;
|
|
@@ -20474,7 +20676,9 @@ type TsNoMeaninglessVoidOperator = [] | [{
|
|
|
20474
20676
|
}];
|
|
20475
20677
|
// ----- ts/no-misused-promises -----
|
|
20476
20678
|
type TsNoMisusedPromises = [] | [{
|
|
20477
|
-
checksConditionals?: boolean
|
|
20679
|
+
checksConditionals?: boolean | {
|
|
20680
|
+
flagUnions?: 'all' | 'strict' | 'none';
|
|
20681
|
+
};
|
|
20478
20682
|
checksSpreads?: boolean;
|
|
20479
20683
|
checksVoidReturn?: boolean | {
|
|
20480
20684
|
arguments?: boolean;
|
|
@@ -20988,6 +21192,9 @@ type UnicornFilenameCase = [] | [{
|
|
|
20988
21192
|
})[];
|
|
20989
21193
|
multipleFileExtensions?: boolean;
|
|
20990
21194
|
checkDirectories?: boolean;
|
|
21195
|
+
directoryRoots?: (string | {
|
|
21196
|
+
[k: string]: unknown | undefined;
|
|
21197
|
+
})[];
|
|
20991
21198
|
} | {
|
|
20992
21199
|
cases?: {
|
|
20993
21200
|
camelCase?: boolean;
|
|
@@ -21001,6 +21208,9 @@ type UnicornFilenameCase = [] | [{
|
|
|
21001
21208
|
})[];
|
|
21002
21209
|
multipleFileExtensions?: boolean;
|
|
21003
21210
|
checkDirectories?: boolean;
|
|
21211
|
+
directoryRoots?: (string | {
|
|
21212
|
+
[k: string]: unknown | undefined;
|
|
21213
|
+
})[];
|
|
21004
21214
|
}];
|
|
21005
21215
|
// ----- unicorn/id-match -----
|
|
21006
21216
|
type UnicornIdMatch = [] | [string] | [string, {
|
|
@@ -21087,6 +21297,10 @@ type UnicornNoArrayReverse = [] | [{
|
|
|
21087
21297
|
type UnicornNoArraySort = [] | [{
|
|
21088
21298
|
allowExpressionStatement?: boolean;
|
|
21089
21299
|
}];
|
|
21300
|
+
// ----- unicorn/no-deprecated-css-features -----
|
|
21301
|
+
type UnicornNoDeprecatedCssFeatures = [] | [{
|
|
21302
|
+
allow?: string[];
|
|
21303
|
+
}];
|
|
21090
21304
|
// ----- unicorn/no-empty-file -----
|
|
21091
21305
|
type UnicornNoEmptyFile = [] | [{
|
|
21092
21306
|
allowComments?: boolean;
|
|
@@ -21131,6 +21345,10 @@ type UnicornNoNull = [] | [{
|
|
|
21131
21345
|
type UnicornNoTypeofUndefined = [] | [{
|
|
21132
21346
|
checkGlobalVariables?: boolean;
|
|
21133
21347
|
}];
|
|
21348
|
+
// ----- unicorn/no-unknown-pseudo-selectors -----
|
|
21349
|
+
type UnicornNoUnknownPseudoSelectors = [] | [{
|
|
21350
|
+
allow?: string[];
|
|
21351
|
+
}];
|
|
21134
21352
|
// ----- unicorn/no-unnecessary-polyfills -----
|
|
21135
21353
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
21136
21354
|
targets?: string | string[] | {
|
|
@@ -21141,6 +21359,10 @@ type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
|
21141
21359
|
type UnicornNoUnreadableArrayDestructuring = [] | [{
|
|
21142
21360
|
maximumIgnoredElements?: number;
|
|
21143
21361
|
}];
|
|
21362
|
+
// ----- unicorn/no-unscoped-css-nesting-selector -----
|
|
21363
|
+
type UnicornNoUnscopedCssNestingSelector = [] | [{
|
|
21364
|
+
scopingRootAtRules?: string[];
|
|
21365
|
+
}];
|
|
21144
21366
|
// ----- unicorn/no-useless-undefined -----
|
|
21145
21367
|
type UnicornNoUselessUndefined = [] | [{
|
|
21146
21368
|
checkArguments?: boolean;
|
|
@@ -21197,6 +21419,7 @@ type UnicornPreferAt = [] | [{
|
|
|
21197
21419
|
// ----- unicorn/prefer-continue -----
|
|
21198
21420
|
type UnicornPreferContinue = [] | [{
|
|
21199
21421
|
maximumStatements?: number;
|
|
21422
|
+
checkShortBodies?: boolean;
|
|
21200
21423
|
}];
|
|
21201
21424
|
// ----- unicorn/prefer-dom-node-html-methods -----
|
|
21202
21425
|
type UnicornPreferDomNodeHtmlMethods = [] | [{
|
|
@@ -21206,6 +21429,7 @@ type UnicornPreferDomNodeHtmlMethods = [] | [{
|
|
|
21206
21429
|
// ----- unicorn/prefer-early-return -----
|
|
21207
21430
|
type UnicornPreferEarlyReturn = [] | [{
|
|
21208
21431
|
maximumStatements?: number;
|
|
21432
|
+
checkShortBodies?: boolean;
|
|
21209
21433
|
}];
|
|
21210
21434
|
// ----- unicorn/prefer-explicit-viewport-units -----
|
|
21211
21435
|
type UnicornPreferExplicitViewportUnits = [] | [{
|
|
@@ -21575,7 +21799,7 @@ type Yoda = [] | ['always' | 'never'] | ['always' | 'never', {
|
|
|
21575
21799
|
onlyEquality?: boolean;
|
|
21576
21800
|
}];
|
|
21577
21801
|
// Names of all the configs
|
|
21578
|
-
type ConfigNames = 'kp/astro/setup' | 'kp/astro/component' | 'kp/astro/rules' | 'kp/astro/script-ts' | 'kp/disables/stylelint-config' | 'kp/disables/prettier' | 'kp/html-script' | 'kp/html/setup' | 'kp/html' | 'kp/html/markdown-code-blocks' | 'kp/ignores' | 'kp/js/rules' | 'kp/js/cjs' | 'kp/json/setup' | 'kp/json/rules-json' | 'kp/json/rules-jsonc' | 'kp/json/rules-json5' | 'kp/json/rules' | 'kp/json/rules-settings' | 'kp/json/rules-package' | 'kp/json/rules-tsconfig' | 'kp/json/rules-overrides' | 'kp/jsx/rules' | 'kp/markdown/remark' | 'kp/markdown/code-blocks' | 'kp/mdx/remark' | 'kp/mdx/code-blocks' | 'kp/react/setup' | 'kp/react/rules' | 'kp/react/disable-type-aware' | 'kp/svelte/setup' | 'kp/svelte/scripts' | 'kp/svelte/component' | 'kp/svelte/rules' | 'kp/svelte/sveltekit-routes' | 'kp/svelte/sveltekit-app' | 'kp/svelte/modules' | 'kp/test/setup' | 'kp/test/rules' | 'kp/toml/setup' | 'kp/toml/rules' | 'kp/ts/rules' | 'kp/ts/dts' | 'kp/tsx/rules' | 'kp/yaml/setup' | 'kp/yaml/rules';
|
|
21802
|
+
type ConfigNames = 'kp/astro/setup' | 'kp/astro/component' | 'kp/astro/rules' | 'kp/astro/script-ts' | 'kp/disables/stylelint-config' | 'kp/disables/prettier' | 'kp/extra-file-extensions' | 'kp/html-script' | 'kp/html/setup' | 'kp/html' | 'kp/html/markdown-code-blocks' | 'kp/ignores' | 'kp/js/rules' | 'kp/js/cjs' | 'kp/json/setup' | 'kp/json/rules-json' | 'kp/json/rules-jsonc' | 'kp/json/rules-json5' | 'kp/json/rules' | 'kp/json/rules-settings' | 'kp/json/rules-package' | 'kp/json/rules-tsconfig' | 'kp/json/rules-overrides' | 'kp/jsx/rules' | 'kp/markdown/remark' | 'kp/markdown/code-blocks' | 'kp/mdx/remark' | 'kp/mdx/code-blocks' | 'kp/react/setup' | 'kp/react/rules' | 'kp/react/disable-type-aware' | 'kp/svelte/setup' | 'kp/svelte/scripts' | 'kp/svelte/component' | 'kp/svelte/rules' | 'kp/svelte/sveltekit-routes' | 'kp/svelte/sveltekit-app' | 'kp/svelte/modules' | 'kp/test/setup' | 'kp/test/rules' | 'kp/toml/setup' | 'kp/toml/rules' | 'kp/ts/rules' | 'kp/ts/dts' | 'kp/tsx/rules' | 'kp/yaml/setup' | 'kp/yaml/rules';
|
|
21579
21803
|
//#endregion
|
|
21580
21804
|
//#region src/types.d.ts
|
|
21581
21805
|
type Awaitable<T> = Promise<T> | T;
|
|
@@ -21734,22 +21958,22 @@ type FileType = 'astro' | 'cjs' | 'cjsx' | 'cts' | 'ctsx' | 'html' | 'js' | 'jso
|
|
|
21734
21958
|
*
|
|
21735
21959
|
* @returns The fixed source string.
|
|
21736
21960
|
*/
|
|
21737
|
-
declare function fix(source: string, fileTypeOrConfig?: FileType | OptionsConfig, config?: OptionsConfig): Promise<string>;
|
|
21961
|
+
export declare function fix(source: string, fileTypeOrConfig?: FileType | OptionsConfig, config?: OptionsConfig): Promise<string>;
|
|
21738
21962
|
/**
|
|
21739
21963
|
* Lint and fix a file in place using the shared ESLint configuration.
|
|
21740
21964
|
*
|
|
21741
21965
|
* @param filePath - Path to the file to lint and fix.
|
|
21742
21966
|
* @param config - Optional `OptionsConfig` for configuration.
|
|
21743
21967
|
*/
|
|
21744
|
-
declare function fixFile(filePath: string, config?: OptionsConfig): Promise<void>;
|
|
21968
|
+
export declare function fixFile(filePath: string, config?: OptionsConfig): Promise<void>;
|
|
21745
21969
|
/**
|
|
21746
21970
|
* Clear the cached ESLint module and instances. Subsequent calls to `fix` or
|
|
21747
21971
|
* `fixFile` will re-import ESLint and re-create instances.
|
|
21748
21972
|
*/
|
|
21749
|
-
declare function clearCache(): void;
|
|
21973
|
+
export declare function clearCache(): void;
|
|
21750
21974
|
//#endregion
|
|
21751
21975
|
//#region src/config.d.ts
|
|
21752
|
-
declare const defaultPluginRenaming: {
|
|
21976
|
+
export declare const defaultPluginRenaming: {
|
|
21753
21977
|
'@eslint-community/eslint-comments': string;
|
|
21754
21978
|
'@eslint-react': string;
|
|
21755
21979
|
jsonc: string;
|
|
@@ -21762,7 +21986,7 @@ declare const defaultPluginRenaming: {
|
|
|
21762
21986
|
vitest: string;
|
|
21763
21987
|
yml: string;
|
|
21764
21988
|
};
|
|
21765
|
-
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
21989
|
+
export type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
21766
21990
|
/**
|
|
21767
21991
|
* **@Kitschpatrol's Shared [ESLint](https://eslint.org/) Configuration***
|
|
21768
21992
|
*
|
|
@@ -21784,7 +22008,7 @@ type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
|
21784
22008
|
* @see [@kitschpatrol/eslint-config](https://github.com/kitschpatrol/shared-config/tree/main/packages/eslint-config)
|
|
21785
22009
|
* @see [@kitschpatrol/shared-config](https://github.com/kitschpatrol/shared-config)*
|
|
21786
22010
|
*/
|
|
21787
|
-
declare function eslintConfig(options?: Omit<TypedFlatConfigItem, 'files'> & OptionsConfig, ...userConfigs: Array<Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>>): Promise<FlatConfigComposer<TypedFlatConfigItem, ConfigNames>>;
|
|
22011
|
+
export declare function eslintConfig(options?: Omit<TypedFlatConfigItem, 'files'> & OptionsConfig, ...userConfigs: Array<Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>>): Promise<FlatConfigComposer<TypedFlatConfigItem, ConfigNames>>;
|
|
21788
22012
|
/**
|
|
21789
22013
|
* Get ESLint language options object.
|
|
21790
22014
|
*
|
|
@@ -21792,21 +22016,21 @@ declare function eslintConfig(options?: Omit<TypedFlatConfigItem, 'files'> & Opt
|
|
|
21792
22016
|
* @param isJsxEnabled - Whether to enable JSX parsing.
|
|
21793
22017
|
* @param tsconfigRootDirectory - Root directory for TypeScript project lookup.
|
|
21794
22018
|
*/
|
|
21795
|
-
declare function getLanguageOptions(typeAware?: boolean, isJsxEnabled?: boolean, tsconfigRootDirectory?: string): Linter.LanguageOptions;
|
|
22019
|
+
export declare function getLanguageOptions(typeAware?: boolean, isJsxEnabled?: boolean, tsconfigRootDirectory?: string): Linter.LanguageOptions;
|
|
21796
22020
|
/**
|
|
21797
22021
|
* Get the overrides for a specific key.
|
|
21798
22022
|
*
|
|
21799
22023
|
* @param options The options object.
|
|
21800
22024
|
* @param key The key to get the overrides for.
|
|
21801
22025
|
*/
|
|
21802
|
-
declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): Partial<Linter.RulesRecord & RuleOptions>;
|
|
22026
|
+
export declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): Partial<Linter.RulesRecord & RuleOptions>;
|
|
21803
22027
|
/**
|
|
21804
22028
|
* Get the overrides for embedded scripts for a specific key.
|
|
21805
22029
|
*
|
|
21806
22030
|
* @param options The options object.
|
|
21807
22031
|
* @param key The key to get the overrides for.
|
|
21808
22032
|
*/
|
|
21809
|
-
declare function getOverridesEmbeddedScripts<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): Partial<Linter.RulesRecord & RuleOptions>;
|
|
22033
|
+
export declare function getOverridesEmbeddedScripts<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): Partial<Linter.RulesRecord & RuleOptions>;
|
|
21810
22034
|
/**
|
|
21811
22035
|
* Construct an array of ESLint flat config items.
|
|
21812
22036
|
*
|
|
@@ -21822,101 +22046,101 @@ declare function getOverridesEmbeddedScripts<K extends keyof OptionsConfig>(opti
|
|
|
21822
22046
|
* @param options The options object.
|
|
21823
22047
|
* @param key The key to resolve the sub options for.
|
|
21824
22048
|
*/
|
|
21825
|
-
declare function resolveSubOptions<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): ResolvedOptions<OptionsConfig[K]>;
|
|
22049
|
+
export declare function resolveSubOptions<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): ResolvedOptions<OptionsConfig[K]>;
|
|
21826
22050
|
//#endregion
|
|
21827
22051
|
//#region src/configs/astro.d.ts
|
|
21828
|
-
declare function astro(options?: OptionsOverrides & OptionsOverridesEmbeddedScripts & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
22052
|
+
export declare function astro(options?: OptionsOverrides & OptionsOverridesEmbeddedScripts & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
21829
22053
|
//#endregion
|
|
21830
22054
|
//#region src/configs/disables.d.ts
|
|
21831
22055
|
/**
|
|
21832
22056
|
* Final configuration pass to disable specific rules in specific contexts.
|
|
21833
22057
|
*/
|
|
21834
|
-
declare function disables(): Promise<TypedFlatConfigItem[]>;
|
|
22058
|
+
export declare function disables(): Promise<TypedFlatConfigItem[]>;
|
|
21835
22059
|
//#endregion
|
|
21836
22060
|
//#region src/configs/html.d.ts
|
|
21837
|
-
declare function html(options?: OptionsOverrides & OptionsOverridesEmbeddedScripts): Promise<TypedFlatConfigItem[]>;
|
|
22061
|
+
export declare function html(options?: OptionsOverrides & OptionsOverridesEmbeddedScripts): Promise<TypedFlatConfigItem[]>;
|
|
21838
22062
|
//#endregion
|
|
21839
22063
|
//#region src/configs/ignores.d.ts
|
|
21840
|
-
declare function ignores(userIgnores?: string[]): Promise<TypedFlatConfigItem[]>;
|
|
22064
|
+
export declare function ignores(userIgnores?: string[]): Promise<TypedFlatConfigItem[]>;
|
|
21841
22065
|
//#endregion
|
|
21842
22066
|
//#region src/configs/js.d.ts
|
|
21843
22067
|
/**
|
|
21844
22068
|
* JavaScript configuration, note use of TypeScript rules
|
|
21845
22069
|
*/
|
|
21846
|
-
declare function js(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
22070
|
+
export declare function js(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
21847
22071
|
//#endregion
|
|
21848
22072
|
//#region src/configs/json.d.ts
|
|
21849
|
-
declare function json(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
22073
|
+
export declare function json(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
21850
22074
|
//#endregion
|
|
21851
22075
|
//#region src/configs/jsx.d.ts
|
|
21852
|
-
declare function jsx(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
22076
|
+
export declare function jsx(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
21853
22077
|
//#endregion
|
|
21854
22078
|
//#region src/configs/md.d.ts
|
|
21855
|
-
declare function md(options?: OptionsOverrides & OptionsOverridesEmbeddedScripts): Promise<TypedFlatConfigItem[]>;
|
|
22079
|
+
export declare function md(options?: OptionsOverrides & OptionsOverridesEmbeddedScripts): Promise<TypedFlatConfigItem[]>;
|
|
21856
22080
|
//#endregion
|
|
21857
22081
|
//#region src/configs/mdx.d.ts
|
|
21858
|
-
declare function mdx(options?: OptionsOverrides & OptionsOverridesEmbeddedScripts): Promise<TypedFlatConfigItem[]>;
|
|
22082
|
+
export declare function mdx(options?: OptionsOverrides & OptionsOverridesEmbeddedScripts): Promise<TypedFlatConfigItem[]>;
|
|
21859
22083
|
//#endregion
|
|
21860
22084
|
//#region src/configs/react.d.ts
|
|
21861
|
-
declare function react(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware & {
|
|
22085
|
+
export declare function react(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware & {
|
|
21862
22086
|
typeAwareJavaScript?: boolean;
|
|
21863
22087
|
}): Promise<TypedFlatConfigItem[]>;
|
|
21864
22088
|
//#endregion
|
|
21865
22089
|
//#region src/configs/svelte.d.ts
|
|
21866
|
-
declare function svelte(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware & {
|
|
22090
|
+
export declare function svelte(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware & {
|
|
21867
22091
|
typeAwareJavaScript?: boolean;
|
|
21868
22092
|
}): Promise<TypedFlatConfigItem[]>;
|
|
21869
22093
|
//#endregion
|
|
21870
22094
|
//#region src/configs/test.d.ts
|
|
21871
|
-
declare function test(options?: OptionsIsInEditor & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
22095
|
+
export declare function test(options?: OptionsIsInEditor & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
21872
22096
|
//#endregion
|
|
21873
22097
|
//#region src/configs/toml.d.ts
|
|
21874
|
-
declare function toml(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
22098
|
+
export declare function toml(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
21875
22099
|
//#endregion
|
|
21876
22100
|
//#region src/configs/ts.d.ts
|
|
21877
|
-
declare function ts(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
22101
|
+
export declare function ts(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
21878
22102
|
//#endregion
|
|
21879
22103
|
//#region src/configs/tsx.d.ts
|
|
21880
|
-
declare function tsx(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
22104
|
+
export declare function tsx(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
21881
22105
|
//#endregion
|
|
21882
22106
|
//#region src/configs/yaml.d.ts
|
|
21883
|
-
declare function yaml(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
22107
|
+
export declare function yaml(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
21884
22108
|
//#endregion
|
|
21885
22109
|
//#region src/globs.d.ts
|
|
21886
|
-
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
21887
|
-
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
21888
|
-
declare const GLOB_JS = "**/*.?([cm])js";
|
|
21889
|
-
declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
21890
|
-
declare const GLOB_TS = "**/*.?([cm])ts";
|
|
21891
|
-
declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
21892
|
-
declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
|
|
21893
|
-
declare const GLOB_CSS = "**/*.css";
|
|
21894
|
-
declare const GLOB_POSTCSS = "**/*.{p,post}css";
|
|
21895
|
-
declare const GLOB_LESS = "**/*.less";
|
|
21896
|
-
declare const GLOB_SCSS = "**/*.scss";
|
|
21897
|
-
declare const GLOB_JSON = "**/*.json";
|
|
21898
|
-
declare const GLOB_JSON5 = "**/*.json5";
|
|
21899
|
-
declare const GLOB_JSONC = "**/*.jsonc";
|
|
21900
|
-
declare const GLOB_MARKDOWN = "**/*.md";
|
|
21901
|
-
declare const GLOB_MDX = "**/*.mdx";
|
|
21902
|
-
declare const GLOB_SVELTE = "**/*.svelte";
|
|
21903
|
-
declare const GLOB_SVELTE_TS = "**/*.svelte.ts";
|
|
21904
|
-
declare const GLOB_SVELTE_JS = "**/*.svelte.js";
|
|
21905
|
-
declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
21906
|
-
declare const GLOB_TOML = "**/*.toml";
|
|
21907
|
-
declare const GLOB_XML = "**/*.xml";
|
|
21908
|
-
declare const GLOB_SVG = "**/*.svg";
|
|
21909
|
-
declare const GLOB_HTML = "**/*.htm?(l)";
|
|
21910
|
-
declare const GLOB_ASTRO = "**/*.astro";
|
|
21911
|
-
declare const GLOB_ASTRO_TS = "**/*.astro/*.ts";
|
|
21912
|
-
declare const GLOB_GRAPHQL = "**/*.{g,graph}ql";
|
|
21913
|
-
declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
|
|
21914
|
-
declare const GLOB_MDX_CODE = "**/*.mdx/**/*.?([cm])[jt]s?(x)";
|
|
21915
|
-
declare const GLOB_MARKDOWN_HTML_CODE = "**/*.md/**/*.htm?(l)";
|
|
21916
|
-
declare const GLOB_MDX_HTML_CODE = "**/*.mdx/**/*.htm?(l)";
|
|
21917
|
-
declare const GLOB_TESTS: string[];
|
|
21918
|
-
declare const GLOB_ALL_SRC: string[];
|
|
21919
|
-
declare const GLOB_EXCLUDE: string[];
|
|
22110
|
+
export declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
22111
|
+
export declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
22112
|
+
export declare const GLOB_JS = "**/*.?([cm])js";
|
|
22113
|
+
export declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
22114
|
+
export declare const GLOB_TS = "**/*.?([cm])ts";
|
|
22115
|
+
export declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
22116
|
+
export declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
|
|
22117
|
+
export declare const GLOB_CSS = "**/*.css";
|
|
22118
|
+
export declare const GLOB_POSTCSS = "**/*.{p,post}css";
|
|
22119
|
+
export declare const GLOB_LESS = "**/*.less";
|
|
22120
|
+
export declare const GLOB_SCSS = "**/*.scss";
|
|
22121
|
+
export declare const GLOB_JSON = "**/*.json";
|
|
22122
|
+
export declare const GLOB_JSON5 = "**/*.json5";
|
|
22123
|
+
export declare const GLOB_JSONC = "**/*.jsonc";
|
|
22124
|
+
export declare const GLOB_MARKDOWN = "**/*.md";
|
|
22125
|
+
export declare const GLOB_MDX = "**/*.mdx";
|
|
22126
|
+
export declare const GLOB_SVELTE = "**/*.svelte";
|
|
22127
|
+
export declare const GLOB_SVELTE_TS = "**/*.svelte.ts";
|
|
22128
|
+
export declare const GLOB_SVELTE_JS = "**/*.svelte.js";
|
|
22129
|
+
export declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
22130
|
+
export declare const GLOB_TOML = "**/*.toml";
|
|
22131
|
+
export declare const GLOB_XML = "**/*.xml";
|
|
22132
|
+
export declare const GLOB_SVG = "**/*.svg";
|
|
22133
|
+
export declare const GLOB_HTML = "**/*.htm?(l)";
|
|
22134
|
+
export declare const GLOB_ASTRO = "**/*.astro";
|
|
22135
|
+
export declare const GLOB_ASTRO_TS = "**/*.astro/*.ts";
|
|
22136
|
+
export declare const GLOB_GRAPHQL = "**/*.{g,graph}ql";
|
|
22137
|
+
export declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
|
|
22138
|
+
export declare const GLOB_MDX_CODE = "**/*.mdx/**/*.?([cm])[jt]s?(x)";
|
|
22139
|
+
export declare const GLOB_MARKDOWN_HTML_CODE = "**/*.md/**/*.htm?(l)";
|
|
22140
|
+
export declare const GLOB_MDX_HTML_CODE = "**/*.mdx/**/*.htm?(l)";
|
|
22141
|
+
export declare const GLOB_TESTS: string[];
|
|
22142
|
+
export declare const GLOB_ALL_SRC: string[];
|
|
22143
|
+
export declare const GLOB_EXCLUDE: string[];
|
|
21920
22144
|
//#endregion
|
|
21921
22145
|
//#region src/utilities.d.ts
|
|
21922
22146
|
/**
|
|
@@ -21924,13 +22148,13 @@ declare const GLOB_EXCLUDE: string[];
|
|
|
21924
22148
|
*
|
|
21925
22149
|
* @param configs - An array of configs or a single config.
|
|
21926
22150
|
*/
|
|
21927
|
-
declare function combine(...configs: Array<Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>>): Promise<TypedFlatConfigItem[]>;
|
|
22151
|
+
export declare function combine(...configs: Array<Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>>): Promise<TypedFlatConfigItem[]>;
|
|
21928
22152
|
/**
|
|
21929
22153
|
* Import a module dynamically and return the default export.
|
|
21930
22154
|
*
|
|
21931
22155
|
* @param m - The module to import.
|
|
21932
22156
|
*/
|
|
21933
|
-
declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
|
|
22157
|
+
export declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
|
|
21934
22158
|
default: infer U;
|
|
21935
22159
|
} ? U : T>;
|
|
21936
22160
|
/**
|
|
@@ -21942,7 +22166,7 @@ declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
|
|
|
21942
22166
|
*
|
|
21943
22167
|
* @returns True if running in an editor environment, false otherwise
|
|
21944
22168
|
*/
|
|
21945
|
-
declare function isInEditorEnv(): boolean;
|
|
22169
|
+
export declare function isInEditorEnv(): boolean;
|
|
21946
22170
|
/**
|
|
21947
22171
|
* Checks if the code is running within Git hooks or lint-staged.
|
|
21948
22172
|
*
|
|
@@ -21951,7 +22175,7 @@ declare function isInEditorEnv(): boolean;
|
|
|
21951
22175
|
*
|
|
21952
22176
|
* @returns True if running in Git hooks or lint-staged, false otherwise
|
|
21953
22177
|
*/
|
|
21954
|
-
declare function isInGitHooksOrLintStaged(): boolean;
|
|
22178
|
+
export declare function isInGitHooksOrLintStaged(): boolean;
|
|
21955
22179
|
/**
|
|
21956
22180
|
* Rename plugin names a flat configs array.
|
|
21957
22181
|
*
|
|
@@ -21967,7 +22191,7 @@ declare function isInGitHooksOrLintStaged(): boolean;
|
|
|
21967
22191
|
* @param configs - The flat configs array.
|
|
21968
22192
|
* @param map - A map of global to local plugin names.
|
|
21969
22193
|
*/
|
|
21970
|
-
declare function renamePluginInConfigs(configs: TypedFlatConfigItem[], map: Record<string, string>): TypedFlatConfigItem[];
|
|
22194
|
+
export declare function renamePluginInConfigs(configs: TypedFlatConfigItem[], map: Record<string, string>): TypedFlatConfigItem[];
|
|
21971
22195
|
/**
|
|
21972
22196
|
* Rename plugin prefixes in a rule object.
|
|
21973
22197
|
*
|
|
@@ -21988,13 +22212,13 @@ declare function renamePluginInConfigs(configs: TypedFlatConfigItem[], map: Reco
|
|
|
21988
22212
|
* @param rules - The rules object.
|
|
21989
22213
|
* @param map - A map of plugin prefixes to rename.
|
|
21990
22214
|
*/
|
|
21991
|
-
declare function renameRules(rules: Record<string, any>, map: Record<string, string>): Record<string, any>;
|
|
22215
|
+
export declare function renameRules(rules: Record<string, any>, map: Record<string, string>): Record<string, any>;
|
|
21992
22216
|
/**
|
|
21993
22217
|
* Convert a value to an array.
|
|
21994
22218
|
*
|
|
21995
22219
|
* @param value - The value to convert.
|
|
21996
22220
|
*/
|
|
21997
|
-
declare function toArray<T>(value: T | T[]): T[];
|
|
22221
|
+
export declare function toArray<T>(value: T | T[]): T[];
|
|
21998
22222
|
/**
|
|
21999
22223
|
* Generates a Perfectionist sort configuration object from an array of strings.
|
|
22000
22224
|
* Uses the v5.0 array-based customGroups format.
|
|
@@ -22008,7 +22232,7 @@ declare function toArray<T>(value: T | T[]): T[];
|
|
|
22008
22232
|
*
|
|
22009
22233
|
* @see https://perfectionist.dev/rules/sort-objects#useconfigurationif
|
|
22010
22234
|
*/
|
|
22011
|
-
declare function generatePerfectionistSortConfig(strings: string[], matchType?: 'exact' | 'leading' | 'trailing'): {
|
|
22235
|
+
export declare function generatePerfectionistSortConfig(strings: string[], matchType?: 'exact' | 'leading' | 'trailing'): {
|
|
22012
22236
|
customGroups: Array<{
|
|
22013
22237
|
elementNamePattern: string;
|
|
22014
22238
|
groupName: string;
|
|
@@ -22019,4 +22243,4 @@ declare function generatePerfectionistSortConfig(strings: string[], matchType?:
|
|
|
22019
22243
|
};
|
|
22020
22244
|
};
|
|
22021
22245
|
//#endregion
|
|
22022
|
-
export { type Awaitable, type ConfigNames, type FileType,
|
|
22246
|
+
export { type Awaitable, type ConfigNames, type FileType, type OptionsConfig, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsOverridesEmbeddedScripts, type OptionsTsconfigRootDirectory, type OptionsTypeAware, type Rules, type TypedFlatConfigItem, eslintConfig as default };
|