@kitschpatrol/eslint-config 5.6.0 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +2 -2
- package/dist/index.d.ts +218 -141
- package/dist/index.js +6 -0
- package/package.json +18 -17
- package/readme.md +14 -14
package/dist/index.d.ts
CHANGED
|
@@ -1115,7 +1115,7 @@ interface RuleOptions {
|
|
|
1115
1115
|
* Reports invalid alignment of JSDoc block asterisks.
|
|
1116
1116
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-alignment.md#repos-sticky-header
|
|
1117
1117
|
*/
|
|
1118
|
-
'jsdoc/check-alignment'?: Linter.RuleEntry<
|
|
1118
|
+
'jsdoc/check-alignment'?: Linter.RuleEntry<JsdocCheckAlignment>
|
|
1119
1119
|
/**
|
|
1120
1120
|
* Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules.
|
|
1121
1121
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-examples.md#repos-sticky-header
|
|
@@ -1492,7 +1492,7 @@ interface RuleOptions {
|
|
|
1492
1492
|
*/
|
|
1493
1493
|
'json-package/restrict-dependency-ranges'?: Linter.RuleEntry<JsonPackageRestrictDependencyRanges>
|
|
1494
1494
|
/**
|
|
1495
|
-
*
|
|
1495
|
+
* Selected collections must be in a consistent order (lexicographical for most; lifecycle-aware for scripts).
|
|
1496
1496
|
* @see https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/blob/HEAD/docs/rules/sort-collections.md
|
|
1497
1497
|
*/
|
|
1498
1498
|
'json-package/sort-collections'?: Linter.RuleEntry<JsonPackageSortCollections>
|
|
@@ -3412,6 +3412,11 @@ interface RuleOptions {
|
|
|
3412
3412
|
* @see https://eslint.org/docs/latest/rules/prefer-template
|
|
3413
3413
|
*/
|
|
3414
3414
|
'prefer-template'?: Linter.RuleEntry<[]>
|
|
3415
|
+
/**
|
|
3416
|
+
* Disallow losing originally caught error when re-throwing custom errors
|
|
3417
|
+
* @see https://eslint.org/docs/latest/rules/preserve-caught-error
|
|
3418
|
+
*/
|
|
3419
|
+
'preserve-caught-error'?: Linter.RuleEntry<PreserveCaughtError>
|
|
3415
3420
|
/**
|
|
3416
3421
|
* Require quotes around object literal property names
|
|
3417
3422
|
* @see https://eslint.org/docs/latest/rules/quote-props
|
|
@@ -4645,8 +4650,14 @@ interface RuleOptions {
|
|
|
4645
4650
|
/**
|
|
4646
4651
|
* disallow using navigation (links, goto, pushState, replaceState) without the base path
|
|
4647
4652
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-base/
|
|
4653
|
+
* @deprecated
|
|
4648
4654
|
*/
|
|
4649
4655
|
'svelte/no-navigation-without-base'?: Linter.RuleEntry<SvelteNoNavigationWithoutBase>
|
|
4656
|
+
/**
|
|
4657
|
+
* disallow using navigation (links, goto, pushState, replaceState) without a resolve()
|
|
4658
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-resolve/
|
|
4659
|
+
*/
|
|
4660
|
+
'svelte/no-navigation-without-resolve'?: Linter.RuleEntry<SvelteNoNavigationWithoutResolve>
|
|
4650
4661
|
/**
|
|
4651
4662
|
* disallow use of not function in event handler
|
|
4652
4663
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-not-function-handler/
|
|
@@ -4905,6 +4916,11 @@ interface RuleOptions {
|
|
|
4905
4916
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md
|
|
4906
4917
|
*/
|
|
4907
4918
|
'test/expect-expect'?: Linter.RuleEntry<TestExpectExpect>
|
|
4919
|
+
/**
|
|
4920
|
+
* enforce hoisted APIs to be on top of the file
|
|
4921
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/hoisted-apis-on-top.md
|
|
4922
|
+
*/
|
|
4923
|
+
'test/hoisted-apis-on-top'?: Linter.RuleEntry<[]>
|
|
4908
4924
|
/**
|
|
4909
4925
|
* enforce a maximum number of expect per test
|
|
4910
4926
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/max-expects.md
|
|
@@ -5111,6 +5127,11 @@ interface RuleOptions {
|
|
|
5111
5127
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-resolves.md
|
|
5112
5128
|
*/
|
|
5113
5129
|
'test/prefer-expect-resolves'?: Linter.RuleEntry<[]>
|
|
5130
|
+
/**
|
|
5131
|
+
* enforce using `expectTypeOf` instead of `expect(typeof ...)`
|
|
5132
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-type-of.md
|
|
5133
|
+
*/
|
|
5134
|
+
'test/prefer-expect-type-of'?: Linter.RuleEntry<[]>
|
|
5114
5135
|
/**
|
|
5115
5136
|
* enforce having hooks in consistent order
|
|
5116
5137
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-in-order.md
|
|
@@ -6026,690 +6047,710 @@ interface RuleOptions {
|
|
|
6026
6047
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>
|
|
6027
6048
|
/**
|
|
6028
6049
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
6029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6050
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/better-regex.md
|
|
6030
6051
|
*/
|
|
6031
6052
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
|
|
6032
6053
|
/**
|
|
6033
6054
|
* Enforce a specific parameter name in catch clauses.
|
|
6034
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/catch-error-name.md
|
|
6035
6056
|
*/
|
|
6036
6057
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
|
|
6037
6058
|
/**
|
|
6038
6059
|
* Enforce consistent assertion style with `node:assert`.
|
|
6039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6060
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-assert.md
|
|
6040
6061
|
*/
|
|
6041
6062
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>
|
|
6042
6063
|
/**
|
|
6043
6064
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6065
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-date-clone.md
|
|
6045
6066
|
*/
|
|
6046
6067
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>
|
|
6047
6068
|
/**
|
|
6048
6069
|
* Use destructured variables over properties.
|
|
6049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6070
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-destructuring.md
|
|
6050
6071
|
*/
|
|
6051
6072
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
|
|
6052
6073
|
/**
|
|
6053
6074
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6075
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-empty-array-spread.md
|
|
6055
6076
|
*/
|
|
6056
6077
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
|
|
6057
6078
|
/**
|
|
6058
6079
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6080
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-existence-index-check.md
|
|
6060
6081
|
*/
|
|
6061
6082
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>
|
|
6062
6083
|
/**
|
|
6063
6084
|
* Move function definitions to the highest possible scope.
|
|
6064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6085
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-function-scoping.md
|
|
6065
6086
|
*/
|
|
6066
6087
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
|
|
6067
6088
|
/**
|
|
6068
6089
|
* Enforce correct `Error` subclassing.
|
|
6069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6090
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/custom-error-definition.md
|
|
6070
6091
|
*/
|
|
6071
6092
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
|
|
6072
6093
|
/**
|
|
6073
6094
|
* Enforce no spaces between braces.
|
|
6074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6095
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/empty-brace-spaces.md
|
|
6075
6096
|
*/
|
|
6076
6097
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
|
|
6077
6098
|
/**
|
|
6078
6099
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6100
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/error-message.md
|
|
6080
6101
|
*/
|
|
6081
6102
|
'unicorn/error-message'?: Linter.RuleEntry<[]>
|
|
6082
6103
|
/**
|
|
6083
6104
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6105
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/escape-case.md
|
|
6085
6106
|
*/
|
|
6086
6107
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>
|
|
6087
6108
|
/**
|
|
6088
6109
|
* Add expiration conditions to TODO comments.
|
|
6089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6110
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/expiring-todo-comments.md
|
|
6090
6111
|
*/
|
|
6091
6112
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
|
|
6092
6113
|
/**
|
|
6093
6114
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6115
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/explicit-length-check.md
|
|
6095
6116
|
*/
|
|
6096
6117
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
|
|
6097
6118
|
/**
|
|
6098
6119
|
* Enforce a case style for filenames.
|
|
6099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6120
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/filename-case.md
|
|
6100
6121
|
*/
|
|
6101
6122
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
|
|
6102
6123
|
/**
|
|
6103
6124
|
* Enforce specific import styles per module.
|
|
6104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/import-style.md
|
|
6105
6126
|
*/
|
|
6106
6127
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
|
|
6107
6128
|
/**
|
|
6108
6129
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
6109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/new-for-builtins.md
|
|
6110
6131
|
*/
|
|
6111
6132
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
|
|
6112
6133
|
/**
|
|
6113
6134
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6135
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-abusive-eslint-disable.md
|
|
6115
6136
|
*/
|
|
6116
6137
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
|
|
6117
6138
|
/**
|
|
6118
6139
|
* Disallow recursive access to `this` within getters and setters.
|
|
6119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6140
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-accessor-recursion.md
|
|
6120
6141
|
*/
|
|
6121
6142
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>
|
|
6122
6143
|
/**
|
|
6123
6144
|
* Disallow anonymous functions and classes as the default export.
|
|
6124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6145
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-anonymous-default-export.md
|
|
6125
6146
|
*/
|
|
6126
6147
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
|
|
6127
6148
|
/**
|
|
6128
6149
|
* Prevent passing a function reference directly to iterator methods.
|
|
6129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6150
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-callback-reference.md
|
|
6130
6151
|
*/
|
|
6131
6152
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
|
|
6132
6153
|
/**
|
|
6133
6154
|
* Prefer `for…of` over the `forEach` method.
|
|
6134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6155
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-for-each.md
|
|
6135
6156
|
*/
|
|
6136
6157
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
|
|
6137
6158
|
/**
|
|
6138
6159
|
* Disallow using the `this` argument in array methods.
|
|
6139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6160
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-method-this-argument.md
|
|
6140
6161
|
*/
|
|
6141
6162
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
|
|
6142
6163
|
/**
|
|
6143
6164
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-array-push-push
|
|
6145
6166
|
* @deprecated
|
|
6146
6167
|
*/
|
|
6147
6168
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>
|
|
6148
6169
|
/**
|
|
6149
6170
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6150
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6171
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reduce.md
|
|
6151
6172
|
*/
|
|
6152
6173
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
|
|
6153
6174
|
/**
|
|
6154
6175
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6155
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6176
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reverse.md
|
|
6156
6177
|
*/
|
|
6157
6178
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>
|
|
6179
|
+
/**
|
|
6180
|
+
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6181
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-sort.md
|
|
6182
|
+
*/
|
|
6183
|
+
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>
|
|
6158
6184
|
/**
|
|
6159
6185
|
* Disallow member access from await expression.
|
|
6160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6186
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-expression-member.md
|
|
6161
6187
|
*/
|
|
6162
6188
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
|
|
6163
6189
|
/**
|
|
6164
6190
|
* Disallow using `await` in `Promise` method parameters.
|
|
6165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6191
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-in-promise-methods.md
|
|
6166
6192
|
*/
|
|
6167
6193
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
6168
6194
|
/**
|
|
6169
6195
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6196
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-console-spaces.md
|
|
6171
6197
|
*/
|
|
6172
6198
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
|
|
6173
6199
|
/**
|
|
6174
6200
|
* Do not use `document.cookie` directly.
|
|
6175
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6201
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-document-cookie.md
|
|
6176
6202
|
*/
|
|
6177
6203
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
|
|
6178
6204
|
/**
|
|
6179
6205
|
* Disallow empty files.
|
|
6180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6206
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-empty-file.md
|
|
6181
6207
|
*/
|
|
6182
6208
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
|
|
6183
6209
|
/**
|
|
6184
6210
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6211
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-for-loop.md
|
|
6186
6212
|
*/
|
|
6187
6213
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
|
|
6188
6214
|
/**
|
|
6189
6215
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
6190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6216
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-hex-escape.md
|
|
6191
6217
|
*/
|
|
6192
6218
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
|
|
6193
6219
|
/**
|
|
6194
6220
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-instanceof-array
|
|
6196
6222
|
* @deprecated
|
|
6197
6223
|
*/
|
|
6198
6224
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
|
|
6199
6225
|
/**
|
|
6200
6226
|
* Disallow `instanceof` with built-in objects
|
|
6201
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6227
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-instanceof-builtins.md
|
|
6202
6228
|
*/
|
|
6203
6229
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>
|
|
6204
6230
|
/**
|
|
6205
6231
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6206
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6232
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-fetch-options.md
|
|
6207
6233
|
*/
|
|
6208
6234
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
|
|
6209
6235
|
/**
|
|
6210
6236
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6211
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6237
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-remove-event-listener.md
|
|
6212
6238
|
*/
|
|
6213
6239
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
|
|
6214
6240
|
/**
|
|
6215
6241
|
* Disallow identifiers starting with `new` or `class`.
|
|
6216
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6242
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-keyword-prefix.md
|
|
6217
6243
|
*/
|
|
6218
6244
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
|
|
6219
6245
|
/**
|
|
6220
6246
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6221
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6247
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-length-as-slice-end
|
|
6222
6248
|
* @deprecated
|
|
6223
6249
|
*/
|
|
6224
6250
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>
|
|
6225
6251
|
/**
|
|
6226
6252
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6227
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6253
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-lonely-if.md
|
|
6228
6254
|
*/
|
|
6229
6255
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
|
|
6230
6256
|
/**
|
|
6231
6257
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6232
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6258
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-magic-array-flat-depth.md
|
|
6233
6259
|
*/
|
|
6234
6260
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
6235
6261
|
/**
|
|
6236
6262
|
* Disallow named usage of default import and export.
|
|
6237
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-named-default.md
|
|
6238
6264
|
*/
|
|
6239
6265
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>
|
|
6240
6266
|
/**
|
|
6241
6267
|
* Disallow negated conditions.
|
|
6242
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6268
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negated-condition.md
|
|
6243
6269
|
*/
|
|
6244
6270
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
|
|
6245
6271
|
/**
|
|
6246
6272
|
* Disallow negated expression in equality check.
|
|
6247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negation-in-equality-check.md
|
|
6248
6274
|
*/
|
|
6249
6275
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
|
|
6250
6276
|
/**
|
|
6251
6277
|
* Disallow nested ternary expressions.
|
|
6252
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6278
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-nested-ternary.md
|
|
6253
6279
|
*/
|
|
6254
6280
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
|
|
6255
6281
|
/**
|
|
6256
6282
|
* Disallow `new Array()`.
|
|
6257
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-array.md
|
|
6258
6284
|
*/
|
|
6259
6285
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>
|
|
6260
6286
|
/**
|
|
6261
6287
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6262
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6288
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-buffer.md
|
|
6263
6289
|
*/
|
|
6264
6290
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
|
|
6265
6291
|
/**
|
|
6266
6292
|
* Disallow the use of the `null` literal.
|
|
6267
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6293
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-null.md
|
|
6268
6294
|
*/
|
|
6269
6295
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
|
|
6270
6296
|
/**
|
|
6271
6297
|
* Disallow the use of objects as default parameters.
|
|
6272
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-object-as-default-parameter.md
|
|
6273
6299
|
*/
|
|
6274
6300
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
|
|
6275
6301
|
/**
|
|
6276
6302
|
* Disallow `process.exit()`.
|
|
6277
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-process-exit.md
|
|
6278
6304
|
*/
|
|
6279
6305
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
|
|
6280
6306
|
/**
|
|
6281
6307
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6282
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-single-promise-in-promise-methods.md
|
|
6283
6309
|
*/
|
|
6284
6310
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
6285
6311
|
/**
|
|
6286
6312
|
* Disallow classes that only have static members.
|
|
6287
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-static-only-class.md
|
|
6288
6314
|
*/
|
|
6289
6315
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
|
|
6290
6316
|
/**
|
|
6291
6317
|
* Disallow `then` property.
|
|
6292
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-thenable.md
|
|
6293
6319
|
*/
|
|
6294
6320
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>
|
|
6295
6321
|
/**
|
|
6296
6322
|
* Disallow assigning `this` to a variable.
|
|
6297
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-this-assignment.md
|
|
6298
6324
|
*/
|
|
6299
6325
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
|
|
6300
6326
|
/**
|
|
6301
6327
|
* Disallow comparing `undefined` using `typeof`.
|
|
6302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-typeof-undefined.md
|
|
6303
6329
|
*/
|
|
6304
6330
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
|
|
6305
6331
|
/**
|
|
6306
6332
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6307
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6308
6334
|
*/
|
|
6309
6335
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
6310
6336
|
/**
|
|
6311
6337
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6312
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-splice-count.md
|
|
6313
6339
|
*/
|
|
6314
6340
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>
|
|
6315
6341
|
/**
|
|
6316
6342
|
* Disallow awaiting non-promise values.
|
|
6317
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-await.md
|
|
6318
6344
|
*/
|
|
6319
6345
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
|
|
6320
6346
|
/**
|
|
6321
6347
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6322
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-polyfills.md
|
|
6323
6349
|
*/
|
|
6324
6350
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
|
|
6325
6351
|
/**
|
|
6326
6352
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-slice-end.md
|
|
6328
6354
|
*/
|
|
6329
6355
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>
|
|
6330
6356
|
/**
|
|
6331
6357
|
* Disallow unreadable array destructuring.
|
|
6332
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-array-destructuring.md
|
|
6333
6359
|
*/
|
|
6334
6360
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
|
|
6335
6361
|
/**
|
|
6336
6362
|
* Disallow unreadable IIFEs.
|
|
6337
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-iife.md
|
|
6338
6364
|
*/
|
|
6339
6365
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
|
|
6340
6366
|
/**
|
|
6341
6367
|
* Disallow unused object properties.
|
|
6342
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unused-properties.md
|
|
6343
6369
|
*/
|
|
6344
6370
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
|
|
6345
6371
|
/**
|
|
6346
6372
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
6347
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-error-capture-stack-trace.md
|
|
6348
6374
|
*/
|
|
6349
6375
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>
|
|
6350
6376
|
/**
|
|
6351
6377
|
* Disallow useless fallback when spreading in object literals.
|
|
6352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-fallback-in-spread.md
|
|
6353
6379
|
*/
|
|
6354
6380
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
|
|
6355
6381
|
/**
|
|
6356
6382
|
* Disallow useless array length check.
|
|
6357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-length-check.md
|
|
6358
6384
|
*/
|
|
6359
6385
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
|
|
6360
6386
|
/**
|
|
6361
6387
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
6362
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-promise-resolve-reject.md
|
|
6363
6389
|
*/
|
|
6364
6390
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
|
|
6365
6391
|
/**
|
|
6366
6392
|
* Disallow unnecessary spread.
|
|
6367
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-spread.md
|
|
6368
6394
|
*/
|
|
6369
6395
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
|
|
6370
6396
|
/**
|
|
6371
6397
|
* Disallow useless case in switch statements.
|
|
6372
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-switch-case.md
|
|
6373
6399
|
*/
|
|
6374
6400
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
|
|
6375
6401
|
/**
|
|
6376
6402
|
* Disallow useless `undefined`.
|
|
6377
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-undefined.md
|
|
6378
6404
|
*/
|
|
6379
6405
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
|
|
6380
6406
|
/**
|
|
6381
6407
|
* Disallow number literals with zero fractions or dangling dots.
|
|
6382
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-zero-fractions.md
|
|
6383
6409
|
*/
|
|
6384
6410
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
|
|
6385
6411
|
/**
|
|
6386
6412
|
* Enforce proper case for numeric literals.
|
|
6387
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/number-literal-case.md
|
|
6388
6414
|
*/
|
|
6389
6415
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>
|
|
6390
6416
|
/**
|
|
6391
6417
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
6392
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/numeric-separators-style.md
|
|
6393
6419
|
*/
|
|
6394
6420
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
|
|
6395
6421
|
/**
|
|
6396
6422
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
6397
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-add-event-listener.md
|
|
6398
6424
|
*/
|
|
6399
6425
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
|
|
6400
6426
|
/**
|
|
6401
6427
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
6402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-find.md
|
|
6403
6429
|
*/
|
|
6404
6430
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
|
|
6405
6431
|
/**
|
|
6406
6432
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
6407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat.md
|
|
6408
6434
|
*/
|
|
6409
6435
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
|
|
6410
6436
|
/**
|
|
6411
6437
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
6412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat-map.md
|
|
6413
6439
|
*/
|
|
6414
6440
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
|
|
6415
6441
|
/**
|
|
6416
6442
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
6417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-index-of.md
|
|
6418
6444
|
*/
|
|
6419
6445
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
|
|
6420
6446
|
/**
|
|
6421
6447
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
6422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-some.md
|
|
6423
6449
|
*/
|
|
6424
6450
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
|
|
6425
6451
|
/**
|
|
6426
6452
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
6427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-at.md
|
|
6428
6454
|
*/
|
|
6429
6455
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
|
|
6456
|
+
/**
|
|
6457
|
+
* Prefer `BigInt` literals over the constructor.
|
|
6458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-bigint-literals.md
|
|
6459
|
+
*/
|
|
6460
|
+
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>
|
|
6430
6461
|
/**
|
|
6431
6462
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
6432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6463
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-blob-reading-methods.md
|
|
6433
6464
|
*/
|
|
6434
6465
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
|
|
6435
6466
|
/**
|
|
6436
6467
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
6437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6468
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-class-fields.md
|
|
6438
6469
|
*/
|
|
6439
6470
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>
|
|
6471
|
+
/**
|
|
6472
|
+
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
6473
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-classlist-toggle.md
|
|
6474
|
+
*/
|
|
6475
|
+
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>
|
|
6440
6476
|
/**
|
|
6441
6477
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
6442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-code-point.md
|
|
6443
6479
|
*/
|
|
6444
6480
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
|
|
6445
6481
|
/**
|
|
6446
6482
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
6447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6483
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-date-now.md
|
|
6448
6484
|
*/
|
|
6449
6485
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
|
|
6450
6486
|
/**
|
|
6451
6487
|
* Prefer default parameters over reassignment.
|
|
6452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6488
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-default-parameters.md
|
|
6453
6489
|
*/
|
|
6454
6490
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
|
|
6455
6491
|
/**
|
|
6456
6492
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
6457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6493
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-append.md
|
|
6458
6494
|
*/
|
|
6459
6495
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
|
|
6460
6496
|
/**
|
|
6461
6497
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
6462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6498
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-dataset.md
|
|
6463
6499
|
*/
|
|
6464
6500
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
|
|
6465
6501
|
/**
|
|
6466
6502
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
6467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-remove.md
|
|
6468
6504
|
*/
|
|
6469
6505
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
|
|
6470
6506
|
/**
|
|
6471
6507
|
* Prefer `.textContent` over `.innerText`.
|
|
6472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6508
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-text-content.md
|
|
6473
6509
|
*/
|
|
6474
6510
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
|
|
6475
6511
|
/**
|
|
6476
6512
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
6477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6513
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-event-target.md
|
|
6478
6514
|
*/
|
|
6479
6515
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
|
|
6480
6516
|
/**
|
|
6481
6517
|
* Prefer `export…from` when re-exporting.
|
|
6482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6518
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-export-from.md
|
|
6483
6519
|
*/
|
|
6484
6520
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
|
|
6485
6521
|
/**
|
|
6486
6522
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
6487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6523
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-global-this.md
|
|
6488
6524
|
*/
|
|
6489
6525
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>
|
|
6490
6526
|
/**
|
|
6491
6527
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
6492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6528
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-import-meta-properties.md
|
|
6493
6529
|
*/
|
|
6494
6530
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>
|
|
6495
6531
|
/**
|
|
6496
6532
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
6497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6533
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-includes.md
|
|
6498
6534
|
*/
|
|
6499
6535
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
|
|
6500
6536
|
/**
|
|
6501
6537
|
* Prefer reading a JSON file as a buffer.
|
|
6502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6538
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-json-parse-buffer.md
|
|
6503
6539
|
*/
|
|
6504
6540
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
|
|
6505
6541
|
/**
|
|
6506
6542
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
6507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6543
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-keyboard-event-key.md
|
|
6508
6544
|
*/
|
|
6509
6545
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
|
|
6510
6546
|
/**
|
|
6511
6547
|
* Prefer using a logical operator over a ternary.
|
|
6512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6548
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-logical-operator-over-ternary.md
|
|
6513
6549
|
*/
|
|
6514
6550
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
|
|
6515
6551
|
/**
|
|
6516
6552
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
6517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6553
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-min-max.md
|
|
6518
6554
|
*/
|
|
6519
6555
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>
|
|
6520
6556
|
/**
|
|
6521
6557
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
6522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-trunc.md
|
|
6523
6559
|
*/
|
|
6524
6560
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
|
|
6525
6561
|
/**
|
|
6526
6562
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
6527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-dom-apis.md
|
|
6528
6564
|
*/
|
|
6529
6565
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
|
|
6530
6566
|
/**
|
|
6531
6567
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
6532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-math-apis.md
|
|
6533
6569
|
*/
|
|
6534
6570
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
|
|
6535
6571
|
/**
|
|
6536
6572
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
6537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-module.md
|
|
6538
6574
|
*/
|
|
6539
6575
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>
|
|
6540
6576
|
/**
|
|
6541
6577
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
6542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6578
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-native-coercion-functions.md
|
|
6543
6579
|
*/
|
|
6544
6580
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
|
|
6545
6581
|
/**
|
|
6546
6582
|
* Prefer negative index over `.length - index` when possible.
|
|
6547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6583
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-negative-index.md
|
|
6548
6584
|
*/
|
|
6549
6585
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
|
|
6550
6586
|
/**
|
|
6551
6587
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
6552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-node-protocol.md
|
|
6553
6589
|
*/
|
|
6554
6590
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
|
|
6555
6591
|
/**
|
|
6556
6592
|
* Prefer `Number` static properties over global ones.
|
|
6557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-number-properties.md
|
|
6558
6594
|
*/
|
|
6559
6595
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
|
|
6560
6596
|
/**
|
|
6561
6597
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
6562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-object-from-entries.md
|
|
6563
6599
|
*/
|
|
6564
6600
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
|
|
6565
6601
|
/**
|
|
6566
6602
|
* Prefer omitting the `catch` binding parameter.
|
|
6567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-optional-catch-binding.md
|
|
6568
6604
|
*/
|
|
6569
6605
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
|
|
6570
6606
|
/**
|
|
6571
6607
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
6572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-prototype-methods.md
|
|
6573
6609
|
*/
|
|
6574
6610
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
|
|
6575
6611
|
/**
|
|
6576
6612
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
6577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-query-selector.md
|
|
6578
6614
|
*/
|
|
6579
6615
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
|
|
6580
6616
|
/**
|
|
6581
6617
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
6582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-reflect-apply.md
|
|
6583
6619
|
*/
|
|
6584
6620
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
|
|
6585
6621
|
/**
|
|
6586
6622
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
6587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-regexp-test.md
|
|
6588
6624
|
*/
|
|
6589
6625
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
|
|
6590
6626
|
/**
|
|
6591
6627
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
6592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-has.md
|
|
6593
6629
|
*/
|
|
6594
6630
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
|
|
6595
6631
|
/**
|
|
6596
6632
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
6597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-size.md
|
|
6598
6634
|
*/
|
|
6599
6635
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
|
|
6600
6636
|
/**
|
|
6601
6637
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
6602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-single-call.md
|
|
6603
6639
|
*/
|
|
6604
6640
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>
|
|
6605
6641
|
/**
|
|
6606
6642
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
6607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-spread.md
|
|
6608
6644
|
*/
|
|
6609
6645
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
|
|
6610
6646
|
/**
|
|
6611
6647
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
6612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-raw.md
|
|
6613
6649
|
*/
|
|
6614
6650
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
|
|
6615
6651
|
/**
|
|
6616
6652
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
6617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-replace-all.md
|
|
6618
6654
|
*/
|
|
6619
6655
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
|
|
6620
6656
|
/**
|
|
6621
6657
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
6622
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-slice.md
|
|
6623
6659
|
*/
|
|
6624
6660
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
|
|
6625
6661
|
/**
|
|
6626
6662
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
6627
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-starts-ends-with.md
|
|
6628
6664
|
*/
|
|
6629
6665
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
6630
6666
|
/**
|
|
6631
6667
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
6632
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-trim-start-end.md
|
|
6633
6669
|
*/
|
|
6634
6670
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
|
|
6635
6671
|
/**
|
|
6636
6672
|
* Prefer using `structuredClone` to create a deep clone.
|
|
6637
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-structured-clone.md
|
|
6638
6674
|
*/
|
|
6639
6675
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
|
|
6640
6676
|
/**
|
|
6641
6677
|
* Prefer `switch` over multiple `else-if`.
|
|
6642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-switch.md
|
|
6643
6679
|
*/
|
|
6644
6680
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
|
|
6645
6681
|
/**
|
|
6646
6682
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
6647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-ternary.md
|
|
6648
6684
|
*/
|
|
6649
6685
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
|
|
6650
6686
|
/**
|
|
6651
6687
|
* Prefer top-level await over top-level promises and async function calls.
|
|
6652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-top-level-await.md
|
|
6653
6689
|
*/
|
|
6654
6690
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
|
|
6655
6691
|
/**
|
|
6656
6692
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
6657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-type-error.md
|
|
6658
6694
|
*/
|
|
6659
6695
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
|
|
6660
6696
|
/**
|
|
6661
6697
|
* Prevent abbreviations.
|
|
6662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prevent-abbreviations.md
|
|
6663
6699
|
*/
|
|
6664
6700
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
|
|
6665
6701
|
/**
|
|
6666
6702
|
* Enforce consistent relative URL style.
|
|
6667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/relative-url-style.md
|
|
6668
6704
|
*/
|
|
6669
6705
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
|
|
6670
6706
|
/**
|
|
6671
6707
|
* Enforce using the separator argument with `Array#join()`.
|
|
6672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-array-join-separator.md
|
|
6673
6709
|
*/
|
|
6674
6710
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
|
|
6711
|
+
/**
|
|
6712
|
+
* Require non-empty module attributes for imports and exports
|
|
6713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-attributes.md
|
|
6714
|
+
*/
|
|
6715
|
+
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>
|
|
6675
6716
|
/**
|
|
6676
6717
|
* Require non-empty specifier list in import and export statements.
|
|
6677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-specifiers.md
|
|
6678
6719
|
*/
|
|
6679
6720
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>
|
|
6680
6721
|
/**
|
|
6681
6722
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
6682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-number-to-fixed-digits-argument.md
|
|
6683
6724
|
*/
|
|
6684
6725
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
|
|
6685
6726
|
/**
|
|
6686
6727
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
6687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-post-message-target-origin.md
|
|
6688
6729
|
*/
|
|
6689
6730
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
|
|
6690
6731
|
/**
|
|
6691
6732
|
* Enforce better string content.
|
|
6692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/string-content.md
|
|
6693
6734
|
*/
|
|
6694
6735
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
|
|
6695
6736
|
/**
|
|
6696
6737
|
* Enforce consistent brace style for `case` clauses.
|
|
6697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/switch-case-braces.md
|
|
6698
6739
|
*/
|
|
6699
6740
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
|
|
6700
6741
|
/**
|
|
6701
6742
|
* Fix whitespace-insensitive template indentation.
|
|
6702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/template-indent.md
|
|
6703
6744
|
*/
|
|
6704
6745
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
|
|
6705
6746
|
/**
|
|
6706
6747
|
* Enforce consistent case for text encoding identifiers.
|
|
6707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/text-encoding-identifier-case.md
|
|
6708
6749
|
*/
|
|
6709
6750
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>
|
|
6710
6751
|
/**
|
|
6711
6752
|
* Require `new` when creating an error.
|
|
6712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/throw-new-error.md
|
|
6713
6754
|
*/
|
|
6714
6755
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
|
|
6715
6756
|
/**
|
|
@@ -8418,6 +8459,14 @@ type InitDeclarations =
|
|
|
8418
8459
|
ignoreForLoopInit?: boolean
|
|
8419
8460
|
},
|
|
8420
8461
|
]
|
|
8462
|
+
// ----- jsdoc/check-alignment -----
|
|
8463
|
+
type JsdocCheckAlignment =
|
|
8464
|
+
| []
|
|
8465
|
+
| [
|
|
8466
|
+
{
|
|
8467
|
+
innerIndent?: number
|
|
8468
|
+
},
|
|
8469
|
+
]
|
|
8421
8470
|
// ----- jsdoc/check-examples -----
|
|
8422
8471
|
type JsdocCheckExamples =
|
|
8423
8472
|
| []
|
|
@@ -8880,6 +8929,7 @@ type JsdocRequireJsdoc =
|
|
|
8880
8929
|
enableFixer?: boolean
|
|
8881
8930
|
exemptEmptyConstructors?: boolean
|
|
8882
8931
|
exemptEmptyFunctions?: boolean
|
|
8932
|
+
exemptOverloadedImplementations?: boolean
|
|
8883
8933
|
fixerMessage?: string
|
|
8884
8934
|
minLineCount?: number
|
|
8885
8935
|
publicOnly?:
|
|
@@ -8898,6 +8948,7 @@ type JsdocRequireJsdoc =
|
|
|
8898
8948
|
FunctionExpression?: boolean
|
|
8899
8949
|
MethodDefinition?: boolean
|
|
8900
8950
|
}
|
|
8951
|
+
skipInterveningOverloadedDeclarations?: boolean
|
|
8901
8952
|
},
|
|
8902
8953
|
]
|
|
8903
8954
|
// ----- jsdoc/require-param -----
|
|
@@ -9047,6 +9098,7 @@ type JsdocRequireTemplate =
|
|
|
9047
9098
|
| []
|
|
9048
9099
|
| [
|
|
9049
9100
|
{
|
|
9101
|
+
exemptedBy?: string[]
|
|
9050
9102
|
requireSeparateTemplates?: boolean
|
|
9051
9103
|
},
|
|
9052
9104
|
]
|
|
@@ -18880,6 +18932,14 @@ type PreferRegexLiterals =
|
|
|
18880
18932
|
disallowRedundantWrapping?: boolean
|
|
18881
18933
|
},
|
|
18882
18934
|
]
|
|
18935
|
+
// ----- preserve-caught-error -----
|
|
18936
|
+
type PreserveCaughtError =
|
|
18937
|
+
| []
|
|
18938
|
+
| [
|
|
18939
|
+
{
|
|
18940
|
+
requireCatchParameter?: boolean
|
|
18941
|
+
},
|
|
18942
|
+
]
|
|
18883
18943
|
// ----- quote-props -----
|
|
18884
18944
|
type QuoteProps =
|
|
18885
18945
|
| []
|
|
@@ -18926,8 +18986,6 @@ type ReactNamingConventionComponentName =
|
|
|
18926
18986
|
| ('PascalCase' | 'CONSTANT_CASE')
|
|
18927
18987
|
| {
|
|
18928
18988
|
allowAllCaps?: boolean
|
|
18929
|
-
allowLeadingUnderscore?: boolean
|
|
18930
|
-
allowNamespace?: boolean
|
|
18931
18989
|
excepts?: string[]
|
|
18932
18990
|
rule?: 'PascalCase' | 'CONSTANT_CASE'
|
|
18933
18991
|
},
|
|
@@ -19555,6 +19613,17 @@ type SvelteNoNavigationWithoutBase =
|
|
|
19555
19613
|
ignoreReplaceState?: boolean
|
|
19556
19614
|
},
|
|
19557
19615
|
]
|
|
19616
|
+
// ----- svelte/no-navigation-without-resolve -----
|
|
19617
|
+
type SvelteNoNavigationWithoutResolve =
|
|
19618
|
+
| []
|
|
19619
|
+
| [
|
|
19620
|
+
{
|
|
19621
|
+
ignoreGoto?: boolean
|
|
19622
|
+
ignoreLinks?: boolean
|
|
19623
|
+
ignorePushState?: boolean
|
|
19624
|
+
ignoreReplaceState?: boolean
|
|
19625
|
+
},
|
|
19626
|
+
]
|
|
19558
19627
|
// ----- svelte/no-reactive-reassign -----
|
|
19559
19628
|
type SvelteNoReactiveReassign =
|
|
19560
19629
|
| []
|
|
@@ -23895,6 +23964,14 @@ type UnicornNoArrayReverse =
|
|
|
23895
23964
|
allowExpressionStatement?: boolean
|
|
23896
23965
|
},
|
|
23897
23966
|
]
|
|
23967
|
+
// ----- unicorn/no-array-sort -----
|
|
23968
|
+
type UnicornNoArraySort =
|
|
23969
|
+
| []
|
|
23970
|
+
| [
|
|
23971
|
+
{
|
|
23972
|
+
allowExpressionStatement?: boolean
|
|
23973
|
+
},
|
|
23974
|
+
]
|
|
23898
23975
|
// ----- unicorn/no-instanceof-builtins -----
|
|
23899
23976
|
type UnicornNoInstanceofBuiltins =
|
|
23900
23977
|
| []
|