@pengzhanbo/eslint-config 2.9.1 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +736 -494
- package/dist/index.js +313 -157
- package/package.json +40 -40
package/dist/index.d.ts
CHANGED
|
@@ -194,6 +194,11 @@ interface RuleOptions {
|
|
|
194
194
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/prefer-static-string-properties.md
|
|
195
195
|
*/
|
|
196
196
|
'angular-template/prefer-static-string-properties'?: Linter.RuleEntry<AngularTemplatePreferStaticStringProperties>;
|
|
197
|
+
/**
|
|
198
|
+
* Suggests using [style] bindings over ngStyle where applicable
|
|
199
|
+
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/prefer-style-binding.md
|
|
200
|
+
*/
|
|
201
|
+
'angular-template/prefer-style-binding'?: Linter.RuleEntry<[]>;
|
|
197
202
|
/**
|
|
198
203
|
* Ensure that template literals are used instead of concatenating strings or expressions.
|
|
199
204
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/prefer-template-literal.md
|
|
@@ -273,7 +278,7 @@ interface RuleOptions {
|
|
|
273
278
|
* Requires inject() calls to be declared at the top of the class, before any other member
|
|
274
279
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/inject-at-top.md
|
|
275
280
|
*/
|
|
276
|
-
'angular/inject-at-top'?: Linter.RuleEntry<
|
|
281
|
+
'angular/inject-at-top'?: Linter.RuleEntry<AngularInjectAtTop>;
|
|
277
282
|
/**
|
|
278
283
|
* Angular Lifecycle methods should not be async. Angular does not wait for async lifecycle but the code incorrectly suggests it does.
|
|
279
284
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-async-lifecycle-method.md
|
|
@@ -408,7 +413,7 @@ interface RuleOptions {
|
|
|
408
413
|
* Use `model` instead of `input` and `output` for two-way bindings
|
|
409
414
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-signal-model.md
|
|
410
415
|
*/
|
|
411
|
-
'angular/prefer-signal-model'?: Linter.RuleEntry<
|
|
416
|
+
'angular/prefer-signal-model'?: Linter.RuleEntry<AngularPreferSignalModel>;
|
|
412
417
|
/**
|
|
413
418
|
* Use readonly signals instead of `@Input()`, `@ViewChild()` and other legacy decorators
|
|
414
419
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-signals.md
|
|
@@ -419,6 +424,11 @@ interface RuleOptions {
|
|
|
419
424
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-standalone.md
|
|
420
425
|
*/
|
|
421
426
|
'angular/prefer-standalone'?: Linter.RuleEntry<[]>;
|
|
427
|
+
/**
|
|
428
|
+
* Ensures that reactive contexts such as computed(), linkedSignal() and effect() read at least one reactive value (a signal). A reactive context with no reactive dependencies never re-runs, which is almost always a mistake.
|
|
429
|
+
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/reactive-context-must-read-signal.md
|
|
430
|
+
*/
|
|
431
|
+
'angular/reactive-context-must-read-signal'?: Linter.RuleEntry<AngularReactiveContextMustReadSignal>;
|
|
422
432
|
/**
|
|
423
433
|
* The ./ and ../ prefix is standard syntax for relative URLs; don't depend on Angular's current ability to do without that prefix.
|
|
424
434
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/relative-url-prefix.md
|
|
@@ -440,7 +450,7 @@ interface RuleOptions {
|
|
|
440
450
|
*/
|
|
441
451
|
'angular/runtime-localize'?: Linter.RuleEntry<[]>;
|
|
442
452
|
/**
|
|
443
|
-
* Ensures that keys in type decorators (Component, Directive, NgModule, Pipe) are sorted in a consistent order
|
|
453
|
+
* Ensures that keys in type decorators (Component, Directive, Injectable, NgModule, Pipe) are sorted in a consistent order
|
|
444
454
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/sort-keys-in-type-decorator.md
|
|
445
455
|
*/
|
|
446
456
|
'angular/sort-keys-in-type-decorator'?: Linter.RuleEntry<AngularSortKeysInTypeDecorator>;
|
|
@@ -1532,6 +1542,11 @@ interface RuleOptions {
|
|
|
1532
1542
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/text-escaping.md#repos-sticky-header
|
|
1533
1543
|
*/
|
|
1534
1544
|
'jsdoc/text-escaping'?: Linter.RuleEntry<JsdocTextEscaping>;
|
|
1545
|
+
/**
|
|
1546
|
+
* Disallows (or requires descriptions for) `@ts-<directive>` comments, mirroring `@typescript-eslint/ban-ts-comment`.
|
|
1547
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-ban-ts-comment.md#repos-sticky-header
|
|
1548
|
+
*/
|
|
1549
|
+
'jsdoc/ts-ban-ts-comment'?: Linter.RuleEntry<JsdocTsBanTsComment>;
|
|
1535
1550
|
/**
|
|
1536
1551
|
* Prefers either function properties or method signatures
|
|
1537
1552
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-method-signature-style.md#repos-sticky-header
|
|
@@ -3561,6 +3576,11 @@ interface RuleOptions {
|
|
|
3561
3576
|
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/json/json-valid-catalog.test.ts
|
|
3562
3577
|
*/
|
|
3563
3578
|
'pnpm/json-valid-catalog'?: Linter.RuleEntry<PnpmJsonValidCatalog>;
|
|
3579
|
+
/**
|
|
3580
|
+
* Require blank lines around multi-line entries in `pnpm-workspace.yaml`, and disallow them between single-line entries
|
|
3581
|
+
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-blank-lines.test.ts
|
|
3582
|
+
*/
|
|
3583
|
+
'pnpm/yaml-blank-lines'?: Linter.RuleEntry<[]>;
|
|
3564
3584
|
/**
|
|
3565
3585
|
* Enforce settings in `pnpm-workspace.yaml`
|
|
3566
3586
|
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-enforce-settings.test.ts
|
|
@@ -3776,7 +3796,7 @@ interface RuleOptions {
|
|
|
3776
3796
|
*/
|
|
3777
3797
|
'react/globals'?: Linter.RuleEntry<[]>;
|
|
3778
3798
|
/**
|
|
3779
|
-
* Validates against
|
|
3799
|
+
* Validates against mutating props, state, and other immutable values, including through functions passed into frozen contexts such as JSX props, hook arguments, and hook return values.
|
|
3780
3800
|
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
3781
3801
|
*/
|
|
3782
3802
|
'react/immutability'?: Linter.RuleEntry<[]>;
|
|
@@ -4131,7 +4151,7 @@ interface RuleOptions {
|
|
|
4131
4151
|
*/
|
|
4132
4152
|
'react/x-globals'?: Linter.RuleEntry<[]>;
|
|
4133
4153
|
/**
|
|
4134
|
-
* Validates against
|
|
4154
|
+
* Validates against mutating props, state, and other immutable values, including through functions passed into frozen contexts such as JSX props, hook arguments, and hook return values.
|
|
4135
4155
|
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
4136
4156
|
*/
|
|
4137
4157
|
'react/x-immutability'?: Linter.RuleEntry<[]>;
|
|
@@ -4879,6 +4899,11 @@ interface RuleOptions {
|
|
|
4879
4899
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-array-handlers.md
|
|
4880
4900
|
*/
|
|
4881
4901
|
'solid/no-array-handlers'?: Linter.RuleEntry<[]>;
|
|
4902
|
+
/**
|
|
4903
|
+
* Disallow boolean values on enumerated attributes like draggable and tristate aria-*, which take string tokens — a boolean false removes the attribute instead of writing "false".
|
|
4904
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-boolean-enumerated-attribute.md
|
|
4905
|
+
*/
|
|
4906
|
+
'solid/no-boolean-enumerated-attribute'?: Linter.RuleEntry<[]>;
|
|
4882
4907
|
/**
|
|
4883
4908
|
* Disallow browser-only globals inside server functions, which run exclusively on the server.
|
|
4884
4909
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-browser-globals-in-server-function.md
|
|
@@ -4929,11 +4954,26 @@ interface RuleOptions {
|
|
|
4929
4954
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-single-arg-create-effect.md
|
|
4930
4955
|
*/
|
|
4931
4956
|
'solid/no-single-arg-create-effect'?: Linter.RuleEntry<[]>;
|
|
4957
|
+
/**
|
|
4958
|
+
* Disallow mutating a store's read proxy; store state changes only through the setter's mutable draft.
|
|
4959
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-store-mutation-outside-setter.md
|
|
4960
|
+
*/
|
|
4961
|
+
'solid/no-store-mutation-outside-setter'?: Linter.RuleEntry<[]>;
|
|
4932
4962
|
/**
|
|
4933
4963
|
* Enforce using only Solid-specific namespaced attribute names (i.e. `'on:'` in `<div on:click={...} />`).
|
|
4934
4964
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-unknown-namespaces.md
|
|
4935
4965
|
*/
|
|
4936
4966
|
'solid/no-unknown-namespaces'?: Linter.RuleEntry<SolidNoUnknownNamespaces>;
|
|
4967
|
+
/**
|
|
4968
|
+
* Disallow signals that are never written (use a plain value) or never read (dead state).
|
|
4969
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-unused-signal.md
|
|
4970
|
+
*/
|
|
4971
|
+
'solid/no-unused-signal'?: Linter.RuleEntry<[]>;
|
|
4972
|
+
/**
|
|
4973
|
+
* Disallow writing signals or stores inside `createMemo`, the compute half of `createEffect`, or a component body, which are pure owned scopes.
|
|
4974
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-write-in-pure-computation.md
|
|
4975
|
+
*/
|
|
4976
|
+
'solid/no-write-in-pure-computation'?: Linter.RuleEntry<[]>;
|
|
4937
4977
|
/**
|
|
4938
4978
|
* Enforce using the classlist prop over importing a classnames helper. The classlist prop accepts an object `{ [class: string]: boolean }` just like classnames.
|
|
4939
4979
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/prefer-classlist.md
|
|
@@ -6739,6 +6779,11 @@ interface RuleOptions {
|
|
|
6739
6779
|
* @see https://typescript-eslint.io/rules/no-for-in-array
|
|
6740
6780
|
*/
|
|
6741
6781
|
'ts/no-for-in-array'?: Linter.RuleEntry<[]>;
|
|
6782
|
+
/**
|
|
6783
|
+
* Disallow type operations that resolve to the "empty object" type
|
|
6784
|
+
* @see https://typescript-eslint.io/rules/no-generated-empty-object-type
|
|
6785
|
+
*/
|
|
6786
|
+
'ts/no-generated-empty-object-type'?: Linter.RuleEntry<[]>;
|
|
6742
6787
|
/**
|
|
6743
6788
|
* Disallow the use of `eval()`-like functions
|
|
6744
6789
|
* @see https://typescript-eslint.io/rules/no-implied-eval
|
|
@@ -7214,1740 +7259,1841 @@ interface RuleOptions {
|
|
|
7214
7259
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
7215
7260
|
/**
|
|
7216
7261
|
* Prefer better DOM traversal APIs.
|
|
7217
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7262
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/better-dom-traversing.md
|
|
7218
7263
|
*/
|
|
7219
7264
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
7220
7265
|
/**
|
|
7221
7266
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
7222
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7267
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
7223
7268
|
* @deprecated
|
|
7224
7269
|
*/
|
|
7225
7270
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
7226
7271
|
/**
|
|
7227
7272
|
* Enforce a specific parameter name in catch clauses.
|
|
7228
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/catch-error-name.md
|
|
7229
7274
|
*/
|
|
7230
7275
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
7231
7276
|
/**
|
|
7232
7277
|
* Enforce consistent class references in static methods.
|
|
7233
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7278
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/class-reference-in-static-methods.md
|
|
7234
7279
|
*/
|
|
7235
7280
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
7236
7281
|
/**
|
|
7237
7282
|
* Enforce better comment content.
|
|
7238
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/comment-content.md
|
|
7239
7284
|
*/
|
|
7240
7285
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
7241
7286
|
/**
|
|
7242
7287
|
* Enforce a consistent return style for multiline arrow function bodies.
|
|
7243
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7288
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-arrow-return-style.md
|
|
7244
7289
|
*/
|
|
7245
7290
|
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
7246
7291
|
/**
|
|
7247
7292
|
* Enforce consistent assertion style with `node:assert`.
|
|
7248
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7293
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-assert.md
|
|
7249
7294
|
*/
|
|
7250
7295
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
7251
7296
|
/**
|
|
7252
7297
|
* Enforce consistent naming for boolean names.
|
|
7253
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-boolean-name.md
|
|
7254
7299
|
*/
|
|
7255
7300
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
7256
7301
|
/**
|
|
7257
7302
|
* Enforce consistent class member order.
|
|
7258
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-class-member-order.md
|
|
7259
7304
|
*/
|
|
7260
7305
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
7261
7306
|
/**
|
|
7262
7307
|
* Enforce consistent spelling of compound words in identifiers.
|
|
7263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-compound-words.md
|
|
7264
7309
|
*/
|
|
7265
7310
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
7266
7311
|
/**
|
|
7267
7312
|
* Enforce consistent conditional object spread style.
|
|
7268
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
7269
7314
|
*/
|
|
7270
7315
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
7271
7316
|
/**
|
|
7272
7317
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
7273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-date-clone.md
|
|
7274
7319
|
*/
|
|
7275
7320
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
7276
7321
|
/**
|
|
7277
7322
|
* Use destructured variables over properties.
|
|
7278
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-destructuring.md
|
|
7279
7324
|
*/
|
|
7280
7325
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
7281
7326
|
/**
|
|
7282
7327
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
7283
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-empty-array-spread.md
|
|
7284
7329
|
*/
|
|
7285
7330
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
7286
7331
|
/**
|
|
7287
7332
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
7288
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-existence-index-check.md
|
|
7289
7334
|
*/
|
|
7290
7335
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
7291
7336
|
/**
|
|
7292
7337
|
* Enforce consistent decorator position on exported classes.
|
|
7293
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-export-decorator-position.md
|
|
7294
7339
|
*/
|
|
7295
7340
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
7296
7341
|
/**
|
|
7297
7342
|
* Move function definitions to the highest possible scope.
|
|
7298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-function-scoping.md
|
|
7299
7344
|
*/
|
|
7300
7345
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
7301
7346
|
/**
|
|
7302
7347
|
* Enforce function syntax by role.
|
|
7303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-function-style.md
|
|
7304
7349
|
*/
|
|
7305
7350
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
7306
7351
|
/**
|
|
7307
7352
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
7308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-json-file-read.md
|
|
7309
7354
|
*/
|
|
7310
7355
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
7311
7356
|
/**
|
|
7312
7357
|
* Enforce consistent optional chaining for same-base member access.
|
|
7313
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-optional-chaining.md
|
|
7314
7359
|
*/
|
|
7315
7360
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
7316
7361
|
/**
|
|
7317
7362
|
* Enforce consistent style for escaping `${` in template literals.
|
|
7318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-template-literal-escape.md
|
|
7319
7364
|
*/
|
|
7320
7365
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
7321
7366
|
/**
|
|
7322
7367
|
* Enforce consistent labels on tuple type elements.
|
|
7323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-tuple-labels.md
|
|
7324
7369
|
*/
|
|
7325
7370
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
7326
7371
|
/**
|
|
7327
7372
|
* Enforce correct `Error` subclassing.
|
|
7328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/custom-error-definition.md
|
|
7329
7374
|
*/
|
|
7330
7375
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
7331
7376
|
/**
|
|
7332
7377
|
* Enforce consistent default export declarations.
|
|
7333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/default-export-style.md
|
|
7334
7379
|
*/
|
|
7335
7380
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
7336
7381
|
/**
|
|
7337
7382
|
* Enforce consistent style for DOM element dataset access.
|
|
7338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/dom-node-dataset.md
|
|
7339
7384
|
*/
|
|
7340
7385
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
7341
7386
|
/**
|
|
7342
7387
|
* Enforce no spaces between braces.
|
|
7343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/empty-brace-spaces.md
|
|
7344
7389
|
*/
|
|
7345
7390
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
7346
7391
|
/**
|
|
7347
7392
|
* Enforce passing a `message` value when creating a built-in error.
|
|
7348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/error-message.md
|
|
7349
7394
|
*/
|
|
7350
7395
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
7351
7396
|
/**
|
|
7352
7397
|
* Require escape sequences to use uppercase or lowercase values.
|
|
7353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/escape-case.md
|
|
7354
7399
|
*/
|
|
7355
7400
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
7356
7401
|
/**
|
|
7357
7402
|
* Add expiration conditions to TODO comments.
|
|
7358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/expiring-todo-comments.md
|
|
7359
7404
|
*/
|
|
7360
7405
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
7361
7406
|
/**
|
|
7362
7407
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
7363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/explicit-length-check.md
|
|
7364
7409
|
*/
|
|
7365
7410
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
7366
7411
|
/**
|
|
7367
7412
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
7368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/explicit-timer-delay.md
|
|
7369
7414
|
*/
|
|
7370
7415
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
7371
7416
|
/**
|
|
7372
7417
|
* Enforce a case style for filenames and directory names.
|
|
7373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/filename-case.md
|
|
7374
7419
|
*/
|
|
7375
7420
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
7376
7421
|
/**
|
|
7377
7422
|
* Require identifiers to match a specified regular expression.
|
|
7378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/id-match.md
|
|
7379
7424
|
*/
|
|
7380
7425
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
7381
7426
|
/**
|
|
7382
7427
|
* Enforce specific import styles per module.
|
|
7383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/import-style.md
|
|
7384
7429
|
*/
|
|
7385
7430
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
7386
7431
|
/**
|
|
7387
7432
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
7388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/isolated-functions.md
|
|
7389
7434
|
*/
|
|
7390
7435
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
7391
7436
|
/**
|
|
7392
7437
|
* Enforce a consistent style for optional loop sources.
|
|
7393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/iteration-fallback-style.md
|
|
7394
7439
|
*/
|
|
7395
7440
|
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
7396
7441
|
/**
|
|
7397
7442
|
* Require or disallow logical assignment operator shorthand
|
|
7398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/logical-assignment-operators.md
|
|
7399
7444
|
*/
|
|
7400
7445
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
7401
7446
|
/**
|
|
7402
7447
|
* Limit the depth of nested calls.
|
|
7403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/max-nested-calls.md
|
|
7404
7449
|
*/
|
|
7405
7450
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
7406
7451
|
/**
|
|
7407
7452
|
* Enforce replacements for variable, property, and filenames.
|
|
7408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/name-replacements.md
|
|
7409
7454
|
*/
|
|
7410
7455
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
7411
7456
|
/**
|
|
7412
7457
|
* Enforce correct use of `new` for builtin constructors.
|
|
7413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/new-for-builtins.md
|
|
7414
7459
|
*/
|
|
7415
7460
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
7416
7461
|
/**
|
|
7417
7462
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
7418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7463
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
7419
7464
|
*/
|
|
7420
7465
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
7421
7466
|
/**
|
|
7422
7467
|
* Disallow recursive access to `this` within getters and setters.
|
|
7423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7468
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-accessor-recursion.md
|
|
7424
7469
|
*/
|
|
7425
7470
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
7426
7471
|
/**
|
|
7427
7472
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
7428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7473
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
7429
7474
|
*/
|
|
7430
7475
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
7431
7476
|
/**
|
|
7432
7477
|
* Disallow anonymous functions and classes as the default export.
|
|
7433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-anonymous-default-export.md
|
|
7434
7479
|
*/
|
|
7435
7480
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
7436
7481
|
/**
|
|
7437
7482
|
* Prevent passing a function reference directly to iterator methods.
|
|
7438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7483
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-callback-reference.md
|
|
7439
7484
|
*/
|
|
7440
7485
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
7441
7486
|
/**
|
|
7442
7487
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
7443
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7488
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-concat-in-loop.md
|
|
7444
7489
|
*/
|
|
7445
7490
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
7446
7491
|
/**
|
|
7447
7492
|
* Disallow using reference values as `Array#fill()` values.
|
|
7448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7493
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
7449
7494
|
*/
|
|
7450
7495
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
7451
7496
|
/**
|
|
7452
7497
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
7453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7498
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-from-fill.md
|
|
7454
7499
|
*/
|
|
7455
7500
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
7456
7501
|
/**
|
|
7457
7502
|
* Disallow front-of-array mutation.
|
|
7458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-front-mutation.md
|
|
7459
7504
|
*/
|
|
7460
7505
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
7461
7506
|
/**
|
|
7462
7507
|
* Disallow using the `this` argument in array methods.
|
|
7463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7508
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-method-this-argument.md
|
|
7464
7509
|
*/
|
|
7465
7510
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
7466
7511
|
/**
|
|
7467
7512
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
7468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7513
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
7469
7514
|
* @deprecated
|
|
7470
7515
|
*/
|
|
7471
7516
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
7472
7517
|
/**
|
|
7473
7518
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
7474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-reduce.md
|
|
7475
7520
|
*/
|
|
7476
7521
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
7477
7522
|
/**
|
|
7478
7523
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
7479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-reverse.md
|
|
7480
7525
|
*/
|
|
7481
7526
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
7482
7527
|
/**
|
|
7483
7528
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
7484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-sort.md
|
|
7485
7530
|
*/
|
|
7486
7531
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
7487
7532
|
/**
|
|
7488
7533
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
7489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
7490
7535
|
*/
|
|
7491
7536
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
7492
7537
|
/**
|
|
7493
7538
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
7494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-splice.md
|
|
7495
7540
|
*/
|
|
7496
7541
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
7497
7542
|
/**
|
|
7498
7543
|
* Disallow asterisk prefixes in documentation comments.
|
|
7499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
7500
7545
|
*/
|
|
7501
7546
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
7547
|
+
/**
|
|
7548
|
+
* Disallow asynchronous callbacks in synchronous iterator helpers.
|
|
7549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-async-iterator-callback.md
|
|
7550
|
+
*/
|
|
7551
|
+
'unicorn/no-async-iterator-callback'?: Linter.RuleEntry<[]>;
|
|
7502
7552
|
/**
|
|
7503
7553
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
7504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-async-promise-finally.md
|
|
7505
7555
|
*/
|
|
7506
7556
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
7507
7557
|
/**
|
|
7508
7558
|
* Disallow member access from await expression.
|
|
7509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-await-expression-member.md
|
|
7510
7560
|
*/
|
|
7511
7561
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
7512
7562
|
/**
|
|
7513
7563
|
* Disallow using `await` in `Promise` method parameters.
|
|
7514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-await-in-promise-methods.md
|
|
7515
7565
|
*/
|
|
7516
7566
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7517
7567
|
/**
|
|
7518
7568
|
* Disallow barrel files.
|
|
7519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-barrel-files.md
|
|
7520
7570
|
*/
|
|
7521
7571
|
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
7522
7572
|
/**
|
|
7523
7573
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
7524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-blob-to-file.md
|
|
7525
7575
|
*/
|
|
7526
7576
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
7527
7577
|
/**
|
|
7528
7578
|
* Disallow boolean-returning sort comparators.
|
|
7529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
7530
7580
|
*/
|
|
7531
7581
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7532
7582
|
/**
|
|
7533
|
-
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
7534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7583
|
+
* Disallow `break` and optionally `continue` in nested loops and switches inside loops.
|
|
7584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-break-in-nested-loop.md
|
|
7535
7585
|
*/
|
|
7536
|
-
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<
|
|
7586
|
+
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<UnicornNoBreakInNestedLoop>;
|
|
7537
7587
|
/**
|
|
7538
7588
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
7539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-canvas-to-image.md
|
|
7540
7590
|
*/
|
|
7541
7591
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
7542
7592
|
/**
|
|
7543
7593
|
* Disallow chained comparisons such as `a < b < c`.
|
|
7544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-chained-comparison.md
|
|
7545
7595
|
*/
|
|
7546
7596
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
7547
7597
|
/**
|
|
7548
7598
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
7549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-collection-bracket-access.md
|
|
7550
7600
|
*/
|
|
7551
7601
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
7552
7602
|
/**
|
|
7553
7603
|
* Disallow dynamic object property existence checks.
|
|
7554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-computed-property-existence-check.md
|
|
7555
7605
|
*/
|
|
7556
7606
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
7557
7607
|
/**
|
|
7558
7608
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
7559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-confusing-array-splice.md
|
|
7560
7610
|
*/
|
|
7561
7611
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
7562
7612
|
/**
|
|
7563
7613
|
* Disallow confusing uses of `Array#with()`.
|
|
7564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-confusing-array-with.md
|
|
7565
7615
|
*/
|
|
7566
7616
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
7567
7617
|
/**
|
|
7568
7618
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
7569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-console-spaces.md
|
|
7570
7620
|
*/
|
|
7571
7621
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
7572
7622
|
/**
|
|
7573
7623
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
7574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-constant-zero-expression.md
|
|
7575
7625
|
*/
|
|
7576
7626
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
7577
7627
|
/**
|
|
7578
7628
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
7579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
7580
7630
|
*/
|
|
7581
7631
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
7632
|
+
/**
|
|
7633
|
+
* Disallow deprecated CSS features.
|
|
7634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-deprecated-css-features.md
|
|
7635
|
+
*/
|
|
7636
|
+
'unicorn/no-deprecated-css-features'?: Linter.RuleEntry<UnicornNoDeprecatedCssFeatures>;
|
|
7582
7637
|
/**
|
|
7583
7638
|
* Do not use `document.cookie` directly.
|
|
7584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-document-cookie.md
|
|
7585
7640
|
*/
|
|
7586
7641
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
7587
7642
|
/**
|
|
7588
7643
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
7589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-double-comparison.md
|
|
7590
7645
|
*/
|
|
7591
7646
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
7647
|
+
/**
|
|
7648
|
+
* Disallow duplicate CSS selectors.
|
|
7649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-css-selectors.md
|
|
7650
|
+
*/
|
|
7651
|
+
'unicorn/no-duplicate-css-selectors'?: Linter.RuleEntry<[]>;
|
|
7652
|
+
/**
|
|
7653
|
+
* Disallow duplicate font family names.
|
|
7654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-font-family-names.md
|
|
7655
|
+
*/
|
|
7656
|
+
'unicorn/no-duplicate-font-family-names'?: Linter.RuleEntry<[]>;
|
|
7592
7657
|
/**
|
|
7593
7658
|
* Disallow duplicate adjacent branches in if chains.
|
|
7594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-if-branches.md
|
|
7595
7660
|
*/
|
|
7596
7661
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
7597
7662
|
/**
|
|
7598
7663
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
7599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
7600
7665
|
*/
|
|
7601
7666
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
7602
7667
|
/**
|
|
7603
7668
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
7604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-loops.md
|
|
7605
7670
|
*/
|
|
7606
7671
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
7607
7672
|
/**
|
|
7608
7673
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
7609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-set-values.md
|
|
7610
7675
|
*/
|
|
7611
7676
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
7612
7677
|
/**
|
|
7613
7678
|
* Disallow empty files.
|
|
7614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-empty-file.md
|
|
7615
7680
|
*/
|
|
7616
7681
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
7617
7682
|
/**
|
|
7618
7683
|
* Disallow assigning to built-in error properties.
|
|
7619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-error-property-assignment.md
|
|
7620
7685
|
*/
|
|
7621
7686
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7622
7687
|
/**
|
|
7623
7688
|
* Disallow exports in scripts.
|
|
7624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-exports-in-scripts.md
|
|
7625
7690
|
*/
|
|
7626
7691
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
7627
7692
|
/**
|
|
7628
7693
|
* Prefer `for…of` over the `forEach` method.
|
|
7629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-for-each.md
|
|
7630
7695
|
*/
|
|
7631
7696
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
7632
7697
|
/**
|
|
7633
7698
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
7634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-for-loop.md
|
|
7635
7700
|
*/
|
|
7636
7701
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
7637
7702
|
/**
|
|
7638
7703
|
* Disallow assigning properties on the global object.
|
|
7639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-global-object-property-assignment.md
|
|
7640
7705
|
*/
|
|
7641
7706
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7642
7707
|
/**
|
|
7643
7708
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
7644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
7645
7710
|
* @deprecated
|
|
7646
7711
|
*/
|
|
7647
7712
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
7648
7713
|
/**
|
|
7649
7714
|
* Disallow immediate mutation after variable assignment.
|
|
7650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-immediate-mutation.md
|
|
7651
7716
|
*/
|
|
7652
|
-
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<
|
|
7717
|
+
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<UnicornNoImmediateMutation>;
|
|
7653
7718
|
/**
|
|
7654
7719
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
7655
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-impossible-length-comparison.md
|
|
7656
7721
|
*/
|
|
7657
7722
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
7658
7723
|
/**
|
|
7659
7724
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
7660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-incorrect-query-selector.md
|
|
7661
7726
|
*/
|
|
7662
7727
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
7663
7728
|
/**
|
|
7664
7729
|
* Disallow incorrect template literal interpolation syntax.
|
|
7665
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
7666
7731
|
*/
|
|
7667
7732
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
7668
7733
|
/**
|
|
7669
7734
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
7670
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
7671
7736
|
* @deprecated
|
|
7672
7737
|
*/
|
|
7673
7738
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
7674
7739
|
/**
|
|
7675
7740
|
* Disallow `instanceof` with built-in objects
|
|
7676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-instanceof-builtins.md
|
|
7677
7742
|
*/
|
|
7678
7743
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
7679
7744
|
/**
|
|
7680
7745
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
7681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-argument-count.md
|
|
7682
7747
|
*/
|
|
7683
7748
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
7684
7749
|
/**
|
|
7685
7750
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
7686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-character-comparison.md
|
|
7687
7752
|
*/
|
|
7688
7753
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
7689
7754
|
/**
|
|
7690
7755
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
7691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7756
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-fetch-options.md
|
|
7692
7757
|
*/
|
|
7693
7758
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7694
7759
|
/**
|
|
7695
7760
|
* Disallow invalid `accept` values on file inputs.
|
|
7696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7761
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
7697
7762
|
*/
|
|
7698
7763
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
7764
|
+
/**
|
|
7765
|
+
* Disallow unknown media features and invalid values for known media features.
|
|
7766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-media-features.md
|
|
7767
|
+
*/
|
|
7768
|
+
'unicorn/no-invalid-media-features'?: Linter.RuleEntry<[]>;
|
|
7699
7769
|
/**
|
|
7700
7770
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
7701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
7702
7772
|
*/
|
|
7703
7773
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
7704
7774
|
/**
|
|
7705
7775
|
* Disallow invalid implementations of well-known symbol methods.
|
|
7706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
7707
7777
|
*/
|
|
7708
7778
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
7709
7779
|
/**
|
|
7710
7780
|
* Disallow identifiers starting with `new` or `class`.
|
|
7711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-keyword-prefix.md
|
|
7712
7782
|
*/
|
|
7713
7783
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
7714
7784
|
/**
|
|
7715
7785
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
7716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-late-current-target-access.md
|
|
7717
7787
|
*/
|
|
7718
7788
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
7719
7789
|
/**
|
|
7720
7790
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
7721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-late-event-control.md
|
|
7722
7792
|
*/
|
|
7723
7793
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
7724
7794
|
/**
|
|
7725
7795
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
7726
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
7727
7797
|
* @deprecated
|
|
7728
7798
|
*/
|
|
7729
7799
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
7730
7800
|
/**
|
|
7731
7801
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
7732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-lonely-if.md
|
|
7733
7803
|
*/
|
|
7734
7804
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
7735
7805
|
/**
|
|
7736
7806
|
* Disallow mutating a loop iterable during iteration.
|
|
7737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
7738
7808
|
*/
|
|
7739
7809
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
7740
7810
|
/**
|
|
7741
7811
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
7742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
7743
7813
|
*/
|
|
7744
7814
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7745
7815
|
/**
|
|
7746
7816
|
* Disallow manually wrapped comments.
|
|
7747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
7748
7818
|
*/
|
|
7749
7819
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
7750
7820
|
/**
|
|
7751
7821
|
* Disallow checking a Map key before accessing a different key.
|
|
7752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-mismatched-map-key.md
|
|
7753
7823
|
*/
|
|
7754
7824
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
7755
7825
|
/**
|
|
7756
7826
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
7757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-misrefactored-assignment.md
|
|
7758
7828
|
*/
|
|
7759
7829
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
7760
7830
|
/**
|
|
7761
7831
|
* Disallow references to missing local resources.
|
|
7762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7832
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-missing-local-resource.md
|
|
7763
7833
|
*/
|
|
7764
7834
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
7765
7835
|
/**
|
|
7766
7836
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
7767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
7768
7838
|
*/
|
|
7769
7839
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
7770
7840
|
/**
|
|
7771
7841
|
* Disallow named usage of default import and export.
|
|
7772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-named-default.md
|
|
7773
7843
|
*/
|
|
7774
7844
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
7775
7845
|
/**
|
|
7776
7846
|
* Disallow negated array predicate calls.
|
|
7777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-negated-array-predicate.md
|
|
7778
7848
|
*/
|
|
7779
7849
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7780
7850
|
/**
|
|
7781
7851
|
* Disallow negated comparisons.
|
|
7782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7852
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-negated-comparison.md
|
|
7783
7853
|
*/
|
|
7784
7854
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
7785
7855
|
/**
|
|
7786
7856
|
* Disallow negated conditions.
|
|
7787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7857
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-negated-condition.md
|
|
7788
7858
|
*/
|
|
7789
7859
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
7790
7860
|
/**
|
|
7791
7861
|
* Disallow negated expression in equality check.
|
|
7792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-negation-in-equality-check.md
|
|
7793
7863
|
*/
|
|
7794
7864
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
7795
7865
|
/**
|
|
7796
7866
|
* Disallow nested ternary expressions.
|
|
7797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-nested-ternary.md
|
|
7798
7868
|
*/
|
|
7799
7869
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7870
|
+
/**
|
|
7871
|
+
* Disallow nesting under selector lists with mixed specificity.
|
|
7872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-nesting-with-mixed-specificity.md
|
|
7873
|
+
*/
|
|
7874
|
+
'unicorn/no-nesting-with-mixed-specificity'?: Linter.RuleEntry<[]>;
|
|
7800
7875
|
/**
|
|
7801
7876
|
* Disallow `new Array()`.
|
|
7802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-new-array.md
|
|
7803
7878
|
*/
|
|
7804
7879
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
7805
7880
|
/**
|
|
7806
7881
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
7807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-new-buffer.md
|
|
7808
7883
|
*/
|
|
7809
7884
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
7810
7885
|
/**
|
|
7811
7886
|
* Disallow non-function values with function-style verb prefixes.
|
|
7812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
7813
7888
|
*/
|
|
7814
7889
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
7815
7890
|
/**
|
|
7816
7891
|
* Disallow non-standard properties on built-in objects.
|
|
7817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
7818
7893
|
*/
|
|
7819
7894
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
7820
7895
|
/**
|
|
7821
7896
|
* Disallow the use of the `null` literal.
|
|
7822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-null.md
|
|
7823
7898
|
*/
|
|
7824
7899
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
7825
7900
|
/**
|
|
7826
7901
|
* Disallow the use of objects as default parameters.
|
|
7827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-object-as-default-parameter.md
|
|
7828
7903
|
*/
|
|
7829
7904
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
7830
7905
|
/**
|
|
7831
7906
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
7832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7907
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-object-methods-with-collections.md
|
|
7833
7908
|
*/
|
|
7834
7909
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
7835
7910
|
/**
|
|
7836
7911
|
* Disallow optional chaining on undeclared variables.
|
|
7837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
7838
7913
|
*/
|
|
7839
7914
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
7840
7915
|
/**
|
|
7841
7916
|
* Disallow `process.exit()`.
|
|
7842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7917
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-process-exit.md
|
|
7843
7918
|
*/
|
|
7844
7919
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
7845
7920
|
/**
|
|
7846
7921
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
7847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-redundant-comparison.md
|
|
7848
7923
|
*/
|
|
7849
7924
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
7925
|
+
/**
|
|
7926
|
+
* Disallow nested style rules that do not modify the parent selector.
|
|
7927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-redundant-nested-style-rules.md
|
|
7928
|
+
*/
|
|
7929
|
+
'unicorn/no-redundant-nested-style-rules'?: Linter.RuleEntry<[]>;
|
|
7850
7930
|
/**
|
|
7851
7931
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
7852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7932
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-return-array-push.md
|
|
7853
7933
|
*/
|
|
7854
7934
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
7855
7935
|
/**
|
|
7856
7936
|
* Disallow selector syntax in DOM names.
|
|
7857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7937
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-selector-as-dom-name.md
|
|
7858
7938
|
*/
|
|
7859
7939
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
7860
7940
|
/**
|
|
7861
7941
|
* Disallow shorthand properties that override related longhand properties.
|
|
7862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7942
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
7863
7943
|
*/
|
|
7864
7944
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
7865
7945
|
/**
|
|
7866
7946
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
7867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7947
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
7868
7948
|
*/
|
|
7869
7949
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7870
7950
|
/**
|
|
7871
7951
|
* Disallow classes that only have static members.
|
|
7872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-static-only-class.md
|
|
7873
7953
|
*/
|
|
7874
7954
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
7875
7955
|
/**
|
|
7876
7956
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
7877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7957
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-subtraction-comparison.md
|
|
7878
7958
|
*/
|
|
7879
7959
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
7880
7960
|
/**
|
|
7881
7961
|
* Disallow `then` property.
|
|
7882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-thenable.md
|
|
7883
7963
|
*/
|
|
7884
7964
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
7885
7965
|
/**
|
|
7886
7966
|
* Disallow assigning `this` to a variable.
|
|
7887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-this-assignment.md
|
|
7888
7968
|
*/
|
|
7889
7969
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
7890
7970
|
/**
|
|
7891
7971
|
* Disallow `this` outside of classes.
|
|
7892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-this-outside-of-class.md
|
|
7893
7973
|
*/
|
|
7894
7974
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
7895
7975
|
/**
|
|
7896
7976
|
* Disallow assigning to top-level variables from inside functions.
|
|
7897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
7898
7978
|
*/
|
|
7899
7979
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
7900
7980
|
/**
|
|
7901
7981
|
* Disallow top-level side effects in exported modules.
|
|
7902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-top-level-side-effects.md
|
|
7903
7983
|
*/
|
|
7904
7984
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
7905
7985
|
/**
|
|
7906
7986
|
* Disallow `all` as a transition property.
|
|
7907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-transition-all.md
|
|
7908
7988
|
*/
|
|
7909
7989
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
7910
7990
|
/**
|
|
7911
7991
|
* Disallow comparing `undefined` using `typeof`.
|
|
7912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-typeof-undefined.md
|
|
7913
7993
|
*/
|
|
7914
7994
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
7915
7995
|
/**
|
|
7916
7996
|
* Disallow referencing methods without calling them.
|
|
7917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-uncalled-method.md
|
|
7918
7998
|
*/
|
|
7919
7999
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
7920
8000
|
/**
|
|
7921
8001
|
* Require class members to be declared.
|
|
7922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-undeclared-class-members.md
|
|
7923
8003
|
*/
|
|
7924
8004
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
8005
|
+
/**
|
|
8006
|
+
* Disallow unknown and noncanonical CSS annotations.
|
|
8007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unknown-css-annotations.md
|
|
8008
|
+
*/
|
|
8009
|
+
'unicorn/no-unknown-css-annotations'?: Linter.RuleEntry<[]>;
|
|
8010
|
+
/**
|
|
8011
|
+
* Disallow unknown pseudo-class and pseudo-element selectors.
|
|
8012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unknown-pseudo-selectors.md
|
|
8013
|
+
*/
|
|
8014
|
+
'unicorn/no-unknown-pseudo-selectors'?: Linter.RuleEntry<UnicornNoUnknownPseudoSelectors>;
|
|
7925
8015
|
/**
|
|
7926
8016
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
7927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8017
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
7928
8018
|
*/
|
|
7929
8019
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7930
8020
|
/**
|
|
7931
8021
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
7932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
7933
8023
|
*/
|
|
7934
8024
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7935
8025
|
/**
|
|
7936
8026
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
7937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
7938
8028
|
*/
|
|
7939
8029
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
7940
8030
|
/**
|
|
7941
8031
|
* Disallow awaiting non-promise values.
|
|
7942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-await.md
|
|
7943
8033
|
*/
|
|
7944
8034
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
7945
8035
|
/**
|
|
7946
8036
|
* Disallow unnecessary comparisons against boolean literals.
|
|
7947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
7948
8038
|
*/
|
|
7949
8039
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
7950
8040
|
/**
|
|
7951
8041
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
7952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
7953
8043
|
*/
|
|
7954
8044
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7955
8045
|
/**
|
|
7956
8046
|
* Disallow unnecessary `globalThis` references.
|
|
7957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-global-this.md
|
|
7958
8048
|
*/
|
|
7959
8049
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
7960
8050
|
/**
|
|
7961
8051
|
* Disallow unnecessary nested ternary expressions.
|
|
7962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
7963
8053
|
*/
|
|
7964
8054
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7965
8055
|
/**
|
|
7966
8056
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
7967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
7968
8058
|
*/
|
|
7969
8059
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
7970
8060
|
/**
|
|
7971
8061
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
7972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
7973
8063
|
*/
|
|
7974
8064
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
7975
8065
|
/**
|
|
7976
8066
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
7977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-splice.md
|
|
7978
8068
|
*/
|
|
7979
8069
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
7980
8070
|
/**
|
|
7981
8071
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
7982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8072
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
7983
8073
|
*/
|
|
7984
8074
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
7985
8075
|
/**
|
|
7986
8076
|
* Disallow unreadable array destructuring.
|
|
7987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
7988
8078
|
*/
|
|
7989
8079
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
7990
8080
|
/**
|
|
7991
8081
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
7992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
7993
8083
|
*/
|
|
7994
8084
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
7995
8085
|
/**
|
|
7996
8086
|
* Disallow unreadable IIFEs.
|
|
7997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-iife.md
|
|
7998
8088
|
*/
|
|
7999
8089
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
8000
8090
|
/**
|
|
8001
8091
|
* Disallow unreadable `new` expressions.
|
|
8002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-new-expression.md
|
|
8003
8093
|
*/
|
|
8004
8094
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
8005
8095
|
/**
|
|
8006
8096
|
* Disallow unreadable object destructuring.
|
|
8007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
8008
8098
|
*/
|
|
8009
8099
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8010
8100
|
/**
|
|
8011
8101
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
8012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
8013
8103
|
*/
|
|
8014
8104
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
8015
8105
|
/**
|
|
8016
8106
|
* Disallow unsafe DOM HTML APIs.
|
|
8017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-dom-html.md
|
|
8018
8108
|
*/
|
|
8019
8109
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
8020
8110
|
/**
|
|
8021
8111
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
8022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
8023
8113
|
*/
|
|
8024
8114
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
8025
8115
|
/**
|
|
8026
8116
|
* Disallow unsafe values as property keys.
|
|
8027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8117
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-property-key.md
|
|
8028
8118
|
*/
|
|
8029
8119
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
8030
8120
|
/**
|
|
8031
8121
|
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
8032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
8033
8123
|
*/
|
|
8034
8124
|
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
8035
8125
|
/**
|
|
8036
8126
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
8037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
8038
8128
|
*/
|
|
8039
8129
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
8040
8130
|
/**
|
|
8041
|
-
* Disallow
|
|
8042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8131
|
+
* Disallow unscoped CSS nesting selectors.
|
|
8132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unscoped-css-nesting-selector.md
|
|
8133
|
+
*/
|
|
8134
|
+
'unicorn/no-unscoped-css-nesting-selector'?: Linter.RuleEntry<UnicornNoUnscopedCssNestingSelector>;
|
|
8135
|
+
/**
|
|
8136
|
+
* Replaced by `unicorn/no-unused-builtin-method-return` which covers more cases.
|
|
8137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-unused-array-method-return
|
|
8138
|
+
* @deprecated
|
|
8043
8139
|
*/
|
|
8044
8140
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
8141
|
+
/**
|
|
8142
|
+
* Disallow ignoring the return value of selected built-in methods.
|
|
8143
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unused-builtin-method-return.md
|
|
8144
|
+
*/
|
|
8145
|
+
'unicorn/no-unused-builtin-method-return'?: Linter.RuleEntry<[]>;
|
|
8146
|
+
/**
|
|
8147
|
+
* Disallow discarding lazy iterator helpers.
|
|
8148
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unused-iterator-helper.md
|
|
8149
|
+
*/
|
|
8150
|
+
'unicorn/no-unused-iterator-helper'?: Linter.RuleEntry<[]>;
|
|
8045
8151
|
/**
|
|
8046
8152
|
* Disallow unused object properties.
|
|
8047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8153
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unused-properties.md
|
|
8048
8154
|
*/
|
|
8049
8155
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
8050
8156
|
/**
|
|
8051
8157
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
8052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8158
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-boolean-cast.md
|
|
8053
8159
|
*/
|
|
8054
8160
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
8055
8161
|
/**
|
|
8056
8162
|
* Disallow useless type coercions of values that are already of the target type.
|
|
8057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8163
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-coercion.md
|
|
8058
8164
|
*/
|
|
8059
8165
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
8060
8166
|
/**
|
|
8061
8167
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
8062
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8168
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-collection-argument.md
|
|
8063
8169
|
*/
|
|
8064
8170
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
8065
8171
|
/**
|
|
8066
8172
|
* Disallow useless compound assignments such as `x += 0`.
|
|
8067
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8173
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-compound-assignment.md
|
|
8068
8174
|
*/
|
|
8069
8175
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
8070
8176
|
/**
|
|
8071
8177
|
* Disallow useless concatenation of literals.
|
|
8072
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8178
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-concat.md
|
|
8073
8179
|
*/
|
|
8074
8180
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
8075
8181
|
/**
|
|
8076
8182
|
* Disallow useless `continue` statements.
|
|
8077
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8183
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-continue.md
|
|
8078
8184
|
*/
|
|
8079
8185
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
8080
8186
|
/**
|
|
8081
8187
|
* Disallow unnecessary existence checks before deletion.
|
|
8082
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8188
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-delete-check.md
|
|
8083
8189
|
*/
|
|
8084
8190
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
8085
8191
|
/**
|
|
8086
8192
|
* Disallow `else` after a statement that exits.
|
|
8087
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8193
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-else.md
|
|
8088
8194
|
*/
|
|
8089
8195
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
8090
8196
|
/**
|
|
8091
8197
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
8092
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8198
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
8093
8199
|
*/
|
|
8094
8200
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
8095
8201
|
/**
|
|
8096
8202
|
* Disallow useless fallback when spreading in object literals.
|
|
8097
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8203
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
8098
8204
|
*/
|
|
8099
8205
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
8100
8206
|
/**
|
|
8101
8207
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
8102
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8208
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
8103
8209
|
*/
|
|
8104
8210
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8105
8211
|
/**
|
|
8106
8212
|
* Disallow useless array length check.
|
|
8107
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8213
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-length-check.md
|
|
8108
8214
|
*/
|
|
8109
8215
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
8110
8216
|
/**
|
|
8111
8217
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
8112
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8218
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-logical-operand.md
|
|
8113
8219
|
*/
|
|
8114
8220
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
8115
8221
|
/**
|
|
8116
8222
|
* Disallow useless overrides of class methods.
|
|
8117
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8223
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-override.md
|
|
8118
8224
|
*/
|
|
8119
8225
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
8120
8226
|
/**
|
|
8121
8227
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
8122
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8228
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
8123
8229
|
*/
|
|
8124
8230
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
8125
8231
|
/**
|
|
8126
8232
|
* Disallow redundant re-exports.
|
|
8127
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-re-export.md
|
|
8128
8234
|
*/
|
|
8129
8235
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
8130
8236
|
/**
|
|
8131
8237
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
8132
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8238
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-recursion.md
|
|
8133
8239
|
*/
|
|
8134
8240
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
8241
|
+
/**
|
|
8242
|
+
* Disallow unnecessary `Set` construction around `Set` methods.
|
|
8243
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-set-construction.md
|
|
8244
|
+
*/
|
|
8245
|
+
'unicorn/no-useless-set-construction'?: Linter.RuleEntry<[]>;
|
|
8135
8246
|
/**
|
|
8136
8247
|
* Disallow unnecessary spread.
|
|
8137
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8248
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-spread.md
|
|
8138
8249
|
*/
|
|
8139
8250
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
8140
8251
|
/**
|
|
8141
8252
|
* Disallow useless case in switch statements.
|
|
8142
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8253
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-switch-case.md
|
|
8143
8254
|
*/
|
|
8144
8255
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
8145
8256
|
/**
|
|
8146
8257
|
* Disallow useless template literal expressions.
|
|
8147
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8258
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-template-literals.md
|
|
8148
8259
|
*/
|
|
8149
8260
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
8150
8261
|
/**
|
|
8151
8262
|
* Disallow useless `undefined`.
|
|
8152
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-undefined.md
|
|
8153
8264
|
*/
|
|
8154
8265
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
8266
|
+
/**
|
|
8267
|
+
* Disallow returning or exporting resources declared with `using`, including through capturing functions.
|
|
8268
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-using-resource-escape.md
|
|
8269
|
+
*/
|
|
8270
|
+
'unicorn/no-using-resource-escape'?: Linter.RuleEntry<[]>;
|
|
8155
8271
|
/**
|
|
8156
8272
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
8157
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
8158
8274
|
*/
|
|
8159
8275
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
8160
8276
|
/**
|
|
8161
8277
|
* Disallow number literals with zero fractions or dangling dots.
|
|
8162
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8278
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-zero-fractions.md
|
|
8163
8279
|
*/
|
|
8164
8280
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
8165
8281
|
/**
|
|
8166
8282
|
* Enforce proper case for numeric literals.
|
|
8167
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/number-literal-case.md
|
|
8168
8284
|
*/
|
|
8169
8285
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
8170
8286
|
/**
|
|
8171
8287
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
8172
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8288
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/numeric-separators-style.md
|
|
8173
8289
|
*/
|
|
8174
8290
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
8175
8291
|
/**
|
|
8176
8292
|
* Require assignment operator shorthand where possible.
|
|
8177
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8293
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/operator-assignment.md
|
|
8178
8294
|
*/
|
|
8179
8295
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
8180
8296
|
/**
|
|
8181
8297
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
8182
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-abort-signal-any.md
|
|
8183
8299
|
*/
|
|
8184
8300
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
8185
8301
|
/**
|
|
8186
8302
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
8187
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
8188
8304
|
*/
|
|
8189
8305
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
8190
8306
|
/**
|
|
8191
8307
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
8192
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-add-event-listener.md
|
|
8193
8309
|
*/
|
|
8194
8310
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
8195
8311
|
/**
|
|
8196
8312
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
8197
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
8198
8314
|
*/
|
|
8199
8315
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
8200
8316
|
/**
|
|
8201
8317
|
* Prefer `AggregateError` when throwing collected errors.
|
|
8202
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-aggregate-error.md
|
|
8203
8319
|
*/
|
|
8204
8320
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
8205
8321
|
/**
|
|
8206
8322
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
8207
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-find.md
|
|
8208
8324
|
*/
|
|
8209
8325
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
8210
8326
|
/**
|
|
8211
8327
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
8212
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-flat.md
|
|
8213
8329
|
*/
|
|
8214
8330
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
8215
8331
|
/**
|
|
8216
8332
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
8217
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-flat-map.md
|
|
8218
8334
|
*/
|
|
8219
8335
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8220
8336
|
/**
|
|
8221
|
-
* Prefer `Array.fromAsync()` over
|
|
8222
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8337
|
+
* Prefer `Array.fromAsync()` over array accumulation loops.
|
|
8338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-from-async.md
|
|
8223
8339
|
*/
|
|
8224
8340
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
8225
8341
|
/**
|
|
8226
8342
|
* Prefer using the `Array.from()` mapping function argument.
|
|
8227
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-from-map.md
|
|
8228
8344
|
*/
|
|
8229
8345
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
8230
8346
|
/**
|
|
8231
8347
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
8232
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-from-range.md
|
|
8233
8349
|
*/
|
|
8234
8350
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
8235
8351
|
/**
|
|
8236
8352
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
8237
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-index-of.md
|
|
8238
8354
|
*/
|
|
8239
8355
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
8240
8356
|
/**
|
|
8241
8357
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
8242
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
8243
8359
|
*/
|
|
8244
8360
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8245
8361
|
/**
|
|
8246
8362
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
8247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-last-methods.md
|
|
8248
8364
|
*/
|
|
8249
8365
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
8250
8366
|
/**
|
|
8251
8367
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
8252
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-slice.md
|
|
8253
8369
|
*/
|
|
8254
8370
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
8255
8371
|
/**
|
|
8256
8372
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
8257
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-some.md
|
|
8258
8374
|
*/
|
|
8259
8375
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
8260
8376
|
/**
|
|
8261
8377
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
8262
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-at.md
|
|
8263
8379
|
*/
|
|
8264
8380
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
8265
8381
|
/**
|
|
8266
8382
|
* Prefer `await` over promise chaining.
|
|
8267
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-await.md
|
|
8268
8384
|
*/
|
|
8269
8385
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
8270
8386
|
/**
|
|
8271
8387
|
* Prefer `BigInt` literals over the constructor.
|
|
8272
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-bigint-literals.md
|
|
8273
8389
|
*/
|
|
8274
8390
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
8275
8391
|
/**
|
|
8276
8392
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
8277
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
8278
8394
|
*/
|
|
8279
8395
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
8280
8396
|
/**
|
|
8281
8397
|
* Prefer block statements over IIFEs used only for scoping.
|
|
8282
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
8283
8399
|
*/
|
|
8284
8400
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
8285
8401
|
/**
|
|
8286
8402
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
8287
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-boolean-return.md
|
|
8288
8404
|
*/
|
|
8289
8405
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8290
8406
|
/**
|
|
8291
8407
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
8292
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-class-fields.md
|
|
8293
8409
|
*/
|
|
8294
8410
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
8295
8411
|
/**
|
|
8296
8412
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
8297
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-classlist-toggle.md
|
|
8298
8414
|
*/
|
|
8299
8415
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
8300
8416
|
/**
|
|
8301
8417
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
8302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-code-point.md
|
|
8303
8419
|
*/
|
|
8304
8420
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
8305
8421
|
/**
|
|
8306
|
-
* Prefer
|
|
8307
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8422
|
+
* Prefer combining consecutive guards with identical exit statements.
|
|
8423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-combined-guards.md
|
|
8424
|
+
*/
|
|
8425
|
+
'unicorn/prefer-combined-guards'?: Linter.RuleEntry<UnicornPreferCombinedGuards>;
|
|
8426
|
+
/**
|
|
8427
|
+
* Prefer early continues over conditionals wrapping the remainder of the loop body.
|
|
8428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-continue.md
|
|
8308
8429
|
*/
|
|
8309
8430
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
8310
8431
|
/**
|
|
8311
8432
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
8312
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-date-now.md
|
|
8313
8434
|
*/
|
|
8314
8435
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
8315
8436
|
/**
|
|
8316
8437
|
* Prefer default parameters over reassignment.
|
|
8317
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-default-parameters.md
|
|
8318
8439
|
*/
|
|
8319
8440
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
8320
8441
|
/**
|
|
8321
8442
|
* Prefer direct iteration over default iterator method calls.
|
|
8322
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-direct-iteration.md
|
|
8323
8444
|
*/
|
|
8324
8445
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
8325
8446
|
/**
|
|
8326
8447
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
8327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dispose.md
|
|
8328
8449
|
*/
|
|
8329
8450
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
8330
8451
|
/**
|
|
8331
8452
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
8332
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-append.md
|
|
8333
8454
|
*/
|
|
8334
8455
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
8335
8456
|
/**
|
|
8336
8457
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
8337
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
8338
8459
|
* @deprecated
|
|
8339
8460
|
*/
|
|
8340
8461
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
8341
8462
|
/**
|
|
8342
8463
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
8343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
8344
8465
|
*/
|
|
8345
8466
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
8346
8467
|
/**
|
|
8347
8468
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
8348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-remove.md
|
|
8349
8470
|
*/
|
|
8350
8471
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
8351
8472
|
/**
|
|
8352
|
-
* Prefer `.replaceChildren()` when
|
|
8353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8473
|
+
* Prefer `.replaceChildren()` when replacing DOM children.
|
|
8474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
8354
8475
|
*/
|
|
8355
8476
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
8356
8477
|
/**
|
|
8357
8478
|
* Prefer `.textContent` over `.innerText`.
|
|
8358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
8359
8480
|
*/
|
|
8360
8481
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
8361
8482
|
/**
|
|
8362
|
-
* Prefer early returns over
|
|
8363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8483
|
+
* Prefer early returns over conditionals wrapping the remainder of the function body.
|
|
8484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-early-return.md
|
|
8364
8485
|
*/
|
|
8365
8486
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
8366
8487
|
/**
|
|
8367
8488
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
8368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-else-if.md
|
|
8369
8490
|
*/
|
|
8370
8491
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
8371
8492
|
/**
|
|
8372
8493
|
* Prefer `Error.isError()` when checking for errors.
|
|
8373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-error-is-error.md
|
|
8374
8495
|
*/
|
|
8375
8496
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
8376
8497
|
/**
|
|
8377
8498
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
8378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-event-target.md
|
|
8379
8500
|
*/
|
|
8380
8501
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
8381
8502
|
/**
|
|
8382
8503
|
* Prefer explicit viewport units.
|
|
8383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
8384
8505
|
*/
|
|
8385
8506
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
8386
8507
|
/**
|
|
8387
8508
|
* Prefer `export…from` when re-exporting.
|
|
8388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-export-from.md
|
|
8389
8510
|
*/
|
|
8390
8511
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
8391
8512
|
/**
|
|
8392
8513
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
8393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
8394
8515
|
*/
|
|
8395
8516
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8396
8517
|
/**
|
|
8397
8518
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
8398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
8399
8520
|
*/
|
|
8400
8521
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
8401
8522
|
/**
|
|
8402
8523
|
* Prefer global numeric constants over `Number` static properties.
|
|
8403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-global-number-constants.md
|
|
8404
8525
|
*/
|
|
8405
8526
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
8406
8527
|
/**
|
|
8407
8528
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
8408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-global-this.md
|
|
8409
8530
|
*/
|
|
8410
8531
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
8411
8532
|
/**
|
|
8412
|
-
* Prefer `Object.groupBy()` or `Map.groupBy()` over
|
|
8413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8533
|
+
* Prefer `Object.groupBy()` or `Map.groupBy()` over manual grouping.
|
|
8534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-group-by.md
|
|
8414
8535
|
*/
|
|
8415
8536
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
8416
8537
|
/**
|
|
8417
8538
|
* Prefer `.has()` when checking existence.
|
|
8418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-has-check.md
|
|
8419
8540
|
*/
|
|
8420
8541
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
8421
8542
|
/**
|
|
8422
8543
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
8423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
8424
8545
|
*/
|
|
8425
8546
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
8426
8547
|
/**
|
|
8427
8548
|
* Prefer HTTPS over HTTP.
|
|
8428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-https.md
|
|
8429
8550
|
*/
|
|
8430
8551
|
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
8431
8552
|
/**
|
|
8432
8553
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
8433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
8434
8555
|
*/
|
|
8435
8556
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
8436
8557
|
/**
|
|
8437
8558
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
8438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-import-meta-properties.md
|
|
8439
8560
|
*/
|
|
8440
8561
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
8441
8562
|
/**
|
|
8442
8563
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
8443
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-includes.md
|
|
8444
8565
|
*/
|
|
8445
8566
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
8446
8567
|
/**
|
|
8447
8568
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
8448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
8449
8570
|
*/
|
|
8450
8571
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
8451
8572
|
/**
|
|
8452
8573
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
8453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
8454
8575
|
*/
|
|
8455
8576
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
8456
8577
|
/**
|
|
8457
8578
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
8458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-concat.md
|
|
8459
8580
|
*/
|
|
8460
8581
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
8461
8582
|
/**
|
|
8462
8583
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
8463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-helpers.md
|
|
8464
8585
|
*/
|
|
8465
8586
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
8466
8587
|
/**
|
|
8467
8588
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
8468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-to-array.md
|
|
8469
8590
|
*/
|
|
8470
8591
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8471
8592
|
/**
|
|
8472
8593
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
8473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
8474
8595
|
*/
|
|
8475
8596
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
8597
|
+
/**
|
|
8598
|
+
* Prefer `Iterator.zip()` over parallel-array indexing.
|
|
8599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-zip.md
|
|
8600
|
+
*/
|
|
8601
|
+
'unicorn/prefer-iterator-zip'?: Linter.RuleEntry<[]>;
|
|
8602
|
+
/**
|
|
8603
|
+
* Prefer JSON imports over reading and parsing JSON files.
|
|
8604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-json-import.md
|
|
8605
|
+
*/
|
|
8606
|
+
'unicorn/prefer-json-import'?: Linter.RuleEntry<[]>;
|
|
8476
8607
|
/**
|
|
8477
8608
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
8478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
8479
8610
|
* @deprecated
|
|
8480
8611
|
*/
|
|
8481
8612
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
8482
8613
|
/**
|
|
8483
8614
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
8484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
8485
8616
|
*/
|
|
8486
8617
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
8487
8618
|
/**
|
|
8488
8619
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
8489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-location-assign.md
|
|
8490
8621
|
*/
|
|
8491
8622
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
8492
8623
|
/**
|
|
8493
8624
|
* Prefer using a logical operator over a ternary.
|
|
8494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
8495
8626
|
*/
|
|
8496
8627
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
8497
8628
|
/**
|
|
8498
8629
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
8499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-map-from-entries.md
|
|
8500
8631
|
*/
|
|
8501
8632
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
8502
8633
|
/**
|
|
8503
8634
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
8504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-math-abs.md
|
|
8505
8636
|
*/
|
|
8506
8637
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
8507
8638
|
/**
|
|
8508
8639
|
* Prefer `Math` constants over their approximate numeric values.
|
|
8509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8640
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-math-constants.md
|
|
8510
8641
|
*/
|
|
8511
8642
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
8512
8643
|
/**
|
|
8513
8644
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
8514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8645
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-math-min-max.md
|
|
8515
8646
|
*/
|
|
8516
8647
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8517
8648
|
/**
|
|
8518
8649
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
8519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-math-trunc.md
|
|
8520
8651
|
*/
|
|
8521
8652
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
8653
|
+
/**
|
|
8654
|
+
* Prefer modern media feature range syntax.
|
|
8655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-media-feature-range-syntax.md
|
|
8656
|
+
*/
|
|
8657
|
+
'unicorn/prefer-media-feature-range-syntax'?: Linter.RuleEntry<[]>;
|
|
8522
8658
|
/**
|
|
8523
8659
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
8524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-minimal-ternary.md
|
|
8525
8661
|
*/
|
|
8526
8662
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
8527
8663
|
/**
|
|
8528
8664
|
* Prefer modern DOM APIs.
|
|
8529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
8530
8666
|
*/
|
|
8531
8667
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
8532
8668
|
/**
|
|
8533
8669
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
8534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-modern-math-apis.md
|
|
8535
8671
|
*/
|
|
8536
8672
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
8537
8673
|
/**
|
|
8538
8674
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
8539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-module.md
|
|
8540
8676
|
*/
|
|
8541
8677
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
8542
8678
|
/**
|
|
8543
8679
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
8544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
8545
8681
|
*/
|
|
8546
8682
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
8547
8683
|
/**
|
|
8548
8684
|
* Prefer negative index over `.length - index` when possible.
|
|
8549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-negative-index.md
|
|
8550
8686
|
*/
|
|
8551
8687
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
8552
8688
|
/**
|
|
8553
8689
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
8554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-node-protocol.md
|
|
8555
8691
|
*/
|
|
8556
8692
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
8557
8693
|
/**
|
|
8558
8694
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
8559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-number-coercion.md
|
|
8560
8696
|
*/
|
|
8561
8697
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
8562
8698
|
/**
|
|
8563
8699
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
8564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
8565
8701
|
*/
|
|
8566
8702
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
8567
8703
|
/**
|
|
8568
8704
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
8569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-number-properties.md
|
|
8570
8706
|
*/
|
|
8571
8707
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
8572
8708
|
/**
|
|
8573
8709
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
8574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-object-define-properties.md
|
|
8575
8711
|
*/
|
|
8576
8712
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
8577
8713
|
/**
|
|
8578
8714
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
8579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
8580
8716
|
*/
|
|
8581
8717
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
8582
8718
|
/**
|
|
8583
8719
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
8584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-object-from-entries.md
|
|
8585
8721
|
*/
|
|
8586
8722
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
8587
8723
|
/**
|
|
8588
8724
|
* Prefer the most specific `Object` iterable method.
|
|
8589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
8590
8726
|
*/
|
|
8591
8727
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8592
8728
|
/**
|
|
8593
8729
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
8594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-observer-apis.md
|
|
8595
8731
|
*/
|
|
8596
8732
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
8597
8733
|
/**
|
|
8598
8734
|
* Prefer omitting the `catch` binding parameter.
|
|
8599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
8600
8736
|
*/
|
|
8601
8737
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
8602
8738
|
/**
|
|
8603
8739
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
8604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-path2d.md
|
|
8605
8741
|
*/
|
|
8606
8742
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
8607
8743
|
/**
|
|
8608
8744
|
* Prefer private class fields over the underscore-prefix convention.
|
|
8609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-private-class-fields.md
|
|
8610
8746
|
*/
|
|
8611
8747
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
8612
8748
|
/**
|
|
8613
8749
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
8614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-promise-try.md
|
|
8615
8751
|
*/
|
|
8616
8752
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
8617
8753
|
/**
|
|
8618
8754
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
8619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
8620
8756
|
*/
|
|
8621
8757
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
8622
8758
|
/**
|
|
8623
8759
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
8624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-prototype-methods.md
|
|
8625
8761
|
*/
|
|
8626
8762
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
8627
8763
|
/**
|
|
8628
8764
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
8629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-query-selector.md
|
|
8630
8766
|
*/
|
|
8631
8767
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
8632
8768
|
/**
|
|
8633
8769
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
8634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-queue-microtask.md
|
|
8635
8771
|
*/
|
|
8636
8772
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
8637
8773
|
/**
|
|
8638
8774
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
8639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-reflect-apply.md
|
|
8640
8776
|
*/
|
|
8641
8777
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
8642
8778
|
/**
|
|
8643
8779
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
8644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-regexp-escape.md
|
|
8645
8781
|
*/
|
|
8646
8782
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
8647
8783
|
/**
|
|
8648
8784
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
8649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-regexp-test.md
|
|
8650
8786
|
*/
|
|
8651
8787
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
8652
8788
|
/**
|
|
8653
8789
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
8654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-response-static-json.md
|
|
8655
8791
|
*/
|
|
8656
8792
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
8657
8793
|
/**
|
|
8658
8794
|
* Prefer `:scope` when using element query selector methods.
|
|
8659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-scoped-selector.md
|
|
8660
8796
|
*/
|
|
8661
8797
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
8662
8798
|
/**
|
|
8663
8799
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
8664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-set-has.md
|
|
8665
8801
|
*/
|
|
8666
8802
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
8667
8803
|
/**
|
|
8668
8804
|
* Prefer `Set` methods for Set operations.
|
|
8669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-set-methods.md
|
|
8670
8806
|
*/
|
|
8671
8807
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
8672
8808
|
/**
|
|
8673
8809
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
8674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-set-size.md
|
|
8675
8811
|
*/
|
|
8676
8812
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
8677
8813
|
/**
|
|
8678
8814
|
* Prefer arrow function properties over methods with a single return.
|
|
8679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-short-arrow-method.md
|
|
8680
8816
|
*/
|
|
8681
8817
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
8682
8818
|
/**
|
|
8683
8819
|
* Prefer simple conditions first in logical expressions.
|
|
8684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-simple-condition-first.md
|
|
8685
8821
|
*/
|
|
8686
8822
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
8687
8823
|
/**
|
|
8688
8824
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
8689
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
8690
8826
|
*/
|
|
8691
8827
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
8692
8828
|
/**
|
|
8693
8829
|
* Prefer simplified conditions.
|
|
8694
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-simplified-conditions.md
|
|
8695
8831
|
*/
|
|
8696
8832
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
8697
8833
|
/**
|
|
8698
8834
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
8699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-single-array-predicate.md
|
|
8700
8836
|
*/
|
|
8701
8837
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
8702
8838
|
/**
|
|
8703
8839
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
8704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-single-call.md
|
|
8705
8841
|
*/
|
|
8706
8842
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
8707
8843
|
/**
|
|
8708
8844
|
* Prefer a single object destructuring declaration per local const source.
|
|
8709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
8710
8846
|
*/
|
|
8711
8847
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8712
8848
|
/**
|
|
8713
8849
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
8714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-single-replace.md
|
|
8715
8851
|
*/
|
|
8716
8852
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
8717
8853
|
/**
|
|
8718
8854
|
* Prefer declaring variables in the smallest possible scope.
|
|
8719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-smaller-scope.md
|
|
8720
8856
|
*/
|
|
8721
8857
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
8722
8858
|
/**
|
|
8723
8859
|
* Prefer `String#split()` with a limit.
|
|
8724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-split-limit.md
|
|
8725
8861
|
*/
|
|
8726
8862
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
8727
8863
|
/**
|
|
8728
8864
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
8729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-spread.md
|
|
8730
8866
|
*/
|
|
8731
8867
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
8732
8868
|
/**
|
|
8733
8869
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
8734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-match-all.md
|
|
8735
8871
|
*/
|
|
8736
8872
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
8737
8873
|
/**
|
|
8738
8874
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
8739
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
8740
8876
|
*/
|
|
8741
8877
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
8742
8878
|
/**
|
|
8743
8879
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
8744
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-raw.md
|
|
8745
8881
|
*/
|
|
8746
8882
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
8747
8883
|
/**
|
|
8748
8884
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
8749
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-repeat.md
|
|
8750
8886
|
*/
|
|
8751
8887
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
8752
8888
|
/**
|
|
8753
8889
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
8754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-replace-all.md
|
|
8755
8891
|
*/
|
|
8756
8892
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
8757
8893
|
/**
|
|
8758
8894
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
8759
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-slice.md
|
|
8760
8896
|
*/
|
|
8761
8897
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
8762
8898
|
/**
|
|
8763
8899
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
8764
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
8765
8901
|
*/
|
|
8766
8902
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
8767
8903
|
/**
|
|
8768
8904
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
8769
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
8770
8906
|
*/
|
|
8771
8907
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
8772
8908
|
/**
|
|
8773
8909
|
* Prefer using `structuredClone` to create a deep clone.
|
|
8774
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-structured-clone.md
|
|
8775
8911
|
*/
|
|
8776
8912
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
8777
8913
|
/**
|
|
8778
8914
|
* Prefer `switch` over multiple `else-if`.
|
|
8779
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8915
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-switch.md
|
|
8780
8916
|
*/
|
|
8781
8917
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
8782
8918
|
/**
|
|
8783
8919
|
* Prefer `Temporal` over `Date`.
|
|
8784
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8920
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-temporal.md
|
|
8785
8921
|
*/
|
|
8786
8922
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
8923
|
+
/**
|
|
8924
|
+
* Prefer direct Temporal conversion methods.
|
|
8925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-temporal-conversion.md
|
|
8926
|
+
*/
|
|
8927
|
+
'unicorn/prefer-temporal-conversion'?: Linter.RuleEntry<[]>;
|
|
8787
8928
|
/**
|
|
8788
8929
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
8789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8930
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-ternary.md
|
|
8790
8931
|
*/
|
|
8791
8932
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
8792
8933
|
/**
|
|
8793
8934
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
8794
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-then-catch.md
|
|
8795
8936
|
*/
|
|
8796
8937
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
8797
8938
|
/**
|
|
8798
8939
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
8799
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-toggle-attribute.md
|
|
8800
8941
|
*/
|
|
8801
8942
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
8802
8943
|
/**
|
|
8803
8944
|
* Prefer top-level await over top-level promises and async function calls.
|
|
8804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-top-level-await.md
|
|
8805
8946
|
*/
|
|
8806
8947
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
8807
8948
|
/**
|
|
8808
8949
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
8809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-type-error.md
|
|
8810
8951
|
*/
|
|
8811
8952
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
8812
8953
|
/**
|
|
8813
8954
|
* Require type literals to be last in union types.
|
|
8814
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-type-literal-last.md
|
|
8815
8956
|
*/
|
|
8816
8957
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
8817
8958
|
/**
|
|
8818
|
-
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over
|
|
8819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8959
|
+
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over legacy base64 conversions and manual postprocessing.
|
|
8960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-uint8array-base64.md
|
|
8820
8961
|
*/
|
|
8821
8962
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
8963
|
+
/**
|
|
8964
|
+
* Prefer `Uint8Array#toHex()` and `Uint8Array.fromHex()` over manual and Buffer hex conversions.
|
|
8965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-uint8array-hex.md
|
|
8966
|
+
*/
|
|
8967
|
+
'unicorn/prefer-uint8array-hex'?: Linter.RuleEntry<[]>;
|
|
8822
8968
|
/**
|
|
8823
8969
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
8824
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-unary-minus.md
|
|
8825
8971
|
*/
|
|
8826
8972
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
8827
8973
|
/**
|
|
8828
8974
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
8829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
8830
8976
|
*/
|
|
8831
8977
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
8832
8978
|
/**
|
|
8833
8979
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
8834
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-url-can-parse.md
|
|
8835
8981
|
*/
|
|
8836
8982
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
8837
8983
|
/**
|
|
8838
8984
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
8839
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8985
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-url-href.md
|
|
8840
8986
|
*/
|
|
8841
8987
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
8842
8988
|
/**
|
|
8843
8989
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
8844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8990
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-url-search-parameters.md
|
|
8845
8991
|
*/
|
|
8846
8992
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
8847
8993
|
/**
|
|
8848
8994
|
* Prefer putting the condition in the while statement.
|
|
8849
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-while-loop-condition.md
|
|
8850
8996
|
*/
|
|
8851
8997
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
8852
8998
|
/**
|
|
8853
8999
|
* Renamed to `unicorn/name-replacements`.
|
|
8854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9000
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
8855
9001
|
* @deprecated
|
|
8856
9002
|
*/
|
|
8857
9003
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
8858
9004
|
/**
|
|
8859
9005
|
* Enforce consistent relative URL style.
|
|
8860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/relative-url-style.md
|
|
8861
9007
|
*/
|
|
8862
9008
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
8863
9009
|
/**
|
|
8864
9010
|
* Enforce using the separator argument with `Array#join()`.
|
|
8865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-array-join-separator.md
|
|
8866
9012
|
*/
|
|
8867
9013
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
8868
9014
|
/**
|
|
8869
9015
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
8870
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-array-sort-compare.md
|
|
8871
9017
|
*/
|
|
8872
9018
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
8873
9019
|
/**
|
|
8874
9020
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
8875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9021
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-css-escape.md
|
|
8876
9022
|
*/
|
|
8877
9023
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
8878
9024
|
/**
|
|
8879
9025
|
* Require configured YAML frontmatter fields.
|
|
8880
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-frontmatter-fields.md
|
|
8881
9027
|
*/
|
|
8882
9028
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
8883
9029
|
/**
|
|
8884
9030
|
* Require non-empty module attributes for imports and exports
|
|
8885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-module-attributes.md
|
|
8886
9032
|
*/
|
|
8887
9033
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
8888
9034
|
/**
|
|
8889
9035
|
* Require non-empty specifier list in import and export statements.
|
|
8890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-module-specifiers.md
|
|
8891
9037
|
*/
|
|
8892
9038
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
8893
9039
|
/**
|
|
8894
9040
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
8895
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9041
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
8896
9042
|
*/
|
|
8897
9043
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
8898
9044
|
/**
|
|
8899
9045
|
* Require passive event listeners for high-frequency events.
|
|
8900
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9046
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-passive-events.md
|
|
8901
9047
|
*/
|
|
8902
9048
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
8903
9049
|
/**
|
|
8904
9050
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
8905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9051
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-post-message-target-origin.md
|
|
8906
9052
|
*/
|
|
8907
9053
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
8908
9054
|
/**
|
|
8909
9055
|
* Require boolean-returning Proxy traps to return booleans.
|
|
8910
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9056
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
8911
9057
|
*/
|
|
8912
9058
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8913
9059
|
/**
|
|
8914
9060
|
* Enforce a consistent style for single-line block comments.
|
|
8915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/single-line-block-comment-style.md
|
|
8916
9062
|
*/
|
|
8917
9063
|
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
8918
9064
|
/**
|
|
8919
9065
|
* Enforce better string content.
|
|
8920
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9066
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/string-content.md
|
|
8921
9067
|
*/
|
|
8922
9068
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
8923
9069
|
/**
|
|
8924
9070
|
* Enforce consistent brace style for `case` clauses.
|
|
8925
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9071
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/switch-case-braces.md
|
|
8926
9072
|
*/
|
|
8927
9073
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
8928
9074
|
/**
|
|
8929
9075
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
8930
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9076
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/switch-case-break-position.md
|
|
8931
9077
|
*/
|
|
8932
9078
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
8933
9079
|
/**
|
|
8934
9080
|
* Fix whitespace-insensitive template indentation.
|
|
8935
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/template-indent.md
|
|
8936
9082
|
*/
|
|
8937
9083
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
8938
9084
|
/**
|
|
8939
9085
|
* Enforce consistent case for text encoding identifiers.
|
|
8940
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9086
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/text-encoding-identifier-case.md
|
|
8941
9087
|
*/
|
|
8942
9088
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
8943
9089
|
/**
|
|
8944
9090
|
* Require `new` when creating an error.
|
|
8945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9091
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/throw-new-error.md
|
|
8946
9092
|
*/
|
|
8947
9093
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
8948
9094
|
/**
|
|
8949
9095
|
* Limit the complexity of `try` blocks.
|
|
8950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9096
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/try-complexity.md
|
|
8951
9097
|
*/
|
|
8952
9098
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
8953
9099
|
/**
|
|
@@ -9753,6 +9899,11 @@ interface RuleOptions {
|
|
|
9753
9899
|
* @see https://eslint.vuejs.org/rules/no-setup-props-reactivity-loss.html
|
|
9754
9900
|
*/
|
|
9755
9901
|
'vue/no-setup-props-reactivity-loss'?: Linter.RuleEntry<[]>;
|
|
9902
|
+
/**
|
|
9903
|
+
* disallow the use of event names that collide with native web event names
|
|
9904
|
+
* @see https://eslint.vuejs.org/rules/no-shadow-native-events.html
|
|
9905
|
+
*/
|
|
9906
|
+
'vue/no-shadow-native-events'?: Linter.RuleEntry<[]>;
|
|
9756
9907
|
/**
|
|
9757
9908
|
* enforce component's data property to be a function
|
|
9758
9909
|
* @see https://eslint.vuejs.org/rules/no-shared-component-data.html
|
|
@@ -10546,6 +10697,8 @@ type AngularTemplateButtonHasType = [] | [{
|
|
|
10546
10697
|
// ----- angular-template/click-events-have-key-events -----
|
|
10547
10698
|
type AngularTemplateClickEventsHaveKeyEvents = [] | [{
|
|
10548
10699
|
ignoreWithDirectives?: string[];
|
|
10700
|
+
requireKeyCode?: boolean;
|
|
10701
|
+
allowedKeyCodes?: string[];
|
|
10549
10702
|
}];
|
|
10550
10703
|
// ----- angular-template/conditional-complexity -----
|
|
10551
10704
|
type AngularTemplateConditionalComplexity = [] | [{
|
|
@@ -10604,8 +10757,8 @@ type AngularTemplateNoDuplicateAttributes = [] | [{
|
|
|
10604
10757
|
}];
|
|
10605
10758
|
// ----- angular-template/no-inline-styles -----
|
|
10606
10759
|
type AngularTemplateNoInlineStyles = [] | [{
|
|
10607
|
-
allowNgStyle?: boolean;
|
|
10608
|
-
allowBindToStyle?: boolean;
|
|
10760
|
+
allowNgStyle?: (boolean | "dynamic");
|
|
10761
|
+
allowBindToStyle?: (boolean | "dynamic");
|
|
10609
10762
|
}];
|
|
10610
10763
|
// ----- angular-template/no-interpolation-in-attributes -----
|
|
10611
10764
|
type AngularTemplateNoInterpolationInAttributes = [] | [{
|
|
@@ -10687,6 +10840,10 @@ type AngularDirectiveSelector = [] | [({
|
|
|
10687
10840
|
prefix?: (string | unknown[]);
|
|
10688
10841
|
style: ("camelCase" | "kebab-case");
|
|
10689
10842
|
}])];
|
|
10843
|
+
// ----- angular/inject-at-top -----
|
|
10844
|
+
type AngularInjectAtTop = [] | [{
|
|
10845
|
+
additionalInjectFunctions?: string[];
|
|
10846
|
+
}];
|
|
10690
10847
|
// ----- angular/no-input-prefix -----
|
|
10691
10848
|
type AngularNoInputPrefix = [] | [{
|
|
10692
10849
|
prefixes?: string[];
|
|
@@ -10703,6 +10860,10 @@ type AngularPipePrefix = [] | [{
|
|
|
10703
10860
|
type AngularPreferOnPushComponentChangeDetection = [] | [{
|
|
10704
10861
|
allowExplicitOnPush?: boolean;
|
|
10705
10862
|
}];
|
|
10863
|
+
// ----- angular/prefer-signal-model -----
|
|
10864
|
+
type AngularPreferSignalModel = [] | [{
|
|
10865
|
+
useTypeChecking?: boolean;
|
|
10866
|
+
}];
|
|
10706
10867
|
// ----- angular/prefer-signals -----
|
|
10707
10868
|
type AngularPreferSignals = [] | [{
|
|
10708
10869
|
preferReadonlySignalProperties?: boolean;
|
|
@@ -10711,6 +10872,10 @@ type AngularPreferSignals = [] | [{
|
|
|
10711
10872
|
useTypeChecking?: boolean;
|
|
10712
10873
|
additionalSignalCreationFunctions?: string[];
|
|
10713
10874
|
}];
|
|
10875
|
+
// ----- angular/reactive-context-must-read-signal -----
|
|
10876
|
+
type AngularReactiveContextMustReadSignal = [] | [{
|
|
10877
|
+
checkResources?: boolean;
|
|
10878
|
+
}];
|
|
10714
10879
|
// ----- angular/require-localize-metadata -----
|
|
10715
10880
|
type AngularRequireLocalizeMetadata = [] | [{
|
|
10716
10881
|
requireDescription?: boolean;
|
|
@@ -10721,12 +10886,15 @@ type AngularRequireLocalizeMetadata = [] | [{
|
|
|
10721
10886
|
type AngularSortKeysInTypeDecorator = [] | [{
|
|
10722
10887
|
Component?: string[];
|
|
10723
10888
|
Directive?: string[];
|
|
10889
|
+
Injectable?: string[];
|
|
10724
10890
|
NgModule?: string[];
|
|
10725
10891
|
Pipe?: string[];
|
|
10892
|
+
allowUnconfiguredProperties?: boolean;
|
|
10726
10893
|
}];
|
|
10727
10894
|
// ----- angular/use-injectable-provided-in -----
|
|
10728
10895
|
type AngularUseInjectableProvidedIn = [] | [{
|
|
10729
10896
|
ignoreClassNamePattern?: string;
|
|
10897
|
+
allowProvidedInNull?: boolean;
|
|
10730
10898
|
}];
|
|
10731
10899
|
// ----- antfu/consistent-chaining -----
|
|
10732
10900
|
type AntfuConsistentChaining = [] | [{
|
|
@@ -11110,10 +11278,12 @@ type EslintCommentsDisableEnablePair = [] | [{
|
|
|
11110
11278
|
type EslintCommentsNoRestrictedDisable = string[];
|
|
11111
11279
|
// ----- eslint-comments/no-use -----
|
|
11112
11280
|
type EslintCommentsNoUse = [] | [{
|
|
11113
|
-
|
|
11281
|
+
additionalDirectives?: string[];
|
|
11282
|
+
allow?: string[];
|
|
11114
11283
|
}];
|
|
11115
11284
|
// ----- eslint-comments/require-description -----
|
|
11116
11285
|
type EslintCommentsRequireDescription = [] | [{
|
|
11286
|
+
additionalDirectives?: string[];
|
|
11117
11287
|
ignore?: ("eslint" | "eslint-disable" | "eslint-disable-line" | "eslint-disable-next-line" | "eslint-enable" | "eslint-env" | "exported" | "global" | "globals")[];
|
|
11118
11288
|
}];
|
|
11119
11289
|
// ----- format/dprint -----
|
|
@@ -11518,6 +11688,8 @@ type JsdocNoUndefinedTypes = [] | [{
|
|
|
11518
11688
|
// ----- jsdoc/no-unnecessary-type-assertion -----
|
|
11519
11689
|
type JsdocNoUnnecessaryTypeAssertion = [] | [{
|
|
11520
11690
|
checkLiteralConstAssertions?: boolean;
|
|
11691
|
+
enableFixer?: boolean;
|
|
11692
|
+
preferConstToLiteralTuples?: boolean;
|
|
11521
11693
|
treatAnyAsRedundant?: boolean;
|
|
11522
11694
|
typesToIgnore?: string[];
|
|
11523
11695
|
}];
|
|
@@ -11794,6 +11966,22 @@ type JsdocTextEscaping = [] | [{
|
|
|
11794
11966
|
escapeHTML?: boolean;
|
|
11795
11967
|
escapeMarkdown?: boolean;
|
|
11796
11968
|
}];
|
|
11969
|
+
// ----- jsdoc/ts-ban-ts-comment -----
|
|
11970
|
+
type JsdocTsBanTsComment = [] | [{
|
|
11971
|
+
minimumDescriptionLength?: number;
|
|
11972
|
+
"ts-check"?: (boolean | "allow-with-description" | {
|
|
11973
|
+
descriptionFormat?: string;
|
|
11974
|
+
});
|
|
11975
|
+
"ts-expect-error"?: (boolean | "allow-with-description" | {
|
|
11976
|
+
descriptionFormat?: string;
|
|
11977
|
+
});
|
|
11978
|
+
"ts-ignore"?: (boolean | "allow-with-description" | {
|
|
11979
|
+
descriptionFormat?: string;
|
|
11980
|
+
});
|
|
11981
|
+
"ts-nocheck"?: (boolean | "allow-with-description" | {
|
|
11982
|
+
descriptionFormat?: string;
|
|
11983
|
+
});
|
|
11984
|
+
}];
|
|
11797
11985
|
// ----- jsdoc/ts-method-signature-style -----
|
|
11798
11986
|
type JsdocTsMethodSignatureStyle = [] | [("method" | "property")] | [("method" | "property"), {
|
|
11799
11987
|
enableFixer?: boolean;
|
|
@@ -14882,10 +15070,6 @@ type PerfectionistSortImports = {
|
|
|
14882
15070
|
sortBy?: ("specifier" | "path");
|
|
14883
15071
|
})[];
|
|
14884
15072
|
newlinesBetween?: ("ignore" | number);
|
|
14885
|
-
tsconfig?: {
|
|
14886
|
-
rootDir: string;
|
|
14887
|
-
filename?: string;
|
|
14888
|
-
};
|
|
14889
15073
|
maxLineLength?: number;
|
|
14890
15074
|
sortSideEffects?: boolean;
|
|
14891
15075
|
environment?: ("node" | "bun");
|
|
@@ -14920,6 +15104,10 @@ type PerfectionistSortImports = {
|
|
|
14920
15104
|
pattern: string;
|
|
14921
15105
|
flags?: string;
|
|
14922
15106
|
} | string));
|
|
15107
|
+
tsconfig?: {
|
|
15108
|
+
rootDir: string;
|
|
15109
|
+
filename?: string;
|
|
15110
|
+
};
|
|
14923
15111
|
}[];
|
|
14924
15112
|
// ----- perfectionist/sort-interfaces -----
|
|
14925
15113
|
type PerfectionistSortInterfaces = {
|
|
@@ -15504,6 +15692,7 @@ type PerfectionistSortModules = [] | [{
|
|
|
15504
15692
|
order?: ("asc" | "desc");
|
|
15505
15693
|
})[];
|
|
15506
15694
|
newlinesBetween?: ("ignore" | number);
|
|
15695
|
+
additionalModuleBlockTypes?: string[];
|
|
15507
15696
|
useExperimentalDependencyDetection?: boolean;
|
|
15508
15697
|
newlinesBetweenOverloadSignatures?: ("ignore" | number);
|
|
15509
15698
|
partitionByComment?: (boolean | (({
|
|
@@ -15529,6 +15718,10 @@ type PerfectionistSortModules = [] | [{
|
|
|
15529
15718
|
} | string)));
|
|
15530
15719
|
});
|
|
15531
15720
|
partitionByNewLine?: boolean;
|
|
15721
|
+
tsconfig?: {
|
|
15722
|
+
rootDir: string;
|
|
15723
|
+
filename?: string;
|
|
15724
|
+
};
|
|
15532
15725
|
}];
|
|
15533
15726
|
// ----- perfectionist/sort-named-exports -----
|
|
15534
15727
|
type PerfectionistSortNamedExports = {
|
|
@@ -16057,6 +16250,13 @@ type PerfectionistSortObjects = {
|
|
|
16057
16250
|
partitionByComputedKey?: boolean;
|
|
16058
16251
|
styledComponents?: boolean;
|
|
16059
16252
|
useExperimentalDependencyDetection?: boolean;
|
|
16253
|
+
ignoreCallbackDependenciesPatterns?: (({
|
|
16254
|
+
pattern: string;
|
|
16255
|
+
flags?: string;
|
|
16256
|
+
} | string)[] | ({
|
|
16257
|
+
pattern: string;
|
|
16258
|
+
flags?: string;
|
|
16259
|
+
} | string));
|
|
16060
16260
|
partitionByComment?: (boolean | (({
|
|
16061
16261
|
pattern: string;
|
|
16062
16262
|
flags?: string;
|
|
@@ -16392,6 +16592,13 @@ type PerfectionistSortVariableDeclarations = {
|
|
|
16392
16592
|
matchesAstSelector?: string;
|
|
16393
16593
|
};
|
|
16394
16594
|
useExperimentalDependencyDetection?: boolean;
|
|
16595
|
+
ignoreCallbackDependenciesPatterns?: (({
|
|
16596
|
+
pattern: string;
|
|
16597
|
+
flags?: string;
|
|
16598
|
+
} | string)[] | ({
|
|
16599
|
+
pattern: string;
|
|
16600
|
+
flags?: string;
|
|
16601
|
+
} | string));
|
|
16395
16602
|
partitionByComment?: (boolean | (({
|
|
16396
16603
|
pattern: string;
|
|
16397
16604
|
flags?: string;
|
|
@@ -16528,6 +16735,7 @@ type ReactRefreshOnlyExportComponents = [] | [{
|
|
|
16528
16735
|
extraHOCs?: string[];
|
|
16529
16736
|
allowExportNames?: string[];
|
|
16530
16737
|
allowConstantExport?: boolean;
|
|
16738
|
+
allowCompoundComponents?: boolean;
|
|
16531
16739
|
checkJS?: boolean;
|
|
16532
16740
|
}];
|
|
16533
16741
|
// ----- react/dom-no-unknown-property -----
|
|
@@ -19146,7 +19354,9 @@ type TsNoMeaninglessVoidOperator = [] | [{
|
|
|
19146
19354
|
}];
|
|
19147
19355
|
// ----- ts/no-misused-promises -----
|
|
19148
19356
|
type TsNoMisusedPromises = [] | [{
|
|
19149
|
-
checksConditionals?: boolean
|
|
19357
|
+
checksConditionals?: (boolean | {
|
|
19358
|
+
flagUnions?: ("all" | "strict" | "none");
|
|
19359
|
+
});
|
|
19150
19360
|
checksSpreads?: boolean;
|
|
19151
19361
|
checksVoidReturn?: (boolean | {
|
|
19152
19362
|
arguments?: boolean;
|
|
@@ -19660,6 +19870,9 @@ type UnicornFilenameCase = [] | [({
|
|
|
19660
19870
|
})[];
|
|
19661
19871
|
multipleFileExtensions?: boolean;
|
|
19662
19872
|
checkDirectories?: boolean;
|
|
19873
|
+
directoryRoots?: (string | {
|
|
19874
|
+
[k: string]: unknown | undefined;
|
|
19875
|
+
})[];
|
|
19663
19876
|
} | {
|
|
19664
19877
|
cases?: {
|
|
19665
19878
|
camelCase?: boolean;
|
|
@@ -19673,6 +19886,9 @@ type UnicornFilenameCase = [] | [({
|
|
|
19673
19886
|
})[];
|
|
19674
19887
|
multipleFileExtensions?: boolean;
|
|
19675
19888
|
checkDirectories?: boolean;
|
|
19889
|
+
directoryRoots?: (string | {
|
|
19890
|
+
[k: string]: unknown | undefined;
|
|
19891
|
+
})[];
|
|
19676
19892
|
})];
|
|
19677
19893
|
// ----- unicorn/id-match -----
|
|
19678
19894
|
type UnicornIdMatch = [] | [string] | [string, {
|
|
@@ -19759,10 +19975,22 @@ type UnicornNoArrayReverse = [] | [{
|
|
|
19759
19975
|
type UnicornNoArraySort = [] | [{
|
|
19760
19976
|
allowExpressionStatement?: boolean;
|
|
19761
19977
|
}];
|
|
19978
|
+
// ----- unicorn/no-break-in-nested-loop -----
|
|
19979
|
+
type UnicornNoBreakInNestedLoop = [] | [{
|
|
19980
|
+
checkContinue?: boolean;
|
|
19981
|
+
}];
|
|
19982
|
+
// ----- unicorn/no-deprecated-css-features -----
|
|
19983
|
+
type UnicornNoDeprecatedCssFeatures = [] | [{
|
|
19984
|
+
allow?: string[];
|
|
19985
|
+
}];
|
|
19762
19986
|
// ----- unicorn/no-empty-file -----
|
|
19763
19987
|
type UnicornNoEmptyFile = [] | [{
|
|
19764
19988
|
allowComments?: boolean;
|
|
19765
19989
|
}];
|
|
19990
|
+
// ----- unicorn/no-immediate-mutation -----
|
|
19991
|
+
type UnicornNoImmediateMutation = [] | [{
|
|
19992
|
+
checkConditionals?: boolean;
|
|
19993
|
+
}];
|
|
19766
19994
|
// ----- unicorn/no-instanceof-builtins -----
|
|
19767
19995
|
type UnicornNoInstanceofBuiltins = [] | [{
|
|
19768
19996
|
useErrorIsError?: boolean;
|
|
@@ -19803,6 +20031,10 @@ type UnicornNoNull = [] | [{
|
|
|
19803
20031
|
type UnicornNoTypeofUndefined = [] | [{
|
|
19804
20032
|
checkGlobalVariables?: boolean;
|
|
19805
20033
|
}];
|
|
20034
|
+
// ----- unicorn/no-unknown-pseudo-selectors -----
|
|
20035
|
+
type UnicornNoUnknownPseudoSelectors = [] | [{
|
|
20036
|
+
allow?: string[];
|
|
20037
|
+
}];
|
|
19806
20038
|
// ----- unicorn/no-unnecessary-polyfills -----
|
|
19807
20039
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
19808
20040
|
targets?: (string | string[] | {
|
|
@@ -19813,6 +20045,10 @@ type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
|
19813
20045
|
type UnicornNoUnreadableArrayDestructuring = [] | [{
|
|
19814
20046
|
maximumIgnoredElements?: number;
|
|
19815
20047
|
}];
|
|
20048
|
+
// ----- unicorn/no-unscoped-css-nesting-selector -----
|
|
20049
|
+
type UnicornNoUnscopedCssNestingSelector = [] | [{
|
|
20050
|
+
scopingRootAtRules?: string[];
|
|
20051
|
+
}];
|
|
19816
20052
|
// ----- unicorn/no-useless-undefined -----
|
|
19817
20053
|
type UnicornNoUselessUndefined = [] | [{
|
|
19818
20054
|
checkArguments?: boolean;
|
|
@@ -19866,9 +20102,14 @@ type UnicornPreferAt = [] | [{
|
|
|
19866
20102
|
getLastElementFunctions?: string[];
|
|
19867
20103
|
checkAllIndexAccess?: boolean;
|
|
19868
20104
|
}];
|
|
20105
|
+
// ----- unicorn/prefer-combined-guards -----
|
|
20106
|
+
type UnicornPreferCombinedGuards = [] | [{
|
|
20107
|
+
checkCompoundConditions?: boolean;
|
|
20108
|
+
}];
|
|
19869
20109
|
// ----- unicorn/prefer-continue -----
|
|
19870
20110
|
type UnicornPreferContinue = [] | [{
|
|
19871
20111
|
maximumStatements?: number;
|
|
20112
|
+
checkShortBodies?: boolean;
|
|
19872
20113
|
}];
|
|
19873
20114
|
// ----- unicorn/prefer-dom-node-html-methods -----
|
|
19874
20115
|
type UnicornPreferDomNodeHtmlMethods = [] | [{
|
|
@@ -19878,6 +20119,7 @@ type UnicornPreferDomNodeHtmlMethods = [] | [{
|
|
|
19878
20119
|
// ----- unicorn/prefer-early-return -----
|
|
19879
20120
|
type UnicornPreferEarlyReturn = [] | [{
|
|
19880
20121
|
maximumStatements?: number;
|
|
20122
|
+
checkShortBodies?: boolean;
|
|
19881
20123
|
}];
|
|
19882
20124
|
// ----- unicorn/prefer-explicit-viewport-units -----
|
|
19883
20125
|
type UnicornPreferExplicitViewportUnits = [] | [{
|
|
@@ -20885,7 +21127,7 @@ type VueNoDeprecatedSlotAttribute = [] | [{
|
|
|
20885
21127
|
}];
|
|
20886
21128
|
// ----- vue/no-dupe-keys -----
|
|
20887
21129
|
type VueNoDupeKeys = [] | [{
|
|
20888
|
-
groups?:
|
|
21130
|
+
groups?: string[];
|
|
20889
21131
|
}];
|
|
20890
21132
|
// ----- vue/no-duplicate-attr-inheritance -----
|
|
20891
21133
|
type VueNoDuplicateAttrInheritance = [] | [{
|
|
@@ -21015,8 +21257,8 @@ type VueNoReservedComponentNames = [] | [{
|
|
|
21015
21257
|
}];
|
|
21016
21258
|
// ----- vue/no-reserved-keys -----
|
|
21017
21259
|
type VueNoReservedKeys = [] | [{
|
|
21018
|
-
reserved?:
|
|
21019
|
-
groups?:
|
|
21260
|
+
reserved?: string[];
|
|
21261
|
+
groups?: string[];
|
|
21020
21262
|
}];
|
|
21021
21263
|
// ----- vue/no-reserved-props -----
|
|
21022
21264
|
type VueNoReservedProps = [] | [{
|
|
@@ -21104,7 +21346,7 @@ type VueNoTemplateTargetBlank = [] | [{
|
|
|
21104
21346
|
}];
|
|
21105
21347
|
// ----- vue/no-undef-components -----
|
|
21106
21348
|
type VueNoUndefComponents = [] | [{
|
|
21107
|
-
ignorePatterns?:
|
|
21349
|
+
ignorePatterns?: string[];
|
|
21108
21350
|
}];
|
|
21109
21351
|
// ----- vue/no-undef-directives -----
|
|
21110
21352
|
type VueNoUndefDirectives = [] | [{
|
|
@@ -21238,7 +21480,7 @@ type VueOperatorLinebreak = [] | [(("after" | "before" | "none") | null)] | [(("
|
|
|
21238
21480
|
}];
|
|
21239
21481
|
// ----- vue/order-in-components -----
|
|
21240
21482
|
type VueOrderInComponents = [] | [{
|
|
21241
|
-
order?:
|
|
21483
|
+
order?: (string | string[])[];
|
|
21242
21484
|
}];
|
|
21243
21485
|
// ----- vue/padding-line-between-blocks -----
|
|
21244
21486
|
type VuePaddingLineBetweenBlocks = [] | [("never" | "always")];
|
|
@@ -21327,8 +21569,8 @@ type VueSlotNameCasing = [] | [("camelCase" | "kebab-case" | "singleword")];
|
|
|
21327
21569
|
// ----- vue/sort-keys -----
|
|
21328
21570
|
type VueSortKeys = [] | [("asc" | "desc")] | [("asc" | "desc"), {
|
|
21329
21571
|
caseSensitive?: boolean;
|
|
21330
|
-
ignoreChildrenOf?:
|
|
21331
|
-
ignoreGrandchildrenOf?:
|
|
21572
|
+
ignoreChildrenOf?: string[];
|
|
21573
|
+
ignoreGrandchildrenOf?: string[];
|
|
21332
21574
|
minKeys?: number;
|
|
21333
21575
|
natural?: boolean;
|
|
21334
21576
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -21388,7 +21630,7 @@ type VueValidVFor = [] | [{
|
|
|
21388
21630
|
}];
|
|
21389
21631
|
// ----- vue/valid-v-on -----
|
|
21390
21632
|
type VueValidVOn = [] | [{
|
|
21391
|
-
modifiers?:
|
|
21633
|
+
modifiers?: string[];
|
|
21392
21634
|
}];
|
|
21393
21635
|
// ----- vue/valid-v-slot -----
|
|
21394
21636
|
type VueValidVSlot = [] | [{
|
|
@@ -21635,7 +21877,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
21635
21877
|
onlyEquality?: boolean;
|
|
21636
21878
|
}];
|
|
21637
21879
|
// Names of all the configs
|
|
21638
|
-
type ConfigNames = 'config/gitignore' | 'config/ignores' | 'config/javascript/setup' | 'config/javascript/rules' | 'config/eslint-comments/rules' | 'config/node/setup' | 'config/node/rules' | 'config/jsdoc/setup' | 'config/jsdoc/rules' | 'config/imports/rules' | 'config/command/rules' | 'config/perfectionist/setup' | 'config/node/setup' | 'config/node/rules' | 'config/jsdoc/setup' | 'config/jsdoc/rules' | 'config/imports/rules' | 'config/unicorn/setup' | 'config/unicorn/rules' | 'config/jsx/setup' | 'config/typescript/setup' | 'config/typescript/parser' | 'config/typescript/type-aware-parser' | 'config/typescript/rules' | 'config/typescript/rules-type-aware' | 'config/typescript/erasable-syntax-only' | 'config/stylistic/rules' | 'config/regexp/rules' | 'config/test/setup' | 'config/test/rules' | 'config/vue/setup' | 'config/vue/rules' | 'config/react/setup' | 'config/react/rules' | 'config/react/typescript' | 'config/react/type-aware-rules' | 'config/nextjs/setup' | 'config/nextjs/rules' | 'config/solid/setup' | 'config/solid/rules' | 'config/svelte/setup' | 'config/svelte/rules' | 'config/unocss/rules' | 'config/astro/setup' | 'config/astro/rules' | 'antfu/angular/setup' | 'antfu/angular/rules/ts' | 'antfu/angular/rules/template' | 'config/jsonc/setup' | 'config/jsonc/rules' | 'config/sort/package-json' | 'config/sort/tsconfig-json' | 'config/pnpm/package-json' | 'config/pnpm/pnpm-workspace-yaml' | 'config/pnpm/pnpm-workspace-yaml-sort' | 'config/yaml/setup' | 'config/yaml/rules' | 'config/toml/setup' | 'config/toml/rules' | 'config/markdown/setup' | 'config/markdown/processor' | 'config/markdown/parser' | 'config/markdown/rules' | 'config/markdown/disables/code' | 'config/
|
|
21880
|
+
type ConfigNames = 'config/gitignore' | 'config/ignores' | 'config/javascript/setup' | 'config/javascript/rules' | 'config/eslint-comments/rules' | 'config/node/setup' | 'config/node/rules' | 'config/jsdoc/setup' | 'config/jsdoc/rules' | 'config/imports/rules' | 'config/command/rules' | 'config/perfectionist/setup' | 'config/node/setup' | 'config/node/rules' | 'config/jsdoc/setup' | 'config/jsdoc/rules' | 'config/imports/rules' | 'config/unicorn/setup' | 'config/unicorn/rules' | 'config/jsx/setup' | 'config/typescript/setup' | 'config/typescript/parser' | 'config/typescript/type-aware-parser' | 'config/typescript/rules' | 'config/typescript/rules-type-aware' | 'config/typescript/erasable-syntax-only' | 'config/stylistic/rules' | 'config/regexp/rules' | 'config/test/setup' | 'config/test/rules' | 'config/vue/setup' | 'config/vue/rules' | 'config/react/setup' | 'config/react/rules' | 'config/react/typescript' | 'config/react/type-aware-rules' | 'config/nextjs/setup' | 'config/nextjs/rules' | 'config/solid/setup' | 'config/solid/rules' | 'config/svelte/setup' | 'config/svelte/rules' | 'config/unocss/rules' | 'config/astro/setup' | 'config/astro/rules' | 'antfu/angular/setup' | 'antfu/angular/rules/ts' | 'antfu/angular/rules/template' | 'config/jsonc/setup' | 'config/jsonc/rules' | 'config/sort/package-json' | 'config/sort/tsconfig-json' | 'config/pnpm/package-json' | 'config/pnpm/pnpm-workspace-yaml' | 'config/pnpm/pnpm-workspace-yaml-stylistic' | 'config/pnpm/pnpm-workspace-yaml-sort' | 'config/yaml/setup' | 'config/yaml/rules' | 'config/toml/setup' | 'config/toml/rules' | 'config/markdown/setup' | 'config/markdown/processor' | 'config/markdown/parser' | 'config/markdown/rules' | 'config/markdown/disables/code' | 'config/formatter/setup' | 'config/formatter/css' | 'config/formatter/scss' | 'config/formatter/less' | 'config/formatter/html' | 'config/formatter/xml' | 'config/formatter/svg' | 'config/formatter/markdown' | 'config/formatter/astro' | 'config/formatter/astro/disables' | 'config/formatter/graphql' | 'config/disables/scripts' | 'config/disables/cli' | 'config/disables/bin' | 'config/disables/dts' | 'config/disables/cjs' | 'config/disables/config-files';
|
|
21639
21881
|
//#endregion
|
|
21640
21882
|
//#region src/vender/prettier-types.d.ts
|
|
21641
21883
|
/**
|
|
@@ -21709,7 +21951,7 @@ interface VendoredPrettierOptionsRequired {
|
|
|
21709
21951
|
/**
|
|
21710
21952
|
* Provide ability to support new languages to prettier.
|
|
21711
21953
|
*/
|
|
21712
|
-
plugins: Array<string |
|
|
21954
|
+
plugins: Array<string | Record<string, unknown>>;
|
|
21713
21955
|
/**
|
|
21714
21956
|
* How to handle whitespaces in HTML.
|
|
21715
21957
|
* @default "css"
|
|
@@ -21758,14 +22000,14 @@ interface VendoredPrettierOptionsRequired {
|
|
|
21758
22000
|
}
|
|
21759
22001
|
//#endregion
|
|
21760
22002
|
//#region src/types.d.ts
|
|
21761
|
-
type Awaitable<T> = T | Promise<T>;
|
|
21762
|
-
type Rules = Record<string, Linter.RuleEntry<any> | undefined> & RuleOptions;
|
|
22003
|
+
export type Awaitable<T> = T | Promise<T>;
|
|
22004
|
+
export type Rules = Record<string, Linter.RuleEntry<any> | undefined> & RuleOptions;
|
|
21763
22005
|
/**
|
|
21764
22006
|
* An updated version of ESLint's `Linter.Config`, which provides autocompletion
|
|
21765
22007
|
* for `rules` and relaxes type limitations for `plugins` and `rules`, because
|
|
21766
22008
|
* many plugins still lack proper type definitions.
|
|
21767
22009
|
*/
|
|
21768
|
-
type TypedFlatConfigItem = Omit<ConfigWithExtends, "plugins" | "rules"> & {
|
|
22010
|
+
export type TypedFlatConfigItem = Omit<ConfigWithExtends, "plugins" | "rules"> & {
|
|
21769
22011
|
/**
|
|
21770
22012
|
* An object containing a name-value mapping of plugin names to plugin objects.
|
|
21771
22013
|
* When `files` is specified, these plugins are only available to the matching files.
|
|
@@ -21779,13 +22021,13 @@ type TypedFlatConfigItem = Omit<ConfigWithExtends, "plugins" | "rules"> & {
|
|
|
21779
22021
|
*/
|
|
21780
22022
|
rules?: Rules;
|
|
21781
22023
|
};
|
|
21782
|
-
interface OptionsFiles {
|
|
22024
|
+
export interface OptionsFiles {
|
|
21783
22025
|
/**
|
|
21784
22026
|
* Override the `files` option to provide custom globs.
|
|
21785
22027
|
*/
|
|
21786
22028
|
files?: string[];
|
|
21787
22029
|
}
|
|
21788
|
-
interface OptionsVue extends OptionsOverrides {
|
|
22030
|
+
export interface OptionsVue extends OptionsOverrides {
|
|
21789
22031
|
/**
|
|
21790
22032
|
* Create virtual files for Vue SFC blocks to enable linting.
|
|
21791
22033
|
*
|
|
@@ -21807,8 +22049,8 @@ interface OptionsVue extends OptionsOverrides {
|
|
|
21807
22049
|
*/
|
|
21808
22050
|
a11y?: boolean;
|
|
21809
22051
|
}
|
|
21810
|
-
interface OptionsJSXA11y extends OptionsOverrides {}
|
|
21811
|
-
interface OptionsJSX {
|
|
22052
|
+
export interface OptionsJSXA11y extends OptionsOverrides {}
|
|
22053
|
+
export interface OptionsJSX {
|
|
21812
22054
|
/**
|
|
21813
22055
|
* Enable JSX accessibility rules.
|
|
21814
22056
|
*
|
|
@@ -21820,8 +22062,8 @@ interface OptionsJSX {
|
|
|
21820
22062
|
*/
|
|
21821
22063
|
a11y?: boolean | OptionsJSXA11y;
|
|
21822
22064
|
}
|
|
21823
|
-
type OptionsTypescript = (OptionsTypeScriptWithTypes & OptionsOverrides & OptionsTypeScriptErasableOnly) | (OptionsTypeScriptParserOptions & OptionsOverrides & OptionsTypeScriptErasableOnly);
|
|
21824
|
-
interface OptionsFormatters {
|
|
22065
|
+
export type OptionsTypescript = (OptionsTypeScriptWithTypes & OptionsOverrides & OptionsTypeScriptErasableOnly) | (OptionsTypeScriptParserOptions & OptionsOverrides & OptionsTypeScriptErasableOnly);
|
|
22066
|
+
export interface OptionsFormatters {
|
|
21825
22067
|
/**
|
|
21826
22068
|
* Enable formatting support for CSS, Less, Sass, and SCSS.
|
|
21827
22069
|
*
|
|
@@ -21877,7 +22119,7 @@ interface OptionsFormatters {
|
|
|
21877
22119
|
*/
|
|
21878
22120
|
astro?: "prettier" | boolean;
|
|
21879
22121
|
}
|
|
21880
|
-
interface OptionsComponentExts {
|
|
22122
|
+
export interface OptionsComponentExts {
|
|
21881
22123
|
/**
|
|
21882
22124
|
* Additional extensions for components.
|
|
21883
22125
|
*
|
|
@@ -21886,7 +22128,7 @@ interface OptionsComponentExts {
|
|
|
21886
22128
|
*/
|
|
21887
22129
|
componentExts?: string[];
|
|
21888
22130
|
}
|
|
21889
|
-
interface OptionsE18e extends OptionsOverrides {
|
|
22131
|
+
export interface OptionsE18e extends OptionsOverrides {
|
|
21890
22132
|
/**
|
|
21891
22133
|
* Include modernization rules
|
|
21892
22134
|
*
|
|
@@ -21909,7 +22151,7 @@ interface OptionsE18e extends OptionsOverrides {
|
|
|
21909
22151
|
*/
|
|
21910
22152
|
performanceImprovements?: boolean;
|
|
21911
22153
|
}
|
|
21912
|
-
interface OptionsUnicorn extends OptionsOverrides {
|
|
22154
|
+
export interface OptionsUnicorn extends OptionsOverrides {
|
|
21913
22155
|
/**
|
|
21914
22156
|
* Include all rules recommended by `eslint-plugin-unicorn`, instead of only ones picked by Anthony.
|
|
21915
22157
|
*
|
|
@@ -21917,7 +22159,7 @@ interface OptionsUnicorn extends OptionsOverrides {
|
|
|
21917
22159
|
*/
|
|
21918
22160
|
allRecommended?: boolean;
|
|
21919
22161
|
}
|
|
21920
|
-
interface OptionsMarkdown extends OptionsOverrides {
|
|
22162
|
+
export interface OptionsMarkdown extends OptionsOverrides {
|
|
21921
22163
|
/**
|
|
21922
22164
|
* Enable GFM (GitHub Flavored Markdown) support.
|
|
21923
22165
|
*
|
|
@@ -21929,7 +22171,7 @@ interface OptionsMarkdown extends OptionsOverrides {
|
|
|
21929
22171
|
*/
|
|
21930
22172
|
overridesMarkdown?: TypedFlatConfigItem["rules"];
|
|
21931
22173
|
}
|
|
21932
|
-
interface OptionsTypeScriptParserOptions {
|
|
22174
|
+
export interface OptionsTypeScriptParserOptions {
|
|
21933
22175
|
/**
|
|
21934
22176
|
* Additional parser options for TypeScript.
|
|
21935
22177
|
*/
|
|
@@ -21945,7 +22187,7 @@ interface OptionsTypeScriptParserOptions {
|
|
|
21945
22187
|
*/
|
|
21946
22188
|
ignoresTypeAware?: string[];
|
|
21947
22189
|
}
|
|
21948
|
-
interface OptionsTypeScriptWithTypes {
|
|
22190
|
+
export interface OptionsTypeScriptWithTypes {
|
|
21949
22191
|
/**
|
|
21950
22192
|
* When this options is provided, type aware rules will be enabled.
|
|
21951
22193
|
* @see https://typescript-eslint.io/linting/typed-linting/
|
|
@@ -21956,20 +22198,20 @@ interface OptionsTypeScriptWithTypes {
|
|
|
21956
22198
|
*/
|
|
21957
22199
|
overridesTypeAware?: TypedFlatConfigItem["rules"];
|
|
21958
22200
|
}
|
|
21959
|
-
interface OptionsHasTypeScript {
|
|
22201
|
+
export interface OptionsHasTypeScript {
|
|
21960
22202
|
typescript?: boolean;
|
|
21961
22203
|
}
|
|
21962
|
-
interface OptionsStylistic {
|
|
22204
|
+
export interface OptionsStylistic {
|
|
21963
22205
|
stylistic?: boolean | StylisticConfig;
|
|
21964
22206
|
}
|
|
21965
|
-
interface OptionsStylistic {
|
|
22207
|
+
export interface OptionsStylistic {
|
|
21966
22208
|
stylistic?: boolean | StylisticConfig;
|
|
21967
22209
|
}
|
|
21968
|
-
interface StylisticConfig extends Pick<StylisticCustomizeOptions, "indent" | "quotes" | "jsx" | "semi" | "braceStyle" | "experimental"> {}
|
|
21969
|
-
interface OptionsOverrides {
|
|
22210
|
+
export interface StylisticConfig extends Pick<StylisticCustomizeOptions, "indent" | "quotes" | "jsx" | "semi" | "braceStyle" | "experimental"> {}
|
|
22211
|
+
export interface OptionsOverrides {
|
|
21970
22212
|
overrides?: TypedFlatConfigItem["rules"];
|
|
21971
22213
|
}
|
|
21972
|
-
interface OptionsProjectType {
|
|
22214
|
+
export interface OptionsProjectType {
|
|
21973
22215
|
/**
|
|
21974
22216
|
* Type of the project. `lib` will enable more strict rules for libraries.
|
|
21975
22217
|
*
|
|
@@ -21977,7 +22219,7 @@ interface OptionsProjectType {
|
|
|
21977
22219
|
*/
|
|
21978
22220
|
type?: "app" | "lib";
|
|
21979
22221
|
}
|
|
21980
|
-
interface OptionsTypeScriptErasableOnly {
|
|
22222
|
+
export interface OptionsTypeScriptErasableOnly {
|
|
21981
22223
|
/**
|
|
21982
22224
|
* Enable erasable syntax only rules.
|
|
21983
22225
|
*
|
|
@@ -21986,16 +22228,16 @@ interface OptionsTypeScriptErasableOnly {
|
|
|
21986
22228
|
*/
|
|
21987
22229
|
erasableOnly?: boolean;
|
|
21988
22230
|
}
|
|
21989
|
-
interface OptionsRegExp {
|
|
22231
|
+
export interface OptionsRegExp {
|
|
21990
22232
|
/**
|
|
21991
22233
|
* Override rulelevels
|
|
21992
22234
|
*/
|
|
21993
22235
|
level?: "error" | "warn";
|
|
21994
22236
|
}
|
|
21995
|
-
interface OptionsIsInEditor {
|
|
22237
|
+
export interface OptionsIsInEditor {
|
|
21996
22238
|
isInEditor?: boolean;
|
|
21997
22239
|
}
|
|
21998
|
-
interface OptionsPnpm extends OptionsIsInEditor {
|
|
22240
|
+
export interface OptionsPnpm extends OptionsIsInEditor, OptionsStylistic {
|
|
21999
22241
|
/**
|
|
22000
22242
|
* Requires catalogs usage
|
|
22001
22243
|
*
|
|
@@ -22021,7 +22263,7 @@ interface OptionsPnpm extends OptionsIsInEditor {
|
|
|
22021
22263
|
*/
|
|
22022
22264
|
sort?: boolean;
|
|
22023
22265
|
}
|
|
22024
|
-
interface OptionsUnoCSS extends OptionsOverrides {
|
|
22266
|
+
export interface OptionsUnoCSS extends OptionsOverrides {
|
|
22025
22267
|
/**
|
|
22026
22268
|
* Enable attributify support.
|
|
22027
22269
|
* @default true
|
|
@@ -22033,7 +22275,7 @@ interface OptionsUnoCSS extends OptionsOverrides {
|
|
|
22033
22275
|
*/
|
|
22034
22276
|
strict?: boolean;
|
|
22035
22277
|
}
|
|
22036
|
-
interface OptionsTailwindCSS extends OptionsOverrides {
|
|
22278
|
+
export interface OptionsTailwindCSS extends OptionsOverrides {
|
|
22037
22279
|
/**
|
|
22038
22280
|
* Read CSS files
|
|
22039
22281
|
*/
|
|
@@ -22053,8 +22295,8 @@ interface OptionsTailwindCSS extends OptionsOverrides {
|
|
|
22053
22295
|
*/
|
|
22054
22296
|
customClassNames?: boolean;
|
|
22055
22297
|
}
|
|
22056
|
-
interface OptionsReact extends OptionsOverrides {}
|
|
22057
|
-
interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
|
|
22298
|
+
export interface OptionsReact extends OptionsOverrides {}
|
|
22299
|
+
export interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
|
|
22058
22300
|
/**
|
|
22059
22301
|
* Enable gitignore support.
|
|
22060
22302
|
*
|
|
@@ -22301,7 +22543,7 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
|
|
|
22301
22543
|
}
|
|
22302
22544
|
//#endregion
|
|
22303
22545
|
//#region src/factory.d.ts
|
|
22304
|
-
declare const defaultPluginRenaming: {
|
|
22546
|
+
export declare const defaultPluginRenaming: {
|
|
22305
22547
|
"@eslint-react": string;
|
|
22306
22548
|
"@next/next": string;
|
|
22307
22549
|
"@stylistic": string;
|
|
@@ -22310,9 +22552,9 @@ declare const defaultPluginRenaming: {
|
|
|
22310
22552
|
vitest: string;
|
|
22311
22553
|
yml: string;
|
|
22312
22554
|
};
|
|
22313
|
-
type EslintConfigOptions = OptionsConfig & Omit<TypedFlatConfigItem, "files" | "ignores">;
|
|
22314
|
-
type UserConfig = Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | FlatConfigComposer<any, any> | Linter.Config[]>[];
|
|
22315
|
-
type EslintConfigReturn = FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
|
|
22555
|
+
export type EslintConfigOptions = OptionsConfig & Omit<TypedFlatConfigItem, "files" | "ignores">;
|
|
22556
|
+
export type UserConfig = Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | FlatConfigComposer<any, any> | Linter.Config[]>[];
|
|
22557
|
+
export type EslintConfigReturn = FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
|
|
22316
22558
|
/**
|
|
22317
22559
|
* Construct an array of ESLint flat config items.
|
|
22318
22560
|
*
|
|
@@ -22323,62 +22565,62 @@ type EslintConfigReturn = FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
|
|
|
22323
22565
|
* @returns {Promise<TypedFlatConfigItem[]>}
|
|
22324
22566
|
* The merged ESLint configurations.
|
|
22325
22567
|
*/
|
|
22326
|
-
declare function eslintFlatConfig(options?: EslintConfigOptions, ...userConfigs: UserConfig[]): EslintConfigReturn;
|
|
22327
|
-
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
22328
|
-
declare function resolveSubOptions<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): ResolvedOptions<OptionsConfig[K]>;
|
|
22329
|
-
declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): Partial<Linter.RulesRecord & RuleOptions>;
|
|
22568
|
+
export declare function eslintFlatConfig(options?: EslintConfigOptions, ...userConfigs: UserConfig[]): EslintConfigReturn;
|
|
22569
|
+
export type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
22570
|
+
export declare function resolveSubOptions<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): ResolvedOptions<OptionsConfig[K]>;
|
|
22571
|
+
export declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): Partial<Linter.RulesRecord & RuleOptions>;
|
|
22330
22572
|
//#endregion
|
|
22331
22573
|
//#region src/config-presets.d.ts
|
|
22332
|
-
declare const CONFIG_PRESET_FULL_ON: OptionsConfig;
|
|
22333
|
-
declare const CONFIG_PRESET_FULL_OFF: OptionsConfig;
|
|
22574
|
+
export declare const CONFIG_PRESET_FULL_ON: OptionsConfig;
|
|
22575
|
+
export declare const CONFIG_PRESET_FULL_OFF: OptionsConfig;
|
|
22334
22576
|
//#endregion
|
|
22335
22577
|
//#region src/configs/angular.d.ts
|
|
22336
|
-
declare function angular(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
22578
|
+
export declare function angular(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
22337
22579
|
//#endregion
|
|
22338
22580
|
//#region src/configs/astro.d.ts
|
|
22339
|
-
declare function astro(options?: OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
22581
|
+
export declare function astro(options?: OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
22340
22582
|
//#endregion
|
|
22341
22583
|
//#region src/configs/command.d.ts
|
|
22342
|
-
declare function command(): Promise<TypedFlatConfigItem[]>;
|
|
22584
|
+
export declare function command(): Promise<TypedFlatConfigItem[]>;
|
|
22343
22585
|
//#endregion
|
|
22344
22586
|
//#region src/configs/comments.d.ts
|
|
22345
|
-
declare function comments(): Promise<TypedFlatConfigItem[]>;
|
|
22587
|
+
export declare function comments(): Promise<TypedFlatConfigItem[]>;
|
|
22346
22588
|
//#endregion
|
|
22347
22589
|
//#region src/configs/disables.d.ts
|
|
22348
|
-
declare function disables(): Promise<TypedFlatConfigItem[]>;
|
|
22590
|
+
export declare function disables(): Promise<TypedFlatConfigItem[]>;
|
|
22349
22591
|
//#endregion
|
|
22350
22592
|
//#region src/configs/e18e.d.ts
|
|
22351
|
-
declare function e18e(options?: OptionsE18e & OptionsProjectType & OptionsIsInEditor): Promise<TypedFlatConfigItem[]>;
|
|
22593
|
+
export declare function e18e(options?: OptionsE18e & OptionsProjectType & OptionsIsInEditor): Promise<TypedFlatConfigItem[]>;
|
|
22352
22594
|
//#endregion
|
|
22353
22595
|
//#region src/configs/formatters.d.ts
|
|
22354
|
-
declare function formatters(
|
|
22596
|
+
export declare function formatters(rawOptions?: OptionsFormatters | true, stylistic?: StylisticConfig): Promise<TypedFlatConfigItem[]>;
|
|
22355
22597
|
//#endregion
|
|
22356
22598
|
//#region src/configs/ignores.d.ts
|
|
22357
|
-
declare function ignores(userIgnores?: string[] | ((originals: string[]) => string[]), ignoreTypeScript?: boolean): Promise<TypedFlatConfigItem[]>;
|
|
22599
|
+
export declare function ignores(userIgnores?: string[] | ((originals: string[]) => string[]), ignoreTypeScript?: boolean): Promise<TypedFlatConfigItem[]>;
|
|
22358
22600
|
//#endregion
|
|
22359
22601
|
//#region src/configs/imports.d.ts
|
|
22360
|
-
declare function imports(_options?: OptionsStylistic): Promise<TypedFlatConfigItem[]>;
|
|
22602
|
+
export declare function imports(_options?: OptionsStylistic): Promise<TypedFlatConfigItem[]>;
|
|
22361
22603
|
//#endregion
|
|
22362
22604
|
//#region src/configs/javascript.d.ts
|
|
22363
|
-
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
22605
|
+
export declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
22364
22606
|
//#endregion
|
|
22365
22607
|
//#region src/configs/jsdoc.d.ts
|
|
22366
|
-
declare function jsdoc(options?: OptionsStylistic): Promise<TypedFlatConfigItem[]>;
|
|
22608
|
+
export declare function jsdoc(options?: OptionsStylistic): Promise<TypedFlatConfigItem[]>;
|
|
22367
22609
|
//#endregion
|
|
22368
22610
|
//#region src/configs/jsonc.d.ts
|
|
22369
|
-
declare function jsonc(options?: OptionsFiles & OptionsStylistic & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
22611
|
+
export declare function jsonc(options?: OptionsFiles & OptionsStylistic & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
22370
22612
|
//#endregion
|
|
22371
22613
|
//#region src/configs/jsx.d.ts
|
|
22372
|
-
declare function jsx(options?: OptionsJSX): Promise<TypedFlatConfigItem[]>;
|
|
22614
|
+
export declare function jsx(options?: OptionsJSX): Promise<TypedFlatConfigItem[]>;
|
|
22373
22615
|
//#endregion
|
|
22374
22616
|
//#region src/configs/markdown.d.ts
|
|
22375
|
-
declare function markdown(options?: OptionsFiles & OptionsComponentExts & OptionsMarkdown): Promise<TypedFlatConfigItem[]>;
|
|
22617
|
+
export declare function markdown(options?: OptionsFiles & OptionsComponentExts & OptionsMarkdown): Promise<TypedFlatConfigItem[]>;
|
|
22376
22618
|
//#endregion
|
|
22377
22619
|
//#region src/configs/nextjs.d.ts
|
|
22378
|
-
declare function nextjs(options?: OptionsOverrides & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
22620
|
+
export declare function nextjs(options?: OptionsOverrides & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
22379
22621
|
//#endregion
|
|
22380
22622
|
//#region src/configs/node.d.ts
|
|
22381
|
-
declare function node(): Promise<TypedFlatConfigItem[]>;
|
|
22623
|
+
export declare function node(): Promise<TypedFlatConfigItem[]>;
|
|
22382
22624
|
//#endregion
|
|
22383
22625
|
//#region src/configs/perfectionist.d.ts
|
|
22384
22626
|
/**
|
|
@@ -22386,19 +22628,19 @@ declare function node(): Promise<TypedFlatConfigItem[]>;
|
|
|
22386
22628
|
*
|
|
22387
22629
|
* @see https://github.com/azat-io/eslint-plugin-perfectionist
|
|
22388
22630
|
*/
|
|
22389
|
-
declare function perfectionist(options: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
22631
|
+
export declare function perfectionist(options: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
22390
22632
|
//#endregion
|
|
22391
22633
|
//#region src/configs/pnpm.d.ts
|
|
22392
|
-
declare function pnpm(options: OptionsPnpm): Promise<TypedFlatConfigItem[]>;
|
|
22634
|
+
export declare function pnpm(options: OptionsPnpm): Promise<TypedFlatConfigItem[]>;
|
|
22393
22635
|
//#endregion
|
|
22394
22636
|
//#region src/configs/react.d.ts
|
|
22395
|
-
declare function react(options?: OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes & OptionsReact & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
22637
|
+
export declare function react(options?: OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes & OptionsReact & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
22396
22638
|
//#endregion
|
|
22397
22639
|
//#region src/configs/regexp.d.ts
|
|
22398
|
-
declare function regexp(options?: OptionsRegExp & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
22640
|
+
export declare function regexp(options?: OptionsRegExp & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
22399
22641
|
//#endregion
|
|
22400
22642
|
//#region src/configs/solid.d.ts
|
|
22401
|
-
declare function solid(options?: OptionsHasTypeScript & OptionsOverrides & OptionsFiles & OptionsTypeScriptWithTypes): Promise<TypedFlatConfigItem[]>;
|
|
22643
|
+
export declare function solid(options?: OptionsHasTypeScript & OptionsOverrides & OptionsFiles & OptionsTypeScriptWithTypes): Promise<TypedFlatConfigItem[]>;
|
|
22402
22644
|
//#endregion
|
|
22403
22645
|
//#region src/configs/sort.d.ts
|
|
22404
22646
|
/**
|
|
@@ -22406,86 +22648,86 @@ declare function solid(options?: OptionsHasTypeScript & OptionsOverrides & Optio
|
|
|
22406
22648
|
*
|
|
22407
22649
|
* Requires `jsonc` config
|
|
22408
22650
|
*/
|
|
22409
|
-
declare function sortPackageJson(): Promise<TypedFlatConfigItem[]>;
|
|
22651
|
+
export declare function sortPackageJson(): Promise<TypedFlatConfigItem[]>;
|
|
22410
22652
|
/**
|
|
22411
22653
|
* Sort tsconfig.json
|
|
22412
22654
|
*
|
|
22413
22655
|
* Requires `jsonc` config
|
|
22414
22656
|
*/
|
|
22415
|
-
declare function sortTsconfig(): TypedFlatConfigItem[];
|
|
22657
|
+
export declare function sortTsconfig(): TypedFlatConfigItem[];
|
|
22416
22658
|
//#endregion
|
|
22417
22659
|
//#region src/configs/stylistic.d.ts
|
|
22418
|
-
declare const StylisticConfigDefaults: StylisticConfig;
|
|
22419
|
-
interface StylisticOptions extends StylisticConfig, OptionsOverrides {
|
|
22660
|
+
export declare const StylisticConfigDefaults: StylisticConfig;
|
|
22661
|
+
export interface StylisticOptions extends StylisticConfig, OptionsOverrides {
|
|
22420
22662
|
lessOpinionated?: boolean;
|
|
22421
22663
|
}
|
|
22422
|
-
declare function stylistic(options?: StylisticOptions): Promise<TypedFlatConfigItem[]>;
|
|
22664
|
+
export declare function stylistic(options?: StylisticOptions): Promise<TypedFlatConfigItem[]>;
|
|
22423
22665
|
//#endregion
|
|
22424
22666
|
//#region src/configs/svelte.d.ts
|
|
22425
|
-
declare function svelte(options?: OptionsHasTypeScript & OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
22667
|
+
export declare function svelte(options?: OptionsHasTypeScript & OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
22426
22668
|
//#endregion
|
|
22427
22669
|
//#region src/configs/tailwindcss.d.ts
|
|
22428
|
-
declare function tailwindcss(options?: OptionsTailwindCSS): Promise<TypedFlatConfigItem[]>;
|
|
22670
|
+
export declare function tailwindcss(options?: OptionsTailwindCSS): Promise<TypedFlatConfigItem[]>;
|
|
22429
22671
|
//#endregion
|
|
22430
22672
|
//#region src/configs/test.d.ts
|
|
22431
|
-
declare function test(options?: OptionsFiles & OptionsIsInEditor & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
22673
|
+
export declare function test(options?: OptionsFiles & OptionsIsInEditor & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
22432
22674
|
//#endregion
|
|
22433
22675
|
//#region src/configs/toml.d.ts
|
|
22434
|
-
declare function toml(options?: OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
22676
|
+
export declare function toml(options?: OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
22435
22677
|
//#endregion
|
|
22436
22678
|
//#region src/configs/typescript.d.ts
|
|
22437
|
-
declare function typescript(options?: OptionsFiles & OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions & OptionsProjectType & OptionsTypeScriptErasableOnly): Promise<TypedFlatConfigItem[]>;
|
|
22679
|
+
export declare function typescript(options?: OptionsFiles & OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions & OptionsProjectType & OptionsTypeScriptErasableOnly): Promise<TypedFlatConfigItem[]>;
|
|
22438
22680
|
//#endregion
|
|
22439
22681
|
//#region src/configs/unicorn.d.ts
|
|
22440
|
-
declare function unicorn(options?: OptionsUnicorn): Promise<TypedFlatConfigItem[]>;
|
|
22682
|
+
export declare function unicorn(options?: OptionsUnicorn): Promise<TypedFlatConfigItem[]>;
|
|
22441
22683
|
//#endregion
|
|
22442
22684
|
//#region src/configs/unocss.d.ts
|
|
22443
|
-
declare function unocss(options?: OptionsUnoCSS): Promise<TypedFlatConfigItem[]>;
|
|
22685
|
+
export declare function unocss(options?: OptionsUnoCSS): Promise<TypedFlatConfigItem[]>;
|
|
22444
22686
|
//#endregion
|
|
22445
22687
|
//#region src/configs/vue.d.ts
|
|
22446
|
-
declare function vue(options?: OptionsVue & OptionsHasTypeScript & OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
22688
|
+
export declare function vue(options?: OptionsVue & OptionsHasTypeScript & OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
22447
22689
|
//#endregion
|
|
22448
22690
|
//#region src/configs/yaml.d.ts
|
|
22449
|
-
declare function yaml(options?: OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
22691
|
+
export declare function yaml(options?: OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
22450
22692
|
//#endregion
|
|
22451
22693
|
//#region src/globs.d.ts
|
|
22452
|
-
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
22453
|
-
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
22454
|
-
declare const GLOB_JS = "**/*.?([cm])js";
|
|
22455
|
-
declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
22456
|
-
declare const GLOB_TS = "**/*.?([cm])ts";
|
|
22457
|
-
declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
22458
|
-
declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
|
|
22459
|
-
declare const GLOB_CSS = "**/*.css";
|
|
22460
|
-
declare const GLOB_POSTCSS = "**/*.{p,post}css";
|
|
22461
|
-
declare const GLOB_LESS = "**/*.less";
|
|
22462
|
-
declare const GLOB_SCSS = "**/*.scss";
|
|
22463
|
-
declare const GLOB_JSON = "**/*.json";
|
|
22464
|
-
declare const GLOB_JSON5 = "**/*.json5";
|
|
22465
|
-
declare const GLOB_JSONC = "**/*.jsonc";
|
|
22466
|
-
declare const GLOB_MARKDOWN = "**/*.md";
|
|
22467
|
-
declare const GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
|
|
22468
|
-
declare const GLOB_VUE = "**/*.vue";
|
|
22469
|
-
declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
22470
|
-
declare const GLOB_TOML = "**/*.toml";
|
|
22471
|
-
declare const GLOB_XML = "**/*.xml";
|
|
22472
|
-
declare const GLOB_SVG = "**/*.svg";
|
|
22473
|
-
declare const GLOB_HTML = "**/*.htm?(l)";
|
|
22474
|
-
declare const GLOB_ASTRO = "**/*.astro";
|
|
22475
|
-
declare const GLOB_ASTRO_TS = "**/*.astro/*.ts";
|
|
22476
|
-
declare const GLOB_SVELTE = "**/*.svelte?(.{js,ts})";
|
|
22477
|
-
declare const GLOB_GRAPHQL = "**/*.{g,graph}ql";
|
|
22478
|
-
declare const GLOB_MARKDOWN_CODE: string;
|
|
22479
|
-
declare const GLOB_TESTS: string[];
|
|
22480
|
-
declare const GLOB_ALL_SRC: string[];
|
|
22481
|
-
declare const GLOB_EXCLUDE: string[];
|
|
22694
|
+
export declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
22695
|
+
export declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
22696
|
+
export declare const GLOB_JS = "**/*.?([cm])js";
|
|
22697
|
+
export declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
22698
|
+
export declare const GLOB_TS = "**/*.?([cm])ts";
|
|
22699
|
+
export declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
22700
|
+
export declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
|
|
22701
|
+
export declare const GLOB_CSS = "**/*.css";
|
|
22702
|
+
export declare const GLOB_POSTCSS = "**/*.{p,post}css";
|
|
22703
|
+
export declare const GLOB_LESS = "**/*.less";
|
|
22704
|
+
export declare const GLOB_SCSS = "**/*.scss";
|
|
22705
|
+
export declare const GLOB_JSON = "**/*.json";
|
|
22706
|
+
export declare const GLOB_JSON5 = "**/*.json5";
|
|
22707
|
+
export declare const GLOB_JSONC = "**/*.jsonc";
|
|
22708
|
+
export declare const GLOB_MARKDOWN = "**/*.md";
|
|
22709
|
+
export declare const GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
|
|
22710
|
+
export declare const GLOB_VUE = "**/*.vue";
|
|
22711
|
+
export declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
22712
|
+
export declare const GLOB_TOML = "**/*.toml";
|
|
22713
|
+
export declare const GLOB_XML = "**/*.xml";
|
|
22714
|
+
export declare const GLOB_SVG = "**/*.svg";
|
|
22715
|
+
export declare const GLOB_HTML = "**/*.htm?(l)";
|
|
22716
|
+
export declare const GLOB_ASTRO = "**/*.astro";
|
|
22717
|
+
export declare const GLOB_ASTRO_TS = "**/*.astro/*.ts";
|
|
22718
|
+
export declare const GLOB_SVELTE = "**/*.svelte?(.{js,ts})";
|
|
22719
|
+
export declare const GLOB_GRAPHQL = "**/*.{g,graph}ql";
|
|
22720
|
+
export declare const GLOB_MARKDOWN_CODE: string;
|
|
22721
|
+
export declare const GLOB_TESTS: string[];
|
|
22722
|
+
export declare const GLOB_ALL_SRC: string[];
|
|
22723
|
+
export declare const GLOB_EXCLUDE: string[];
|
|
22482
22724
|
//#endregion
|
|
22483
22725
|
//#region src/utils.d.ts
|
|
22484
|
-
declare const parserPlain: Linter.Parser;
|
|
22726
|
+
export declare const parserPlain: Linter.Parser;
|
|
22485
22727
|
/**
|
|
22486
22728
|
* Combine array and non-array configs into a single array.
|
|
22487
22729
|
*/
|
|
22488
|
-
declare function combine(...configs: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>[]): Promise<TypedFlatConfigItem[]>;
|
|
22730
|
+
export declare function combine(...configs: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>[]): Promise<TypedFlatConfigItem[]>;
|
|
22489
22731
|
/**
|
|
22490
22732
|
* Rename plugin prefixes in a rule object.
|
|
22491
22733
|
* Accepts a map of prefixes to rename.
|
|
@@ -22504,7 +22746,7 @@ declare function combine(...configs: Awaitable<TypedFlatConfigItem | TypedFlatCo
|
|
|
22504
22746
|
* }]
|
|
22505
22747
|
* ```
|
|
22506
22748
|
*/
|
|
22507
|
-
declare function renameRules(rules: Record<string, any>, map: Record<string, string>): Record<string, any>;
|
|
22749
|
+
export declare function renameRules(rules: Record<string, any>, map: Record<string, string>): Record<string, any>;
|
|
22508
22750
|
/**
|
|
22509
22751
|
* Rename plugin names a flat configs array
|
|
22510
22752
|
*
|
|
@@ -22519,14 +22761,14 @@ declare function renameRules(rules: Record<string, any>, map: Record<string, str
|
|
|
22519
22761
|
* })
|
|
22520
22762
|
* ```
|
|
22521
22763
|
*/
|
|
22522
|
-
declare function renamePluginInConfigs(configs: TypedFlatConfigItem[], map: Record<string, string>): TypedFlatConfigItem[];
|
|
22523
|
-
declare function toArray<T>(value: T | T[]): T[];
|
|
22524
|
-
declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
|
|
22764
|
+
export declare function renamePluginInConfigs(configs: TypedFlatConfigItem[], map: Record<string, string>): TypedFlatConfigItem[];
|
|
22765
|
+
export declare function toArray<T>(value: T | T[]): T[];
|
|
22766
|
+
export declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
|
|
22525
22767
|
default: infer U;
|
|
22526
22768
|
} ? U : T>;
|
|
22527
|
-
declare function isPackageInScope(name: string): boolean;
|
|
22528
|
-
declare function ensurePackages(packages: string | undefined | (string | undefined)[]): Promise<void>;
|
|
22529
|
-
declare function isInEditorEnv(): boolean;
|
|
22530
|
-
declare function isInGitHooksOrLintStaged(): boolean;
|
|
22769
|
+
export declare function isPackageInScope(name: string): boolean;
|
|
22770
|
+
export declare function ensurePackages(packages: string | undefined | (string | undefined)[]): Promise<void>;
|
|
22771
|
+
export declare function isInEditorEnv(): boolean;
|
|
22772
|
+
export declare function isInGitHooksOrLintStaged(): boolean;
|
|
22531
22773
|
//#endregion
|
|
22532
|
-
export {
|
|
22774
|
+
export { type ConfigNames, type RuleOptions, eslintFlatConfig as default, pluginAntfu, pluginComments, pluginE18e, pluginImportLite, pluginNode, pluginPerfectionist, pluginUnicorn, pluginUnusedImports };
|