@jimmy.codes/eslint-config 6.14.2 → 6.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{astro-Cc3Rxusf.js → astro-CYKa1Ijk.js} +3 -2
- package/dist/{globs-CRO5v7xy.js → globs-C5FyFNuk.js} +1 -1
- package/dist/globs.js +1 -1
- package/dist/{has-dependency-7vimNBSE.js → has-dependency-lkRo7x2C.js} +1 -1
- package/dist/index.d.ts +229 -144
- package/dist/index.js +13 -13
- package/dist/{interop-default-D4l3hsYQ.js → interop-default-DQxo_rHy.js} +1 -1
- package/dist/{jest-BCatBVvc.js → jest-DBcw_I7S.js} +2 -2
- package/dist/{nextjs-Dw-jYP2k.js → nextjs-BAZ7sZb7.js} +3 -3
- package/dist/{playwright-Bbcb5Jsi.js → playwright-BXMpcaS7.js} +2 -2
- package/dist/{react-BnGlxfxv.js → react-Dmzbj6KF.js} +16 -13
- package/dist/{storybook-BO4plVPp.js → storybook-D3Bkozqd.js} +2 -2
- package/dist/{tanstack-query-DqqVfxJs.js → tanstack-query-C0Pag-TK.js} +2 -2
- package/dist/{testing-library-lJsmjyFo.js → testing-library-DuiSlHeo.js} +2 -2
- package/dist/{typescript-D8AT5dEv.js → typescript-CWevoym8.js} +1 -1
- package/dist/{upwarn-C7t3ub-R.js → upwarn-DItTz7lt.js} +1 -1
- package/dist/{vitest-CADaM8FX.js → vitest-Bs_zrIdp.js} +2 -2
- package/package.json +15 -11
package/dist/index.d.ts
CHANGED
|
@@ -672,6 +672,11 @@ interface RuleOptions {
|
|
|
672
672
|
* @see https://eslint.style/rules/eol-last
|
|
673
673
|
*/
|
|
674
674
|
'@stylistic/eol-last'?: Linter.RuleEntry<StylisticEolLast>;
|
|
675
|
+
/**
|
|
676
|
+
* Enforce consistent spacing and line break styles inside brackets.
|
|
677
|
+
* @see https://eslint.style/rules/list-style
|
|
678
|
+
*/
|
|
679
|
+
'@stylistic/exp-list-style'?: Linter.RuleEntry<StylisticExpListStyle>;
|
|
675
680
|
/**
|
|
676
681
|
* Enforce line breaks between arguments of a function call
|
|
677
682
|
* @see https://eslint.style/rules/function-call-argument-newline
|
|
@@ -2046,6 +2051,11 @@ interface RuleOptions {
|
|
|
2046
2051
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-text-directive/
|
|
2047
2052
|
*/
|
|
2048
2053
|
'astro/no-set-text-directive'?: Linter.RuleEntry<[]>;
|
|
2054
|
+
/**
|
|
2055
|
+
* disallow inline `<script>` without `src` to encourage CSP-safe patterns
|
|
2056
|
+
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unsafe-inline-scripts/
|
|
2057
|
+
*/
|
|
2058
|
+
'astro/no-unsafe-inline-scripts'?: Linter.RuleEntry<AstroNoUnsafeInlineScripts>;
|
|
2049
2059
|
/**
|
|
2050
2060
|
* disallow selectors defined in `style` tag that don't use in HTML
|
|
2051
2061
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unused-css-selector/
|
|
@@ -5282,7 +5292,7 @@ interface RuleOptions {
|
|
|
5282
5292
|
*/
|
|
5283
5293
|
'react-hooks/use-memo'?: Linter.RuleEntry<ReactHooksUseMemo>;
|
|
5284
5294
|
/**
|
|
5285
|
-
* Validates that useMemos always return a value. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
5295
|
+
* Validates that useMemos always return a value and that the result of the useMemo is used by the component/hook. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
5286
5296
|
*/
|
|
5287
5297
|
'react-hooks/void-use-memo'?: Linter.RuleEntry<ReactHooksVoidUseMemo>;
|
|
5288
5298
|
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
|
|
@@ -6041,710 +6051,725 @@ interface RuleOptions {
|
|
|
6041
6051
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
6042
6052
|
/**
|
|
6043
6053
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
6044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/better-regex.md
|
|
6045
6055
|
*/
|
|
6046
6056
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
6047
6057
|
/**
|
|
6048
6058
|
* Enforce a specific parameter name in catch clauses.
|
|
6049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/catch-error-name.md
|
|
6050
6060
|
*/
|
|
6051
6061
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
6052
6062
|
/**
|
|
6053
6063
|
* Enforce consistent assertion style with `node:assert`.
|
|
6054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-assert.md
|
|
6055
6065
|
*/
|
|
6056
6066
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6057
6067
|
/**
|
|
6058
6068
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-date-clone.md
|
|
6060
6070
|
*/
|
|
6061
6071
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6062
6072
|
/**
|
|
6063
6073
|
* Use destructured variables over properties.
|
|
6064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-destructuring.md
|
|
6065
6075
|
*/
|
|
6066
6076
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6067
6077
|
/**
|
|
6068
6078
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-empty-array-spread.md
|
|
6070
6080
|
*/
|
|
6071
6081
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6072
6082
|
/**
|
|
6073
6083
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-existence-index-check.md
|
|
6075
6085
|
*/
|
|
6076
6086
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6077
6087
|
/**
|
|
6078
6088
|
* Move function definitions to the highest possible scope.
|
|
6079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-function-scoping.md
|
|
6080
6090
|
*/
|
|
6081
6091
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6082
6092
|
/**
|
|
6083
6093
|
* Enforce correct `Error` subclassing.
|
|
6084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/custom-error-definition.md
|
|
6085
6095
|
*/
|
|
6086
6096
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6087
6097
|
/**
|
|
6088
6098
|
* Enforce no spaces between braces.
|
|
6089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/empty-brace-spaces.md
|
|
6090
6100
|
*/
|
|
6091
6101
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6092
6102
|
/**
|
|
6093
6103
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/error-message.md
|
|
6095
6105
|
*/
|
|
6096
6106
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6097
6107
|
/**
|
|
6098
6108
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/escape-case.md
|
|
6100
6110
|
*/
|
|
6101
6111
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
6102
6112
|
/**
|
|
6103
6113
|
* Add expiration conditions to TODO comments.
|
|
6104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/expiring-todo-comments.md
|
|
6105
6115
|
*/
|
|
6106
6116
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
6107
6117
|
/**
|
|
6108
6118
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/explicit-length-check.md
|
|
6110
6120
|
*/
|
|
6111
6121
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
6112
6122
|
/**
|
|
6113
6123
|
* Enforce a case style for filenames.
|
|
6114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/filename-case.md
|
|
6115
6125
|
*/
|
|
6116
6126
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
6117
6127
|
/**
|
|
6118
6128
|
* Enforce specific import styles per module.
|
|
6119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/import-style.md
|
|
6120
6130
|
*/
|
|
6121
6131
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
6122
6132
|
/**
|
|
6123
6133
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
6124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/new-for-builtins.md
|
|
6125
6135
|
*/
|
|
6126
6136
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
6127
6137
|
/**
|
|
6128
6138
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
6130
6140
|
*/
|
|
6131
6141
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
6132
6142
|
/**
|
|
6133
6143
|
* Disallow recursive access to `this` within getters and setters.
|
|
6134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-accessor-recursion.md
|
|
6135
6145
|
*/
|
|
6136
6146
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6137
6147
|
/**
|
|
6138
6148
|
* Disallow anonymous functions and classes as the default export.
|
|
6139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-anonymous-default-export.md
|
|
6140
6150
|
*/
|
|
6141
6151
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
6142
6152
|
/**
|
|
6143
6153
|
* Prevent passing a function reference directly to iterator methods.
|
|
6144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-callback-reference.md
|
|
6145
6155
|
*/
|
|
6146
6156
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
6147
6157
|
/**
|
|
6148
6158
|
* Prefer `for…of` over the `forEach` method.
|
|
6149
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-for-each.md
|
|
6150
6160
|
*/
|
|
6151
6161
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
6152
6162
|
/**
|
|
6153
6163
|
* Disallow using the `this` argument in array methods.
|
|
6154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-method-this-argument.md
|
|
6155
6165
|
*/
|
|
6156
6166
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
6157
6167
|
/**
|
|
6158
6168
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-array-push-push
|
|
6160
6170
|
* @deprecated
|
|
6161
6171
|
*/
|
|
6162
6172
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
6163
6173
|
/**
|
|
6164
6174
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reduce.md
|
|
6166
6176
|
*/
|
|
6167
6177
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
6168
6178
|
/**
|
|
6169
6179
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reverse.md
|
|
6171
6181
|
*/
|
|
6172
6182
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
6173
6183
|
/**
|
|
6174
6184
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6175
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-sort.md
|
|
6176
6186
|
*/
|
|
6177
6187
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
6178
6188
|
/**
|
|
6179
6189
|
* Disallow member access from await expression.
|
|
6180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-expression-member.md
|
|
6181
6191
|
*/
|
|
6182
6192
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
6183
6193
|
/**
|
|
6184
6194
|
* Disallow using `await` in `Promise` method parameters.
|
|
6185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6195
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-in-promise-methods.md
|
|
6186
6196
|
*/
|
|
6187
6197
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6188
6198
|
/**
|
|
6189
6199
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6200
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-console-spaces.md
|
|
6191
6201
|
*/
|
|
6192
6202
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6193
6203
|
/**
|
|
6194
6204
|
* Do not use `document.cookie` directly.
|
|
6195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6205
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-document-cookie.md
|
|
6196
6206
|
*/
|
|
6197
6207
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6198
6208
|
/**
|
|
6199
6209
|
* Disallow empty files.
|
|
6200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6210
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-empty-file.md
|
|
6201
6211
|
*/
|
|
6202
6212
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
6203
6213
|
/**
|
|
6204
6214
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6205
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-for-loop.md
|
|
6206
6216
|
*/
|
|
6207
6217
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
6208
6218
|
/**
|
|
6209
6219
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
6210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6220
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-hex-escape.md
|
|
6211
6221
|
*/
|
|
6212
6222
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
6223
|
+
/**
|
|
6224
|
+
* Disallow immediate mutation after variable assignment.
|
|
6225
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-immediate-mutation.md
|
|
6226
|
+
*/
|
|
6227
|
+
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
6213
6228
|
/**
|
|
6214
6229
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6230
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
6216
6231
|
* @deprecated
|
|
6217
6232
|
*/
|
|
6218
6233
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
6219
6234
|
/**
|
|
6220
6235
|
* Disallow `instanceof` with built-in objects
|
|
6221
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6236
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-instanceof-builtins.md
|
|
6222
6237
|
*/
|
|
6223
6238
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
6224
6239
|
/**
|
|
6225
6240
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6226
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-fetch-options.md
|
|
6227
6242
|
*/
|
|
6228
6243
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6229
6244
|
/**
|
|
6230
6245
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6231
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
6232
6247
|
*/
|
|
6233
6248
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
6234
6249
|
/**
|
|
6235
6250
|
* Disallow identifiers starting with `new` or `class`.
|
|
6236
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-keyword-prefix.md
|
|
6237
6252
|
*/
|
|
6238
6253
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
6239
6254
|
/**
|
|
6240
6255
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6241
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-length-as-slice-end
|
|
6242
6257
|
* @deprecated
|
|
6243
6258
|
*/
|
|
6244
6259
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
6245
6260
|
/**
|
|
6246
6261
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6262
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-lonely-if.md
|
|
6248
6263
|
*/
|
|
6249
6264
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
6250
6265
|
/**
|
|
6251
6266
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6252
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6267
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
6253
6268
|
*/
|
|
6254
6269
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6255
6270
|
/**
|
|
6256
6271
|
* Disallow named usage of default import and export.
|
|
6257
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6272
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-named-default.md
|
|
6258
6273
|
*/
|
|
6259
6274
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
6260
6275
|
/**
|
|
6261
6276
|
* Disallow negated conditions.
|
|
6262
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6277
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negated-condition.md
|
|
6263
6278
|
*/
|
|
6264
6279
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
6265
6280
|
/**
|
|
6266
6281
|
* Disallow negated expression in equality check.
|
|
6267
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6282
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negation-in-equality-check.md
|
|
6268
6283
|
*/
|
|
6269
6284
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
6270
6285
|
/**
|
|
6271
6286
|
* Disallow nested ternary expressions.
|
|
6272
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6287
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-nested-ternary.md
|
|
6273
6288
|
*/
|
|
6274
6289
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6275
6290
|
/**
|
|
6276
6291
|
* Disallow `new Array()`.
|
|
6277
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6292
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-array.md
|
|
6278
6293
|
*/
|
|
6279
6294
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
6280
6295
|
/**
|
|
6281
6296
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6282
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6297
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-buffer.md
|
|
6283
6298
|
*/
|
|
6284
6299
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
6285
6300
|
/**
|
|
6286
6301
|
* Disallow the use of the `null` literal.
|
|
6287
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6302
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-null.md
|
|
6288
6303
|
*/
|
|
6289
6304
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
6290
6305
|
/**
|
|
6291
6306
|
* Disallow the use of objects as default parameters.
|
|
6292
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6307
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-object-as-default-parameter.md
|
|
6293
6308
|
*/
|
|
6294
6309
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
6295
6310
|
/**
|
|
6296
6311
|
* Disallow `process.exit()`.
|
|
6297
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6312
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-process-exit.md
|
|
6298
6313
|
*/
|
|
6299
6314
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
6300
6315
|
/**
|
|
6301
6316
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
6303
6318
|
*/
|
|
6304
6319
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6305
6320
|
/**
|
|
6306
6321
|
* Disallow classes that only have static members.
|
|
6307
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6322
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-static-only-class.md
|
|
6308
6323
|
*/
|
|
6309
6324
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
6310
6325
|
/**
|
|
6311
6326
|
* Disallow `then` property.
|
|
6312
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6327
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-thenable.md
|
|
6313
6328
|
*/
|
|
6314
6329
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
6315
6330
|
/**
|
|
6316
6331
|
* Disallow assigning `this` to a variable.
|
|
6317
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6332
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-this-assignment.md
|
|
6318
6333
|
*/
|
|
6319
6334
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
6320
6335
|
/**
|
|
6321
6336
|
* Disallow comparing `undefined` using `typeof`.
|
|
6322
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6337
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-typeof-undefined.md
|
|
6323
6338
|
*/
|
|
6324
6339
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
6325
6340
|
/**
|
|
6326
6341
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6342
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6328
6343
|
*/
|
|
6329
6344
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6330
6345
|
/**
|
|
6331
6346
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6332
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6347
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
6333
6348
|
*/
|
|
6334
6349
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
6335
6350
|
/**
|
|
6336
6351
|
* Disallow awaiting non-promise values.
|
|
6337
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-await.md
|
|
6338
6353
|
*/
|
|
6339
6354
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
6340
6355
|
/**
|
|
6341
6356
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6342
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6357
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
6343
6358
|
*/
|
|
6344
6359
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
6345
6360
|
/**
|
|
6346
6361
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6347
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
6348
6363
|
*/
|
|
6349
6364
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
6350
6365
|
/**
|
|
6351
6366
|
* Disallow unreadable array destructuring.
|
|
6352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6367
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
6353
6368
|
*/
|
|
6354
6369
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
6355
6370
|
/**
|
|
6356
6371
|
* Disallow unreadable IIFEs.
|
|
6357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6372
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-iife.md
|
|
6358
6373
|
*/
|
|
6359
6374
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
6360
6375
|
/**
|
|
6361
6376
|
* Disallow unused object properties.
|
|
6362
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6377
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unused-properties.md
|
|
6363
6378
|
*/
|
|
6364
6379
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
6380
|
+
/**
|
|
6381
|
+
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
6382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-collection-argument.md
|
|
6383
|
+
*/
|
|
6384
|
+
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
6365
6385
|
/**
|
|
6366
6386
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
6367
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6387
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
6368
6388
|
*/
|
|
6369
6389
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
6370
6390
|
/**
|
|
6371
6391
|
* Disallow useless fallback when spreading in object literals.
|
|
6372
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
6373
6393
|
*/
|
|
6374
6394
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
6375
6395
|
/**
|
|
6376
6396
|
* Disallow useless array length check.
|
|
6377
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6397
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-length-check.md
|
|
6378
6398
|
*/
|
|
6379
6399
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
6380
6400
|
/**
|
|
6381
6401
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
6382
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
6383
6403
|
*/
|
|
6384
6404
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
6385
6405
|
/**
|
|
6386
6406
|
* Disallow unnecessary spread.
|
|
6387
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-spread.md
|
|
6388
6408
|
*/
|
|
6389
6409
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
6390
6410
|
/**
|
|
6391
6411
|
* Disallow useless case in switch statements.
|
|
6392
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-switch-case.md
|
|
6393
6413
|
*/
|
|
6394
6414
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
6395
6415
|
/**
|
|
6396
6416
|
* Disallow useless `undefined`.
|
|
6397
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-undefined.md
|
|
6398
6418
|
*/
|
|
6399
6419
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
6400
6420
|
/**
|
|
6401
6421
|
* Disallow number literals with zero fractions or dangling dots.
|
|
6402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-zero-fractions.md
|
|
6403
6423
|
*/
|
|
6404
6424
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
6405
6425
|
/**
|
|
6406
6426
|
* Enforce proper case for numeric literals.
|
|
6407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/number-literal-case.md
|
|
6408
6428
|
*/
|
|
6409
6429
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
6410
6430
|
/**
|
|
6411
6431
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
6412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/numeric-separators-style.md
|
|
6413
6433
|
*/
|
|
6414
6434
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
6415
6435
|
/**
|
|
6416
6436
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
6417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-add-event-listener.md
|
|
6418
6438
|
*/
|
|
6419
6439
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
6420
6440
|
/**
|
|
6421
6441
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
6422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-find.md
|
|
6423
6443
|
*/
|
|
6424
6444
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
6425
6445
|
/**
|
|
6426
6446
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
6427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat.md
|
|
6428
6448
|
*/
|
|
6429
6449
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
6430
6450
|
/**
|
|
6431
6451
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
6432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat-map.md
|
|
6433
6453
|
*/
|
|
6434
6454
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
6435
6455
|
/**
|
|
6436
6456
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
6437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-index-of.md
|
|
6438
6458
|
*/
|
|
6439
6459
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
6440
6460
|
/**
|
|
6441
6461
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
6442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-some.md
|
|
6443
6463
|
*/
|
|
6444
6464
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
6445
6465
|
/**
|
|
6446
6466
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
6447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-at.md
|
|
6448
6468
|
*/
|
|
6449
6469
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
6450
6470
|
/**
|
|
6451
6471
|
* Prefer `BigInt` literals over the constructor.
|
|
6452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-bigint-literals.md
|
|
6453
6473
|
*/
|
|
6454
6474
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
6455
6475
|
/**
|
|
6456
6476
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
6457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
6458
6478
|
*/
|
|
6459
6479
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
6460
6480
|
/**
|
|
6461
6481
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
6462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-class-fields.md
|
|
6463
6483
|
*/
|
|
6464
6484
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
6465
6485
|
/**
|
|
6466
6486
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
6467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-classlist-toggle.md
|
|
6468
6488
|
*/
|
|
6469
6489
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
6470
6490
|
/**
|
|
6471
6491
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
6472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-code-point.md
|
|
6473
6493
|
*/
|
|
6474
6494
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
6475
6495
|
/**
|
|
6476
6496
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
6477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-date-now.md
|
|
6478
6498
|
*/
|
|
6479
6499
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
6480
6500
|
/**
|
|
6481
6501
|
* Prefer default parameters over reassignment.
|
|
6482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-default-parameters.md
|
|
6483
6503
|
*/
|
|
6484
6504
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
6485
6505
|
/**
|
|
6486
6506
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
6487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-append.md
|
|
6488
6508
|
*/
|
|
6489
6509
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
6490
6510
|
/**
|
|
6491
6511
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
6492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
6493
6513
|
*/
|
|
6494
6514
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
6495
6515
|
/**
|
|
6496
6516
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
6497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-remove.md
|
|
6498
6518
|
*/
|
|
6499
6519
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
6500
6520
|
/**
|
|
6501
6521
|
* Prefer `.textContent` over `.innerText`.
|
|
6502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
6503
6523
|
*/
|
|
6504
6524
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
6505
6525
|
/**
|
|
6506
6526
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
6507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-event-target.md
|
|
6508
6528
|
*/
|
|
6509
6529
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
6510
6530
|
/**
|
|
6511
6531
|
* Prefer `export…from` when re-exporting.
|
|
6512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-export-from.md
|
|
6513
6533
|
*/
|
|
6514
6534
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
6515
6535
|
/**
|
|
6516
6536
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
6517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-global-this.md
|
|
6518
6538
|
*/
|
|
6519
6539
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
6520
6540
|
/**
|
|
6521
6541
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
6522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-import-meta-properties.md
|
|
6523
6543
|
*/
|
|
6524
6544
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
6525
6545
|
/**
|
|
6526
6546
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
6527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-includes.md
|
|
6528
6548
|
*/
|
|
6529
6549
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
6530
6550
|
/**
|
|
6531
6551
|
* Prefer reading a JSON file as a buffer.
|
|
6532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
6533
6553
|
*/
|
|
6534
6554
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
6535
6555
|
/**
|
|
6536
6556
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
6537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
6538
6558
|
*/
|
|
6539
6559
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
6540
6560
|
/**
|
|
6541
6561
|
* Prefer using a logical operator over a ternary.
|
|
6542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
6543
6563
|
*/
|
|
6544
6564
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
6545
6565
|
/**
|
|
6546
6566
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
6547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-min-max.md
|
|
6548
6568
|
*/
|
|
6549
6569
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
6550
6570
|
/**
|
|
6551
6571
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
6552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-trunc.md
|
|
6553
6573
|
*/
|
|
6554
6574
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
6555
6575
|
/**
|
|
6556
6576
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
6557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
6558
6578
|
*/
|
|
6559
6579
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
6560
6580
|
/**
|
|
6561
6581
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
6562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-math-apis.md
|
|
6563
6583
|
*/
|
|
6564
6584
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
6565
6585
|
/**
|
|
6566
6586
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
6567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-module.md
|
|
6568
6588
|
*/
|
|
6569
6589
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
6570
6590
|
/**
|
|
6571
6591
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
6572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
6573
6593
|
*/
|
|
6574
6594
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
6575
6595
|
/**
|
|
6576
6596
|
* Prefer negative index over `.length - index` when possible.
|
|
6577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-negative-index.md
|
|
6578
6598
|
*/
|
|
6579
6599
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
6580
6600
|
/**
|
|
6581
6601
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
6582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-node-protocol.md
|
|
6583
6603
|
*/
|
|
6584
6604
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
6585
6605
|
/**
|
|
6586
6606
|
* Prefer `Number` static properties over global ones.
|
|
6587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-number-properties.md
|
|
6588
6608
|
*/
|
|
6589
6609
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
6590
6610
|
/**
|
|
6591
6611
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
6592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-object-from-entries.md
|
|
6593
6613
|
*/
|
|
6594
6614
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
6595
6615
|
/**
|
|
6596
6616
|
* Prefer omitting the `catch` binding parameter.
|
|
6597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
6598
6618
|
*/
|
|
6599
6619
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
6600
6620
|
/**
|
|
6601
6621
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
6602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-prototype-methods.md
|
|
6603
6623
|
*/
|
|
6604
6624
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
6605
6625
|
/**
|
|
6606
6626
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
6607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-query-selector.md
|
|
6608
6628
|
*/
|
|
6609
6629
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
6610
6630
|
/**
|
|
6611
6631
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
6612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-reflect-apply.md
|
|
6613
6633
|
*/
|
|
6614
6634
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
6615
6635
|
/**
|
|
6616
6636
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
6617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-regexp-test.md
|
|
6618
6638
|
*/
|
|
6619
6639
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
6640
|
+
/**
|
|
6641
|
+
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
6642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-response-static-json.md
|
|
6643
|
+
*/
|
|
6644
|
+
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
6620
6645
|
/**
|
|
6621
6646
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
6622
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-has.md
|
|
6623
6648
|
*/
|
|
6624
6649
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
6625
6650
|
/**
|
|
6626
6651
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
6627
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6652
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-size.md
|
|
6628
6653
|
*/
|
|
6629
6654
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
6630
6655
|
/**
|
|
6631
6656
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
6632
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6657
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-single-call.md
|
|
6633
6658
|
*/
|
|
6634
6659
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
6635
6660
|
/**
|
|
6636
6661
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
6637
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6662
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-spread.md
|
|
6638
6663
|
*/
|
|
6639
6664
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
6640
6665
|
/**
|
|
6641
6666
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
6642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6667
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-raw.md
|
|
6643
6668
|
*/
|
|
6644
6669
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
6645
6670
|
/**
|
|
6646
6671
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
6647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6672
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-replace-all.md
|
|
6648
6673
|
*/
|
|
6649
6674
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
6650
6675
|
/**
|
|
6651
6676
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
6652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6677
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-slice.md
|
|
6653
6678
|
*/
|
|
6654
6679
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
6655
6680
|
/**
|
|
6656
6681
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
6657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6682
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
6658
6683
|
*/
|
|
6659
6684
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
6660
6685
|
/**
|
|
6661
6686
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
6662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6687
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
6663
6688
|
*/
|
|
6664
6689
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
6665
6690
|
/**
|
|
6666
6691
|
* Prefer using `structuredClone` to create a deep clone.
|
|
6667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-structured-clone.md
|
|
6668
6693
|
*/
|
|
6669
6694
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
6670
6695
|
/**
|
|
6671
6696
|
* Prefer `switch` over multiple `else-if`.
|
|
6672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-switch.md
|
|
6673
6698
|
*/
|
|
6674
6699
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
6675
6700
|
/**
|
|
6676
6701
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
6677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-ternary.md
|
|
6678
6703
|
*/
|
|
6679
6704
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
6680
6705
|
/**
|
|
6681
6706
|
* Prefer top-level await over top-level promises and async function calls.
|
|
6682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6707
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-top-level-await.md
|
|
6683
6708
|
*/
|
|
6684
6709
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
6685
6710
|
/**
|
|
6686
6711
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
6687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-type-error.md
|
|
6688
6713
|
*/
|
|
6689
6714
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
6690
6715
|
/**
|
|
6691
6716
|
* Prevent abbreviations.
|
|
6692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prevent-abbreviations.md
|
|
6693
6718
|
*/
|
|
6694
6719
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
6695
6720
|
/**
|
|
6696
6721
|
* Enforce consistent relative URL style.
|
|
6697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/relative-url-style.md
|
|
6698
6723
|
*/
|
|
6699
6724
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
6700
6725
|
/**
|
|
6701
6726
|
* Enforce using the separator argument with `Array#join()`.
|
|
6702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-array-join-separator.md
|
|
6703
6728
|
*/
|
|
6704
6729
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
6705
6730
|
/**
|
|
6706
6731
|
* Require non-empty module attributes for imports and exports
|
|
6707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-attributes.md
|
|
6708
6733
|
*/
|
|
6709
6734
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
6710
6735
|
/**
|
|
6711
6736
|
* Require non-empty specifier list in import and export statements.
|
|
6712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-specifiers.md
|
|
6713
6738
|
*/
|
|
6714
6739
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
6715
6740
|
/**
|
|
6716
6741
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
6717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
6718
6743
|
*/
|
|
6719
6744
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
6720
6745
|
/**
|
|
6721
6746
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
6722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-post-message-target-origin.md
|
|
6723
6748
|
*/
|
|
6724
6749
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
6725
6750
|
/**
|
|
6726
6751
|
* Enforce better string content.
|
|
6727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/string-content.md
|
|
6728
6753
|
*/
|
|
6729
6754
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
6730
6755
|
/**
|
|
6731
6756
|
* Enforce consistent brace style for `case` clauses.
|
|
6732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/switch-case-braces.md
|
|
6733
6758
|
*/
|
|
6734
6759
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
6735
6760
|
/**
|
|
6736
6761
|
* Fix whitespace-insensitive template indentation.
|
|
6737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/template-indent.md
|
|
6738
6763
|
*/
|
|
6739
6764
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
6740
6765
|
/**
|
|
6741
6766
|
* Enforce consistent case for text encoding identifiers.
|
|
6742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/text-encoding-identifier-case.md
|
|
6743
6768
|
*/
|
|
6744
|
-
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<
|
|
6769
|
+
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
6745
6770
|
/**
|
|
6746
6771
|
* Require `new` when creating an error.
|
|
6747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/throw-new-error.md
|
|
6748
6773
|
*/
|
|
6749
6774
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
6750
6775
|
/**
|
|
@@ -7401,6 +7426,50 @@ type StylisticCurlyNewline = [] | [(("always" | "never") | {
|
|
|
7401
7426
|
type StylisticDotLocation = [] | [("object" | "property")];
|
|
7402
7427
|
// ----- @stylistic/eol-last -----
|
|
7403
7428
|
type StylisticEolLast = [] | [("always" | "never" | "unix" | "windows")];
|
|
7429
|
+
// ----- @stylistic/exp-list-style -----
|
|
7430
|
+
type StylisticExpListStyle = [] | [{
|
|
7431
|
+
singleLine?: _StylisticExpListStyle_SingleLineConfig;
|
|
7432
|
+
multiLine?: _StylisticExpListStyle_MultiLineConfig;
|
|
7433
|
+
overrides?: {
|
|
7434
|
+
"[]"?: _StylisticExpListStyle_BaseConfig;
|
|
7435
|
+
"{}"?: _StylisticExpListStyle_BaseConfig;
|
|
7436
|
+
"<>"?: _StylisticExpListStyle_BaseConfig;
|
|
7437
|
+
"()"?: _StylisticExpListStyle_BaseConfig;
|
|
7438
|
+
ArrayExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7439
|
+
ArrayPattern?: _StylisticExpListStyle_BaseConfig;
|
|
7440
|
+
ArrowFunctionExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7441
|
+
CallExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7442
|
+
ExportNamedDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
7443
|
+
FunctionDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
7444
|
+
FunctionExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7445
|
+
ImportDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
7446
|
+
ImportAttributes?: _StylisticExpListStyle_BaseConfig;
|
|
7447
|
+
NewExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7448
|
+
ObjectExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7449
|
+
ObjectPattern?: _StylisticExpListStyle_BaseConfig;
|
|
7450
|
+
TSDeclareFunction?: _StylisticExpListStyle_BaseConfig;
|
|
7451
|
+
TSFunctionType?: _StylisticExpListStyle_BaseConfig;
|
|
7452
|
+
TSInterfaceBody?: _StylisticExpListStyle_BaseConfig;
|
|
7453
|
+
TSEnumBody?: _StylisticExpListStyle_BaseConfig;
|
|
7454
|
+
TSTupleType?: _StylisticExpListStyle_BaseConfig;
|
|
7455
|
+
TSTypeLiteral?: _StylisticExpListStyle_BaseConfig;
|
|
7456
|
+
TSTypeParameterDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
7457
|
+
TSTypeParameterInstantiation?: _StylisticExpListStyle_BaseConfig;
|
|
7458
|
+
JSONArrayExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7459
|
+
JSONObjectExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7460
|
+
};
|
|
7461
|
+
}];
|
|
7462
|
+
interface _StylisticExpListStyle_SingleLineConfig {
|
|
7463
|
+
spacing?: ("always" | "never");
|
|
7464
|
+
maxItems?: number;
|
|
7465
|
+
}
|
|
7466
|
+
interface _StylisticExpListStyle_MultiLineConfig {
|
|
7467
|
+
minItems?: number;
|
|
7468
|
+
}
|
|
7469
|
+
interface _StylisticExpListStyle_BaseConfig {
|
|
7470
|
+
singleLine?: _StylisticExpListStyle_SingleLineConfig;
|
|
7471
|
+
multiline?: _StylisticExpListStyle_MultiLineConfig;
|
|
7472
|
+
}
|
|
7404
7473
|
// ----- @stylistic/function-call-argument-newline -----
|
|
7405
7474
|
type StylisticFunctionCallArgumentNewline = [] | [("always" | "never" | "consistent")];
|
|
7406
7475
|
// ----- @stylistic/function-call-spacing -----
|
|
@@ -7470,7 +7539,11 @@ type StylisticIndent = [] | [("tab" | number)] | [("tab" | number), {
|
|
|
7470
7539
|
ObjectExpression?: (number | ("first" | "off"));
|
|
7471
7540
|
ImportDeclaration?: (number | ("first" | "off"));
|
|
7472
7541
|
flatTernaryExpressions?: boolean;
|
|
7473
|
-
offsetTernaryExpressions?: boolean
|
|
7542
|
+
offsetTernaryExpressions?: (boolean | {
|
|
7543
|
+
CallExpression?: boolean;
|
|
7544
|
+
AwaitExpression?: boolean;
|
|
7545
|
+
NewExpression?: boolean;
|
|
7546
|
+
});
|
|
7474
7547
|
offsetTernaryExpressionsOffsetCallExpressions?: boolean;
|
|
7475
7548
|
ignoredNodes?: string[];
|
|
7476
7549
|
ignoreComments?: boolean;
|
|
@@ -8271,6 +8344,7 @@ type StylisticObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "n
|
|
|
8271
8344
|
TSInterfaceBody?: ("always" | "never");
|
|
8272
8345
|
TSEnumBody?: ("always" | "never");
|
|
8273
8346
|
};
|
|
8347
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
8274
8348
|
}];
|
|
8275
8349
|
// ----- @stylistic/object-property-newline -----
|
|
8276
8350
|
type StylisticObjectPropertyNewline = [] | [{
|
|
@@ -9590,6 +9664,13 @@ type AstroJsxA11YScope = [] | [{
|
|
|
9590
9664
|
type AstroJsxA11YTabindexNoPositive = [] | [{
|
|
9591
9665
|
[k: string]: unknown | undefined;
|
|
9592
9666
|
}];
|
|
9667
|
+
// ----- astro/no-unsafe-inline-scripts -----
|
|
9668
|
+
type AstroNoUnsafeInlineScripts = [] | [{
|
|
9669
|
+
allowDefineVars?: boolean;
|
|
9670
|
+
allowModuleScripts?: boolean;
|
|
9671
|
+
allowNonExecutingTypes?: string[];
|
|
9672
|
+
allowNonce?: boolean;
|
|
9673
|
+
}];
|
|
9593
9674
|
// ----- astro/prefer-split-class-list -----
|
|
9594
9675
|
type AstroPreferSplitClassList = [] | [{
|
|
9595
9676
|
splitLiteral?: boolean;
|
|
@@ -14694,6 +14775,10 @@ type UnicornTemplateIndent = [] | [{
|
|
|
14694
14775
|
selectors?: string[];
|
|
14695
14776
|
comments?: string[];
|
|
14696
14777
|
}];
|
|
14778
|
+
// ----- unicorn/text-encoding-identifier-case -----
|
|
14779
|
+
type UnicornTextEncodingIdentifierCase = [] | [{
|
|
14780
|
+
withDash?: boolean;
|
|
14781
|
+
}];
|
|
14697
14782
|
// ----- use-isnan -----
|
|
14698
14783
|
type UseIsnan = [] | [{
|
|
14699
14784
|
enforceForSwitchCase?: boolean;
|