@pengzhanbo/eslint-config 2.9.0 → 2.9.1
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 +439 -349
- package/package.json +40 -40
package/dist/index.d.ts
CHANGED
|
@@ -388,7 +388,7 @@ interface RuleOptions {
|
|
|
388
388
|
* Ensures components do not opt out of the default `ChangeDetectionStrategy.OnPush` change detection strategy
|
|
389
389
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-on-push-component-change-detection.md
|
|
390
390
|
*/
|
|
391
|
-
'angular/prefer-on-push-component-change-detection'?: Linter.RuleEntry<
|
|
391
|
+
'angular/prefer-on-push-component-change-detection'?: Linter.RuleEntry<AngularPreferOnPushComponentChangeDetection>;
|
|
392
392
|
/**
|
|
393
393
|
* Use `OutputEmitterRef` instead of `@Output()`
|
|
394
394
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-output-emitter-ref.md
|
|
@@ -985,6 +985,11 @@ interface RuleOptions {
|
|
|
985
985
|
* @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/enums.md
|
|
986
986
|
*/
|
|
987
987
|
'erasable-syntax-only/enums'?: Linter.RuleEntry<[]>;
|
|
988
|
+
/**
|
|
989
|
+
* Avoid using TypeScript's export aliases.
|
|
990
|
+
* @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/export-aliases.md
|
|
991
|
+
*/
|
|
992
|
+
'erasable-syntax-only/export-aliases'?: Linter.RuleEntry<[]>;
|
|
988
993
|
/**
|
|
989
994
|
* Avoid using TypeScript's import aliases.
|
|
990
995
|
* @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/import-aliases.md
|
|
@@ -1328,6 +1333,10 @@ interface RuleOptions {
|
|
|
1328
1333
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-undefined-types.md#repos-sticky-header
|
|
1329
1334
|
*/
|
|
1330
1335
|
'jsdoc/no-undefined-types'?: Linter.RuleEntry<JsdocNoUndefinedTypes>;
|
|
1336
|
+
/**
|
|
1337
|
+
* Reports redundant @type tags that match or broaden the naturally inferred TypeScript type.
|
|
1338
|
+
*/
|
|
1339
|
+
'jsdoc/no-unnecessary-type-assertion'?: Linter.RuleEntry<JsdocNoUnnecessaryTypeAssertion>;
|
|
1331
1340
|
/**
|
|
1332
1341
|
* Normalizes labeled links in `@see` tags to a canonical `{@link}` form.
|
|
1333
1342
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/normalize-see-links.md#repos-sticky-header
|
|
@@ -3000,7 +3009,7 @@ interface RuleOptions {
|
|
|
3000
3009
|
* Disallow unmodified loop conditions
|
|
3001
3010
|
* @see https://eslint.org/docs/latest/rules/no-unmodified-loop-condition
|
|
3002
3011
|
*/
|
|
3003
|
-
'no-unmodified-loop-condition'?: Linter.RuleEntry<
|
|
3012
|
+
'no-unmodified-loop-condition'?: Linter.RuleEntry<NoUnmodifiedLoopCondition>;
|
|
3004
3013
|
/**
|
|
3005
3014
|
* Disallow ternary operators when simpler alternatives exist
|
|
3006
3015
|
* @see https://eslint.org/docs/latest/rules/no-unneeded-ternary
|
|
@@ -4860,11 +4869,21 @@ interface RuleOptions {
|
|
|
4860
4869
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/jsx-uses-vars.md
|
|
4861
4870
|
*/
|
|
4862
4871
|
'solid/jsx-uses-vars'?: Linter.RuleEntry<[]>;
|
|
4872
|
+
/**
|
|
4873
|
+
* Disallow passing uncalled signal accessors or other functions as value-typed DOM element attributes.
|
|
4874
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-accessor-as-prop.md
|
|
4875
|
+
*/
|
|
4876
|
+
'solid/no-accessor-as-prop'?: Linter.RuleEntry<[]>;
|
|
4863
4877
|
/**
|
|
4864
4878
|
* Disallow usage of type-unsafe event handlers.
|
|
4865
4879
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-array-handlers.md
|
|
4866
4880
|
*/
|
|
4867
4881
|
'solid/no-array-handlers'?: Linter.RuleEntry<[]>;
|
|
4882
|
+
/**
|
|
4883
|
+
* Disallow browser-only globals inside server functions, which run exclusively on the server.
|
|
4884
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-browser-globals-in-server-function.md
|
|
4885
|
+
*/
|
|
4886
|
+
'solid/no-browser-globals-in-server-function'?: Linter.RuleEntry<[]>;
|
|
4868
4887
|
/**
|
|
4869
4888
|
* Disallow destructuring props. In Solid, props must be used with property accesses (`props.foo`) to preserve reactivity. This rule only tracks destructuring in the parameter list.
|
|
4870
4889
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-destructure.md
|
|
@@ -4875,6 +4894,16 @@ interface RuleOptions {
|
|
|
4875
4894
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-innerhtml.md
|
|
4876
4895
|
*/
|
|
4877
4896
|
'solid/no-innerhtml'?: Linter.RuleEntry<SolidNoInnerhtml>;
|
|
4897
|
+
/**
|
|
4898
|
+
* Disallow server functions from capturing variables in enclosing non-module scopes, mirroring the compiler's build-time validation.
|
|
4899
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-invalid-server-capture.md
|
|
4900
|
+
*/
|
|
4901
|
+
'solid/no-invalid-server-capture'?: Linter.RuleEntry<[]>;
|
|
4902
|
+
/**
|
|
4903
|
+
* Disallow reactive primitives at module scope, where state is shared across SSR requests.
|
|
4904
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-module-scope-reactive-primitive.md
|
|
4905
|
+
*/
|
|
4906
|
+
'solid/no-module-scope-reactive-primitive'?: Linter.RuleEntry<[]>;
|
|
4878
4907
|
/**
|
|
4879
4908
|
* Disallow usage of APIs that use ES6 Proxies, only to target environments that don't support them.
|
|
4880
4909
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-proxy-apis.md
|
|
@@ -4890,6 +4919,16 @@ interface RuleOptions {
|
|
|
4890
4919
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-react-specific-props.md
|
|
4891
4920
|
*/
|
|
4892
4921
|
'solid/no-react-specific-props'?: Linter.RuleEntry<[]>;
|
|
4922
|
+
/**
|
|
4923
|
+
* Disallow restating a prop or option value that is already the default.
|
|
4924
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-restated-default-options.md
|
|
4925
|
+
*/
|
|
4926
|
+
'solid/no-restated-default-options'?: Linter.RuleEntry<[]>;
|
|
4927
|
+
/**
|
|
4928
|
+
* Require the two-argument `createEffect(compute, effect)` form used by Solid 2.0.
|
|
4929
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-single-arg-create-effect.md
|
|
4930
|
+
*/
|
|
4931
|
+
'solid/no-single-arg-create-effect'?: Linter.RuleEntry<[]>;
|
|
4893
4932
|
/**
|
|
4894
4933
|
* Enforce using only Solid-specific namespaced attribute names (i.e. `'on:'` in `<div on:click={...} />`).
|
|
4895
4934
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-unknown-namespaces.md
|
|
@@ -4906,16 +4945,36 @@ interface RuleOptions {
|
|
|
4906
4945
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/prefer-for.md
|
|
4907
4946
|
*/
|
|
4908
4947
|
'solid/prefer-for'?: Linter.RuleEntry<[]>;
|
|
4948
|
+
/**
|
|
4949
|
+
* Enforce running side-effectful setup (timers, global listeners, observers) inside `onSettled` instead of the component body.
|
|
4950
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/prefer-onSettled-for-side-effects.md
|
|
4951
|
+
*/
|
|
4952
|
+
'solid/prefer-onSettled-for-side-effects'?: Linter.RuleEntry<[]>;
|
|
4909
4953
|
/**
|
|
4910
4954
|
* Enforce using Solid's `<Show />` component for conditionally showing content. Solid's compiler covers this case, so it's a stylistic rule only.
|
|
4911
4955
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/prefer-show.md
|
|
4912
4956
|
*/
|
|
4913
4957
|
'solid/prefer-show'?: Linter.RuleEntry<[]>;
|
|
4958
|
+
/**
|
|
4959
|
+
* Enforce using the structured array/object forms of the `class` prop over manually-built class strings.
|
|
4960
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/prefer-structured-class.md
|
|
4961
|
+
*/
|
|
4962
|
+
'solid/prefer-structured-class'?: Linter.RuleEntry<[]>;
|
|
4914
4963
|
/**
|
|
4915
4964
|
* Enforce that reactivity (props, signals, memos, etc.) is properly used, so changes in those values will be tracked and update the view as expected.
|
|
4916
4965
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/reactivity.md
|
|
4917
4966
|
*/
|
|
4918
4967
|
'solid/reactivity'?: Linter.RuleEntry<SolidReactivity>;
|
|
4968
|
+
/**
|
|
4969
|
+
* Disallow Solid 1.x APIs that were removed or renamed in Solid 2.0, with migration guidance.
|
|
4970
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/removed-api.md
|
|
4971
|
+
*/
|
|
4972
|
+
'solid/removed-api'?: Linter.RuleEntry<[]>;
|
|
4973
|
+
/**
|
|
4974
|
+
* Require server functions to be async, matching their client-side contract.
|
|
4975
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/require-async-server-function.md
|
|
4976
|
+
*/
|
|
4977
|
+
'solid/require-async-server-function'?: Linter.RuleEntry<[]>;
|
|
4919
4978
|
/**
|
|
4920
4979
|
* Disallow extra closing tags for components without children.
|
|
4921
4980
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/self-closing-comp.md
|
|
@@ -4926,6 +4985,11 @@ interface RuleOptions {
|
|
|
4926
4985
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/style-prop.md
|
|
4927
4986
|
*/
|
|
4928
4987
|
'solid/style-prop'?: Linter.RuleEntry<SolidStyleProp>;
|
|
4988
|
+
/**
|
|
4989
|
+
* Enforce that "use server" directives are placed where the compiler honors them, and that module-level directive files export working server functions.
|
|
4990
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/valid-use-server.md
|
|
4991
|
+
*/
|
|
4992
|
+
'solid/valid-use-server'?: Linter.RuleEntry<SolidValidUseServer>;
|
|
4929
4993
|
/**
|
|
4930
4994
|
* Enforce sorted `import` declarations within modules
|
|
4931
4995
|
* @see https://eslint.org/docs/latest/rules/sort-imports
|
|
@@ -5784,6 +5848,11 @@ interface RuleOptions {
|
|
|
5784
5848
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-mustaches/
|
|
5785
5849
|
*/
|
|
5786
5850
|
'svelte/no-useless-mustaches'?: Linter.RuleEntry<SvelteNoUselessMustaches>;
|
|
5851
|
+
/**
|
|
5852
|
+
* require attribute interpolation instead of template literals
|
|
5853
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-attribute-interpolation/
|
|
5854
|
+
*/
|
|
5855
|
+
'svelte/prefer-attribute-interpolation'?: Linter.RuleEntry<[]>;
|
|
5787
5856
|
/**
|
|
5788
5857
|
* require class directives instead of ternary expressions
|
|
5789
5858
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-class-directive/
|
|
@@ -7145,1740 +7214,1740 @@ interface RuleOptions {
|
|
|
7145
7214
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
7146
7215
|
/**
|
|
7147
7216
|
* Prefer better DOM traversal APIs.
|
|
7148
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7217
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/better-dom-traversing.md
|
|
7149
7218
|
*/
|
|
7150
7219
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
7151
7220
|
/**
|
|
7152
7221
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
7153
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7222
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
7154
7223
|
* @deprecated
|
|
7155
7224
|
*/
|
|
7156
7225
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
7157
7226
|
/**
|
|
7158
7227
|
* Enforce a specific parameter name in catch clauses.
|
|
7159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7228
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/catch-error-name.md
|
|
7160
7229
|
*/
|
|
7161
7230
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
7162
7231
|
/**
|
|
7163
7232
|
* Enforce consistent class references in static methods.
|
|
7164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/class-reference-in-static-methods.md
|
|
7165
7234
|
*/
|
|
7166
7235
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
7167
7236
|
/**
|
|
7168
7237
|
* Enforce better comment content.
|
|
7169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7238
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/comment-content.md
|
|
7170
7239
|
*/
|
|
7171
7240
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
7172
7241
|
/**
|
|
7173
7242
|
* Enforce a consistent return style for multiline arrow function bodies.
|
|
7174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7243
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-arrow-return-style.md
|
|
7175
7244
|
*/
|
|
7176
7245
|
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
7177
7246
|
/**
|
|
7178
7247
|
* Enforce consistent assertion style with `node:assert`.
|
|
7179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7248
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-assert.md
|
|
7180
7249
|
*/
|
|
7181
7250
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
7182
7251
|
/**
|
|
7183
7252
|
* Enforce consistent naming for boolean names.
|
|
7184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7253
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-boolean-name.md
|
|
7185
7254
|
*/
|
|
7186
7255
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
7187
7256
|
/**
|
|
7188
7257
|
* Enforce consistent class member order.
|
|
7189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7258
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-class-member-order.md
|
|
7190
7259
|
*/
|
|
7191
7260
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
7192
7261
|
/**
|
|
7193
7262
|
* Enforce consistent spelling of compound words in identifiers.
|
|
7194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-compound-words.md
|
|
7195
7264
|
*/
|
|
7196
7265
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
7197
7266
|
/**
|
|
7198
7267
|
* Enforce consistent conditional object spread style.
|
|
7199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7268
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
7200
7269
|
*/
|
|
7201
7270
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
7202
7271
|
/**
|
|
7203
7272
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
7204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-date-clone.md
|
|
7205
7274
|
*/
|
|
7206
7275
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
7207
7276
|
/**
|
|
7208
7277
|
* Use destructured variables over properties.
|
|
7209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7278
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-destructuring.md
|
|
7210
7279
|
*/
|
|
7211
7280
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
7212
7281
|
/**
|
|
7213
7282
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
7214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-empty-array-spread.md
|
|
7215
7284
|
*/
|
|
7216
7285
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
7217
7286
|
/**
|
|
7218
7287
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
7219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7288
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-existence-index-check.md
|
|
7220
7289
|
*/
|
|
7221
7290
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
7222
7291
|
/**
|
|
7223
7292
|
* Enforce consistent decorator position on exported classes.
|
|
7224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7293
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-export-decorator-position.md
|
|
7225
7294
|
*/
|
|
7226
7295
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
7227
7296
|
/**
|
|
7228
7297
|
* Move function definitions to the highest possible scope.
|
|
7229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-function-scoping.md
|
|
7230
7299
|
*/
|
|
7231
7300
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
7232
7301
|
/**
|
|
7233
7302
|
* Enforce function syntax by role.
|
|
7234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-function-style.md
|
|
7235
7304
|
*/
|
|
7236
7305
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
7237
7306
|
/**
|
|
7238
7307
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
7239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-json-file-read.md
|
|
7240
7309
|
*/
|
|
7241
7310
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
7242
7311
|
/**
|
|
7243
7312
|
* Enforce consistent optional chaining for same-base member access.
|
|
7244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-optional-chaining.md
|
|
7245
7314
|
*/
|
|
7246
7315
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
7247
7316
|
/**
|
|
7248
7317
|
* Enforce consistent style for escaping `${` in template literals.
|
|
7249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-template-literal-escape.md
|
|
7250
7319
|
*/
|
|
7251
7320
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
7252
7321
|
/**
|
|
7253
7322
|
* Enforce consistent labels on tuple type elements.
|
|
7254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-tuple-labels.md
|
|
7255
7324
|
*/
|
|
7256
7325
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
7257
7326
|
/**
|
|
7258
7327
|
* Enforce correct `Error` subclassing.
|
|
7259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/custom-error-definition.md
|
|
7260
7329
|
*/
|
|
7261
7330
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
7262
7331
|
/**
|
|
7263
7332
|
* Enforce consistent default export declarations.
|
|
7264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/default-export-style.md
|
|
7265
7334
|
*/
|
|
7266
7335
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
7267
7336
|
/**
|
|
7268
7337
|
* Enforce consistent style for DOM element dataset access.
|
|
7269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/dom-node-dataset.md
|
|
7270
7339
|
*/
|
|
7271
7340
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
7272
7341
|
/**
|
|
7273
7342
|
* Enforce no spaces between braces.
|
|
7274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/empty-brace-spaces.md
|
|
7275
7344
|
*/
|
|
7276
7345
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
7277
7346
|
/**
|
|
7278
7347
|
* Enforce passing a `message` value when creating a built-in error.
|
|
7279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/error-message.md
|
|
7280
7349
|
*/
|
|
7281
7350
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
7282
7351
|
/**
|
|
7283
7352
|
* Require escape sequences to use uppercase or lowercase values.
|
|
7284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/escape-case.md
|
|
7285
7354
|
*/
|
|
7286
7355
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
7287
7356
|
/**
|
|
7288
7357
|
* Add expiration conditions to TODO comments.
|
|
7289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/expiring-todo-comments.md
|
|
7290
7359
|
*/
|
|
7291
7360
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
7292
7361
|
/**
|
|
7293
7362
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
7294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/explicit-length-check.md
|
|
7295
7364
|
*/
|
|
7296
7365
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
7297
7366
|
/**
|
|
7298
7367
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
7299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/explicit-timer-delay.md
|
|
7300
7369
|
*/
|
|
7301
7370
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
7302
7371
|
/**
|
|
7303
7372
|
* Enforce a case style for filenames and directory names.
|
|
7304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/filename-case.md
|
|
7305
7374
|
*/
|
|
7306
7375
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
7307
7376
|
/**
|
|
7308
7377
|
* Require identifiers to match a specified regular expression.
|
|
7309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/id-match.md
|
|
7310
7379
|
*/
|
|
7311
7380
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
7312
7381
|
/**
|
|
7313
7382
|
* Enforce specific import styles per module.
|
|
7314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/import-style.md
|
|
7315
7384
|
*/
|
|
7316
7385
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
7317
7386
|
/**
|
|
7318
7387
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
7319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/isolated-functions.md
|
|
7320
7389
|
*/
|
|
7321
7390
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
7322
7391
|
/**
|
|
7323
7392
|
* Enforce a consistent style for optional loop sources.
|
|
7324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/iteration-fallback-style.md
|
|
7325
7394
|
*/
|
|
7326
7395
|
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
7327
7396
|
/**
|
|
7328
7397
|
* Require or disallow logical assignment operator shorthand
|
|
7329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/logical-assignment-operators.md
|
|
7330
7399
|
*/
|
|
7331
7400
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
7332
7401
|
/**
|
|
7333
7402
|
* Limit the depth of nested calls.
|
|
7334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/max-nested-calls.md
|
|
7335
7404
|
*/
|
|
7336
7405
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
7337
7406
|
/**
|
|
7338
7407
|
* Enforce replacements for variable, property, and filenames.
|
|
7339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/name-replacements.md
|
|
7340
7409
|
*/
|
|
7341
7410
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
7342
7411
|
/**
|
|
7343
7412
|
* Enforce correct use of `new` for builtin constructors.
|
|
7344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/new-for-builtins.md
|
|
7345
7414
|
*/
|
|
7346
7415
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
7347
7416
|
/**
|
|
7348
7417
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
7349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
7350
7419
|
*/
|
|
7351
7420
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
7352
7421
|
/**
|
|
7353
7422
|
* Disallow recursive access to `this` within getters and setters.
|
|
7354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-accessor-recursion.md
|
|
7355
7424
|
*/
|
|
7356
7425
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
7357
7426
|
/**
|
|
7358
7427
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
7359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
7360
7429
|
*/
|
|
7361
7430
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
7362
7431
|
/**
|
|
7363
7432
|
* Disallow anonymous functions and classes as the default export.
|
|
7364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-anonymous-default-export.md
|
|
7365
7434
|
*/
|
|
7366
7435
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
7367
7436
|
/**
|
|
7368
7437
|
* Prevent passing a function reference directly to iterator methods.
|
|
7369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-callback-reference.md
|
|
7370
7439
|
*/
|
|
7371
7440
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
7372
7441
|
/**
|
|
7373
7442
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
7374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-concat-in-loop.md
|
|
7375
7444
|
*/
|
|
7376
7445
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
7377
7446
|
/**
|
|
7378
7447
|
* Disallow using reference values as `Array#fill()` values.
|
|
7379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
7380
7449
|
*/
|
|
7381
7450
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
7382
7451
|
/**
|
|
7383
7452
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
7384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-from-fill.md
|
|
7385
7454
|
*/
|
|
7386
7455
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
7387
7456
|
/**
|
|
7388
7457
|
* Disallow front-of-array mutation.
|
|
7389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-front-mutation.md
|
|
7390
7459
|
*/
|
|
7391
7460
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
7392
7461
|
/**
|
|
7393
7462
|
* Disallow using the `this` argument in array methods.
|
|
7394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7463
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-method-this-argument.md
|
|
7395
7464
|
*/
|
|
7396
7465
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
7397
7466
|
/**
|
|
7398
7467
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
7399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7468
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
7400
7469
|
* @deprecated
|
|
7401
7470
|
*/
|
|
7402
7471
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
7403
7472
|
/**
|
|
7404
7473
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
7405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-reduce.md
|
|
7406
7475
|
*/
|
|
7407
7476
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
7408
7477
|
/**
|
|
7409
7478
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
7410
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-reverse.md
|
|
7411
7480
|
*/
|
|
7412
7481
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
7413
7482
|
/**
|
|
7414
7483
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
7415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-sort.md
|
|
7416
7485
|
*/
|
|
7417
7486
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
7418
7487
|
/**
|
|
7419
7488
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
7420
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
7421
7490
|
*/
|
|
7422
7491
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
7423
7492
|
/**
|
|
7424
7493
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
7425
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-splice.md
|
|
7426
7495
|
*/
|
|
7427
7496
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
7428
7497
|
/**
|
|
7429
7498
|
* Disallow asterisk prefixes in documentation comments.
|
|
7430
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
7431
7500
|
*/
|
|
7432
7501
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
7433
7502
|
/**
|
|
7434
7503
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
7435
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-async-promise-finally.md
|
|
7436
7505
|
*/
|
|
7437
7506
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
7438
7507
|
/**
|
|
7439
7508
|
* Disallow member access from await expression.
|
|
7440
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-await-expression-member.md
|
|
7441
7510
|
*/
|
|
7442
7511
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
7443
7512
|
/**
|
|
7444
7513
|
* Disallow using `await` in `Promise` method parameters.
|
|
7445
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-await-in-promise-methods.md
|
|
7446
7515
|
*/
|
|
7447
7516
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7448
7517
|
/**
|
|
7449
7518
|
* Disallow barrel files.
|
|
7450
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-barrel-files.md
|
|
7451
7520
|
*/
|
|
7452
7521
|
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
7453
7522
|
/**
|
|
7454
7523
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
7455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-blob-to-file.md
|
|
7456
7525
|
*/
|
|
7457
7526
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
7458
7527
|
/**
|
|
7459
7528
|
* Disallow boolean-returning sort comparators.
|
|
7460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
7461
7530
|
*/
|
|
7462
7531
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7463
7532
|
/**
|
|
7464
7533
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
7465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-break-in-nested-loop.md
|
|
7466
7535
|
*/
|
|
7467
7536
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
7468
7537
|
/**
|
|
7469
7538
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
7470
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-canvas-to-image.md
|
|
7471
7540
|
*/
|
|
7472
7541
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
7473
7542
|
/**
|
|
7474
7543
|
* Disallow chained comparisons such as `a < b < c`.
|
|
7475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-chained-comparison.md
|
|
7476
7545
|
*/
|
|
7477
7546
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
7478
7547
|
/**
|
|
7479
7548
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
7480
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-collection-bracket-access.md
|
|
7481
7550
|
*/
|
|
7482
7551
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
7483
7552
|
/**
|
|
7484
7553
|
* Disallow dynamic object property existence checks.
|
|
7485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-computed-property-existence-check.md
|
|
7486
7555
|
*/
|
|
7487
7556
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
7488
7557
|
/**
|
|
7489
7558
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
7490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-confusing-array-splice.md
|
|
7491
7560
|
*/
|
|
7492
7561
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
7493
7562
|
/**
|
|
7494
7563
|
* Disallow confusing uses of `Array#with()`.
|
|
7495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-confusing-array-with.md
|
|
7496
7565
|
*/
|
|
7497
7566
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
7498
7567
|
/**
|
|
7499
7568
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
7500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-console-spaces.md
|
|
7501
7570
|
*/
|
|
7502
7571
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
7503
7572
|
/**
|
|
7504
7573
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
7505
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-constant-zero-expression.md
|
|
7506
7575
|
*/
|
|
7507
7576
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
7508
7577
|
/**
|
|
7509
7578
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
7510
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
7511
7580
|
*/
|
|
7512
7581
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
7513
7582
|
/**
|
|
7514
7583
|
* Do not use `document.cookie` directly.
|
|
7515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-document-cookie.md
|
|
7516
7585
|
*/
|
|
7517
7586
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
7518
7587
|
/**
|
|
7519
7588
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
7520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-double-comparison.md
|
|
7521
7590
|
*/
|
|
7522
7591
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
7523
7592
|
/**
|
|
7524
7593
|
* Disallow duplicate adjacent branches in if chains.
|
|
7525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-if-branches.md
|
|
7526
7595
|
*/
|
|
7527
7596
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
7528
7597
|
/**
|
|
7529
7598
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
7530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
7531
7600
|
*/
|
|
7532
7601
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
7533
7602
|
/**
|
|
7534
7603
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
7535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-loops.md
|
|
7536
7605
|
*/
|
|
7537
7606
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
7538
7607
|
/**
|
|
7539
7608
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
7540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-set-values.md
|
|
7541
7610
|
*/
|
|
7542
7611
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
7543
7612
|
/**
|
|
7544
7613
|
* Disallow empty files.
|
|
7545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-empty-file.md
|
|
7546
7615
|
*/
|
|
7547
7616
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
7548
7617
|
/**
|
|
7549
7618
|
* Disallow assigning to built-in error properties.
|
|
7550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-error-property-assignment.md
|
|
7551
7620
|
*/
|
|
7552
7621
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7553
7622
|
/**
|
|
7554
7623
|
* Disallow exports in scripts.
|
|
7555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-exports-in-scripts.md
|
|
7556
7625
|
*/
|
|
7557
7626
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
7558
7627
|
/**
|
|
7559
7628
|
* Prefer `for…of` over the `forEach` method.
|
|
7560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-for-each.md
|
|
7561
7630
|
*/
|
|
7562
7631
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
7563
7632
|
/**
|
|
7564
7633
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
7565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-for-loop.md
|
|
7566
7635
|
*/
|
|
7567
7636
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
7568
7637
|
/**
|
|
7569
7638
|
* Disallow assigning properties on the global object.
|
|
7570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-global-object-property-assignment.md
|
|
7571
7640
|
*/
|
|
7572
7641
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7573
7642
|
/**
|
|
7574
7643
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
7575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
7576
7645
|
* @deprecated
|
|
7577
7646
|
*/
|
|
7578
7647
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
7579
7648
|
/**
|
|
7580
7649
|
* Disallow immediate mutation after variable assignment.
|
|
7581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-immediate-mutation.md
|
|
7582
7651
|
*/
|
|
7583
7652
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
7584
7653
|
/**
|
|
7585
7654
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
7586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-impossible-length-comparison.md
|
|
7587
7656
|
*/
|
|
7588
7657
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
7589
7658
|
/**
|
|
7590
7659
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
7591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-incorrect-query-selector.md
|
|
7592
7661
|
*/
|
|
7593
7662
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
7594
7663
|
/**
|
|
7595
7664
|
* Disallow incorrect template literal interpolation syntax.
|
|
7596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
7597
7666
|
*/
|
|
7598
7667
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
7599
7668
|
/**
|
|
7600
7669
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
7601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
7602
7671
|
* @deprecated
|
|
7603
7672
|
*/
|
|
7604
7673
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
7605
7674
|
/**
|
|
7606
7675
|
* Disallow `instanceof` with built-in objects
|
|
7607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-instanceof-builtins.md
|
|
7608
7677
|
*/
|
|
7609
7678
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
7610
7679
|
/**
|
|
7611
7680
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
7612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-argument-count.md
|
|
7613
7682
|
*/
|
|
7614
7683
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
7615
7684
|
/**
|
|
7616
7685
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
7617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-character-comparison.md
|
|
7618
7687
|
*/
|
|
7619
7688
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
7620
7689
|
/**
|
|
7621
7690
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
7622
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-fetch-options.md
|
|
7623
7692
|
*/
|
|
7624
7693
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7625
7694
|
/**
|
|
7626
7695
|
* Disallow invalid `accept` values on file inputs.
|
|
7627
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
7628
7697
|
*/
|
|
7629
7698
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
7630
7699
|
/**
|
|
7631
7700
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
7632
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
7633
7702
|
*/
|
|
7634
7703
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
7635
7704
|
/**
|
|
7636
7705
|
* Disallow invalid implementations of well-known symbol methods.
|
|
7637
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
7638
7707
|
*/
|
|
7639
7708
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
7640
7709
|
/**
|
|
7641
7710
|
* Disallow identifiers starting with `new` or `class`.
|
|
7642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7711
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-keyword-prefix.md
|
|
7643
7712
|
*/
|
|
7644
7713
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
7645
7714
|
/**
|
|
7646
7715
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
7647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-late-current-target-access.md
|
|
7648
7717
|
*/
|
|
7649
7718
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
7650
7719
|
/**
|
|
7651
7720
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
7652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-late-event-control.md
|
|
7653
7722
|
*/
|
|
7654
7723
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
7655
7724
|
/**
|
|
7656
7725
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
7657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
7658
7727
|
* @deprecated
|
|
7659
7728
|
*/
|
|
7660
7729
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
7661
7730
|
/**
|
|
7662
7731
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
7663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-lonely-if.md
|
|
7664
7733
|
*/
|
|
7665
7734
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
7666
7735
|
/**
|
|
7667
7736
|
* Disallow mutating a loop iterable during iteration.
|
|
7668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
7669
7738
|
*/
|
|
7670
7739
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
7671
7740
|
/**
|
|
7672
7741
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
7673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
7674
7743
|
*/
|
|
7675
7744
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7676
7745
|
/**
|
|
7677
7746
|
* Disallow manually wrapped comments.
|
|
7678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
7679
7748
|
*/
|
|
7680
7749
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
7681
7750
|
/**
|
|
7682
7751
|
* Disallow checking a Map key before accessing a different key.
|
|
7683
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-mismatched-map-key.md
|
|
7684
7753
|
*/
|
|
7685
7754
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
7686
7755
|
/**
|
|
7687
7756
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
7688
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-misrefactored-assignment.md
|
|
7689
7758
|
*/
|
|
7690
7759
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
7691
7760
|
/**
|
|
7692
7761
|
* Disallow references to missing local resources.
|
|
7693
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-missing-local-resource.md
|
|
7694
7763
|
*/
|
|
7695
7764
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
7696
7765
|
/**
|
|
7697
7766
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
7698
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
7699
7768
|
*/
|
|
7700
7769
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
7701
7770
|
/**
|
|
7702
7771
|
* Disallow named usage of default import and export.
|
|
7703
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-named-default.md
|
|
7704
7773
|
*/
|
|
7705
7774
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
7706
7775
|
/**
|
|
7707
7776
|
* Disallow negated array predicate calls.
|
|
7708
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negated-array-predicate.md
|
|
7709
7778
|
*/
|
|
7710
7779
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7711
7780
|
/**
|
|
7712
7781
|
* Disallow negated comparisons.
|
|
7713
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negated-comparison.md
|
|
7714
7783
|
*/
|
|
7715
7784
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
7716
7785
|
/**
|
|
7717
7786
|
* Disallow negated conditions.
|
|
7718
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negated-condition.md
|
|
7719
7788
|
*/
|
|
7720
7789
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
7721
7790
|
/**
|
|
7722
7791
|
* Disallow negated expression in equality check.
|
|
7723
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negation-in-equality-check.md
|
|
7724
7793
|
*/
|
|
7725
7794
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
7726
7795
|
/**
|
|
7727
7796
|
* Disallow nested ternary expressions.
|
|
7728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-nested-ternary.md
|
|
7729
7798
|
*/
|
|
7730
7799
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7731
7800
|
/**
|
|
7732
7801
|
* Disallow `new Array()`.
|
|
7733
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-new-array.md
|
|
7734
7803
|
*/
|
|
7735
7804
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
7736
7805
|
/**
|
|
7737
7806
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
7738
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-new-buffer.md
|
|
7739
7808
|
*/
|
|
7740
7809
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
7741
7810
|
/**
|
|
7742
7811
|
* Disallow non-function values with function-style verb prefixes.
|
|
7743
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
7744
7813
|
*/
|
|
7745
7814
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
7746
7815
|
/**
|
|
7747
7816
|
* Disallow non-standard properties on built-in objects.
|
|
7748
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
7749
7818
|
*/
|
|
7750
7819
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
7751
7820
|
/**
|
|
7752
7821
|
* Disallow the use of the `null` literal.
|
|
7753
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-null.md
|
|
7754
7823
|
*/
|
|
7755
7824
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
7756
7825
|
/**
|
|
7757
7826
|
* Disallow the use of objects as default parameters.
|
|
7758
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-object-as-default-parameter.md
|
|
7759
7828
|
*/
|
|
7760
7829
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
7761
7830
|
/**
|
|
7762
7831
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
7763
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7832
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-object-methods-with-collections.md
|
|
7764
7833
|
*/
|
|
7765
7834
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
7766
7835
|
/**
|
|
7767
7836
|
* Disallow optional chaining on undeclared variables.
|
|
7768
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
7769
7838
|
*/
|
|
7770
7839
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
7771
7840
|
/**
|
|
7772
7841
|
* Disallow `process.exit()`.
|
|
7773
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-process-exit.md
|
|
7774
7843
|
*/
|
|
7775
7844
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
7776
7845
|
/**
|
|
7777
7846
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
7778
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-redundant-comparison.md
|
|
7779
7848
|
*/
|
|
7780
7849
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
7781
7850
|
/**
|
|
7782
7851
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
7783
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7852
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-return-array-push.md
|
|
7784
7853
|
*/
|
|
7785
7854
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
7786
7855
|
/**
|
|
7787
7856
|
* Disallow selector syntax in DOM names.
|
|
7788
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7857
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-selector-as-dom-name.md
|
|
7789
7858
|
*/
|
|
7790
7859
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
7791
7860
|
/**
|
|
7792
7861
|
* Disallow shorthand properties that override related longhand properties.
|
|
7793
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
7794
7863
|
*/
|
|
7795
7864
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
7796
7865
|
/**
|
|
7797
7866
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
7798
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
7799
7868
|
*/
|
|
7800
7869
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7801
7870
|
/**
|
|
7802
7871
|
* Disallow classes that only have static members.
|
|
7803
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-static-only-class.md
|
|
7804
7873
|
*/
|
|
7805
7874
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
7806
7875
|
/**
|
|
7807
7876
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
7808
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-subtraction-comparison.md
|
|
7809
7878
|
*/
|
|
7810
7879
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
7811
7880
|
/**
|
|
7812
7881
|
* Disallow `then` property.
|
|
7813
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-thenable.md
|
|
7814
7883
|
*/
|
|
7815
7884
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
7816
7885
|
/**
|
|
7817
7886
|
* Disallow assigning `this` to a variable.
|
|
7818
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-this-assignment.md
|
|
7819
7888
|
*/
|
|
7820
7889
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
7821
7890
|
/**
|
|
7822
7891
|
* Disallow `this` outside of classes.
|
|
7823
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-this-outside-of-class.md
|
|
7824
7893
|
*/
|
|
7825
7894
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
7826
7895
|
/**
|
|
7827
7896
|
* Disallow assigning to top-level variables from inside functions.
|
|
7828
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
7829
7898
|
*/
|
|
7830
7899
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
7831
7900
|
/**
|
|
7832
7901
|
* Disallow top-level side effects in exported modules.
|
|
7833
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-top-level-side-effects.md
|
|
7834
7903
|
*/
|
|
7835
7904
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
7836
7905
|
/**
|
|
7837
7906
|
* Disallow `all` as a transition property.
|
|
7838
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7907
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-transition-all.md
|
|
7839
7908
|
*/
|
|
7840
7909
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
7841
7910
|
/**
|
|
7842
7911
|
* Disallow comparing `undefined` using `typeof`.
|
|
7843
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-typeof-undefined.md
|
|
7844
7913
|
*/
|
|
7845
7914
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
7846
7915
|
/**
|
|
7847
7916
|
* Disallow referencing methods without calling them.
|
|
7848
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7917
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-uncalled-method.md
|
|
7849
7918
|
*/
|
|
7850
7919
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
7851
7920
|
/**
|
|
7852
7921
|
* Require class members to be declared.
|
|
7853
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-undeclared-class-members.md
|
|
7854
7923
|
*/
|
|
7855
7924
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
7856
7925
|
/**
|
|
7857
7926
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
7858
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
7859
7928
|
*/
|
|
7860
7929
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7861
7930
|
/**
|
|
7862
7931
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
7863
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7932
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
7864
7933
|
*/
|
|
7865
7934
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7866
7935
|
/**
|
|
7867
7936
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
7868
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7937
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
7869
7938
|
*/
|
|
7870
7939
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
7871
7940
|
/**
|
|
7872
7941
|
* Disallow awaiting non-promise values.
|
|
7873
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7942
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-await.md
|
|
7874
7943
|
*/
|
|
7875
7944
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
7876
7945
|
/**
|
|
7877
7946
|
* Disallow unnecessary comparisons against boolean literals.
|
|
7878
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7947
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
7879
7948
|
*/
|
|
7880
7949
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
7881
7950
|
/**
|
|
7882
7951
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
7883
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
7884
7953
|
*/
|
|
7885
7954
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7886
7955
|
/**
|
|
7887
7956
|
* Disallow unnecessary `globalThis` references.
|
|
7888
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7957
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-global-this.md
|
|
7889
7958
|
*/
|
|
7890
7959
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
7891
7960
|
/**
|
|
7892
7961
|
* Disallow unnecessary nested ternary expressions.
|
|
7893
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
7894
7963
|
*/
|
|
7895
7964
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7896
7965
|
/**
|
|
7897
7966
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
7898
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
7899
7968
|
*/
|
|
7900
7969
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
7901
7970
|
/**
|
|
7902
7971
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
7903
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
7904
7973
|
*/
|
|
7905
7974
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
7906
7975
|
/**
|
|
7907
7976
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
7908
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-splice.md
|
|
7909
7978
|
*/
|
|
7910
7979
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
7911
7980
|
/**
|
|
7912
7981
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
7913
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
7914
7983
|
*/
|
|
7915
7984
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
7916
7985
|
/**
|
|
7917
7986
|
* Disallow unreadable array destructuring.
|
|
7918
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
7919
7988
|
*/
|
|
7920
7989
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
7921
7990
|
/**
|
|
7922
7991
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
7923
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
7924
7993
|
*/
|
|
7925
7994
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
7926
7995
|
/**
|
|
7927
7996
|
* Disallow unreadable IIFEs.
|
|
7928
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-iife.md
|
|
7929
7998
|
*/
|
|
7930
7999
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
7931
8000
|
/**
|
|
7932
8001
|
* Disallow unreadable `new` expressions.
|
|
7933
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-new-expression.md
|
|
7934
8003
|
*/
|
|
7935
8004
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
7936
8005
|
/**
|
|
7937
8006
|
* Disallow unreadable object destructuring.
|
|
7938
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
7939
8008
|
*/
|
|
7940
8009
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
7941
8010
|
/**
|
|
7942
8011
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
7943
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
7944
8013
|
*/
|
|
7945
8014
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
7946
8015
|
/**
|
|
7947
8016
|
* Disallow unsafe DOM HTML APIs.
|
|
7948
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8017
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-dom-html.md
|
|
7949
8018
|
*/
|
|
7950
8019
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
7951
8020
|
/**
|
|
7952
8021
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
7953
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
7954
8023
|
*/
|
|
7955
8024
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
7956
8025
|
/**
|
|
7957
8026
|
* Disallow unsafe values as property keys.
|
|
7958
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-property-key.md
|
|
7959
8028
|
*/
|
|
7960
8029
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
7961
8030
|
/**
|
|
7962
8031
|
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
7963
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
7964
8033
|
*/
|
|
7965
8034
|
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
7966
8035
|
/**
|
|
7967
8036
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
7968
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
7969
8038
|
*/
|
|
7970
8039
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
7971
8040
|
/**
|
|
7972
8041
|
* Disallow ignoring the return value of selected array methods.
|
|
7973
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unused-array-method-return.md
|
|
7974
8043
|
*/
|
|
7975
8044
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
7976
8045
|
/**
|
|
7977
8046
|
* Disallow unused object properties.
|
|
7978
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unused-properties.md
|
|
7979
8048
|
*/
|
|
7980
8049
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
7981
8050
|
/**
|
|
7982
8051
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
7983
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-boolean-cast.md
|
|
7984
8053
|
*/
|
|
7985
8054
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
7986
8055
|
/**
|
|
7987
8056
|
* Disallow useless type coercions of values that are already of the target type.
|
|
7988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-coercion.md
|
|
7989
8058
|
*/
|
|
7990
8059
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
7991
8060
|
/**
|
|
7992
8061
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
7993
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-collection-argument.md
|
|
7994
8063
|
*/
|
|
7995
8064
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
7996
8065
|
/**
|
|
7997
8066
|
* Disallow useless compound assignments such as `x += 0`.
|
|
7998
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-compound-assignment.md
|
|
7999
8068
|
*/
|
|
8000
8069
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
8001
8070
|
/**
|
|
8002
8071
|
* Disallow useless concatenation of literals.
|
|
8003
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8072
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-concat.md
|
|
8004
8073
|
*/
|
|
8005
8074
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
8006
8075
|
/**
|
|
8007
8076
|
* Disallow useless `continue` statements.
|
|
8008
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-continue.md
|
|
8009
8078
|
*/
|
|
8010
8079
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
8011
8080
|
/**
|
|
8012
8081
|
* Disallow unnecessary existence checks before deletion.
|
|
8013
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-delete-check.md
|
|
8014
8083
|
*/
|
|
8015
8084
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
8016
8085
|
/**
|
|
8017
8086
|
* Disallow `else` after a statement that exits.
|
|
8018
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-else.md
|
|
8019
8088
|
*/
|
|
8020
8089
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
8021
8090
|
/**
|
|
8022
8091
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
8023
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
8024
8093
|
*/
|
|
8025
8094
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
8026
8095
|
/**
|
|
8027
8096
|
* Disallow useless fallback when spreading in object literals.
|
|
8028
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
8029
8098
|
*/
|
|
8030
8099
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
8031
8100
|
/**
|
|
8032
8101
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
8033
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
8034
8103
|
*/
|
|
8035
8104
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8036
8105
|
/**
|
|
8037
8106
|
* Disallow useless array length check.
|
|
8038
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-length-check.md
|
|
8039
8108
|
*/
|
|
8040
8109
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
8041
8110
|
/**
|
|
8042
8111
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
8043
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-logical-operand.md
|
|
8044
8113
|
*/
|
|
8045
8114
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
8046
8115
|
/**
|
|
8047
8116
|
* Disallow useless overrides of class methods.
|
|
8048
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8117
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-override.md
|
|
8049
8118
|
*/
|
|
8050
8119
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
8051
8120
|
/**
|
|
8052
8121
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
8053
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
8054
8123
|
*/
|
|
8055
8124
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
8056
8125
|
/**
|
|
8057
8126
|
* Disallow redundant re-exports.
|
|
8058
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-re-export.md
|
|
8059
8128
|
*/
|
|
8060
8129
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
8061
8130
|
/**
|
|
8062
8131
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
8063
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-recursion.md
|
|
8064
8133
|
*/
|
|
8065
8134
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
8066
8135
|
/**
|
|
8067
8136
|
* Disallow unnecessary spread.
|
|
8068
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-spread.md
|
|
8069
8138
|
*/
|
|
8070
8139
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
8071
8140
|
/**
|
|
8072
8141
|
* Disallow useless case in switch statements.
|
|
8073
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-switch-case.md
|
|
8074
8143
|
*/
|
|
8075
8144
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
8076
8145
|
/**
|
|
8077
8146
|
* Disallow useless template literal expressions.
|
|
8078
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8147
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-template-literals.md
|
|
8079
8148
|
*/
|
|
8080
8149
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
8081
8150
|
/**
|
|
8082
8151
|
* Disallow useless `undefined`.
|
|
8083
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-undefined.md
|
|
8084
8153
|
*/
|
|
8085
8154
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
8086
8155
|
/**
|
|
8087
8156
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
8088
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
8089
8158
|
*/
|
|
8090
8159
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
8091
8160
|
/**
|
|
8092
8161
|
* Disallow number literals with zero fractions or dangling dots.
|
|
8093
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8162
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-zero-fractions.md
|
|
8094
8163
|
*/
|
|
8095
8164
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
8096
8165
|
/**
|
|
8097
8166
|
* Enforce proper case for numeric literals.
|
|
8098
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/number-literal-case.md
|
|
8099
8168
|
*/
|
|
8100
8169
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
8101
8170
|
/**
|
|
8102
8171
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
8103
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/numeric-separators-style.md
|
|
8104
8173
|
*/
|
|
8105
8174
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
8106
8175
|
/**
|
|
8107
8176
|
* Require assignment operator shorthand where possible.
|
|
8108
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8177
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/operator-assignment.md
|
|
8109
8178
|
*/
|
|
8110
8179
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
8111
8180
|
/**
|
|
8112
8181
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
8113
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-abort-signal-any.md
|
|
8114
8183
|
*/
|
|
8115
8184
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
8116
8185
|
/**
|
|
8117
8186
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
8118
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8187
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
8119
8188
|
*/
|
|
8120
8189
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
8121
8190
|
/**
|
|
8122
8191
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
8123
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8192
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-add-event-listener.md
|
|
8124
8193
|
*/
|
|
8125
8194
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
8126
8195
|
/**
|
|
8127
8196
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
8128
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8197
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
8129
8198
|
*/
|
|
8130
8199
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
8131
8200
|
/**
|
|
8132
8201
|
* Prefer `AggregateError` when throwing collected errors.
|
|
8133
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8202
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-aggregate-error.md
|
|
8134
8203
|
*/
|
|
8135
8204
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
8136
8205
|
/**
|
|
8137
8206
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
8138
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8207
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-find.md
|
|
8139
8208
|
*/
|
|
8140
8209
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
8141
8210
|
/**
|
|
8142
8211
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
8143
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8212
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-flat.md
|
|
8144
8213
|
*/
|
|
8145
8214
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
8146
8215
|
/**
|
|
8147
8216
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
8148
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8217
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-flat-map.md
|
|
8149
8218
|
*/
|
|
8150
8219
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8151
8220
|
/**
|
|
8152
8221
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
8153
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8222
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-from-async.md
|
|
8154
8223
|
*/
|
|
8155
8224
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
8156
8225
|
/**
|
|
8157
8226
|
* Prefer using the `Array.from()` mapping function argument.
|
|
8158
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8227
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-from-map.md
|
|
8159
8228
|
*/
|
|
8160
8229
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
8161
8230
|
/**
|
|
8162
8231
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
8163
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8232
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-from-range.md
|
|
8164
8233
|
*/
|
|
8165
8234
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
8166
8235
|
/**
|
|
8167
8236
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
8168
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8237
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-index-of.md
|
|
8169
8238
|
*/
|
|
8170
8239
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
8171
8240
|
/**
|
|
8172
8241
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
8173
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8242
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
8174
8243
|
*/
|
|
8175
8244
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8176
8245
|
/**
|
|
8177
8246
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
8178
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8247
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-last-methods.md
|
|
8179
8248
|
*/
|
|
8180
8249
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
8181
8250
|
/**
|
|
8182
8251
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
8183
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8252
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-slice.md
|
|
8184
8253
|
*/
|
|
8185
8254
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
8186
8255
|
/**
|
|
8187
8256
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
8188
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8257
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-some.md
|
|
8189
8258
|
*/
|
|
8190
8259
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
8191
8260
|
/**
|
|
8192
8261
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
8193
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8262
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-at.md
|
|
8194
8263
|
*/
|
|
8195
8264
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
8196
8265
|
/**
|
|
8197
8266
|
* Prefer `await` over promise chaining.
|
|
8198
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8267
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-await.md
|
|
8199
8268
|
*/
|
|
8200
8269
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
8201
8270
|
/**
|
|
8202
8271
|
* Prefer `BigInt` literals over the constructor.
|
|
8203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8272
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-bigint-literals.md
|
|
8204
8273
|
*/
|
|
8205
8274
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
8206
8275
|
/**
|
|
8207
8276
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
8208
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8277
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
8209
8278
|
*/
|
|
8210
8279
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
8211
8280
|
/**
|
|
8212
8281
|
* Prefer block statements over IIFEs used only for scoping.
|
|
8213
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8282
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
8214
8283
|
*/
|
|
8215
8284
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
8216
8285
|
/**
|
|
8217
8286
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
8218
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8287
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-boolean-return.md
|
|
8219
8288
|
*/
|
|
8220
8289
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8221
8290
|
/**
|
|
8222
8291
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
8223
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8292
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-class-fields.md
|
|
8224
8293
|
*/
|
|
8225
8294
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
8226
8295
|
/**
|
|
8227
8296
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
8228
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8297
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-classlist-toggle.md
|
|
8229
8298
|
*/
|
|
8230
8299
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
8231
8300
|
/**
|
|
8232
8301
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
8233
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8302
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-code-point.md
|
|
8234
8303
|
*/
|
|
8235
8304
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
8236
8305
|
/**
|
|
8237
8306
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
8238
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8307
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-continue.md
|
|
8239
8308
|
*/
|
|
8240
8309
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
8241
8310
|
/**
|
|
8242
8311
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
8243
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8312
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-date-now.md
|
|
8244
8313
|
*/
|
|
8245
8314
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
8246
8315
|
/**
|
|
8247
8316
|
* Prefer default parameters over reassignment.
|
|
8248
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-default-parameters.md
|
|
8249
8318
|
*/
|
|
8250
8319
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
8251
8320
|
/**
|
|
8252
8321
|
* Prefer direct iteration over default iterator method calls.
|
|
8253
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8322
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-direct-iteration.md
|
|
8254
8323
|
*/
|
|
8255
8324
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
8256
8325
|
/**
|
|
8257
8326
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
8258
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8327
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dispose.md
|
|
8259
8328
|
*/
|
|
8260
8329
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
8261
8330
|
/**
|
|
8262
8331
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
8263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8332
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-append.md
|
|
8264
8333
|
*/
|
|
8265
8334
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
8266
8335
|
/**
|
|
8267
8336
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
8268
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8337
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
8269
8338
|
* @deprecated
|
|
8270
8339
|
*/
|
|
8271
8340
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
8272
8341
|
/**
|
|
8273
8342
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
8274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
8275
8344
|
*/
|
|
8276
8345
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
8277
8346
|
/**
|
|
8278
8347
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
8279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-remove.md
|
|
8280
8349
|
*/
|
|
8281
8350
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
8282
8351
|
/**
|
|
8283
8352
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
8284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
8285
8354
|
*/
|
|
8286
8355
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
8287
8356
|
/**
|
|
8288
8357
|
* Prefer `.textContent` over `.innerText`.
|
|
8289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
8290
8359
|
*/
|
|
8291
8360
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
8292
8361
|
/**
|
|
8293
8362
|
* Prefer early returns over full-function conditional wrapping.
|
|
8294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-early-return.md
|
|
8295
8364
|
*/
|
|
8296
8365
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
8297
8366
|
/**
|
|
8298
8367
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
8299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-else-if.md
|
|
8300
8369
|
*/
|
|
8301
8370
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
8302
8371
|
/**
|
|
8303
8372
|
* Prefer `Error.isError()` when checking for errors.
|
|
8304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-error-is-error.md
|
|
8305
8374
|
*/
|
|
8306
8375
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
8307
8376
|
/**
|
|
8308
8377
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
8309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-event-target.md
|
|
8310
8379
|
*/
|
|
8311
8380
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
8312
8381
|
/**
|
|
8313
8382
|
* Prefer explicit viewport units.
|
|
8314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
8315
8384
|
*/
|
|
8316
8385
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
8317
8386
|
/**
|
|
8318
8387
|
* Prefer `export…from` when re-exporting.
|
|
8319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-export-from.md
|
|
8320
8389
|
*/
|
|
8321
8390
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
8322
8391
|
/**
|
|
8323
8392
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
8324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
8325
8394
|
*/
|
|
8326
8395
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8327
8396
|
/**
|
|
8328
8397
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
8329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
8330
8399
|
*/
|
|
8331
8400
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
8332
8401
|
/**
|
|
8333
8402
|
* Prefer global numeric constants over `Number` static properties.
|
|
8334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-global-number-constants.md
|
|
8335
8404
|
*/
|
|
8336
8405
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
8337
8406
|
/**
|
|
8338
8407
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
8339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-global-this.md
|
|
8340
8409
|
*/
|
|
8341
8410
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
8342
8411
|
/**
|
|
8343
8412
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
8344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-group-by.md
|
|
8345
8414
|
*/
|
|
8346
8415
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
8347
8416
|
/**
|
|
8348
8417
|
* Prefer `.has()` when checking existence.
|
|
8349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-has-check.md
|
|
8350
8419
|
*/
|
|
8351
8420
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
8352
8421
|
/**
|
|
8353
8422
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
8354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
8355
8424
|
*/
|
|
8356
8425
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
8357
8426
|
/**
|
|
8358
8427
|
* Prefer HTTPS over HTTP.
|
|
8359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-https.md
|
|
8360
8429
|
*/
|
|
8361
8430
|
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
8362
8431
|
/**
|
|
8363
8432
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
8364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
8365
8434
|
*/
|
|
8366
8435
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
8367
8436
|
/**
|
|
8368
8437
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
8369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-import-meta-properties.md
|
|
8370
8439
|
*/
|
|
8371
8440
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
8372
8441
|
/**
|
|
8373
8442
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
8374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-includes.md
|
|
8375
8444
|
*/
|
|
8376
8445
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
8377
8446
|
/**
|
|
8378
8447
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
8379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
8380
8449
|
*/
|
|
8381
8450
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
8382
8451
|
/**
|
|
8383
8452
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
8384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
8385
8454
|
*/
|
|
8386
8455
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
8387
8456
|
/**
|
|
8388
8457
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
8389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-concat.md
|
|
8390
8459
|
*/
|
|
8391
8460
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
8392
8461
|
/**
|
|
8393
8462
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
8394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8463
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-helpers.md
|
|
8395
8464
|
*/
|
|
8396
8465
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
8397
8466
|
/**
|
|
8398
8467
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
8399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8468
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-to-array.md
|
|
8400
8469
|
*/
|
|
8401
8470
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8402
8471
|
/**
|
|
8403
8472
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
8404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8473
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
8405
8474
|
*/
|
|
8406
8475
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
8407
8476
|
/**
|
|
8408
8477
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
8409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
8410
8479
|
* @deprecated
|
|
8411
8480
|
*/
|
|
8412
8481
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
8413
8482
|
/**
|
|
8414
8483
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
8415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
8416
8485
|
*/
|
|
8417
8486
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
8418
8487
|
/**
|
|
8419
8488
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
8420
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-location-assign.md
|
|
8421
8490
|
*/
|
|
8422
8491
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
8423
8492
|
/**
|
|
8424
8493
|
* Prefer using a logical operator over a ternary.
|
|
8425
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
8426
8495
|
*/
|
|
8427
8496
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
8428
8497
|
/**
|
|
8429
8498
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
8430
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-map-from-entries.md
|
|
8431
8500
|
*/
|
|
8432
8501
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
8433
8502
|
/**
|
|
8434
8503
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
8435
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-abs.md
|
|
8436
8505
|
*/
|
|
8437
8506
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
8438
8507
|
/**
|
|
8439
8508
|
* Prefer `Math` constants over their approximate numeric values.
|
|
8440
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-constants.md
|
|
8441
8510
|
*/
|
|
8442
8511
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
8443
8512
|
/**
|
|
8444
8513
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
8445
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-min-max.md
|
|
8446
8515
|
*/
|
|
8447
8516
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8448
8517
|
/**
|
|
8449
8518
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
8450
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-trunc.md
|
|
8451
8520
|
*/
|
|
8452
8521
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
8453
8522
|
/**
|
|
8454
8523
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
8455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-minimal-ternary.md
|
|
8456
8525
|
*/
|
|
8457
8526
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
8458
8527
|
/**
|
|
8459
8528
|
* Prefer modern DOM APIs.
|
|
8460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
8461
8530
|
*/
|
|
8462
8531
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
8463
8532
|
/**
|
|
8464
8533
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
8465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-modern-math-apis.md
|
|
8466
8535
|
*/
|
|
8467
8536
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
8468
8537
|
/**
|
|
8469
8538
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
8470
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-module.md
|
|
8471
8540
|
*/
|
|
8472
8541
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
8473
8542
|
/**
|
|
8474
8543
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
8475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
8476
8545
|
*/
|
|
8477
8546
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
8478
8547
|
/**
|
|
8479
8548
|
* Prefer negative index over `.length - index` when possible.
|
|
8480
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-negative-index.md
|
|
8481
8550
|
*/
|
|
8482
8551
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
8483
8552
|
/**
|
|
8484
8553
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
8485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-node-protocol.md
|
|
8486
8555
|
*/
|
|
8487
8556
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
8488
8557
|
/**
|
|
8489
8558
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
8490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-number-coercion.md
|
|
8491
8560
|
*/
|
|
8492
8561
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
8493
8562
|
/**
|
|
8494
8563
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
8495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
8496
8565
|
*/
|
|
8497
8566
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
8498
8567
|
/**
|
|
8499
8568
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
8500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-number-properties.md
|
|
8501
8570
|
*/
|
|
8502
8571
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
8503
8572
|
/**
|
|
8504
8573
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
8505
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-define-properties.md
|
|
8506
8575
|
*/
|
|
8507
8576
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
8508
8577
|
/**
|
|
8509
8578
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
8510
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
8511
8580
|
*/
|
|
8512
8581
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
8513
8582
|
/**
|
|
8514
8583
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
8515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-from-entries.md
|
|
8516
8585
|
*/
|
|
8517
8586
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
8518
8587
|
/**
|
|
8519
8588
|
* Prefer the most specific `Object` iterable method.
|
|
8520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
8521
8590
|
*/
|
|
8522
8591
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8523
8592
|
/**
|
|
8524
8593
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
8525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-observer-apis.md
|
|
8526
8595
|
*/
|
|
8527
8596
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
8528
8597
|
/**
|
|
8529
8598
|
* Prefer omitting the `catch` binding parameter.
|
|
8530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
8531
8600
|
*/
|
|
8532
8601
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
8533
8602
|
/**
|
|
8534
8603
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
8535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-path2d.md
|
|
8536
8605
|
*/
|
|
8537
8606
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
8538
8607
|
/**
|
|
8539
8608
|
* Prefer private class fields over the underscore-prefix convention.
|
|
8540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-private-class-fields.md
|
|
8541
8610
|
*/
|
|
8542
8611
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
8543
8612
|
/**
|
|
8544
8613
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
8545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-promise-try.md
|
|
8546
8615
|
*/
|
|
8547
8616
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
8548
8617
|
/**
|
|
8549
8618
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
8550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
8551
8620
|
*/
|
|
8552
8621
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
8553
8622
|
/**
|
|
8554
8623
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
8555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-prototype-methods.md
|
|
8556
8625
|
*/
|
|
8557
8626
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
8558
8627
|
/**
|
|
8559
8628
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
8560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-query-selector.md
|
|
8561
8630
|
*/
|
|
8562
8631
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
8563
8632
|
/**
|
|
8564
8633
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
8565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-queue-microtask.md
|
|
8566
8635
|
*/
|
|
8567
8636
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
8568
8637
|
/**
|
|
8569
8638
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
8570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-reflect-apply.md
|
|
8571
8640
|
*/
|
|
8572
8641
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
8573
8642
|
/**
|
|
8574
8643
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
8575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-regexp-escape.md
|
|
8576
8645
|
*/
|
|
8577
8646
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
8578
8647
|
/**
|
|
8579
8648
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
8580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-regexp-test.md
|
|
8581
8650
|
*/
|
|
8582
8651
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
8583
8652
|
/**
|
|
8584
8653
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
8585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-response-static-json.md
|
|
8586
8655
|
*/
|
|
8587
8656
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
8588
8657
|
/**
|
|
8589
8658
|
* Prefer `:scope` when using element query selector methods.
|
|
8590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-scoped-selector.md
|
|
8591
8660
|
*/
|
|
8592
8661
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
8593
8662
|
/**
|
|
8594
8663
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
8595
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-set-has.md
|
|
8596
8665
|
*/
|
|
8597
8666
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
8598
8667
|
/**
|
|
8599
8668
|
* Prefer `Set` methods for Set operations.
|
|
8600
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-set-methods.md
|
|
8601
8670
|
*/
|
|
8602
8671
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
8603
8672
|
/**
|
|
8604
8673
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
8605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-set-size.md
|
|
8606
8675
|
*/
|
|
8607
8676
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
8608
8677
|
/**
|
|
8609
8678
|
* Prefer arrow function properties over methods with a single return.
|
|
8610
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-short-arrow-method.md
|
|
8611
8680
|
*/
|
|
8612
8681
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
8613
8682
|
/**
|
|
8614
8683
|
* Prefer simple conditions first in logical expressions.
|
|
8615
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-simple-condition-first.md
|
|
8616
8685
|
*/
|
|
8617
8686
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
8618
8687
|
/**
|
|
8619
8688
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
8620
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
8621
8690
|
*/
|
|
8622
8691
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
8623
8692
|
/**
|
|
8624
8693
|
* Prefer simplified conditions.
|
|
8625
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-simplified-conditions.md
|
|
8626
8695
|
*/
|
|
8627
8696
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
8628
8697
|
/**
|
|
8629
8698
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
8630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-array-predicate.md
|
|
8631
8700
|
*/
|
|
8632
8701
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
8633
8702
|
/**
|
|
8634
8703
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
8635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-call.md
|
|
8636
8705
|
*/
|
|
8637
8706
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
8638
8707
|
/**
|
|
8639
8708
|
* Prefer a single object destructuring declaration per local const source.
|
|
8640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
8641
8710
|
*/
|
|
8642
8711
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8643
8712
|
/**
|
|
8644
8713
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
8645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-replace.md
|
|
8646
8715
|
*/
|
|
8647
8716
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
8648
8717
|
/**
|
|
8649
8718
|
* Prefer declaring variables in the smallest possible scope.
|
|
8650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-smaller-scope.md
|
|
8651
8720
|
*/
|
|
8652
8721
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
8653
8722
|
/**
|
|
8654
8723
|
* Prefer `String#split()` with a limit.
|
|
8655
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-split-limit.md
|
|
8656
8725
|
*/
|
|
8657
8726
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
8658
8727
|
/**
|
|
8659
8728
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
8660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-spread.md
|
|
8661
8730
|
*/
|
|
8662
8731
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
8663
8732
|
/**
|
|
8664
8733
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
8665
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-match-all.md
|
|
8666
8735
|
*/
|
|
8667
8736
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
8668
8737
|
/**
|
|
8669
8738
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
8670
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8739
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
8671
8740
|
*/
|
|
8672
8741
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
8673
8742
|
/**
|
|
8674
8743
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
8675
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-raw.md
|
|
8676
8745
|
*/
|
|
8677
8746
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
8678
8747
|
/**
|
|
8679
8748
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
8680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8749
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-repeat.md
|
|
8681
8750
|
*/
|
|
8682
8751
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
8683
8752
|
/**
|
|
8684
8753
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
8685
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-replace-all.md
|
|
8686
8755
|
*/
|
|
8687
8756
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
8688
8757
|
/**
|
|
8689
8758
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
8690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-slice.md
|
|
8691
8760
|
*/
|
|
8692
8761
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
8693
8762
|
/**
|
|
8694
8763
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
8695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8764
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
8696
8765
|
*/
|
|
8697
8766
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
8698
8767
|
/**
|
|
8699
8768
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
8700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8769
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
8701
8770
|
*/
|
|
8702
8771
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
8703
8772
|
/**
|
|
8704
8773
|
* Prefer using `structuredClone` to create a deep clone.
|
|
8705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8774
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-structured-clone.md
|
|
8706
8775
|
*/
|
|
8707
8776
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
8708
8777
|
/**
|
|
8709
8778
|
* Prefer `switch` over multiple `else-if`.
|
|
8710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8779
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-switch.md
|
|
8711
8780
|
*/
|
|
8712
8781
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
8713
8782
|
/**
|
|
8714
8783
|
* Prefer `Temporal` over `Date`.
|
|
8715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8784
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-temporal.md
|
|
8716
8785
|
*/
|
|
8717
8786
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
8718
8787
|
/**
|
|
8719
8788
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
8720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8789
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-ternary.md
|
|
8721
8790
|
*/
|
|
8722
8791
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
8723
8792
|
/**
|
|
8724
8793
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
8725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8794
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-then-catch.md
|
|
8726
8795
|
*/
|
|
8727
8796
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
8728
8797
|
/**
|
|
8729
8798
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
8730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8799
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-toggle-attribute.md
|
|
8731
8800
|
*/
|
|
8732
8801
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
8733
8802
|
/**
|
|
8734
8803
|
* Prefer top-level await over top-level promises and async function calls.
|
|
8735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8804
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-top-level-await.md
|
|
8736
8805
|
*/
|
|
8737
8806
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
8738
8807
|
/**
|
|
8739
8808
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
8740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-type-error.md
|
|
8741
8810
|
*/
|
|
8742
8811
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
8743
8812
|
/**
|
|
8744
8813
|
* Require type literals to be last in union types.
|
|
8745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8814
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-type-literal-last.md
|
|
8746
8815
|
*/
|
|
8747
8816
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
8748
8817
|
/**
|
|
8749
8818
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
8750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8819
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-uint8array-base64.md
|
|
8751
8820
|
*/
|
|
8752
8821
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
8753
8822
|
/**
|
|
8754
8823
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
8755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8824
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-unary-minus.md
|
|
8756
8825
|
*/
|
|
8757
8826
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
8758
8827
|
/**
|
|
8759
8828
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
8760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8829
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
8761
8830
|
*/
|
|
8762
8831
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
8763
8832
|
/**
|
|
8764
8833
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
8765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8834
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-url-can-parse.md
|
|
8766
8835
|
*/
|
|
8767
8836
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
8768
8837
|
/**
|
|
8769
8838
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
8770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8839
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-url-href.md
|
|
8771
8840
|
*/
|
|
8772
8841
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
8773
8842
|
/**
|
|
8774
8843
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
8775
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8844
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-url-search-parameters.md
|
|
8776
8845
|
*/
|
|
8777
8846
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
8778
8847
|
/**
|
|
8779
8848
|
* Prefer putting the condition in the while statement.
|
|
8780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8849
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-while-loop-condition.md
|
|
8781
8850
|
*/
|
|
8782
8851
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
8783
8852
|
/**
|
|
8784
8853
|
* Renamed to `unicorn/name-replacements`.
|
|
8785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8854
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
8786
8855
|
* @deprecated
|
|
8787
8856
|
*/
|
|
8788
8857
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
8789
8858
|
/**
|
|
8790
8859
|
* Enforce consistent relative URL style.
|
|
8791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/relative-url-style.md
|
|
8792
8861
|
*/
|
|
8793
8862
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
8794
8863
|
/**
|
|
8795
8864
|
* Enforce using the separator argument with `Array#join()`.
|
|
8796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-array-join-separator.md
|
|
8797
8866
|
*/
|
|
8798
8867
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
8799
8868
|
/**
|
|
8800
8869
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
8801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-array-sort-compare.md
|
|
8802
8871
|
*/
|
|
8803
8872
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
8804
8873
|
/**
|
|
8805
8874
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
8806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-css-escape.md
|
|
8807
8876
|
*/
|
|
8808
8877
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
8809
8878
|
/**
|
|
8810
8879
|
* Require configured YAML frontmatter fields.
|
|
8811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-frontmatter-fields.md
|
|
8812
8881
|
*/
|
|
8813
8882
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
8814
8883
|
/**
|
|
8815
8884
|
* Require non-empty module attributes for imports and exports
|
|
8816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-module-attributes.md
|
|
8817
8886
|
*/
|
|
8818
8887
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
8819
8888
|
/**
|
|
8820
8889
|
* Require non-empty specifier list in import and export statements.
|
|
8821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-module-specifiers.md
|
|
8822
8891
|
*/
|
|
8823
8892
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
8824
8893
|
/**
|
|
8825
8894
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
8826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
8827
8896
|
*/
|
|
8828
8897
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
8829
8898
|
/**
|
|
8830
8899
|
* Require passive event listeners for high-frequency events.
|
|
8831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-passive-events.md
|
|
8832
8901
|
*/
|
|
8833
8902
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
8834
8903
|
/**
|
|
8835
8904
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
8836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-post-message-target-origin.md
|
|
8837
8906
|
*/
|
|
8838
8907
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
8839
8908
|
/**
|
|
8840
8909
|
* Require boolean-returning Proxy traps to return booleans.
|
|
8841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
8842
8911
|
*/
|
|
8843
8912
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8844
8913
|
/**
|
|
8845
8914
|
* Enforce a consistent style for single-line block comments.
|
|
8846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8915
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/single-line-block-comment-style.md
|
|
8847
8916
|
*/
|
|
8848
8917
|
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
8849
8918
|
/**
|
|
8850
8919
|
* Enforce better string content.
|
|
8851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8920
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/string-content.md
|
|
8852
8921
|
*/
|
|
8853
8922
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
8854
8923
|
/**
|
|
8855
8924
|
* Enforce consistent brace style for `case` clauses.
|
|
8856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/switch-case-braces.md
|
|
8857
8926
|
*/
|
|
8858
8927
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
8859
8928
|
/**
|
|
8860
8929
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
8861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8930
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/switch-case-break-position.md
|
|
8862
8931
|
*/
|
|
8863
8932
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
8864
8933
|
/**
|
|
8865
8934
|
* Fix whitespace-insensitive template indentation.
|
|
8866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/template-indent.md
|
|
8867
8936
|
*/
|
|
8868
8937
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
8869
8938
|
/**
|
|
8870
8939
|
* Enforce consistent case for text encoding identifiers.
|
|
8871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/text-encoding-identifier-case.md
|
|
8872
8941
|
*/
|
|
8873
8942
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
8874
8943
|
/**
|
|
8875
8944
|
* Require `new` when creating an error.
|
|
8876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/throw-new-error.md
|
|
8877
8946
|
*/
|
|
8878
8947
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
8879
8948
|
/**
|
|
8880
8949
|
* Limit the complexity of `try` blocks.
|
|
8881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/try-complexity.md
|
|
8882
8951
|
*/
|
|
8883
8952
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
8884
8953
|
/**
|
|
@@ -10630,6 +10699,10 @@ type AngularNoInputRename = [] | [{
|
|
|
10630
10699
|
type AngularPipePrefix = [] | [{
|
|
10631
10700
|
prefixes?: string[];
|
|
10632
10701
|
}];
|
|
10702
|
+
// ----- angular/prefer-on-push-component-change-detection -----
|
|
10703
|
+
type AngularPreferOnPushComponentChangeDetection = [] | [{
|
|
10704
|
+
allowExplicitOnPush?: boolean;
|
|
10705
|
+
}];
|
|
10633
10706
|
// ----- angular/prefer-signals -----
|
|
10634
10707
|
type AngularPreferSignals = [] | [{
|
|
10635
10708
|
preferReadonlySignalProperties?: boolean;
|
|
@@ -11252,12 +11325,16 @@ type JsdocCheckLineAlignment = [] | [("always" | "never" | "any")] | [("always"
|
|
|
11252
11325
|
// ----- jsdoc/check-param-names -----
|
|
11253
11326
|
type JsdocCheckParamNames = [] | [{
|
|
11254
11327
|
allowExtraTrailingParamDocs?: boolean;
|
|
11328
|
+
badParamNames?: boolean;
|
|
11329
|
+
badParamOrder?: boolean;
|
|
11255
11330
|
checkDestructured?: boolean;
|
|
11256
11331
|
checkRestProperty?: boolean;
|
|
11257
11332
|
checkTypesPattern?: string;
|
|
11258
11333
|
disableExtraPropertyReporting?: boolean;
|
|
11259
11334
|
disableMissingParamChecks?: boolean;
|
|
11335
|
+
duplicateParams?: boolean;
|
|
11260
11336
|
enableFixer?: boolean;
|
|
11337
|
+
extraParams?: boolean;
|
|
11261
11338
|
useDefaultObjectProperties?: boolean;
|
|
11262
11339
|
}];
|
|
11263
11340
|
// ----- jsdoc/check-property-names -----
|
|
@@ -11438,6 +11515,12 @@ type JsdocNoUndefinedTypes = [] | [{
|
|
|
11438
11515
|
disableReporting?: boolean;
|
|
11439
11516
|
markVariablesAsUsed?: boolean;
|
|
11440
11517
|
}];
|
|
11518
|
+
// ----- jsdoc/no-unnecessary-type-assertion -----
|
|
11519
|
+
type JsdocNoUnnecessaryTypeAssertion = [] | [{
|
|
11520
|
+
checkLiteralConstAssertions?: boolean;
|
|
11521
|
+
treatAnyAsRedundant?: boolean;
|
|
11522
|
+
typesToIgnore?: string[];
|
|
11523
|
+
}];
|
|
11441
11524
|
// ----- jsdoc/normalize-see-links -----
|
|
11442
11525
|
type JsdocNormalizeSeeLinks = [] | [{
|
|
11443
11526
|
canonicalForm?: ("pipe" | "prefix");
|
|
@@ -13149,6 +13232,10 @@ type NoUnderscoreDangle = [] | [{
|
|
|
13149
13232
|
allowInArrayDestructuring?: boolean;
|
|
13150
13233
|
allowInObjectDestructuring?: boolean;
|
|
13151
13234
|
}];
|
|
13235
|
+
// ----- no-unmodified-loop-condition -----
|
|
13236
|
+
type NoUnmodifiedLoopCondition = [] | [{
|
|
13237
|
+
checkConditionalExpressions?: boolean;
|
|
13238
|
+
}];
|
|
13152
13239
|
// ----- no-unneeded-ternary -----
|
|
13153
13240
|
type NoUnneededTernary = [] | [{
|
|
13154
13241
|
defaultAssignment?: boolean;
|
|
@@ -16648,7 +16735,6 @@ type SolidEventHandlers = [] | [{
|
|
|
16648
16735
|
// ----- solid/jsx-no-duplicate-props -----
|
|
16649
16736
|
type SolidJsxNoDuplicateProps = [] | [{
|
|
16650
16737
|
ignoreCase?: boolean;
|
|
16651
|
-
[k: string]: unknown | undefined;
|
|
16652
16738
|
}];
|
|
16653
16739
|
// ----- solid/jsx-no-undef -----
|
|
16654
16740
|
type SolidJsxNoUndef = [] | [{
|
|
@@ -16682,6 +16768,10 @@ type SolidStyleProp = [] | [{
|
|
|
16682
16768
|
styleProps?: [string, ...(string)[]];
|
|
16683
16769
|
allowString?: boolean;
|
|
16684
16770
|
}];
|
|
16771
|
+
// ----- solid/valid-use-server -----
|
|
16772
|
+
type SolidValidUseServer = [] | [{
|
|
16773
|
+
clientWrappers?: string[];
|
|
16774
|
+
}];
|
|
16685
16775
|
// ----- sort-imports -----
|
|
16686
16776
|
type SortImports = [] | [{
|
|
16687
16777
|
ignoreCase?: boolean;
|