@jimmy.codes/eslint-config 6.14.3 → 6.16.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/README.md +2 -0
- 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 +185 -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-DRiOy59I.js → react-TciwSDvV.js} +5 -4
- 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 +16 -16
package/dist/index.d.ts
CHANGED
|
@@ -143,6 +143,11 @@ interface RuleOptions {
|
|
|
143
143
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
|
|
144
144
|
*/
|
|
145
145
|
'@eslint-react/hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]>;
|
|
146
|
+
/**
|
|
147
|
+
* Prevents dollar signs from being inserted as text nodes before expressions.
|
|
148
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-dollar
|
|
149
|
+
*/
|
|
150
|
+
'@eslint-react/jsx-dollar'?: Linter.RuleEntry<[]>;
|
|
146
151
|
/**
|
|
147
152
|
* Enforces that the 'key' prop is placed before the spread prop in JSX elements.
|
|
148
153
|
* @see https://eslint-react.xyz/docs/rules/jsx-key-before-spread
|
|
@@ -2051,6 +2056,11 @@ interface RuleOptions {
|
|
|
2051
2056
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-text-directive/
|
|
2052
2057
|
*/
|
|
2053
2058
|
'astro/no-set-text-directive'?: Linter.RuleEntry<[]>;
|
|
2059
|
+
/**
|
|
2060
|
+
* disallow inline `<script>` without `src` to encourage CSP-safe patterns
|
|
2061
|
+
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unsafe-inline-scripts/
|
|
2062
|
+
*/
|
|
2063
|
+
'astro/no-unsafe-inline-scripts'?: Linter.RuleEntry<AstroNoUnsafeInlineScripts>;
|
|
2054
2064
|
/**
|
|
2055
2065
|
* disallow selectors defined in `style` tag that don't use in HTML
|
|
2056
2066
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unused-css-selector/
|
|
@@ -4941,6 +4951,11 @@ interface RuleOptions {
|
|
|
4941
4951
|
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-unsafe-references.md
|
|
4942
4952
|
*/
|
|
4943
4953
|
'playwright/no-unsafe-references'?: Linter.RuleEntry<[]>;
|
|
4954
|
+
/**
|
|
4955
|
+
* Disallow usage of page locators that are not used
|
|
4956
|
+
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-unused-locators.md
|
|
4957
|
+
*/
|
|
4958
|
+
'playwright/no-unused-locators'?: Linter.RuleEntry<[]>;
|
|
4944
4959
|
/**
|
|
4945
4960
|
* Disallow unnecessary awaits for Playwright methods
|
|
4946
4961
|
* @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-useless-await.md
|
|
@@ -5067,7 +5082,7 @@ interface RuleOptions {
|
|
|
5067
5082
|
*/
|
|
5068
5083
|
'playwright/valid-expect-in-promise'?: Linter.RuleEntry<[]>;
|
|
5069
5084
|
/**
|
|
5070
|
-
* Enforce valid tag format in Playwright test blocks
|
|
5085
|
+
* Enforce valid tag format in Playwright test blocks and titles
|
|
5071
5086
|
*/
|
|
5072
5087
|
'playwright/valid-test-tags'?: Linter.RuleEntry<PlaywrightValidTestTags>;
|
|
5073
5088
|
/**
|
|
@@ -5287,7 +5302,7 @@ interface RuleOptions {
|
|
|
5287
5302
|
*/
|
|
5288
5303
|
'react-hooks/use-memo'?: Linter.RuleEntry<ReactHooksUseMemo>;
|
|
5289
5304
|
/**
|
|
5290
|
-
* Validates that useMemos always return a value. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
5305
|
+
* 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.
|
|
5291
5306
|
*/
|
|
5292
5307
|
'react-hooks/void-use-memo'?: Linter.RuleEntry<ReactHooksVoidUseMemo>;
|
|
5293
5308
|
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
|
|
@@ -6046,710 +6061,725 @@ interface RuleOptions {
|
|
|
6046
6061
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
6047
6062
|
/**
|
|
6048
6063
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
6049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/better-regex.md
|
|
6050
6065
|
*/
|
|
6051
6066
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
6052
6067
|
/**
|
|
6053
6068
|
* Enforce a specific parameter name in catch clauses.
|
|
6054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/catch-error-name.md
|
|
6055
6070
|
*/
|
|
6056
6071
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
6057
6072
|
/**
|
|
6058
6073
|
* Enforce consistent assertion style with `node:assert`.
|
|
6059
|
-
* @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-assert.md
|
|
6060
6075
|
*/
|
|
6061
6076
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6062
6077
|
/**
|
|
6063
6078
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6064
|
-
* @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-date-clone.md
|
|
6065
6080
|
*/
|
|
6066
6081
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6067
6082
|
/**
|
|
6068
6083
|
* Use destructured variables over properties.
|
|
6069
|
-
* @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-destructuring.md
|
|
6070
6085
|
*/
|
|
6071
6086
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6072
6087
|
/**
|
|
6073
6088
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6074
|
-
* @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-empty-array-spread.md
|
|
6075
6090
|
*/
|
|
6076
6091
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6077
6092
|
/**
|
|
6078
6093
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-existence-index-check.md
|
|
6080
6095
|
*/
|
|
6081
6096
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6082
6097
|
/**
|
|
6083
6098
|
* Move function definitions to the highest possible scope.
|
|
6084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-function-scoping.md
|
|
6085
6100
|
*/
|
|
6086
6101
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6087
6102
|
/**
|
|
6088
6103
|
* Enforce correct `Error` subclassing.
|
|
6089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/custom-error-definition.md
|
|
6090
6105
|
*/
|
|
6091
6106
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6092
6107
|
/**
|
|
6093
6108
|
* Enforce no spaces between braces.
|
|
6094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/empty-brace-spaces.md
|
|
6095
6110
|
*/
|
|
6096
6111
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6097
6112
|
/**
|
|
6098
6113
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/error-message.md
|
|
6100
6115
|
*/
|
|
6101
6116
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6102
6117
|
/**
|
|
6103
6118
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/escape-case.md
|
|
6105
6120
|
*/
|
|
6106
6121
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
6107
6122
|
/**
|
|
6108
6123
|
* Add expiration conditions to TODO comments.
|
|
6109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/expiring-todo-comments.md
|
|
6110
6125
|
*/
|
|
6111
6126
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
6112
6127
|
/**
|
|
6113
6128
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/explicit-length-check.md
|
|
6115
6130
|
*/
|
|
6116
6131
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
6117
6132
|
/**
|
|
6118
6133
|
* Enforce a case style for filenames.
|
|
6119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/filename-case.md
|
|
6120
6135
|
*/
|
|
6121
6136
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
6122
6137
|
/**
|
|
6123
6138
|
* Enforce specific import styles per module.
|
|
6124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/import-style.md
|
|
6125
6140
|
*/
|
|
6126
6141
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
6127
6142
|
/**
|
|
6128
6143
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
6129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/new-for-builtins.md
|
|
6130
6145
|
*/
|
|
6131
6146
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
6132
6147
|
/**
|
|
6133
6148
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6134
|
-
* @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-abusive-eslint-disable.md
|
|
6135
6150
|
*/
|
|
6136
6151
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
6137
6152
|
/**
|
|
6138
6153
|
* Disallow recursive access to `this` within getters and setters.
|
|
6139
|
-
* @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-accessor-recursion.md
|
|
6140
6155
|
*/
|
|
6141
6156
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6142
6157
|
/**
|
|
6143
6158
|
* Disallow anonymous functions and classes as the default export.
|
|
6144
|
-
* @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-anonymous-default-export.md
|
|
6145
6160
|
*/
|
|
6146
6161
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
6147
6162
|
/**
|
|
6148
6163
|
* Prevent passing a function reference directly to iterator methods.
|
|
6149
|
-
* @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-callback-reference.md
|
|
6150
6165
|
*/
|
|
6151
6166
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
6152
6167
|
/**
|
|
6153
6168
|
* Prefer `for…of` over the `forEach` method.
|
|
6154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-for-each.md
|
|
6155
6170
|
*/
|
|
6156
6171
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
6157
6172
|
/**
|
|
6158
6173
|
* Disallow using the `this` argument in array methods.
|
|
6159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-method-this-argument.md
|
|
6160
6175
|
*/
|
|
6161
6176
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
6162
6177
|
/**
|
|
6163
6178
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-array-push-push
|
|
6165
6180
|
* @deprecated
|
|
6166
6181
|
*/
|
|
6167
6182
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
6168
6183
|
/**
|
|
6169
6184
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6170
|
-
* @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-reduce.md
|
|
6171
6186
|
*/
|
|
6172
6187
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
6173
6188
|
/**
|
|
6174
6189
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6175
|
-
* @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-array-reverse.md
|
|
6176
6191
|
*/
|
|
6177
6192
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
6178
6193
|
/**
|
|
6179
6194
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6180
|
-
* @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-array-sort.md
|
|
6181
6196
|
*/
|
|
6182
6197
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
6183
6198
|
/**
|
|
6184
6199
|
* Disallow member access from await expression.
|
|
6185
|
-
* @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-await-expression-member.md
|
|
6186
6201
|
*/
|
|
6187
6202
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
6188
6203
|
/**
|
|
6189
6204
|
* Disallow using `await` in `Promise` method parameters.
|
|
6190
|
-
* @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-await-in-promise-methods.md
|
|
6191
6206
|
*/
|
|
6192
6207
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6193
6208
|
/**
|
|
6194
6209
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6195
|
-
* @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-console-spaces.md
|
|
6196
6211
|
*/
|
|
6197
6212
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6198
6213
|
/**
|
|
6199
6214
|
* Do not use `document.cookie` directly.
|
|
6200
|
-
* @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-document-cookie.md
|
|
6201
6216
|
*/
|
|
6202
6217
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6203
6218
|
/**
|
|
6204
6219
|
* Disallow empty files.
|
|
6205
|
-
* @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-empty-file.md
|
|
6206
6221
|
*/
|
|
6207
6222
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
6208
6223
|
/**
|
|
6209
6224
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6225
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-for-loop.md
|
|
6211
6226
|
*/
|
|
6212
6227
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
6213
6228
|
/**
|
|
6214
6229
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
6215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6230
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-hex-escape.md
|
|
6216
6231
|
*/
|
|
6217
6232
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
6233
|
+
/**
|
|
6234
|
+
* Disallow immediate mutation after variable assignment.
|
|
6235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-immediate-mutation.md
|
|
6236
|
+
*/
|
|
6237
|
+
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
6218
6238
|
/**
|
|
6219
6239
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
6221
6241
|
* @deprecated
|
|
6222
6242
|
*/
|
|
6223
6243
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
6224
6244
|
/**
|
|
6225
6245
|
* Disallow `instanceof` with built-in objects
|
|
6226
|
-
* @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-instanceof-builtins.md
|
|
6227
6247
|
*/
|
|
6228
6248
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
6229
6249
|
/**
|
|
6230
6250
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6231
|
-
* @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-invalid-fetch-options.md
|
|
6232
6252
|
*/
|
|
6233
6253
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6234
6254
|
/**
|
|
6235
6255
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6236
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
6237
6257
|
*/
|
|
6238
6258
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
6239
6259
|
/**
|
|
6240
6260
|
* Disallow identifiers starting with `new` or `class`.
|
|
6241
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-keyword-prefix.md
|
|
6242
6262
|
*/
|
|
6243
6263
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
6244
6264
|
/**
|
|
6245
6265
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6246
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-length-as-slice-end
|
|
6247
6267
|
* @deprecated
|
|
6248
6268
|
*/
|
|
6249
6269
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
6250
6270
|
/**
|
|
6251
6271
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6252
|
-
* @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-lonely-if.md
|
|
6253
6273
|
*/
|
|
6254
6274
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
6255
6275
|
/**
|
|
6256
6276
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6257
|
-
* @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-magic-array-flat-depth.md
|
|
6258
6278
|
*/
|
|
6259
6279
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6260
6280
|
/**
|
|
6261
6281
|
* Disallow named usage of default import and export.
|
|
6262
|
-
* @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-named-default.md
|
|
6263
6283
|
*/
|
|
6264
6284
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
6265
6285
|
/**
|
|
6266
6286
|
* Disallow negated conditions.
|
|
6267
|
-
* @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-negated-condition.md
|
|
6268
6288
|
*/
|
|
6269
6289
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
6270
6290
|
/**
|
|
6271
6291
|
* Disallow negated expression in equality check.
|
|
6272
|
-
* @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-negation-in-equality-check.md
|
|
6273
6293
|
*/
|
|
6274
6294
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
6275
6295
|
/**
|
|
6276
6296
|
* Disallow nested ternary expressions.
|
|
6277
|
-
* @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-nested-ternary.md
|
|
6278
6298
|
*/
|
|
6279
6299
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6280
6300
|
/**
|
|
6281
6301
|
* Disallow `new Array()`.
|
|
6282
|
-
* @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-new-array.md
|
|
6283
6303
|
*/
|
|
6284
6304
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
6285
6305
|
/**
|
|
6286
6306
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6287
|
-
* @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-new-buffer.md
|
|
6288
6308
|
*/
|
|
6289
6309
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
6290
6310
|
/**
|
|
6291
6311
|
* Disallow the use of the `null` literal.
|
|
6292
|
-
* @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-null.md
|
|
6293
6313
|
*/
|
|
6294
6314
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
6295
6315
|
/**
|
|
6296
6316
|
* Disallow the use of objects as default parameters.
|
|
6297
|
-
* @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-object-as-default-parameter.md
|
|
6298
6318
|
*/
|
|
6299
6319
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
6300
6320
|
/**
|
|
6301
6321
|
* Disallow `process.exit()`.
|
|
6302
|
-
* @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-process-exit.md
|
|
6303
6323
|
*/
|
|
6304
6324
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
6305
6325
|
/**
|
|
6306
6326
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6307
|
-
* @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-single-promise-in-promise-methods.md
|
|
6308
6328
|
*/
|
|
6309
6329
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6310
6330
|
/**
|
|
6311
6331
|
* Disallow classes that only have static members.
|
|
6312
|
-
* @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-static-only-class.md
|
|
6313
6333
|
*/
|
|
6314
6334
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
6315
6335
|
/**
|
|
6316
6336
|
* Disallow `then` property.
|
|
6317
|
-
* @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-thenable.md
|
|
6318
6338
|
*/
|
|
6319
6339
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
6320
6340
|
/**
|
|
6321
6341
|
* Disallow assigning `this` to a variable.
|
|
6322
|
-
* @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-this-assignment.md
|
|
6323
6343
|
*/
|
|
6324
6344
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
6325
6345
|
/**
|
|
6326
6346
|
* Disallow comparing `undefined` using `typeof`.
|
|
6327
|
-
* @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-typeof-undefined.md
|
|
6328
6348
|
*/
|
|
6329
6349
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
6330
6350
|
/**
|
|
6331
6351
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6332
|
-
* @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-array-flat-depth.md
|
|
6333
6353
|
*/
|
|
6334
6354
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6335
6355
|
/**
|
|
6336
6356
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6337
|
-
* @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-array-splice-count.md
|
|
6338
6358
|
*/
|
|
6339
6359
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
6340
6360
|
/**
|
|
6341
6361
|
* Disallow awaiting non-promise values.
|
|
6342
|
-
* @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-await.md
|
|
6343
6363
|
*/
|
|
6344
6364
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
6345
6365
|
/**
|
|
6346
6366
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6347
|
-
* @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-unnecessary-polyfills.md
|
|
6348
6368
|
*/
|
|
6349
6369
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
6350
6370
|
/**
|
|
6351
6371
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6352
|
-
* @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-unnecessary-slice-end.md
|
|
6353
6373
|
*/
|
|
6354
6374
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
6355
6375
|
/**
|
|
6356
6376
|
* Disallow unreadable array destructuring.
|
|
6357
|
-
* @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-unreadable-array-destructuring.md
|
|
6358
6378
|
*/
|
|
6359
6379
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
6360
6380
|
/**
|
|
6361
6381
|
* Disallow unreadable IIFEs.
|
|
6362
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-iife.md
|
|
6363
6383
|
*/
|
|
6364
6384
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
6365
6385
|
/**
|
|
6366
6386
|
* Disallow unused object properties.
|
|
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-unused-properties.md
|
|
6368
6388
|
*/
|
|
6369
6389
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
6390
|
+
/**
|
|
6391
|
+
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
6392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-collection-argument.md
|
|
6393
|
+
*/
|
|
6394
|
+
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
6370
6395
|
/**
|
|
6371
6396
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
6372
|
-
* @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-error-capture-stack-trace.md
|
|
6373
6398
|
*/
|
|
6374
6399
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
6375
6400
|
/**
|
|
6376
6401
|
* Disallow useless fallback when spreading in object literals.
|
|
6377
|
-
* @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-fallback-in-spread.md
|
|
6378
6403
|
*/
|
|
6379
6404
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
6380
6405
|
/**
|
|
6381
6406
|
* Disallow useless array length check.
|
|
6382
|
-
* @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-length-check.md
|
|
6383
6408
|
*/
|
|
6384
6409
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
6385
6410
|
/**
|
|
6386
6411
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
6387
|
-
* @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-promise-resolve-reject.md
|
|
6388
6413
|
*/
|
|
6389
6414
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
6390
6415
|
/**
|
|
6391
6416
|
* Disallow unnecessary spread.
|
|
6392
|
-
* @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-spread.md
|
|
6393
6418
|
*/
|
|
6394
6419
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
6395
6420
|
/**
|
|
6396
6421
|
* Disallow useless case in switch statements.
|
|
6397
|
-
* @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-useless-switch-case.md
|
|
6398
6423
|
*/
|
|
6399
6424
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
6400
6425
|
/**
|
|
6401
6426
|
* Disallow useless `undefined`.
|
|
6402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-undefined.md
|
|
6403
6428
|
*/
|
|
6404
6429
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
6405
6430
|
/**
|
|
6406
6431
|
* Disallow number literals with zero fractions or dangling dots.
|
|
6407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-zero-fractions.md
|
|
6408
6433
|
*/
|
|
6409
6434
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
6410
6435
|
/**
|
|
6411
6436
|
* Enforce proper case for numeric literals.
|
|
6412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/number-literal-case.md
|
|
6413
6438
|
*/
|
|
6414
6439
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
6415
6440
|
/**
|
|
6416
6441
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
6417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/numeric-separators-style.md
|
|
6418
6443
|
*/
|
|
6419
6444
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
6420
6445
|
/**
|
|
6421
6446
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
6422
|
-
* @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-add-event-listener.md
|
|
6423
6448
|
*/
|
|
6424
6449
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
6425
6450
|
/**
|
|
6426
6451
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
6427
|
-
* @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-find.md
|
|
6428
6453
|
*/
|
|
6429
6454
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
6430
6455
|
/**
|
|
6431
6456
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
6432
|
-
* @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-flat.md
|
|
6433
6458
|
*/
|
|
6434
6459
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
6435
6460
|
/**
|
|
6436
6461
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
6437
|
-
* @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-flat-map.md
|
|
6438
6463
|
*/
|
|
6439
6464
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
6440
6465
|
/**
|
|
6441
6466
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
6442
|
-
* @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-array-index-of.md
|
|
6443
6468
|
*/
|
|
6444
6469
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
6445
6470
|
/**
|
|
6446
6471
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
6447
|
-
* @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-array-some.md
|
|
6448
6473
|
*/
|
|
6449
6474
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
6450
6475
|
/**
|
|
6451
6476
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
6452
|
-
* @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-at.md
|
|
6453
6478
|
*/
|
|
6454
6479
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
6455
6480
|
/**
|
|
6456
6481
|
* Prefer `BigInt` literals over the constructor.
|
|
6457
|
-
* @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-bigint-literals.md
|
|
6458
6483
|
*/
|
|
6459
6484
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
6460
6485
|
/**
|
|
6461
6486
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
6462
|
-
* @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-blob-reading-methods.md
|
|
6463
6488
|
*/
|
|
6464
6489
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
6465
6490
|
/**
|
|
6466
6491
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
6467
|
-
* @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-class-fields.md
|
|
6468
6493
|
*/
|
|
6469
6494
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
6470
6495
|
/**
|
|
6471
6496
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
6472
|
-
* @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-classlist-toggle.md
|
|
6473
6498
|
*/
|
|
6474
6499
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
6475
6500
|
/**
|
|
6476
6501
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
6477
|
-
* @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-code-point.md
|
|
6478
6503
|
*/
|
|
6479
6504
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
6480
6505
|
/**
|
|
6481
6506
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
6482
|
-
* @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-date-now.md
|
|
6483
6508
|
*/
|
|
6484
6509
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
6485
6510
|
/**
|
|
6486
6511
|
* Prefer default parameters over reassignment.
|
|
6487
|
-
* @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-default-parameters.md
|
|
6488
6513
|
*/
|
|
6489
6514
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
6490
6515
|
/**
|
|
6491
6516
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
6492
|
-
* @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-append.md
|
|
6493
6518
|
*/
|
|
6494
6519
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
6495
6520
|
/**
|
|
6496
6521
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
6497
|
-
* @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-dataset.md
|
|
6498
6523
|
*/
|
|
6499
6524
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
6500
6525
|
/**
|
|
6501
6526
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
6502
|
-
* @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-dom-node-remove.md
|
|
6503
6528
|
*/
|
|
6504
6529
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
6505
6530
|
/**
|
|
6506
6531
|
* Prefer `.textContent` over `.innerText`.
|
|
6507
|
-
* @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-dom-node-text-content.md
|
|
6508
6533
|
*/
|
|
6509
6534
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
6510
6535
|
/**
|
|
6511
6536
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
6512
|
-
* @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-event-target.md
|
|
6513
6538
|
*/
|
|
6514
6539
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
6515
6540
|
/**
|
|
6516
6541
|
* Prefer `export…from` when re-exporting.
|
|
6517
|
-
* @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-export-from.md
|
|
6518
6543
|
*/
|
|
6519
6544
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
6520
6545
|
/**
|
|
6521
6546
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
6522
|
-
* @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-global-this.md
|
|
6523
6548
|
*/
|
|
6524
6549
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
6525
6550
|
/**
|
|
6526
6551
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
6527
|
-
* @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-import-meta-properties.md
|
|
6528
6553
|
*/
|
|
6529
6554
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
6530
6555
|
/**
|
|
6531
6556
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
6532
|
-
* @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-includes.md
|
|
6533
6558
|
*/
|
|
6534
6559
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
6535
6560
|
/**
|
|
6536
6561
|
* Prefer reading a JSON file as a buffer.
|
|
6537
|
-
* @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-json-parse-buffer.md
|
|
6538
6563
|
*/
|
|
6539
6564
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
6540
6565
|
/**
|
|
6541
6566
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
6542
|
-
* @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-keyboard-event-key.md
|
|
6543
6568
|
*/
|
|
6544
6569
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
6545
6570
|
/**
|
|
6546
6571
|
* Prefer using a logical operator over a ternary.
|
|
6547
|
-
* @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-logical-operator-over-ternary.md
|
|
6548
6573
|
*/
|
|
6549
6574
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
6550
6575
|
/**
|
|
6551
6576
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
6552
|
-
* @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-math-min-max.md
|
|
6553
6578
|
*/
|
|
6554
6579
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
6555
6580
|
/**
|
|
6556
6581
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
6557
|
-
* @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-math-trunc.md
|
|
6558
6583
|
*/
|
|
6559
6584
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
6560
6585
|
/**
|
|
6561
6586
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
6562
|
-
* @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-modern-dom-apis.md
|
|
6563
6588
|
*/
|
|
6564
6589
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
6565
6590
|
/**
|
|
6566
6591
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
6567
|
-
* @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-modern-math-apis.md
|
|
6568
6593
|
*/
|
|
6569
6594
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
6570
6595
|
/**
|
|
6571
6596
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
6572
|
-
* @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-module.md
|
|
6573
6598
|
*/
|
|
6574
6599
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
6575
6600
|
/**
|
|
6576
6601
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
6577
|
-
* @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-native-coercion-functions.md
|
|
6578
6603
|
*/
|
|
6579
6604
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
6580
6605
|
/**
|
|
6581
6606
|
* Prefer negative index over `.length - index` when possible.
|
|
6582
|
-
* @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-negative-index.md
|
|
6583
6608
|
*/
|
|
6584
6609
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
6585
6610
|
/**
|
|
6586
6611
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
6587
|
-
* @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-node-protocol.md
|
|
6588
6613
|
*/
|
|
6589
6614
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
6590
6615
|
/**
|
|
6591
6616
|
* Prefer `Number` static properties over global ones.
|
|
6592
|
-
* @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-number-properties.md
|
|
6593
6618
|
*/
|
|
6594
6619
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
6595
6620
|
/**
|
|
6596
6621
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
6597
|
-
* @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-object-from-entries.md
|
|
6598
6623
|
*/
|
|
6599
6624
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
6600
6625
|
/**
|
|
6601
6626
|
* Prefer omitting the `catch` binding parameter.
|
|
6602
|
-
* @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-optional-catch-binding.md
|
|
6603
6628
|
*/
|
|
6604
6629
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
6605
6630
|
/**
|
|
6606
6631
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
6607
|
-
* @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-prototype-methods.md
|
|
6608
6633
|
*/
|
|
6609
6634
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
6610
6635
|
/**
|
|
6611
6636
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
6612
|
-
* @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-query-selector.md
|
|
6613
6638
|
*/
|
|
6614
6639
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
6615
6640
|
/**
|
|
6616
6641
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
6617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-reflect-apply.md
|
|
6618
6643
|
*/
|
|
6619
6644
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
6620
6645
|
/**
|
|
6621
6646
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
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-regexp-test.md
|
|
6623
6648
|
*/
|
|
6624
6649
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
6650
|
+
/**
|
|
6651
|
+
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
6652
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-response-static-json.md
|
|
6653
|
+
*/
|
|
6654
|
+
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
6625
6655
|
/**
|
|
6626
6656
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
6627
|
-
* @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-set-has.md
|
|
6628
6658
|
*/
|
|
6629
6659
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
6630
6660
|
/**
|
|
6631
6661
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
6632
|
-
* @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-set-size.md
|
|
6633
6663
|
*/
|
|
6634
6664
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
6635
6665
|
/**
|
|
6636
6666
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
6637
|
-
* @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-single-call.md
|
|
6638
6668
|
*/
|
|
6639
6669
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
6640
6670
|
/**
|
|
6641
6671
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
6642
|
-
* @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-spread.md
|
|
6643
6673
|
*/
|
|
6644
6674
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
6645
6675
|
/**
|
|
6646
6676
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
6647
|
-
* @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-raw.md
|
|
6648
6678
|
*/
|
|
6649
6679
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
6650
6680
|
/**
|
|
6651
6681
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
6652
|
-
* @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-replace-all.md
|
|
6653
6683
|
*/
|
|
6654
6684
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
6655
6685
|
/**
|
|
6656
6686
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
6657
|
-
* @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-slice.md
|
|
6658
6688
|
*/
|
|
6659
6689
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
6660
6690
|
/**
|
|
6661
6691
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
6662
|
-
* @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-string-starts-ends-with.md
|
|
6663
6693
|
*/
|
|
6664
6694
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
6665
6695
|
/**
|
|
6666
6696
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
6667
|
-
* @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-string-trim-start-end.md
|
|
6668
6698
|
*/
|
|
6669
6699
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
6670
6700
|
/**
|
|
6671
6701
|
* Prefer using `structuredClone` to create a deep clone.
|
|
6672
|
-
* @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-structured-clone.md
|
|
6673
6703
|
*/
|
|
6674
6704
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
6675
6705
|
/**
|
|
6676
6706
|
* Prefer `switch` over multiple `else-if`.
|
|
6677
|
-
* @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-switch.md
|
|
6678
6708
|
*/
|
|
6679
6709
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
6680
6710
|
/**
|
|
6681
6711
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
6682
|
-
* @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-ternary.md
|
|
6683
6713
|
*/
|
|
6684
6714
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
6685
6715
|
/**
|
|
6686
6716
|
* Prefer top-level await over top-level promises and async function calls.
|
|
6687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-top-level-await.md
|
|
6688
6718
|
*/
|
|
6689
6719
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
6690
6720
|
/**
|
|
6691
6721
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
6692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-type-error.md
|
|
6693
6723
|
*/
|
|
6694
6724
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
6695
6725
|
/**
|
|
6696
6726
|
* Prevent abbreviations.
|
|
6697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prevent-abbreviations.md
|
|
6698
6728
|
*/
|
|
6699
6729
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
6700
6730
|
/**
|
|
6701
6731
|
* Enforce consistent relative URL style.
|
|
6702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/relative-url-style.md
|
|
6703
6733
|
*/
|
|
6704
6734
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
6705
6735
|
/**
|
|
6706
6736
|
* Enforce using the separator argument with `Array#join()`.
|
|
6707
|
-
* @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-array-join-separator.md
|
|
6708
6738
|
*/
|
|
6709
6739
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
6710
6740
|
/**
|
|
6711
6741
|
* Require non-empty module attributes for imports and exports
|
|
6712
|
-
* @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-module-attributes.md
|
|
6713
6743
|
*/
|
|
6714
6744
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
6715
6745
|
/**
|
|
6716
6746
|
* Require non-empty specifier list in import and export statements.
|
|
6717
|
-
* @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-module-specifiers.md
|
|
6718
6748
|
*/
|
|
6719
6749
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
6720
6750
|
/**
|
|
6721
6751
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
6722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
6723
6753
|
*/
|
|
6724
6754
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
6725
6755
|
/**
|
|
6726
6756
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
6727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-post-message-target-origin.md
|
|
6728
6758
|
*/
|
|
6729
6759
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
6730
6760
|
/**
|
|
6731
6761
|
* Enforce better string content.
|
|
6732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/string-content.md
|
|
6733
6763
|
*/
|
|
6734
6764
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
6735
6765
|
/**
|
|
6736
6766
|
* Enforce consistent brace style for `case` clauses.
|
|
6737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/switch-case-braces.md
|
|
6738
6768
|
*/
|
|
6739
6769
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
6740
6770
|
/**
|
|
6741
6771
|
* Fix whitespace-insensitive template indentation.
|
|
6742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/template-indent.md
|
|
6743
6773
|
*/
|
|
6744
6774
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
6745
6775
|
/**
|
|
6746
6776
|
* Enforce consistent case for text encoding identifiers.
|
|
6747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/text-encoding-identifier-case.md
|
|
6748
6778
|
*/
|
|
6749
|
-
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<
|
|
6779
|
+
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
6750
6780
|
/**
|
|
6751
6781
|
* Require `new` when creating an error.
|
|
6752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/throw-new-error.md
|
|
6753
6783
|
*/
|
|
6754
6784
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
6755
6785
|
/**
|
|
@@ -9644,6 +9674,13 @@ type AstroJsxA11YScope = [] | [{
|
|
|
9644
9674
|
type AstroJsxA11YTabindexNoPositive = [] | [{
|
|
9645
9675
|
[k: string]: unknown | undefined;
|
|
9646
9676
|
}];
|
|
9677
|
+
// ----- astro/no-unsafe-inline-scripts -----
|
|
9678
|
+
type AstroNoUnsafeInlineScripts = [] | [{
|
|
9679
|
+
allowDefineVars?: boolean;
|
|
9680
|
+
allowModuleScripts?: boolean;
|
|
9681
|
+
allowNonExecutingTypes?: string[];
|
|
9682
|
+
allowNonce?: boolean;
|
|
9683
|
+
}];
|
|
9647
9684
|
// ----- astro/prefer-split-class-list -----
|
|
9648
9685
|
type AstroPreferSplitClassList = [] | [{
|
|
9649
9686
|
splitLiteral?: boolean;
|
|
@@ -14748,6 +14785,10 @@ type UnicornTemplateIndent = [] | [{
|
|
|
14748
14785
|
selectors?: string[];
|
|
14749
14786
|
comments?: string[];
|
|
14750
14787
|
}];
|
|
14788
|
+
// ----- unicorn/text-encoding-identifier-case -----
|
|
14789
|
+
type UnicornTextEncodingIdentifierCase = [] | [{
|
|
14790
|
+
withDash?: boolean;
|
|
14791
|
+
}];
|
|
14751
14792
|
// ----- use-isnan -----
|
|
14752
14793
|
type UseIsnan = [] | [{
|
|
14753
14794
|
enforceForSwitchCase?: boolean;
|