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