@shayanthenerd/eslint-config 0.24.1 → 0.26.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 +69 -59
- package/dist/configs/base.mjs +1 -1
- package/dist/configs/baseline.mjs +22 -0
- package/dist/configs/css.mjs +6 -6
- package/dist/configs/html.mjs +8 -8
- package/dist/configs/next.mjs +20 -0
- package/dist/configs/react.mjs +29 -0
- package/dist/helpers/globs.mjs +2 -11
- package/dist/helpers/ignores/defaultIgnorePatterns.mjs +1 -0
- package/dist/helpers/isPackageDetected.mjs +1 -1
- package/dist/helpers/options/defaultOptions.mjs +48 -11
- package/dist/helpers/options/enableDetectedConfigs.mjs +33 -14
- package/dist/index.mjs +11 -7
- package/dist/prettier.config.mjs +1 -1
- package/dist/rules/astro.mjs +1 -0
- package/dist/rules/baseline.mjs +23 -0
- package/dist/rules/css.mjs +27 -6
- package/dist/rules/html.mjs +7 -7
- package/dist/rules/javascript.mjs +2 -3
- package/dist/rules/next.mjs +28 -0
- package/dist/rules/packageJson.mjs +1 -5
- package/dist/rules/react.mjs +160 -0
- package/dist/rules/typescript.mjs +1 -1
- package/dist/rules/unicorn.mjs +97 -1
- package/dist/rules/vue.mjs +2 -2
- package/dist/types/eslint-schema.d.mts +2384 -348
- package/dist/types/index.d.mts +56 -29
- package/dist/types/options/base.d.mts +0 -16
- package/dist/types/options/baseline.d.mts +106 -0
- package/dist/types/options/nuxt.d.mts +1 -2
- package/dist/types/options/react.d.mts +50 -0
- package/dist/types/options/stylistic.d.mts +1 -1
- package/dist/types/options/test.d.mts +1 -1
- package/dist/types/options/typescript.d.mts +1 -1
- package/dist/types/options/vue.d.mts +1 -1
- package/package.json +22 -17
- package/dist/configs/restrictedDefaultExports.mjs +0 -16
- package/dist/types/options/css.d.mts +0 -27
- package/dist/types/options/html.d.mts +0 -27
- package/dist/types/options/perfectionist.d.mts +0 -18
|
@@ -7,6 +7,706 @@ declare module 'eslint' {
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
interface ESLintSchema {
|
|
10
|
+
/**
|
|
11
|
+
* Disallows DOM elements from using 'dangerouslySetInnerHTML'.
|
|
12
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
|
|
13
|
+
*/
|
|
14
|
+
'@eslint-react/dom-no-dangerously-set-innerhtml'?: Linter.RuleEntry<[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Disallows DOM elements from using 'dangerouslySetInnerHTML' and 'children' at the same time.
|
|
17
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml-with-children
|
|
18
|
+
*/
|
|
19
|
+
'@eslint-react/dom-no-dangerously-set-innerhtml-with-children'?: Linter.RuleEntry<[]>;
|
|
20
|
+
/**
|
|
21
|
+
* Disallows 'findDOMNode'.
|
|
22
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-find-dom-node
|
|
23
|
+
*/
|
|
24
|
+
'@eslint-react/dom-no-find-dom-node'?: Linter.RuleEntry<[]>;
|
|
25
|
+
/**
|
|
26
|
+
* Disallows 'flushSync'.
|
|
27
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-flush-sync
|
|
28
|
+
*/
|
|
29
|
+
'@eslint-react/dom-no-flush-sync'?: Linter.RuleEntry<[]>;
|
|
30
|
+
/**
|
|
31
|
+
* Replaces usage of 'ReactDOM.hydrate()' with 'hydrateRoot()'.
|
|
32
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-hydrate
|
|
33
|
+
*/
|
|
34
|
+
'@eslint-react/dom-no-hydrate'?: Linter.RuleEntry<[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Enforces an explicit 'type' attribute for 'button' elements.
|
|
37
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-button-type
|
|
38
|
+
*/
|
|
39
|
+
'@eslint-react/dom-no-missing-button-type'?: Linter.RuleEntry<[]>;
|
|
40
|
+
/**
|
|
41
|
+
* Enforces an explicit 'sandbox' attribute for 'iframe' elements.
|
|
42
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
|
|
43
|
+
*/
|
|
44
|
+
'@eslint-react/dom-no-missing-iframe-sandbox'?: Linter.RuleEntry<[]>;
|
|
45
|
+
/**
|
|
46
|
+
* Replaces usage of 'ReactDOM.render()' with 'createRoot(node).render()'.
|
|
47
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-render
|
|
48
|
+
*/
|
|
49
|
+
'@eslint-react/dom-no-render'?: Linter.RuleEntry<[]>;
|
|
50
|
+
/**
|
|
51
|
+
* Disallows the return value of 'ReactDOM.render'.
|
|
52
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-render-return-value
|
|
53
|
+
*/
|
|
54
|
+
'@eslint-react/dom-no-render-return-value'?: Linter.RuleEntry<[]>;
|
|
55
|
+
/**
|
|
56
|
+
* Disallows 'javascript:' URLs as attribute values.
|
|
57
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-script-url
|
|
58
|
+
*/
|
|
59
|
+
'@eslint-react/dom-no-script-url'?: Linter.RuleEntry<[]>;
|
|
60
|
+
/**
|
|
61
|
+
* Disallows the use of string style prop in JSX. Use an object instead.
|
|
62
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-string-style-prop
|
|
63
|
+
*/
|
|
64
|
+
'@eslint-react/dom-no-string-style-prop'?: Linter.RuleEntry<[]>;
|
|
65
|
+
/**
|
|
66
|
+
* Disallows unknown 'DOM' properties.
|
|
67
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-unknown-property
|
|
68
|
+
*/
|
|
69
|
+
'@eslint-react/dom-no-unknown-property'?: Linter.RuleEntry<EslintReactDomNoUnknownProperty>;
|
|
70
|
+
/**
|
|
71
|
+
* Enforces that the 'sandbox' attribute for 'iframe' elements is not set to unsafe combinations.
|
|
72
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox
|
|
73
|
+
*/
|
|
74
|
+
'@eslint-react/dom-no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]>;
|
|
75
|
+
/**
|
|
76
|
+
* Disallows 'target="_blank"' without 'rel="noreferrer noopener"'.
|
|
77
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
|
|
78
|
+
*/
|
|
79
|
+
'@eslint-react/dom-no-unsafe-target-blank'?: Linter.RuleEntry<[]>;
|
|
80
|
+
/**
|
|
81
|
+
* Replaces usage of 'useFormState' with 'useActionState'.
|
|
82
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-use-form-state
|
|
83
|
+
*/
|
|
84
|
+
'@eslint-react/dom-no-use-form-state'?: Linter.RuleEntry<[]>;
|
|
85
|
+
/**
|
|
86
|
+
* Disallows 'children' in void DOM elements.
|
|
87
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
|
|
88
|
+
*/
|
|
89
|
+
'@eslint-react/dom-no-void-elements-with-children'?: Linter.RuleEntry<[]>;
|
|
90
|
+
/**
|
|
91
|
+
* Validates usage of Error Boundaries instead of try/catch for errors in child components.
|
|
92
|
+
* @see https://eslint-react.xyz/docs/rules/error-boundaries
|
|
93
|
+
*/
|
|
94
|
+
'@eslint-react/error-boundaries'?: Linter.RuleEntry<[]>;
|
|
95
|
+
/**
|
|
96
|
+
* Verifies the list of dependencies for Hooks like 'useEffect' and similar.
|
|
97
|
+
* @see https://github.com/facebook/react/issues/14920
|
|
98
|
+
*/
|
|
99
|
+
'@eslint-react/exhaustive-deps'?: Linter.RuleEntry<EslintReactExhaustiveDeps>;
|
|
100
|
+
/**
|
|
101
|
+
* Validates against assignment/mutation of globals during render, part of ensuring that side effects must run outside of render.
|
|
102
|
+
* @see https://eslint-react.xyz/docs/rules/globals
|
|
103
|
+
*/
|
|
104
|
+
'@eslint-react/globals'?: Linter.RuleEntry<[]>;
|
|
105
|
+
/**
|
|
106
|
+
* Validates against mutating props, state, and other values that are immutable.
|
|
107
|
+
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
108
|
+
*/
|
|
109
|
+
'@eslint-react/immutability'?: Linter.RuleEntry<[]>;
|
|
110
|
+
/**
|
|
111
|
+
* Disallows passing 'children' as a prop.
|
|
112
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-no-children-prop
|
|
113
|
+
*/
|
|
114
|
+
'@eslint-react/jsx-no-children-prop'?: Linter.RuleEntry<[]>;
|
|
115
|
+
/**
|
|
116
|
+
* Disallows passing 'children' as a prop when children are also passed as nested content.
|
|
117
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-no-children-prop-with-children
|
|
118
|
+
*/
|
|
119
|
+
'@eslint-react/jsx-no-children-prop-with-children'?: Linter.RuleEntry<[]>;
|
|
120
|
+
/**
|
|
121
|
+
* Prevents comment strings from being accidentally inserted into a JSX element's text nodes.
|
|
122
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-no-comment-textnodes
|
|
123
|
+
*/
|
|
124
|
+
'@eslint-react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]>;
|
|
125
|
+
/**
|
|
126
|
+
* Prevent patterns that cause deoptimization when using the automatic JSX runtime.
|
|
127
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-no-key-after-spread
|
|
128
|
+
*/
|
|
129
|
+
'@eslint-react/jsx-no-key-after-spread'?: Linter.RuleEntry<[]>;
|
|
130
|
+
/**
|
|
131
|
+
* Catches `$` before `{expr}` in JSX — typically from template literal `${expr}` being copy-pasted into JSX without removing the `$`. The `$` "leaks" into the rendered output.
|
|
132
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-no-leaked-dollar
|
|
133
|
+
*/
|
|
134
|
+
'@eslint-react/jsx-no-leaked-dollar'?: Linter.RuleEntry<[]>;
|
|
135
|
+
/**
|
|
136
|
+
* Catches `;` at the start of JSX text nodes — typically from accidentally placing a statement-ending `;` inside JSX. The `;` "leaks" into the rendered output.
|
|
137
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-no-leaked-semicolon
|
|
138
|
+
*/
|
|
139
|
+
'@eslint-react/jsx-no-leaked-semicolon'?: Linter.RuleEntry<[]>;
|
|
140
|
+
/**
|
|
141
|
+
* Disallow JSX namespace syntax, as React does not support them.
|
|
142
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-no-namespace
|
|
143
|
+
*/
|
|
144
|
+
'@eslint-react/jsx-no-namespace'?: Linter.RuleEntry<[]>;
|
|
145
|
+
/**
|
|
146
|
+
* Disallows useless fragment elements.
|
|
147
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-no-useless-fragment
|
|
148
|
+
*/
|
|
149
|
+
'@eslint-react/jsx-no-useless-fragment'?: Linter.RuleEntry<EslintReactJsxNoUselessFragment>;
|
|
150
|
+
/**
|
|
151
|
+
* Enforces identifier names assigned from `createContext` calls to be a valid component name with the suffix `Context`.
|
|
152
|
+
* @see https://eslint-react.xyz/docs/rules/naming-convention-context-name
|
|
153
|
+
*/
|
|
154
|
+
'@eslint-react/naming-convention-context-name'?: Linter.RuleEntry<[]>;
|
|
155
|
+
/**
|
|
156
|
+
* Enforces identifier names assigned from 'useId' calls to be either 'id' or end with 'Id'.
|
|
157
|
+
* @see https://eslint-react.xyz/docs/rules/naming-convention-id-name
|
|
158
|
+
*/
|
|
159
|
+
'@eslint-react/naming-convention-id-name'?: Linter.RuleEntry<[]>;
|
|
160
|
+
/**
|
|
161
|
+
* Enforces identifier names assigned from 'useRef' calls to be either 'ref' or end with 'Ref'.
|
|
162
|
+
* @see https://eslint-react.xyz/docs/rules/naming-convention-ref-name
|
|
163
|
+
*/
|
|
164
|
+
'@eslint-react/naming-convention-ref-name'?: Linter.RuleEntry<[]>;
|
|
165
|
+
/**
|
|
166
|
+
* Disallows accessing 'this.state' inside 'setState' calls.
|
|
167
|
+
* @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate
|
|
168
|
+
*/
|
|
169
|
+
'@eslint-react/no-access-state-in-setstate'?: Linter.RuleEntry<[]>;
|
|
170
|
+
/**
|
|
171
|
+
* Disallows using an item's index in the array as its key.
|
|
172
|
+
* @see https://eslint-react.xyz/docs/rules/no-array-index-key
|
|
173
|
+
*/
|
|
174
|
+
'@eslint-react/no-array-index-key'?: Linter.RuleEntry<[]>;
|
|
175
|
+
/**
|
|
176
|
+
* Disallows the use of 'Children.count' from the 'react' package.
|
|
177
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-count
|
|
178
|
+
*/
|
|
179
|
+
'@eslint-react/no-children-count'?: Linter.RuleEntry<[]>;
|
|
180
|
+
/**
|
|
181
|
+
* Disallows the use of 'Children.forEach' from the 'react' package.
|
|
182
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-for-each
|
|
183
|
+
*/
|
|
184
|
+
'@eslint-react/no-children-for-each'?: Linter.RuleEntry<[]>;
|
|
185
|
+
/**
|
|
186
|
+
* Disallows the use of 'Children.map' from the 'react' package.
|
|
187
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-map
|
|
188
|
+
*/
|
|
189
|
+
'@eslint-react/no-children-map'?: Linter.RuleEntry<[]>;
|
|
190
|
+
/**
|
|
191
|
+
* Disallows the use of 'Children.only' from the 'react' package.
|
|
192
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-only
|
|
193
|
+
*/
|
|
194
|
+
'@eslint-react/no-children-only'?: Linter.RuleEntry<[]>;
|
|
195
|
+
/**
|
|
196
|
+
* Disallows the use of 'Children.toArray' from the 'react' package.
|
|
197
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-to-array
|
|
198
|
+
*/
|
|
199
|
+
'@eslint-react/no-children-to-array'?: Linter.RuleEntry<[]>;
|
|
200
|
+
/**
|
|
201
|
+
* Disallows class components except for error boundaries.
|
|
202
|
+
* @see https://eslint-react.xyz/docs/rules/no-class-component
|
|
203
|
+
*/
|
|
204
|
+
'@eslint-react/no-class-component'?: Linter.RuleEntry<[]>;
|
|
205
|
+
/**
|
|
206
|
+
* Disallows 'cloneElement'.
|
|
207
|
+
* @see https://eslint-react.xyz/docs/rules/no-clone-element
|
|
208
|
+
*/
|
|
209
|
+
'@eslint-react/no-clone-element'?: Linter.RuleEntry<[]>;
|
|
210
|
+
/**
|
|
211
|
+
* Replaces usage of 'componentWillMount' with 'UNSAFE_componentWillMount'.
|
|
212
|
+
* @see https://eslint-react.xyz/docs/rules/no-component-will-mount
|
|
213
|
+
*/
|
|
214
|
+
'@eslint-react/no-component-will-mount'?: Linter.RuleEntry<[]>;
|
|
215
|
+
/**
|
|
216
|
+
* Replaces usage of 'componentWillReceiveProps' with 'UNSAFE_componentWillReceiveProps'.
|
|
217
|
+
* @see https://eslint-react.xyz/docs/rules/no-component-will-receive-props
|
|
218
|
+
*/
|
|
219
|
+
'@eslint-react/no-component-will-receive-props'?: Linter.RuleEntry<[]>;
|
|
220
|
+
/**
|
|
221
|
+
* Replaces usage of 'componentWillUpdate' with 'UNSAFE_componentWillUpdate'.
|
|
222
|
+
* @see https://eslint-react.xyz/docs/rules/no-component-will-update
|
|
223
|
+
*/
|
|
224
|
+
'@eslint-react/no-component-will-update'?: Linter.RuleEntry<[]>;
|
|
225
|
+
/**
|
|
226
|
+
* Replaces usage of '<Context.Provider>' with '<Context>'.
|
|
227
|
+
* @see https://eslint-react.xyz/docs/rules/no-context-provider
|
|
228
|
+
*/
|
|
229
|
+
'@eslint-react/no-context-provider'?: Linter.RuleEntry<[]>;
|
|
230
|
+
/**
|
|
231
|
+
* Disallows 'createRef' in function components and Hooks.
|
|
232
|
+
* @see https://eslint-react.xyz/docs/rules/no-create-ref
|
|
233
|
+
*/
|
|
234
|
+
'@eslint-react/no-create-ref'?: Linter.RuleEntry<[]>;
|
|
235
|
+
/**
|
|
236
|
+
* Disallows direct mutation of 'this.state'.
|
|
237
|
+
* @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
|
|
238
|
+
*/
|
|
239
|
+
'@eslint-react/no-direct-mutation-state'?: Linter.RuleEntry<[]>;
|
|
240
|
+
/**
|
|
241
|
+
* Prevents duplicate 'key' props on sibling elements when rendering lists.
|
|
242
|
+
* @see https://eslint-react.xyz/docs/rules/no-duplicate-key
|
|
243
|
+
*/
|
|
244
|
+
'@eslint-react/no-duplicate-key'?: Linter.RuleEntry<[]>;
|
|
245
|
+
/**
|
|
246
|
+
* Replaces usage of 'forwardRef' with passing 'ref' as a prop.
|
|
247
|
+
* @see https://eslint-react.xyz/docs/rules/no-forward-ref
|
|
248
|
+
*/
|
|
249
|
+
'@eslint-react/no-forward-ref'?: Linter.RuleEntry<[]>;
|
|
250
|
+
/**
|
|
251
|
+
* Prevents implicitly passing the 'children' prop to components.
|
|
252
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-children
|
|
253
|
+
*/
|
|
254
|
+
'@eslint-react/no-implicit-children'?: Linter.RuleEntry<[]>;
|
|
255
|
+
/**
|
|
256
|
+
* Prevents implicitly passing the 'key' prop to components.
|
|
257
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-key
|
|
258
|
+
*/
|
|
259
|
+
'@eslint-react/no-implicit-key'?: Linter.RuleEntry<[]>;
|
|
260
|
+
/**
|
|
261
|
+
* Prevents implicitly passing the 'ref' prop to components.
|
|
262
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-ref
|
|
263
|
+
*/
|
|
264
|
+
'@eslint-react/no-implicit-ref'?: Linter.RuleEntry<[]>;
|
|
265
|
+
/**
|
|
266
|
+
* Prevents problematic leaked values from being rendered.
|
|
267
|
+
* @see https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
|
|
268
|
+
*/
|
|
269
|
+
'@eslint-react/no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>;
|
|
270
|
+
/**
|
|
271
|
+
* Enforces that all components have a 'displayName' that can be used in DevTools.
|
|
272
|
+
* @see https://eslint-react.xyz/docs/rules/no-missing-component-display-name
|
|
273
|
+
*/
|
|
274
|
+
'@eslint-react/no-missing-component-display-name'?: Linter.RuleEntry<[]>;
|
|
275
|
+
/**
|
|
276
|
+
* Enforces that all contexts have a 'displayName' that can be used in DevTools.
|
|
277
|
+
* @see https://eslint-react.xyz/docs/rules/no-missing-context-display-name
|
|
278
|
+
*/
|
|
279
|
+
'@eslint-react/no-missing-context-display-name'?: Linter.RuleEntry<[]>;
|
|
280
|
+
/**
|
|
281
|
+
* Disallows missing 'key' on items in list rendering.
|
|
282
|
+
* @see https://eslint-react.xyz/docs/rules/no-missing-key
|
|
283
|
+
*/
|
|
284
|
+
'@eslint-react/no-missing-key'?: Linter.RuleEntry<[]>;
|
|
285
|
+
/**
|
|
286
|
+
* Prevents incorrect usage of 'captureOwnerStack'.
|
|
287
|
+
* @see https://eslint-react.xyz/docs/rules/no-misused-capture-owner-stack
|
|
288
|
+
*/
|
|
289
|
+
'@eslint-react/no-misused-capture-owner-stack'?: Linter.RuleEntry<[]>;
|
|
290
|
+
/**
|
|
291
|
+
* Disallows nesting component definitions inside other components.
|
|
292
|
+
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
293
|
+
*/
|
|
294
|
+
'@eslint-react/no-nested-component-definitions'?: Linter.RuleEntry<[]>;
|
|
295
|
+
/**
|
|
296
|
+
* Disallows nesting lazy component declarations inside other components or hooks.
|
|
297
|
+
* @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
|
|
298
|
+
*/
|
|
299
|
+
'@eslint-react/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
|
|
300
|
+
/**
|
|
301
|
+
* Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
|
|
302
|
+
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
|
|
303
|
+
*/
|
|
304
|
+
'@eslint-react/no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]>;
|
|
305
|
+
/**
|
|
306
|
+
* Disallows calling 'this.setState' in 'componentDidUpdate' outside functions such as callbacks.
|
|
307
|
+
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-update
|
|
308
|
+
*/
|
|
309
|
+
'@eslint-react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>;
|
|
310
|
+
/**
|
|
311
|
+
* Disallows calling 'this.setState' in 'componentWillUpdate' outside functions such as callbacks.
|
|
312
|
+
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
|
|
313
|
+
*/
|
|
314
|
+
'@eslint-react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
|
|
315
|
+
/**
|
|
316
|
+
* Enforces that a function with the 'use' prefix uses at least one Hook inside it.
|
|
317
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
|
|
318
|
+
*/
|
|
319
|
+
'@eslint-react/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>;
|
|
320
|
+
/**
|
|
321
|
+
* Warns about the use of 'UNSAFE_componentWillMount' in class components.
|
|
322
|
+
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
|
|
323
|
+
*/
|
|
324
|
+
'@eslint-react/no-unsafe-component-will-mount'?: Linter.RuleEntry<[]>;
|
|
325
|
+
/**
|
|
326
|
+
* Warns about the use of 'UNSAFE_componentWillReceiveProps' in class components.
|
|
327
|
+
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props
|
|
328
|
+
*/
|
|
329
|
+
'@eslint-react/no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]>;
|
|
330
|
+
/**
|
|
331
|
+
* Warns about the use of 'UNSAFE_componentWillUpdate' in class components.
|
|
332
|
+
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update
|
|
333
|
+
*/
|
|
334
|
+
'@eslint-react/no-unsafe-component-will-update'?: Linter.RuleEntry<[]>;
|
|
335
|
+
/**
|
|
336
|
+
* Prevents non-stable values (i.e., object literals) from being used as a value for 'Context.Provider'.
|
|
337
|
+
* @see https://eslint-react.xyz/docs/rules/no-unstable-context-value
|
|
338
|
+
*/
|
|
339
|
+
'@eslint-react/no-unstable-context-value'?: Linter.RuleEntry<[]>;
|
|
340
|
+
/**
|
|
341
|
+
* Prevents using referential-type values as default props in object destructuring.
|
|
342
|
+
* @see https://eslint-react.xyz/docs/rules/no-unstable-default-props
|
|
343
|
+
*/
|
|
344
|
+
'@eslint-react/no-unstable-default-props'?: Linter.RuleEntry<EslintReactNoUnstableDefaultProps>;
|
|
345
|
+
/**
|
|
346
|
+
* Warns about unused class component methods and properties.
|
|
347
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members
|
|
348
|
+
*/
|
|
349
|
+
'@eslint-react/no-unused-class-component-members'?: Linter.RuleEntry<[]>;
|
|
350
|
+
/**
|
|
351
|
+
* Warns about component props that are defined but never used.
|
|
352
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-props
|
|
353
|
+
*/
|
|
354
|
+
'@eslint-react/no-unused-props'?: Linter.RuleEntry<[]>;
|
|
355
|
+
/**
|
|
356
|
+
* Warns about state variables that are defined but never used.
|
|
357
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
358
|
+
*/
|
|
359
|
+
'@eslint-react/no-unused-state'?: Linter.RuleEntry<[]>;
|
|
360
|
+
/**
|
|
361
|
+
* Replaces usage of 'useContext' with 'use'.
|
|
362
|
+
* @see https://eslint-react.xyz/docs/rules/no-use-context
|
|
363
|
+
*/
|
|
364
|
+
'@eslint-react/no-use-context'?: Linter.RuleEntry<[]>;
|
|
365
|
+
/**
|
|
366
|
+
* Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
|
|
367
|
+
* @see https://eslint-react.xyz/docs/rules/purity
|
|
368
|
+
*/
|
|
369
|
+
'@eslint-react/purity'?: Linter.RuleEntry<[]>;
|
|
370
|
+
/**
|
|
371
|
+
* Validates correct usage of refs by checking that 'ref.current' is not read or written during render.
|
|
372
|
+
* @see https://eslint-react.xyz/docs/rules/refs
|
|
373
|
+
*/
|
|
374
|
+
'@eslint-react/refs'?: Linter.RuleEntry<[]>;
|
|
375
|
+
/**
|
|
376
|
+
* Validates and transforms React Client/Server Function definitions.
|
|
377
|
+
* @see https://eslint-react.xyz/docs/rules/rsc-function-definition
|
|
378
|
+
*/
|
|
379
|
+
'@eslint-react/rsc-function-definition'?: Linter.RuleEntry<[]>;
|
|
380
|
+
/**
|
|
381
|
+
* Enforces the Rules of Hooks.
|
|
382
|
+
* @see https://react.dev/reference/rules/rules-of-hooks
|
|
383
|
+
*/
|
|
384
|
+
'@eslint-react/rules-of-hooks'?: Linter.RuleEntry<EslintReactRulesOfHooks>;
|
|
385
|
+
/**
|
|
386
|
+
* Validates against setting state synchronously in an effect, which can lead to re-renders that degrade performance.
|
|
387
|
+
* @see https://eslint-react.xyz/docs/rules/set-state-in-effect
|
|
388
|
+
*/
|
|
389
|
+
'@eslint-react/set-state-in-effect'?: Linter.RuleEntry<[]>;
|
|
390
|
+
/**
|
|
391
|
+
* Validates against unconditionally setting state during render, which can trigger additional renders and potential infinite render loops.
|
|
392
|
+
* @see https://eslint-react.xyz/docs/rules/set-state-in-render
|
|
393
|
+
*/
|
|
394
|
+
'@eslint-react/set-state-in-render'?: Linter.RuleEntry<[]>;
|
|
395
|
+
/**
|
|
396
|
+
* Validates that components are static, not recreated every render.
|
|
397
|
+
* @see https://eslint-react.xyz/docs/rules/static-components
|
|
398
|
+
*/
|
|
399
|
+
'@eslint-react/static-components'?: Linter.RuleEntry<[]>;
|
|
400
|
+
/**
|
|
401
|
+
* Validates against syntax that React Compiler does not support.
|
|
402
|
+
* @see https://eslint-react.xyz/docs/rules/unsupported-syntax
|
|
403
|
+
*/
|
|
404
|
+
'@eslint-react/unsupported-syntax'?: Linter.RuleEntry<[]>;
|
|
405
|
+
/**
|
|
406
|
+
* Validates that 'useMemo' is called with a callback that returns a value.
|
|
407
|
+
* @see https://eslint-react.xyz/docs/rules/use-memo
|
|
408
|
+
*/
|
|
409
|
+
'@eslint-react/use-memo'?: Linter.RuleEntry<[]>;
|
|
410
|
+
/**
|
|
411
|
+
* Enforces correct usage of 'useState', including destructuring, symmetric naming of the value and setter, and wrapping expensive initializers in a lazy initializer function.
|
|
412
|
+
* @see https://eslint-react.xyz/docs/rules/use-state
|
|
413
|
+
*/
|
|
414
|
+
'@eslint-react/use-state'?: Linter.RuleEntry<EslintReactUseState>;
|
|
415
|
+
/**
|
|
416
|
+
* Enforces that every 'addEventListener' in a component or custom hook has a corresponding 'removeEventListener'.
|
|
417
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
|
|
418
|
+
*/
|
|
419
|
+
'@eslint-react/web-api-no-leaked-event-listener'?: Linter.RuleEntry<[]>;
|
|
420
|
+
/**
|
|
421
|
+
* Enforces that every 'fetch' in a component or custom hook has a corresponding 'AbortController' abort in the cleanup function.
|
|
422
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-fetch
|
|
423
|
+
*/
|
|
424
|
+
'@eslint-react/web-api-no-leaked-fetch'?: Linter.RuleEntry<[]>;
|
|
425
|
+
/**
|
|
426
|
+
* Enforces that every 'IntersectionObserver' created in a component or custom hook has a corresponding 'IntersectionObserver.disconnect()'.
|
|
427
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-intersection-observer
|
|
428
|
+
*/
|
|
429
|
+
'@eslint-react/web-api-no-leaked-intersection-observer'?: Linter.RuleEntry<[]>;
|
|
430
|
+
/**
|
|
431
|
+
* Enforces that every 'setInterval' in a component or custom hook has a corresponding 'clearInterval'.
|
|
432
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
|
|
433
|
+
*/
|
|
434
|
+
'@eslint-react/web-api-no-leaked-interval'?: Linter.RuleEntry<[]>;
|
|
435
|
+
/**
|
|
436
|
+
* Enforces that every 'ResizeObserver' created in a component or custom hook has a corresponding 'ResizeObserver.disconnect()'.
|
|
437
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-resize-observer
|
|
438
|
+
*/
|
|
439
|
+
'@eslint-react/web-api-no-leaked-resize-observer'?: Linter.RuleEntry<[]>;
|
|
440
|
+
/**
|
|
441
|
+
* Enforces that every 'setTimeout' in a component or custom hook has a corresponding 'clearTimeout'.
|
|
442
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
|
|
443
|
+
*/
|
|
444
|
+
'@eslint-react/web-api-no-leaked-timeout'?: Linter.RuleEntry<[]>;
|
|
445
|
+
/**
|
|
446
|
+
* Validates usage of Error Boundaries instead of try/catch for errors in child components.
|
|
447
|
+
* @see https://eslint-react.xyz/docs/rules/error-boundaries
|
|
448
|
+
*/
|
|
449
|
+
'@eslint-react/x-error-boundaries'?: Linter.RuleEntry<[]>;
|
|
450
|
+
/**
|
|
451
|
+
* Verifies the list of dependencies for Hooks like 'useEffect' and similar.
|
|
452
|
+
* @see https://github.com/facebook/react/issues/14920
|
|
453
|
+
*/
|
|
454
|
+
'@eslint-react/x-exhaustive-deps'?: Linter.RuleEntry<EslintReactXExhaustiveDeps>;
|
|
455
|
+
/**
|
|
456
|
+
* Validates against assignment/mutation of globals during render, part of ensuring that side effects must run outside of render.
|
|
457
|
+
* @see https://eslint-react.xyz/docs/rules/globals
|
|
458
|
+
*/
|
|
459
|
+
'@eslint-react/x-globals'?: Linter.RuleEntry<[]>;
|
|
460
|
+
/**
|
|
461
|
+
* Validates against mutating props, state, and other values that are immutable.
|
|
462
|
+
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
463
|
+
*/
|
|
464
|
+
'@eslint-react/x-immutability'?: Linter.RuleEntry<[]>;
|
|
465
|
+
/**
|
|
466
|
+
* Disallows accessing 'this.state' inside 'setState' calls.
|
|
467
|
+
* @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate
|
|
468
|
+
*/
|
|
469
|
+
'@eslint-react/x-no-access-state-in-setstate'?: Linter.RuleEntry<[]>;
|
|
470
|
+
/**
|
|
471
|
+
* Disallows using an item's index in the array as its key.
|
|
472
|
+
* @see https://eslint-react.xyz/docs/rules/no-array-index-key
|
|
473
|
+
*/
|
|
474
|
+
'@eslint-react/x-no-array-index-key'?: Linter.RuleEntry<[]>;
|
|
475
|
+
/**
|
|
476
|
+
* Disallows the use of 'Children.count' from the 'react' package.
|
|
477
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-count
|
|
478
|
+
*/
|
|
479
|
+
'@eslint-react/x-no-children-count'?: Linter.RuleEntry<[]>;
|
|
480
|
+
/**
|
|
481
|
+
* Disallows the use of 'Children.forEach' from the 'react' package.
|
|
482
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-for-each
|
|
483
|
+
*/
|
|
484
|
+
'@eslint-react/x-no-children-for-each'?: Linter.RuleEntry<[]>;
|
|
485
|
+
/**
|
|
486
|
+
* Disallows the use of 'Children.map' from the 'react' package.
|
|
487
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-map
|
|
488
|
+
*/
|
|
489
|
+
'@eslint-react/x-no-children-map'?: Linter.RuleEntry<[]>;
|
|
490
|
+
/**
|
|
491
|
+
* Disallows the use of 'Children.only' from the 'react' package.
|
|
492
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-only
|
|
493
|
+
*/
|
|
494
|
+
'@eslint-react/x-no-children-only'?: Linter.RuleEntry<[]>;
|
|
495
|
+
/**
|
|
496
|
+
* Disallows the use of 'Children.toArray' from the 'react' package.
|
|
497
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-to-array
|
|
498
|
+
*/
|
|
499
|
+
'@eslint-react/x-no-children-to-array'?: Linter.RuleEntry<[]>;
|
|
500
|
+
/**
|
|
501
|
+
* Disallows class components except for error boundaries.
|
|
502
|
+
* @see https://eslint-react.xyz/docs/rules/no-class-component
|
|
503
|
+
*/
|
|
504
|
+
'@eslint-react/x-no-class-component'?: Linter.RuleEntry<[]>;
|
|
505
|
+
/**
|
|
506
|
+
* Disallows 'cloneElement'.
|
|
507
|
+
* @see https://eslint-react.xyz/docs/rules/no-clone-element
|
|
508
|
+
*/
|
|
509
|
+
'@eslint-react/x-no-clone-element'?: Linter.RuleEntry<[]>;
|
|
510
|
+
/**
|
|
511
|
+
* Replaces usage of 'componentWillMount' with 'UNSAFE_componentWillMount'.
|
|
512
|
+
* @see https://eslint-react.xyz/docs/rules/no-component-will-mount
|
|
513
|
+
*/
|
|
514
|
+
'@eslint-react/x-no-component-will-mount'?: Linter.RuleEntry<[]>;
|
|
515
|
+
/**
|
|
516
|
+
* Replaces usage of 'componentWillReceiveProps' with 'UNSAFE_componentWillReceiveProps'.
|
|
517
|
+
* @see https://eslint-react.xyz/docs/rules/no-component-will-receive-props
|
|
518
|
+
*/
|
|
519
|
+
'@eslint-react/x-no-component-will-receive-props'?: Linter.RuleEntry<[]>;
|
|
520
|
+
/**
|
|
521
|
+
* Replaces usage of 'componentWillUpdate' with 'UNSAFE_componentWillUpdate'.
|
|
522
|
+
* @see https://eslint-react.xyz/docs/rules/no-component-will-update
|
|
523
|
+
*/
|
|
524
|
+
'@eslint-react/x-no-component-will-update'?: Linter.RuleEntry<[]>;
|
|
525
|
+
/**
|
|
526
|
+
* Replaces usage of '<Context.Provider>' with '<Context>'.
|
|
527
|
+
* @see https://eslint-react.xyz/docs/rules/no-context-provider
|
|
528
|
+
*/
|
|
529
|
+
'@eslint-react/x-no-context-provider'?: Linter.RuleEntry<[]>;
|
|
530
|
+
/**
|
|
531
|
+
* Disallows 'createRef' in function components and Hooks.
|
|
532
|
+
* @see https://eslint-react.xyz/docs/rules/no-create-ref
|
|
533
|
+
*/
|
|
534
|
+
'@eslint-react/x-no-create-ref'?: Linter.RuleEntry<[]>;
|
|
535
|
+
/**
|
|
536
|
+
* Disallows direct mutation of 'this.state'.
|
|
537
|
+
* @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
|
|
538
|
+
*/
|
|
539
|
+
'@eslint-react/x-no-direct-mutation-state'?: Linter.RuleEntry<[]>;
|
|
540
|
+
/**
|
|
541
|
+
* Prevents duplicate 'key' props on sibling elements when rendering lists.
|
|
542
|
+
* @see https://eslint-react.xyz/docs/rules/no-duplicate-key
|
|
543
|
+
*/
|
|
544
|
+
'@eslint-react/x-no-duplicate-key'?: Linter.RuleEntry<[]>;
|
|
545
|
+
/**
|
|
546
|
+
* Replaces usage of 'forwardRef' with passing 'ref' as a prop.
|
|
547
|
+
* @see https://eslint-react.xyz/docs/rules/no-forward-ref
|
|
548
|
+
*/
|
|
549
|
+
'@eslint-react/x-no-forward-ref'?: Linter.RuleEntry<[]>;
|
|
550
|
+
/**
|
|
551
|
+
* Prevents implicitly passing the 'children' prop to components.
|
|
552
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-children
|
|
553
|
+
*/
|
|
554
|
+
'@eslint-react/x-no-implicit-children'?: Linter.RuleEntry<[]>;
|
|
555
|
+
/**
|
|
556
|
+
* Prevents implicitly passing the 'key' prop to components.
|
|
557
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-key
|
|
558
|
+
*/
|
|
559
|
+
'@eslint-react/x-no-implicit-key'?: Linter.RuleEntry<[]>;
|
|
560
|
+
/**
|
|
561
|
+
* Prevents implicitly passing the 'ref' prop to components.
|
|
562
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-ref
|
|
563
|
+
*/
|
|
564
|
+
'@eslint-react/x-no-implicit-ref'?: Linter.RuleEntry<[]>;
|
|
565
|
+
/**
|
|
566
|
+
* Prevents problematic leaked values from being rendered.
|
|
567
|
+
* @see https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
|
|
568
|
+
*/
|
|
569
|
+
'@eslint-react/x-no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>;
|
|
570
|
+
/**
|
|
571
|
+
* Enforces that all components have a 'displayName' that can be used in DevTools.
|
|
572
|
+
* @see https://eslint-react.xyz/docs/rules/no-missing-component-display-name
|
|
573
|
+
*/
|
|
574
|
+
'@eslint-react/x-no-missing-component-display-name'?: Linter.RuleEntry<[]>;
|
|
575
|
+
/**
|
|
576
|
+
* Enforces that all contexts have a 'displayName' that can be used in DevTools.
|
|
577
|
+
* @see https://eslint-react.xyz/docs/rules/no-missing-context-display-name
|
|
578
|
+
*/
|
|
579
|
+
'@eslint-react/x-no-missing-context-display-name'?: Linter.RuleEntry<[]>;
|
|
580
|
+
/**
|
|
581
|
+
* Disallows missing 'key' on items in list rendering.
|
|
582
|
+
* @see https://eslint-react.xyz/docs/rules/no-missing-key
|
|
583
|
+
*/
|
|
584
|
+
'@eslint-react/x-no-missing-key'?: Linter.RuleEntry<[]>;
|
|
585
|
+
/**
|
|
586
|
+
* Prevents incorrect usage of 'captureOwnerStack'.
|
|
587
|
+
* @see https://eslint-react.xyz/docs/rules/no-misused-capture-owner-stack
|
|
588
|
+
*/
|
|
589
|
+
'@eslint-react/x-no-misused-capture-owner-stack'?: Linter.RuleEntry<[]>;
|
|
590
|
+
/**
|
|
591
|
+
* Disallows nesting component definitions inside other components.
|
|
592
|
+
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
593
|
+
*/
|
|
594
|
+
'@eslint-react/x-no-nested-component-definitions'?: Linter.RuleEntry<[]>;
|
|
595
|
+
/**
|
|
596
|
+
* Disallows nesting lazy component declarations inside other components or hooks.
|
|
597
|
+
* @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
|
|
598
|
+
*/
|
|
599
|
+
'@eslint-react/x-no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
|
|
600
|
+
/**
|
|
601
|
+
* Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
|
|
602
|
+
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
|
|
603
|
+
*/
|
|
604
|
+
'@eslint-react/x-no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]>;
|
|
605
|
+
/**
|
|
606
|
+
* Disallows calling 'this.setState' in 'componentDidUpdate' outside functions such as callbacks.
|
|
607
|
+
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-update
|
|
608
|
+
*/
|
|
609
|
+
'@eslint-react/x-no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>;
|
|
610
|
+
/**
|
|
611
|
+
* Disallows calling 'this.setState' in 'componentWillUpdate' outside functions such as callbacks.
|
|
612
|
+
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
|
|
613
|
+
*/
|
|
614
|
+
'@eslint-react/x-no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
|
|
615
|
+
/**
|
|
616
|
+
* Enforces that a function with the 'use' prefix uses at least one Hook inside it.
|
|
617
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
|
|
618
|
+
*/
|
|
619
|
+
'@eslint-react/x-no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>;
|
|
620
|
+
/**
|
|
621
|
+
* Warns about the use of 'UNSAFE_componentWillMount' in class components.
|
|
622
|
+
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
|
|
623
|
+
*/
|
|
624
|
+
'@eslint-react/x-no-unsafe-component-will-mount'?: Linter.RuleEntry<[]>;
|
|
625
|
+
/**
|
|
626
|
+
* Warns about the use of 'UNSAFE_componentWillReceiveProps' in class components.
|
|
627
|
+
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props
|
|
628
|
+
*/
|
|
629
|
+
'@eslint-react/x-no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]>;
|
|
630
|
+
/**
|
|
631
|
+
* Warns about the use of 'UNSAFE_componentWillUpdate' in class components.
|
|
632
|
+
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update
|
|
633
|
+
*/
|
|
634
|
+
'@eslint-react/x-no-unsafe-component-will-update'?: Linter.RuleEntry<[]>;
|
|
635
|
+
/**
|
|
636
|
+
* Prevents non-stable values (i.e., object literals) from being used as a value for 'Context.Provider'.
|
|
637
|
+
* @see https://eslint-react.xyz/docs/rules/no-unstable-context-value
|
|
638
|
+
*/
|
|
639
|
+
'@eslint-react/x-no-unstable-context-value'?: Linter.RuleEntry<[]>;
|
|
640
|
+
/**
|
|
641
|
+
* Prevents using referential-type values as default props in object destructuring.
|
|
642
|
+
* @see https://eslint-react.xyz/docs/rules/no-unstable-default-props
|
|
643
|
+
*/
|
|
644
|
+
'@eslint-react/x-no-unstable-default-props'?: Linter.RuleEntry<EslintReactXNoUnstableDefaultProps>;
|
|
645
|
+
/**
|
|
646
|
+
* Warns about unused class component methods and properties.
|
|
647
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members
|
|
648
|
+
*/
|
|
649
|
+
'@eslint-react/x-no-unused-class-component-members'?: Linter.RuleEntry<[]>;
|
|
650
|
+
/**
|
|
651
|
+
* Warns about component props that are defined but never used.
|
|
652
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-props
|
|
653
|
+
*/
|
|
654
|
+
'@eslint-react/x-no-unused-props'?: Linter.RuleEntry<[]>;
|
|
655
|
+
/**
|
|
656
|
+
* Warns about state variables that are defined but never used.
|
|
657
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
658
|
+
*/
|
|
659
|
+
'@eslint-react/x-no-unused-state'?: Linter.RuleEntry<[]>;
|
|
660
|
+
/**
|
|
661
|
+
* Replaces usage of 'useContext' with 'use'.
|
|
662
|
+
* @see https://eslint-react.xyz/docs/rules/no-use-context
|
|
663
|
+
*/
|
|
664
|
+
'@eslint-react/x-no-use-context'?: Linter.RuleEntry<[]>;
|
|
665
|
+
/**
|
|
666
|
+
* Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
|
|
667
|
+
* @see https://eslint-react.xyz/docs/rules/purity
|
|
668
|
+
*/
|
|
669
|
+
'@eslint-react/x-purity'?: Linter.RuleEntry<[]>;
|
|
670
|
+
/**
|
|
671
|
+
* Validates correct usage of refs by checking that 'ref.current' is not read or written during render.
|
|
672
|
+
* @see https://eslint-react.xyz/docs/rules/refs
|
|
673
|
+
*/
|
|
674
|
+
'@eslint-react/x-refs'?: Linter.RuleEntry<[]>;
|
|
675
|
+
/**
|
|
676
|
+
* Enforces the Rules of Hooks.
|
|
677
|
+
* @see https://react.dev/reference/rules/rules-of-hooks
|
|
678
|
+
*/
|
|
679
|
+
'@eslint-react/x-rules-of-hooks'?: Linter.RuleEntry<EslintReactXRulesOfHooks>;
|
|
680
|
+
/**
|
|
681
|
+
* Validates against setting state synchronously in an effect, which can lead to re-renders that degrade performance.
|
|
682
|
+
* @see https://eslint-react.xyz/docs/rules/set-state-in-effect
|
|
683
|
+
*/
|
|
684
|
+
'@eslint-react/x-set-state-in-effect'?: Linter.RuleEntry<[]>;
|
|
685
|
+
/**
|
|
686
|
+
* Validates against unconditionally setting state during render, which can trigger additional renders and potential infinite render loops.
|
|
687
|
+
* @see https://eslint-react.xyz/docs/rules/set-state-in-render
|
|
688
|
+
*/
|
|
689
|
+
'@eslint-react/x-set-state-in-render'?: Linter.RuleEntry<[]>;
|
|
690
|
+
/**
|
|
691
|
+
* Validates that components are static, not recreated every render.
|
|
692
|
+
* @see https://eslint-react.xyz/docs/rules/static-components
|
|
693
|
+
*/
|
|
694
|
+
'@eslint-react/x-static-components'?: Linter.RuleEntry<[]>;
|
|
695
|
+
/**
|
|
696
|
+
* Validates against syntax that React Compiler does not support.
|
|
697
|
+
* @see https://eslint-react.xyz/docs/rules/unsupported-syntax
|
|
698
|
+
*/
|
|
699
|
+
'@eslint-react/x-unsupported-syntax'?: Linter.RuleEntry<[]>;
|
|
700
|
+
/**
|
|
701
|
+
* Validates that 'useMemo' is called with a callback that returns a value.
|
|
702
|
+
* @see https://eslint-react.xyz/docs/rules/use-memo
|
|
703
|
+
*/
|
|
704
|
+
'@eslint-react/x-use-memo'?: Linter.RuleEntry<[]>;
|
|
705
|
+
/**
|
|
706
|
+
* Enforces correct usage of 'useState', including destructuring, symmetric naming of the value and setter, and wrapping expensive initializers in a lazy initializer function.
|
|
707
|
+
* @see https://eslint-react.xyz/docs/rules/use-state
|
|
708
|
+
*/
|
|
709
|
+
'@eslint-react/x-use-state'?: Linter.RuleEntry<EslintReactXUseState>;
|
|
10
710
|
/**
|
|
11
711
|
* Enforce newline between attributes
|
|
12
712
|
* @see https://html-eslint.org/docs/rules/attrs-newline
|
|
@@ -231,6 +931,40 @@ interface ESLintSchema {
|
|
|
231
931
|
* @see https://html-eslint.org/docs/rules/quotes
|
|
232
932
|
*/
|
|
233
933
|
'@html-eslint/quotes'?: Linter.RuleEntry<HtmlEslintQuotes>;
|
|
934
|
+
/**
|
|
935
|
+
* Disallow extra spacing in className values
|
|
936
|
+
* @see https://html-eslint.org/docs/react/rules/classname-spacing
|
|
937
|
+
*/
|
|
938
|
+
'@html-eslint/react/classname-spacing'?: Linter.RuleEntry<HtmlEslintReactClassnameSpacing>;
|
|
939
|
+
/**
|
|
940
|
+
* Disallow duplicate class names in className
|
|
941
|
+
* @see https://html-eslint.org/docs/react/rules/no-duplicate-classname
|
|
942
|
+
*/
|
|
943
|
+
'@html-eslint/react/no-duplicate-classname'?: Linter.RuleEntry<HtmlEslintReactNoDuplicateClassname>;
|
|
944
|
+
/**
|
|
945
|
+
* Disallow HTML attributes that have no effect in their context
|
|
946
|
+
* @see https://html-eslint.org/docs/react/rules/no-ineffective-attrs
|
|
947
|
+
*/
|
|
948
|
+
'@html-eslint/react/no-ineffective-attrs'?: Linter.RuleEntry<[]>;
|
|
949
|
+
/**
|
|
950
|
+
* Disallow invalid attribute values according to HTML standards
|
|
951
|
+
* @see https://html-eslint.org/docs/react/rules/no-invalid-attr-value
|
|
952
|
+
*/
|
|
953
|
+
'@html-eslint/react/no-invalid-attr-value'?: Linter.RuleEntry<HtmlEslintReactNoInvalidAttrValue>;
|
|
954
|
+
/**
|
|
955
|
+
* Disallow use of obsolete attributes in HTML5
|
|
956
|
+
* @see https://html-eslint.org/docs/react/rules/no-obsolete-attrs
|
|
957
|
+
*/
|
|
958
|
+
'@html-eslint/react/no-obsolete-attrs'?: Linter.RuleEntry<[]>;
|
|
959
|
+
/**
|
|
960
|
+
* Disallow use of obsolete elements in HTML5
|
|
961
|
+
*/
|
|
962
|
+
'@html-eslint/react/no-obsolete-tags'?: Linter.RuleEntry<[]>;
|
|
963
|
+
/**
|
|
964
|
+
* Enforce the use of baseline features.
|
|
965
|
+
* @see https://html-eslint.org/docs/react/rules/use-baseline
|
|
966
|
+
*/
|
|
967
|
+
'@html-eslint/react/use-baseline'?: Linter.RuleEntry<HtmlEslintReactUseBaseline>;
|
|
234
968
|
/**
|
|
235
969
|
* Require specified attributes
|
|
236
970
|
* @see https://html-eslint.org/docs/rules/require-attrs
|
|
@@ -1761,6 +2495,11 @@ interface ESLintSchema {
|
|
|
1761
2495
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-exports-from-components/
|
|
1762
2496
|
*/
|
|
1763
2497
|
'astro/no-exports-from-components'?: Linter.RuleEntry<[]>;
|
|
2498
|
+
/**
|
|
2499
|
+
* disallow omitted end tags
|
|
2500
|
+
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-omitted-end-tags/
|
|
2501
|
+
*/
|
|
2502
|
+
'astro/no-omitted-end-tags'?: Linter.RuleEntry<[]>;
|
|
1764
2503
|
/**
|
|
1765
2504
|
* disallow `prerender` export outside of pages/ directory
|
|
1766
2505
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-prerender-export-outside-pages/
|
|
@@ -1821,6 +2560,30 @@ interface ESLintSchema {
|
|
|
1821
2560
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/valid-compile/
|
|
1822
2561
|
*/
|
|
1823
2562
|
'astro/valid-compile'?: Linter.RuleEntry<[]>;
|
|
2563
|
+
/**
|
|
2564
|
+
* disallow Atomics.pause() usage
|
|
2565
|
+
*/
|
|
2566
|
+
'baseline-js/no-atomics-pause'?: Linter.RuleEntry<[]>;
|
|
2567
|
+
/**
|
|
2568
|
+
* disallow BigInt64Array/BigUint64Array usage
|
|
2569
|
+
*/
|
|
2570
|
+
'baseline-js/no-bigint64array'?: Linter.RuleEntry<[]>;
|
|
2571
|
+
/**
|
|
2572
|
+
* disallow Function#caller and Function#arguments
|
|
2573
|
+
*/
|
|
2574
|
+
'baseline-js/no-function-caller-arguments'?: Linter.RuleEntry<[]>;
|
|
2575
|
+
/**
|
|
2576
|
+
* disallow Math.sumPrecise() usage
|
|
2577
|
+
*/
|
|
2578
|
+
'baseline-js/no-math-sum-precise'?: Linter.RuleEntry<[]>;
|
|
2579
|
+
/**
|
|
2580
|
+
* disallow Temporal API usage
|
|
2581
|
+
*/
|
|
2582
|
+
'baseline-js/no-temporal'?: Linter.RuleEntry<[]>;
|
|
2583
|
+
/**
|
|
2584
|
+
* Enforce JS Baseline by delegating to underlying syntax rules (es-x)
|
|
2585
|
+
*/
|
|
2586
|
+
'baseline-js/use-baseline'?: Linter.RuleEntry<BaselineJsUseBaseline>;
|
|
1824
2587
|
/**
|
|
1825
2588
|
* Enforce canonical class names.
|
|
1826
2589
|
* @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-canonical-classes.md
|
|
@@ -2256,257 +3019,455 @@ interface ESLintSchema {
|
|
|
2256
3019
|
'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>;
|
|
2257
3020
|
/**
|
|
2258
3021
|
* Enforce or ban the use of inline type-only markers for named imports.
|
|
2259
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3022
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/consistent-type-specifier-style.md
|
|
2260
3023
|
*/
|
|
2261
3024
|
'import-x/consistent-type-specifier-style'?: Linter.RuleEntry<ImportXConsistentTypeSpecifierStyle>;
|
|
2262
3025
|
/**
|
|
2263
3026
|
* Ensure a default export is present, given a default import.
|
|
2264
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3027
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/default.md
|
|
2265
3028
|
*/
|
|
2266
3029
|
'import-x/default'?: Linter.RuleEntry<[]>;
|
|
2267
3030
|
/**
|
|
2268
3031
|
* Enforce a leading comment with the webpackChunkName for dynamic imports.
|
|
2269
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3032
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/dynamic-import-chunkname.md
|
|
2270
3033
|
*/
|
|
2271
3034
|
'import-x/dynamic-import-chunkname'?: Linter.RuleEntry<ImportXDynamicImportChunkname>;
|
|
2272
3035
|
/**
|
|
2273
3036
|
* Forbid any invalid exports, i.e. re-export of the same name.
|
|
2274
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3037
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/export.md
|
|
2275
3038
|
*/
|
|
2276
3039
|
'import-x/export'?: Linter.RuleEntry<[]>;
|
|
2277
3040
|
/**
|
|
2278
3041
|
* Ensure all exports appear after other statements.
|
|
2279
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3042
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/exports-last.md
|
|
2280
3043
|
*/
|
|
2281
3044
|
'import-x/exports-last'?: Linter.RuleEntry<[]>;
|
|
2282
3045
|
/**
|
|
2283
3046
|
* Ensure consistent use of file extension within the import path.
|
|
2284
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3047
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/extensions.md
|
|
2285
3048
|
*/
|
|
2286
3049
|
'import-x/extensions'?: Linter.RuleEntry<ImportXExtensions>;
|
|
2287
3050
|
/**
|
|
2288
3051
|
* Ensure all imports appear before other statements.
|
|
2289
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3052
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/first.md
|
|
2290
3053
|
*/
|
|
2291
3054
|
'import-x/first'?: Linter.RuleEntry<ImportXFirst>;
|
|
2292
3055
|
/**
|
|
2293
3056
|
* Prefer named exports to be grouped together in a single export declaration.
|
|
2294
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3057
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/group-exports.md
|
|
2295
3058
|
*/
|
|
2296
3059
|
'import-x/group-exports'?: Linter.RuleEntry<[]>;
|
|
2297
3060
|
/**
|
|
2298
3061
|
* Replaced by `import-x/first`.
|
|
2299
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3062
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/imports-first.md
|
|
2300
3063
|
* @deprecated
|
|
2301
3064
|
*/
|
|
2302
3065
|
'import-x/imports-first'?: Linter.RuleEntry<ImportXImportsFirst>;
|
|
2303
3066
|
/**
|
|
2304
3067
|
* Enforce the maximum number of dependencies a module can have.
|
|
2305
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3068
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/max-dependencies.md
|
|
2306
3069
|
*/
|
|
2307
3070
|
'import-x/max-dependencies'?: Linter.RuleEntry<ImportXMaxDependencies>;
|
|
2308
3071
|
/**
|
|
2309
3072
|
* Ensure named imports correspond to a named export in the remote file.
|
|
2310
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3073
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/named.md
|
|
2311
3074
|
*/
|
|
2312
3075
|
'import-x/named'?: Linter.RuleEntry<ImportXNamed>;
|
|
2313
3076
|
/**
|
|
2314
3077
|
* Ensure imported namespaces contain dereferenced properties as they are dereferenced.
|
|
2315
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3078
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/namespace.md
|
|
2316
3079
|
*/
|
|
2317
3080
|
'import-x/namespace'?: Linter.RuleEntry<ImportXNamespace>;
|
|
2318
3081
|
/**
|
|
2319
3082
|
* Enforce a newline after import statements.
|
|
2320
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3083
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/newline-after-import.md
|
|
2321
3084
|
*/
|
|
2322
3085
|
'import-x/newline-after-import'?: Linter.RuleEntry<ImportXNewlineAfterImport>;
|
|
2323
3086
|
/**
|
|
2324
3087
|
* Forbid import of modules using absolute paths.
|
|
2325
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3088
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-absolute-path.md
|
|
2326
3089
|
*/
|
|
2327
3090
|
'import-x/no-absolute-path'?: Linter.RuleEntry<ImportXNoAbsolutePath>;
|
|
2328
3091
|
/**
|
|
2329
3092
|
* Forbid AMD `require` and `define` calls.
|
|
2330
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3093
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-amd.md
|
|
2331
3094
|
*/
|
|
2332
3095
|
'import-x/no-amd'?: Linter.RuleEntry<[]>;
|
|
2333
3096
|
/**
|
|
2334
3097
|
* Forbid anonymous values as default exports.
|
|
2335
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3098
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-anonymous-default-export.md
|
|
2336
3099
|
*/
|
|
2337
3100
|
'import-x/no-anonymous-default-export'?: Linter.RuleEntry<ImportXNoAnonymousDefaultExport>;
|
|
2338
3101
|
/**
|
|
2339
3102
|
* Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
|
|
2340
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3103
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-commonjs.md
|
|
2341
3104
|
*/
|
|
2342
3105
|
'import-x/no-commonjs'?: Linter.RuleEntry<ImportXNoCommonjs>;
|
|
2343
3106
|
/**
|
|
2344
3107
|
* Forbid a module from importing a module with a dependency path back to itself.
|
|
2345
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3108
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-cycle.md
|
|
2346
3109
|
*/
|
|
2347
3110
|
'import-x/no-cycle'?: Linter.RuleEntry<ImportXNoCycle>;
|
|
2348
3111
|
/**
|
|
2349
3112
|
* Forbid default exports.
|
|
2350
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3113
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-default-export.md
|
|
2351
3114
|
*/
|
|
2352
3115
|
'import-x/no-default-export'?: Linter.RuleEntry<[]>;
|
|
2353
3116
|
/**
|
|
2354
3117
|
* Forbid imported names marked with `@deprecated` documentation tag.
|
|
2355
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3118
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-deprecated.md
|
|
2356
3119
|
*/
|
|
2357
3120
|
'import-x/no-deprecated'?: Linter.RuleEntry<[]>;
|
|
2358
3121
|
/**
|
|
2359
3122
|
* Forbid repeated import of the same module in multiple places.
|
|
2360
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3123
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-duplicates.md
|
|
2361
3124
|
*/
|
|
2362
3125
|
'import-x/no-duplicates'?: Linter.RuleEntry<ImportXNoDuplicates>;
|
|
2363
3126
|
/**
|
|
2364
3127
|
* Forbid `require()` calls with expressions.
|
|
2365
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3128
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-dynamic-require.md
|
|
2366
3129
|
*/
|
|
2367
3130
|
'import-x/no-dynamic-require'?: Linter.RuleEntry<ImportXNoDynamicRequire>;
|
|
2368
3131
|
/**
|
|
2369
3132
|
* Forbid empty named import blocks.
|
|
2370
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3133
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-empty-named-blocks.md
|
|
2371
3134
|
*/
|
|
2372
3135
|
'import-x/no-empty-named-blocks'?: Linter.RuleEntry<[]>;
|
|
2373
3136
|
/**
|
|
2374
3137
|
* Forbid the use of extraneous packages.
|
|
2375
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3138
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-extraneous-dependencies.md
|
|
2376
3139
|
*/
|
|
2377
3140
|
'import-x/no-extraneous-dependencies'?: Linter.RuleEntry<ImportXNoExtraneousDependencies>;
|
|
2378
3141
|
/**
|
|
2379
|
-
* Forbid import statements with CommonJS module.exports.
|
|
2380
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
3142
|
+
* Forbid import statements with CommonJS module.exports.
|
|
3143
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-import-module-exports.md
|
|
3144
|
+
*/
|
|
3145
|
+
'import-x/no-import-module-exports'?: Linter.RuleEntry<ImportXNoImportModuleExports>;
|
|
3146
|
+
/**
|
|
3147
|
+
* Forbid importing the submodules of other modules.
|
|
3148
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-internal-modules.md
|
|
3149
|
+
*/
|
|
3150
|
+
'import-x/no-internal-modules'?: Linter.RuleEntry<ImportXNoInternalModules>;
|
|
3151
|
+
/**
|
|
3152
|
+
* Forbid the use of mutable exports with `var` or `let`.
|
|
3153
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-mutable-exports.md
|
|
3154
|
+
*/
|
|
3155
|
+
'import-x/no-mutable-exports'?: Linter.RuleEntry<[]>;
|
|
3156
|
+
/**
|
|
3157
|
+
* Forbid use of exported name as identifier of default export.
|
|
3158
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-named-as-default.md
|
|
3159
|
+
*/
|
|
3160
|
+
'import-x/no-named-as-default'?: Linter.RuleEntry<[]>;
|
|
3161
|
+
/**
|
|
3162
|
+
* Forbid use of exported name as property of default export.
|
|
3163
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-named-as-default-member.md
|
|
3164
|
+
*/
|
|
3165
|
+
'import-x/no-named-as-default-member'?: Linter.RuleEntry<[]>;
|
|
3166
|
+
/**
|
|
3167
|
+
* Forbid named default exports.
|
|
3168
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-named-default.md
|
|
3169
|
+
*/
|
|
3170
|
+
'import-x/no-named-default'?: Linter.RuleEntry<[]>;
|
|
3171
|
+
/**
|
|
3172
|
+
* Forbid named exports.
|
|
3173
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-named-export.md
|
|
3174
|
+
*/
|
|
3175
|
+
'import-x/no-named-export'?: Linter.RuleEntry<[]>;
|
|
3176
|
+
/**
|
|
3177
|
+
* Forbid namespace (a.k.a. "wildcard" `*`) imports.
|
|
3178
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-namespace.md
|
|
3179
|
+
*/
|
|
3180
|
+
'import-x/no-namespace'?: Linter.RuleEntry<ImportXNoNamespace>;
|
|
3181
|
+
/**
|
|
3182
|
+
* Forbid Node.js builtin modules.
|
|
3183
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-nodejs-modules.md
|
|
3184
|
+
*/
|
|
3185
|
+
'import-x/no-nodejs-modules'?: Linter.RuleEntry<ImportXNoNodejsModules>;
|
|
3186
|
+
/**
|
|
3187
|
+
* Forbid importing packages through relative paths.
|
|
3188
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-relative-packages.md
|
|
3189
|
+
*/
|
|
3190
|
+
'import-x/no-relative-packages'?: Linter.RuleEntry<ImportXNoRelativePackages>;
|
|
3191
|
+
/**
|
|
3192
|
+
* Forbid importing modules from parent directories.
|
|
3193
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-relative-parent-imports.md
|
|
3194
|
+
*/
|
|
3195
|
+
'import-x/no-relative-parent-imports'?: Linter.RuleEntry<ImportXNoRelativeParentImports>;
|
|
3196
|
+
/**
|
|
3197
|
+
* Forbid importing a default export by a different name.
|
|
3198
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-rename-default.md
|
|
3199
|
+
*/
|
|
3200
|
+
'import-x/no-rename-default'?: Linter.RuleEntry<ImportXNoRenameDefault>;
|
|
3201
|
+
/**
|
|
3202
|
+
* Enforce which files can be imported in a given folder.
|
|
3203
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-restricted-paths.md
|
|
3204
|
+
*/
|
|
3205
|
+
'import-x/no-restricted-paths'?: Linter.RuleEntry<ImportXNoRestrictedPaths>;
|
|
3206
|
+
/**
|
|
3207
|
+
* Forbid a module from importing itself.
|
|
3208
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-self-import.md
|
|
3209
|
+
*/
|
|
3210
|
+
'import-x/no-self-import'?: Linter.RuleEntry<[]>;
|
|
3211
|
+
/**
|
|
3212
|
+
* Forbid unassigned imports.
|
|
3213
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-unassigned-import.md
|
|
3214
|
+
*/
|
|
3215
|
+
'import-x/no-unassigned-import'?: Linter.RuleEntry<ImportXNoUnassignedImport>;
|
|
3216
|
+
/**
|
|
3217
|
+
* Ensure imports point to a file/module that can be resolved.
|
|
3218
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-unresolved.md
|
|
3219
|
+
*/
|
|
3220
|
+
'import-x/no-unresolved'?: Linter.RuleEntry<ImportXNoUnresolved>;
|
|
3221
|
+
/**
|
|
3222
|
+
* Forbid modules without exports, or exports without matching import in another module.
|
|
3223
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-unused-modules.md
|
|
3224
|
+
*/
|
|
3225
|
+
'import-x/no-unused-modules'?: Linter.RuleEntry<ImportXNoUnusedModules>;
|
|
3226
|
+
/**
|
|
3227
|
+
* Forbid unnecessary path segments in import and require statements.
|
|
3228
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-useless-path-segments.md
|
|
3229
|
+
*/
|
|
3230
|
+
'import-x/no-useless-path-segments'?: Linter.RuleEntry<ImportXNoUselessPathSegments>;
|
|
3231
|
+
/**
|
|
3232
|
+
* Forbid webpack loader syntax in imports.
|
|
3233
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/no-webpack-loader-syntax.md
|
|
3234
|
+
*/
|
|
3235
|
+
'import-x/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>;
|
|
3236
|
+
/**
|
|
3237
|
+
* Enforce a convention in module import order.
|
|
3238
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/order.md
|
|
3239
|
+
*/
|
|
3240
|
+
'import-x/order'?: Linter.RuleEntry<ImportXOrder>;
|
|
3241
|
+
/**
|
|
3242
|
+
* Prefer a default export if module exports a single name or multiple names.
|
|
3243
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/prefer-default-export.md
|
|
3244
|
+
*/
|
|
3245
|
+
'import-x/prefer-default-export'?: Linter.RuleEntry<ImportXPreferDefaultExport>;
|
|
3246
|
+
/**
|
|
3247
|
+
* Enforce using namespace imports for specific modules, like `react`/`react-dom`, etc.
|
|
3248
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/prefer-namespace-import.md
|
|
3249
|
+
*/
|
|
3250
|
+
'import-x/prefer-namespace-import'?: Linter.RuleEntry<ImportXPreferNamespaceImport>;
|
|
3251
|
+
/**
|
|
3252
|
+
* Forbid potentially ambiguous parse goal (`script` vs. `module`).
|
|
3253
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.17.0/docs/rules/unambiguous.md
|
|
3254
|
+
*/
|
|
3255
|
+
'import-x/unambiguous'?: Linter.RuleEntry<[]>;
|
|
3256
|
+
/**
|
|
3257
|
+
* Enforce consistent indentation
|
|
3258
|
+
* @see https://eslint.org/docs/latest/rules/indent
|
|
3259
|
+
* @deprecated
|
|
3260
|
+
*/
|
|
3261
|
+
'indent'?: Linter.RuleEntry<Indent>;
|
|
3262
|
+
/**
|
|
3263
|
+
* Enforce consistent indentation
|
|
3264
|
+
* @see https://eslint.org/docs/latest/rules/indent-legacy
|
|
3265
|
+
* @deprecated
|
|
3266
|
+
*/
|
|
3267
|
+
'indent-legacy'?: Linter.RuleEntry<IndentLegacy>;
|
|
3268
|
+
/**
|
|
3269
|
+
* Require or disallow initialization in variable declarations
|
|
3270
|
+
* @see https://eslint.org/docs/latest/rules/init-declarations
|
|
3271
|
+
*/
|
|
3272
|
+
'init-declarations'?: Linter.RuleEntry<InitDeclarations>;
|
|
3273
|
+
/**
|
|
3274
|
+
* Enforce emojis are wrapped in `<span>` and provide screen reader access.
|
|
3275
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md
|
|
3276
|
+
* @deprecated
|
|
3277
|
+
*/
|
|
3278
|
+
'jsx-a11y/accessible-emoji'?: Linter.RuleEntry<JsxA11YAccessibleEmoji>;
|
|
3279
|
+
/**
|
|
3280
|
+
* Enforce all elements that require alternative text have meaningful information to relay back to end user.
|
|
3281
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/alt-text.md
|
|
3282
|
+
*/
|
|
3283
|
+
'jsx-a11y/alt-text'?: Linter.RuleEntry<JsxA11YAltText>;
|
|
3284
|
+
/**
|
|
3285
|
+
* Enforce `<a>` text to not exactly match "click here", "here", "link", or "a link".
|
|
3286
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-ambiguous-text.md
|
|
3287
|
+
*/
|
|
3288
|
+
'jsx-a11y/anchor-ambiguous-text'?: Linter.RuleEntry<JsxA11YAnchorAmbiguousText>;
|
|
3289
|
+
/**
|
|
3290
|
+
* Enforce all anchors to contain accessible content.
|
|
3291
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-has-content.md
|
|
3292
|
+
*/
|
|
3293
|
+
'jsx-a11y/anchor-has-content'?: Linter.RuleEntry<JsxA11YAnchorHasContent>;
|
|
3294
|
+
/**
|
|
3295
|
+
* Enforce all anchors are valid, navigable elements.
|
|
3296
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-is-valid.md
|
|
3297
|
+
*/
|
|
3298
|
+
'jsx-a11y/anchor-is-valid'?: Linter.RuleEntry<JsxA11YAnchorIsValid>;
|
|
3299
|
+
/**
|
|
3300
|
+
* Enforce elements with aria-activedescendant are tabbable.
|
|
3301
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-activedescendant-has-tabindex.md
|
|
3302
|
+
*/
|
|
3303
|
+
'jsx-a11y/aria-activedescendant-has-tabindex'?: Linter.RuleEntry<JsxA11YAriaActivedescendantHasTabindex>;
|
|
3304
|
+
/**
|
|
3305
|
+
* Enforce all `aria-*` props are valid.
|
|
3306
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-props.md
|
|
3307
|
+
*/
|
|
3308
|
+
'jsx-a11y/aria-props'?: Linter.RuleEntry<JsxA11YAriaProps>;
|
|
3309
|
+
/**
|
|
3310
|
+
* Enforce ARIA state and property values are valid.
|
|
3311
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-proptypes.md
|
|
3312
|
+
*/
|
|
3313
|
+
'jsx-a11y/aria-proptypes'?: Linter.RuleEntry<JsxA11YAriaProptypes>;
|
|
3314
|
+
/**
|
|
3315
|
+
* Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role.
|
|
3316
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-role.md
|
|
3317
|
+
*/
|
|
3318
|
+
'jsx-a11y/aria-role'?: Linter.RuleEntry<JsxA11YAriaRole>;
|
|
3319
|
+
/**
|
|
3320
|
+
* Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.
|
|
3321
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md
|
|
3322
|
+
*/
|
|
3323
|
+
'jsx-a11y/aria-unsupported-elements'?: Linter.RuleEntry<JsxA11YAriaUnsupportedElements>;
|
|
3324
|
+
/**
|
|
3325
|
+
* Enforce that autocomplete attributes are used correctly.
|
|
3326
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md
|
|
3327
|
+
*/
|
|
3328
|
+
'jsx-a11y/autocomplete-valid'?: Linter.RuleEntry<JsxA11YAutocompleteValid>;
|
|
3329
|
+
/**
|
|
3330
|
+
* Enforce a clickable non-interactive element has at least one keyboard event listener.
|
|
3331
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/click-events-have-key-events.md
|
|
3332
|
+
*/
|
|
3333
|
+
'jsx-a11y/click-events-have-key-events'?: Linter.RuleEntry<JsxA11YClickEventsHaveKeyEvents>;
|
|
3334
|
+
/**
|
|
3335
|
+
* Enforce that a control (an interactive element) has a text label.
|
|
3336
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md
|
|
3337
|
+
*/
|
|
3338
|
+
'jsx-a11y/control-has-associated-label'?: Linter.RuleEntry<JsxA11YControlHasAssociatedLabel>;
|
|
3339
|
+
/**
|
|
3340
|
+
* Enforce heading (`h1`, `h2`, etc) elements contain accessible content.
|
|
3341
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md
|
|
2381
3342
|
*/
|
|
2382
|
-
'
|
|
3343
|
+
'jsx-a11y/heading-has-content'?: Linter.RuleEntry<JsxA11YHeadingHasContent>;
|
|
2383
3344
|
/**
|
|
2384
|
-
*
|
|
2385
|
-
* @see https://github.com/
|
|
3345
|
+
* Enforce `<html>` element has `lang` prop.
|
|
3346
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md
|
|
2386
3347
|
*/
|
|
2387
|
-
'
|
|
3348
|
+
'jsx-a11y/html-has-lang'?: Linter.RuleEntry<JsxA11YHtmlHasLang>;
|
|
2388
3349
|
/**
|
|
2389
|
-
*
|
|
2390
|
-
* @see https://github.com/
|
|
3350
|
+
* Enforce iframe elements have a title attribute.
|
|
3351
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md
|
|
2391
3352
|
*/
|
|
2392
|
-
'
|
|
3353
|
+
'jsx-a11y/iframe-has-title'?: Linter.RuleEntry<JsxA11YIframeHasTitle>;
|
|
2393
3354
|
/**
|
|
2394
|
-
*
|
|
2395
|
-
* @see https://github.com/
|
|
3355
|
+
* Enforce `<img>` alt prop does not contain the word "image", "picture", or "photo".
|
|
3356
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/img-redundant-alt.md
|
|
2396
3357
|
*/
|
|
2397
|
-
'
|
|
3358
|
+
'jsx-a11y/img-redundant-alt'?: Linter.RuleEntry<JsxA11YImgRedundantAlt>;
|
|
2398
3359
|
/**
|
|
2399
|
-
*
|
|
2400
|
-
* @see https://github.com/
|
|
3360
|
+
* Enforce that elements with interactive handlers like `onClick` must be focusable.
|
|
3361
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/interactive-supports-focus.md
|
|
2401
3362
|
*/
|
|
2402
|
-
'
|
|
3363
|
+
'jsx-a11y/interactive-supports-focus'?: Linter.RuleEntry<JsxA11YInteractiveSupportsFocus>;
|
|
2403
3364
|
/**
|
|
2404
|
-
*
|
|
2405
|
-
* @see https://github.com/
|
|
3365
|
+
* Enforce that a `label` tag has a text label and an associated control.
|
|
3366
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md
|
|
2406
3367
|
*/
|
|
2407
|
-
'
|
|
3368
|
+
'jsx-a11y/label-has-associated-control'?: Linter.RuleEntry<JsxA11YLabelHasAssociatedControl>;
|
|
2408
3369
|
/**
|
|
2409
|
-
*
|
|
2410
|
-
* @see https://github.com/
|
|
3370
|
+
* Enforce that `<label>` elements have the `htmlFor` prop.
|
|
3371
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/label-has-for.md
|
|
3372
|
+
* @deprecated
|
|
2411
3373
|
*/
|
|
2412
|
-
'
|
|
3374
|
+
'jsx-a11y/label-has-for'?: Linter.RuleEntry<JsxA11YLabelHasFor>;
|
|
2413
3375
|
/**
|
|
2414
|
-
*
|
|
2415
|
-
* @see https://github.com/
|
|
3376
|
+
* Enforce lang attribute has a valid value.
|
|
3377
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/lang.md
|
|
2416
3378
|
*/
|
|
2417
|
-
'
|
|
3379
|
+
'jsx-a11y/lang'?: Linter.RuleEntry<JsxA11YLang>;
|
|
2418
3380
|
/**
|
|
2419
|
-
*
|
|
2420
|
-
* @see https://github.com/
|
|
3381
|
+
* Enforces that `<audio>` and `<video>` elements must have a `<track>` for captions.
|
|
3382
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/media-has-caption.md
|
|
2421
3383
|
*/
|
|
2422
|
-
'
|
|
3384
|
+
'jsx-a11y/media-has-caption'?: Linter.RuleEntry<JsxA11YMediaHasCaption>;
|
|
2423
3385
|
/**
|
|
2424
|
-
*
|
|
2425
|
-
* @see https://github.com/
|
|
3386
|
+
* Enforce that `onMouseOver`/`onMouseOut` are accompanied by `onFocus`/`onBlur` for keyboard-only users.
|
|
3387
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/mouse-events-have-key-events.md
|
|
2426
3388
|
*/
|
|
2427
|
-
'
|
|
3389
|
+
'jsx-a11y/mouse-events-have-key-events'?: Linter.RuleEntry<JsxA11YMouseEventsHaveKeyEvents>;
|
|
2428
3390
|
/**
|
|
2429
|
-
*
|
|
2430
|
-
* @see https://github.com/
|
|
3391
|
+
* Enforce that the `accessKey` prop is not used on any element to avoid complications with keyboard commands used by a screen reader.
|
|
3392
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-access-key.md
|
|
2431
3393
|
*/
|
|
2432
|
-
'
|
|
3394
|
+
'jsx-a11y/no-access-key'?: Linter.RuleEntry<JsxA11YNoAccessKey>;
|
|
2433
3395
|
/**
|
|
2434
|
-
*
|
|
2435
|
-
* @see https://github.com/
|
|
3396
|
+
* Disallow `aria-hidden="true"` from being set on focusable elements.
|
|
3397
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-aria-hidden-on-focusable.md
|
|
2436
3398
|
*/
|
|
2437
|
-
'
|
|
3399
|
+
'jsx-a11y/no-aria-hidden-on-focusable'?: Linter.RuleEntry<JsxA11YNoAriaHiddenOnFocusable>;
|
|
2438
3400
|
/**
|
|
2439
|
-
* Enforce
|
|
2440
|
-
* @see https://github.com/
|
|
3401
|
+
* Enforce autoFocus prop is not used.
|
|
3402
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-autofocus.md
|
|
2441
3403
|
*/
|
|
2442
|
-
'
|
|
3404
|
+
'jsx-a11y/no-autofocus'?: Linter.RuleEntry<JsxA11YNoAutofocus>;
|
|
2443
3405
|
/**
|
|
2444
|
-
*
|
|
2445
|
-
* @see https://github.com/
|
|
3406
|
+
* Enforce distracting elements are not used.
|
|
3407
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-distracting-elements.md
|
|
2446
3408
|
*/
|
|
2447
|
-
'
|
|
3409
|
+
'jsx-a11y/no-distracting-elements'?: Linter.RuleEntry<JsxA11YNoDistractingElements>;
|
|
2448
3410
|
/**
|
|
2449
|
-
*
|
|
2450
|
-
* @see https://github.com/
|
|
3411
|
+
* Interactive elements should not be assigned non-interactive roles.
|
|
3412
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-interactive-element-to-noninteractive-role.md
|
|
2451
3413
|
*/
|
|
2452
|
-
'
|
|
3414
|
+
'jsx-a11y/no-interactive-element-to-noninteractive-role'?: Linter.RuleEntry<JsxA11YNoInteractiveElementToNoninteractiveRole>;
|
|
2453
3415
|
/**
|
|
2454
|
-
*
|
|
2455
|
-
* @see https://github.com/
|
|
3416
|
+
* Non-interactive elements should not be assigned mouse or keyboard event listeners.
|
|
3417
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-element-interactions.md
|
|
2456
3418
|
*/
|
|
2457
|
-
'
|
|
3419
|
+
'jsx-a11y/no-noninteractive-element-interactions'?: Linter.RuleEntry<JsxA11YNoNoninteractiveElementInteractions>;
|
|
2458
3420
|
/**
|
|
2459
|
-
*
|
|
2460
|
-
* @see https://github.com/
|
|
3421
|
+
* Non-interactive elements should not be assigned interactive roles.
|
|
3422
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-element-to-interactive-role.md
|
|
2461
3423
|
*/
|
|
2462
|
-
'
|
|
3424
|
+
'jsx-a11y/no-noninteractive-element-to-interactive-role'?: Linter.RuleEntry<JsxA11YNoNoninteractiveElementToInteractiveRole>;
|
|
2463
3425
|
/**
|
|
2464
|
-
*
|
|
2465
|
-
* @see https://github.com/
|
|
3426
|
+
* `tabIndex` should only be declared on interactive elements.
|
|
3427
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-tabindex.md
|
|
2466
3428
|
*/
|
|
2467
|
-
'
|
|
3429
|
+
'jsx-a11y/no-noninteractive-tabindex'?: Linter.RuleEntry<JsxA11YNoNoninteractiveTabindex>;
|
|
2468
3430
|
/**
|
|
2469
|
-
*
|
|
2470
|
-
* @see https://github.com/
|
|
3431
|
+
* Enforce usage of `onBlur` over `onChange` on select menus for accessibility.
|
|
3432
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-onchange.md
|
|
3433
|
+
* @deprecated
|
|
2471
3434
|
*/
|
|
2472
|
-
'
|
|
3435
|
+
'jsx-a11y/no-onchange'?: Linter.RuleEntry<JsxA11YNoOnchange>;
|
|
2473
3436
|
/**
|
|
2474
|
-
* Enforce
|
|
2475
|
-
* @see https://github.com/
|
|
3437
|
+
* Enforce explicit role property is not the same as implicit/default role property on element.
|
|
3438
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-redundant-roles.md
|
|
2476
3439
|
*/
|
|
2477
|
-
'
|
|
3440
|
+
'jsx-a11y/no-redundant-roles'?: Linter.RuleEntry<JsxA11YNoRedundantRoles>;
|
|
2478
3441
|
/**
|
|
2479
|
-
*
|
|
2480
|
-
* @see https://github.com/
|
|
3442
|
+
* Enforce that non-interactive, visible elements (such as `<div>`) that have click handlers use the role attribute.
|
|
3443
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-static-element-interactions.md
|
|
2481
3444
|
*/
|
|
2482
|
-
'
|
|
3445
|
+
'jsx-a11y/no-static-element-interactions'?: Linter.RuleEntry<JsxA11YNoStaticElementInteractions>;
|
|
2483
3446
|
/**
|
|
2484
|
-
*
|
|
2485
|
-
* @see https://github.com/
|
|
3447
|
+
* Enforces using semantic DOM elements over the ARIA `role` property.
|
|
3448
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/prefer-tag-over-role.md
|
|
2486
3449
|
*/
|
|
2487
|
-
'
|
|
3450
|
+
'jsx-a11y/prefer-tag-over-role'?: Linter.RuleEntry<JsxA11YPreferTagOverRole>;
|
|
2488
3451
|
/**
|
|
2489
|
-
*
|
|
2490
|
-
* @see https://github.com/
|
|
3452
|
+
* Enforce that elements with ARIA roles must have all required attributes for that role.
|
|
3453
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-has-required-aria-props.md
|
|
2491
3454
|
*/
|
|
2492
|
-
'
|
|
3455
|
+
'jsx-a11y/role-has-required-aria-props'?: Linter.RuleEntry<JsxA11YRoleHasRequiredAriaProps>;
|
|
2493
3456
|
/**
|
|
2494
|
-
* Enforce
|
|
2495
|
-
* @see https://
|
|
2496
|
-
* @deprecated
|
|
3457
|
+
* Enforce that elements with explicit or implicit roles defined contain only `aria-*` properties supported by that `role`.
|
|
3458
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-supports-aria-props.md
|
|
2497
3459
|
*/
|
|
2498
|
-
'
|
|
3460
|
+
'jsx-a11y/role-supports-aria-props'?: Linter.RuleEntry<JsxA11YRoleSupportsAriaProps>;
|
|
2499
3461
|
/**
|
|
2500
|
-
* Enforce
|
|
2501
|
-
* @see https://
|
|
2502
|
-
* @deprecated
|
|
3462
|
+
* Enforce `scope` prop is only used on `<th>` elements.
|
|
3463
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/scope.md
|
|
2503
3464
|
*/
|
|
2504
|
-
'
|
|
3465
|
+
'jsx-a11y/scope'?: Linter.RuleEntry<JsxA11YScope>;
|
|
2505
3466
|
/**
|
|
2506
|
-
*
|
|
2507
|
-
* @see https://
|
|
3467
|
+
* Enforce `tabIndex` value is not greater than zero.
|
|
3468
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/tabindex-no-positive.md
|
|
2508
3469
|
*/
|
|
2509
|
-
'
|
|
3470
|
+
'jsx-a11y/tabindex-no-positive'?: Linter.RuleEntry<JsxA11YTabindexNoPositive>;
|
|
2510
3471
|
/**
|
|
2511
3472
|
* Enforce the consistent use of either double or single quotes in JSX attributes
|
|
2512
3473
|
* @see https://eslint.org/docs/latest/rules/jsx-quotes
|
|
@@ -2970,6 +3931,110 @@ interface ESLintSchema {
|
|
|
2970
3931
|
* @deprecated
|
|
2971
3932
|
*/
|
|
2972
3933
|
'newline-per-chained-call'?: Linter.RuleEntry<NewlinePerChainedCall>;
|
|
3934
|
+
/**
|
|
3935
|
+
* Enforce font-display behavior with Google Fonts.
|
|
3936
|
+
* @see https://nextjs.org/docs/messages/google-font-display
|
|
3937
|
+
*/
|
|
3938
|
+
'next/google-font-display'?: Linter.RuleEntry<[]>;
|
|
3939
|
+
/**
|
|
3940
|
+
* Ensure `preconnect` is used with Google Fonts.
|
|
3941
|
+
* @see https://nextjs.org/docs/messages/google-font-preconnect
|
|
3942
|
+
*/
|
|
3943
|
+
'next/google-font-preconnect'?: Linter.RuleEntry<[]>;
|
|
3944
|
+
/**
|
|
3945
|
+
* Enforce `id` attribute on `next/script` components with inline content.
|
|
3946
|
+
* @see https://nextjs.org/docs/messages/inline-script-id
|
|
3947
|
+
*/
|
|
3948
|
+
'next/inline-script-id'?: Linter.RuleEntry<[]>;
|
|
3949
|
+
/**
|
|
3950
|
+
* Prefer `@next/third-parties/google` when using the inline script for Google Analytics and Tag Manager.
|
|
3951
|
+
* @see https://nextjs.org/docs/messages/next-script-for-ga
|
|
3952
|
+
*/
|
|
3953
|
+
'next/next-script-for-ga'?: Linter.RuleEntry<[]>;
|
|
3954
|
+
/**
|
|
3955
|
+
* Prevent assignment to the `module` variable.
|
|
3956
|
+
* @see https://nextjs.org/docs/messages/no-assign-module-variable
|
|
3957
|
+
*/
|
|
3958
|
+
'next/no-assign-module-variable'?: Linter.RuleEntry<[]>;
|
|
3959
|
+
/**
|
|
3960
|
+
* Prevent Client Components from being async functions.
|
|
3961
|
+
* @see https://nextjs.org/docs/messages/no-async-client-component
|
|
3962
|
+
*/
|
|
3963
|
+
'next/no-async-client-component'?: Linter.RuleEntry<[]>;
|
|
3964
|
+
/**
|
|
3965
|
+
* Prevent usage of `next/script`'s `beforeInteractive` strategy outside of `pages/_document.js`.
|
|
3966
|
+
* @see https://nextjs.org/docs/messages/no-before-interactive-script-outside-document
|
|
3967
|
+
*/
|
|
3968
|
+
'next/no-before-interactive-script-outside-document'?: Linter.RuleEntry<[]>;
|
|
3969
|
+
/**
|
|
3970
|
+
* Prevent manual stylesheet tags.
|
|
3971
|
+
* @see https://nextjs.org/docs/messages/no-css-tags
|
|
3972
|
+
*/
|
|
3973
|
+
'next/no-css-tags'?: Linter.RuleEntry<[]>;
|
|
3974
|
+
/**
|
|
3975
|
+
* Prevent importing `next/document` outside of `pages/_document.js`.
|
|
3976
|
+
* @see https://nextjs.org/docs/messages/no-document-import-in-page
|
|
3977
|
+
*/
|
|
3978
|
+
'next/no-document-import-in-page'?: Linter.RuleEntry<[]>;
|
|
3979
|
+
/**
|
|
3980
|
+
* Prevent duplicate usage of `<Head>` in `pages/_document.js`.
|
|
3981
|
+
* @see https://nextjs.org/docs/messages/no-duplicate-head
|
|
3982
|
+
*/
|
|
3983
|
+
'next/no-duplicate-head'?: Linter.RuleEntry<[]>;
|
|
3984
|
+
/**
|
|
3985
|
+
* Prevent usage of `<head>` element.
|
|
3986
|
+
* @see https://nextjs.org/docs/messages/no-head-element
|
|
3987
|
+
*/
|
|
3988
|
+
'next/no-head-element'?: Linter.RuleEntry<[]>;
|
|
3989
|
+
/**
|
|
3990
|
+
* Prevent usage of `next/head` in `pages/_document.js`.
|
|
3991
|
+
* @see https://nextjs.org/docs/messages/no-head-import-in-document
|
|
3992
|
+
*/
|
|
3993
|
+
'next/no-head-import-in-document'?: Linter.RuleEntry<[]>;
|
|
3994
|
+
/**
|
|
3995
|
+
* Prevent usage of `<a>` elements to navigate to internal Next.js pages.
|
|
3996
|
+
* @see https://nextjs.org/docs/messages/no-html-link-for-pages
|
|
3997
|
+
*/
|
|
3998
|
+
'next/no-html-link-for-pages'?: Linter.RuleEntry<NextNoHtmlLinkForPages>;
|
|
3999
|
+
/**
|
|
4000
|
+
* Prevent usage of `<img>` element due to slower LCP and higher bandwidth.
|
|
4001
|
+
* @see https://nextjs.org/docs/messages/no-img-element
|
|
4002
|
+
*/
|
|
4003
|
+
'next/no-img-element'?: Linter.RuleEntry<[]>;
|
|
4004
|
+
/**
|
|
4005
|
+
* Prevent page-only custom fonts.
|
|
4006
|
+
* @see https://nextjs.org/docs/messages/no-page-custom-font
|
|
4007
|
+
*/
|
|
4008
|
+
'next/no-page-custom-font'?: Linter.RuleEntry<[]>;
|
|
4009
|
+
/**
|
|
4010
|
+
* Prevent usage of `next/script` in `next/head` component.
|
|
4011
|
+
* @see https://nextjs.org/docs/messages/no-script-component-in-head
|
|
4012
|
+
*/
|
|
4013
|
+
'next/no-script-component-in-head'?: Linter.RuleEntry<[]>;
|
|
4014
|
+
/**
|
|
4015
|
+
* Prevent usage of `styled-jsx` in `pages/_document.js`.
|
|
4016
|
+
* @see https://nextjs.org/docs/messages/no-styled-jsx-in-document
|
|
4017
|
+
*/
|
|
4018
|
+
'next/no-styled-jsx-in-document'?: Linter.RuleEntry<[]>;
|
|
4019
|
+
/**
|
|
4020
|
+
* Prevent synchronous scripts.
|
|
4021
|
+
* @see https://nextjs.org/docs/messages/no-sync-scripts
|
|
4022
|
+
*/
|
|
4023
|
+
'next/no-sync-scripts'?: Linter.RuleEntry<[]>;
|
|
4024
|
+
/**
|
|
4025
|
+
* Prevent usage of `<title>` with `Head` component from `next/document`.
|
|
4026
|
+
* @see https://nextjs.org/docs/messages/no-title-in-document-head
|
|
4027
|
+
*/
|
|
4028
|
+
'next/no-title-in-document-head'?: Linter.RuleEntry<[]>;
|
|
4029
|
+
/**
|
|
4030
|
+
* Prevent common typos in Next.js data fetching functions.
|
|
4031
|
+
*/
|
|
4032
|
+
'next/no-typos'?: Linter.RuleEntry<[]>;
|
|
4033
|
+
/**
|
|
4034
|
+
* Prevent duplicate polyfills from Polyfill.io.
|
|
4035
|
+
* @see https://nextjs.org/docs/messages/no-unwanted-polyfillio
|
|
4036
|
+
*/
|
|
4037
|
+
'next/no-unwanted-polyfillio'?: Linter.RuleEntry<[]>;
|
|
2973
4038
|
/**
|
|
2974
4039
|
* Disallow the use of `alert`, `confirm`, and `prompt`
|
|
2975
4040
|
* @see https://eslint.org/docs/latest/rules/no-alert
|
|
@@ -3858,7 +4923,7 @@ interface ESLintSchema {
|
|
|
3858
4923
|
*/
|
|
3859
4924
|
'package-json/no-redundant-publishConfig'?: Linter.RuleEntry<[]>;
|
|
3860
4925
|
/**
|
|
3861
|
-
*
|
|
4926
|
+
* Enforces that package properties are declared in a consistent order.
|
|
3862
4927
|
* @see https://eslint-plugin-package-json.dev/rules/order-properties
|
|
3863
4928
|
*/
|
|
3864
4929
|
'package-json/order-properties'?: Linter.RuleEntry<PackageJsonOrderProperties>;
|
|
@@ -5112,918 +6177,1560 @@ interface ESLintSchema {
|
|
|
5112
6177
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
5113
6178
|
/**
|
|
5114
6179
|
* Prefer better DOM traversal APIs.
|
|
5115
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/better-dom-traversing.md
|
|
5116
6181
|
*/
|
|
5117
6182
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
5118
6183
|
/**
|
|
5119
6184
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
5120
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
5121
6186
|
* @deprecated
|
|
5122
6187
|
*/
|
|
5123
6188
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
5124
6189
|
/**
|
|
5125
6190
|
* Enforce a specific parameter name in catch clauses.
|
|
5126
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6191
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/catch-error-name.md
|
|
5127
6192
|
*/
|
|
5128
6193
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
6194
|
+
/**
|
|
6195
|
+
* Enforce consistent class references in static methods.
|
|
6196
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/class-reference-in-static-methods.md
|
|
6197
|
+
*/
|
|
6198
|
+
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
6199
|
+
/**
|
|
6200
|
+
* Enforce better comment content.
|
|
6201
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/comment-content.md
|
|
6202
|
+
*/
|
|
6203
|
+
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
5129
6204
|
/**
|
|
5130
6205
|
* Enforce consistent assertion style with `node:assert`.
|
|
5131
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6206
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-assert.md
|
|
5132
6207
|
*/
|
|
5133
6208
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6209
|
+
/**
|
|
6210
|
+
* Enforce consistent naming for boolean names.
|
|
6211
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-boolean-name.md
|
|
6212
|
+
*/
|
|
6213
|
+
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
6214
|
+
/**
|
|
6215
|
+
* Enforce consistent class member order.
|
|
6216
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-class-member-order.md
|
|
6217
|
+
*/
|
|
6218
|
+
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
5134
6219
|
/**
|
|
5135
6220
|
* Enforce consistent spelling of compound words in identifiers.
|
|
5136
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-compound-words.md
|
|
5137
6222
|
*/
|
|
5138
6223
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
6224
|
+
/**
|
|
6225
|
+
* Enforce consistent conditional object spread style.
|
|
6226
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
6227
|
+
*/
|
|
6228
|
+
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
5139
6229
|
/**
|
|
5140
6230
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
5141
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6231
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-date-clone.md
|
|
5142
6232
|
*/
|
|
5143
6233
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
5144
6234
|
/**
|
|
5145
6235
|
* Use destructured variables over properties.
|
|
5146
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6236
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-destructuring.md
|
|
5147
6237
|
*/
|
|
5148
6238
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
5149
6239
|
/**
|
|
5150
6240
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
5151
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-empty-array-spread.md
|
|
5152
6242
|
*/
|
|
5153
6243
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
5154
6244
|
/**
|
|
5155
6245
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
5156
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-existence-index-check.md
|
|
5157
6247
|
*/
|
|
5158
6248
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6249
|
+
/**
|
|
6250
|
+
* Enforce consistent decorator position on exported classes.
|
|
6251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-export-decorator-position.md
|
|
6252
|
+
*/
|
|
6253
|
+
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
5159
6254
|
/**
|
|
5160
6255
|
* Move function definitions to the highest possible scope.
|
|
5161
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-function-scoping.md
|
|
5162
6257
|
*/
|
|
5163
6258
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6259
|
+
/**
|
|
6260
|
+
* Enforce function syntax by role.
|
|
6261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-function-style.md
|
|
6262
|
+
*/
|
|
6263
|
+
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
5164
6264
|
/**
|
|
5165
6265
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
5166
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-json-file-read.md
|
|
5167
6267
|
*/
|
|
5168
6268
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
6269
|
+
/**
|
|
6270
|
+
* Enforce consistent optional chaining for same-base member access.
|
|
6271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-optional-chaining.md
|
|
6272
|
+
*/
|
|
6273
|
+
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
5169
6274
|
/**
|
|
5170
6275
|
* Enforce consistent style for escaping `${` in template literals.
|
|
5171
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/consistent-template-literal-escape.md
|
|
5172
6277
|
*/
|
|
5173
6278
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
5174
6279
|
/**
|
|
5175
6280
|
* Enforce correct `Error` subclassing.
|
|
5176
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/custom-error-definition.md
|
|
5177
6282
|
*/
|
|
5178
6283
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6284
|
+
/**
|
|
6285
|
+
* Enforce consistent default export declarations.
|
|
6286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/default-export-style.md
|
|
6287
|
+
*/
|
|
6288
|
+
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
5179
6289
|
/**
|
|
5180
6290
|
* Enforce consistent style for DOM element dataset access.
|
|
5181
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/dom-node-dataset.md
|
|
5182
6292
|
*/
|
|
5183
6293
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
5184
6294
|
/**
|
|
5185
6295
|
* Enforce no spaces between braces.
|
|
5186
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/empty-brace-spaces.md
|
|
5187
6297
|
*/
|
|
5188
6298
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
5189
6299
|
/**
|
|
5190
6300
|
* Enforce passing a `message` value when creating a built-in error.
|
|
5191
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/error-message.md
|
|
5192
6302
|
*/
|
|
5193
6303
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
5194
6304
|
/**
|
|
5195
6305
|
* Require escape sequences to use uppercase or lowercase values.
|
|
5196
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/escape-case.md
|
|
5197
6307
|
*/
|
|
5198
6308
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
5199
6309
|
/**
|
|
5200
6310
|
* Add expiration conditions to TODO comments.
|
|
5201
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/expiring-todo-comments.md
|
|
5202
6312
|
*/
|
|
5203
6313
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
5204
6314
|
/**
|
|
5205
6315
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
5206
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/explicit-length-check.md
|
|
5207
6317
|
*/
|
|
5208
6318
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
6319
|
+
/**
|
|
6320
|
+
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
6321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/explicit-timer-delay.md
|
|
6322
|
+
*/
|
|
6323
|
+
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
5209
6324
|
/**
|
|
5210
6325
|
* Enforce a case style for filenames and directory names.
|
|
5211
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/filename-case.md
|
|
5212
6327
|
*/
|
|
5213
6328
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
6329
|
+
/**
|
|
6330
|
+
* Require identifiers to match a specified regular expression.
|
|
6331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/id-match.md
|
|
6332
|
+
*/
|
|
6333
|
+
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
5214
6334
|
/**
|
|
5215
6335
|
* Enforce specific import styles per module.
|
|
5216
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6336
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/import-style.md
|
|
5217
6337
|
*/
|
|
5218
6338
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
5219
6339
|
/**
|
|
5220
6340
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
5221
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/isolated-functions.md
|
|
5222
6342
|
*/
|
|
5223
6343
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
5224
6344
|
/**
|
|
5225
|
-
*
|
|
5226
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6345
|
+
* Require or disallow logical assignment operator shorthand
|
|
6346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/logical-assignment-operators.md
|
|
6347
|
+
*/
|
|
6348
|
+
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
6349
|
+
/**
|
|
6350
|
+
* Limit the depth of nested calls.
|
|
6351
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/max-nested-calls.md
|
|
6352
|
+
*/
|
|
6353
|
+
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
6354
|
+
/**
|
|
6355
|
+
* Enforce replacements for variable, property, and filenames.
|
|
6356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/name-replacements.md
|
|
6357
|
+
*/
|
|
6358
|
+
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
6359
|
+
/**
|
|
6360
|
+
* Enforce correct use of `new` for builtin constructors.
|
|
6361
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/new-for-builtins.md
|
|
5227
6362
|
*/
|
|
5228
6363
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
5229
6364
|
/**
|
|
5230
6365
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
5231
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6366
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
5232
6367
|
*/
|
|
5233
6368
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
5234
6369
|
/**
|
|
5235
6370
|
* Disallow recursive access to `this` within getters and setters.
|
|
5236
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6371
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-accessor-recursion.md
|
|
5237
6372
|
*/
|
|
5238
6373
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6374
|
+
/**
|
|
6375
|
+
* Disallow bitwise operators where a logical operator was likely intended.
|
|
6376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
6377
|
+
*/
|
|
6378
|
+
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
5239
6379
|
/**
|
|
5240
6380
|
* Disallow anonymous functions and classes as the default export.
|
|
5241
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-anonymous-default-export.md
|
|
5242
6382
|
*/
|
|
5243
6383
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
5244
6384
|
/**
|
|
5245
6385
|
* Prevent passing a function reference directly to iterator methods.
|
|
5246
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-callback-reference.md
|
|
5247
6387
|
*/
|
|
5248
6388
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
5249
6389
|
/**
|
|
5250
|
-
* Disallow
|
|
5251
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6390
|
+
* Disallow array accumulation with `Array#concat()` in loops.
|
|
6391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-concat-in-loop.md
|
|
5252
6392
|
*/
|
|
5253
|
-
'unicorn/no-array-
|
|
6393
|
+
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
5254
6394
|
/**
|
|
5255
|
-
*
|
|
5256
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6395
|
+
* Disallow using reference values as `Array#fill()` values.
|
|
6396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
5257
6397
|
*/
|
|
5258
|
-
'unicorn/no-array-
|
|
6398
|
+
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
5259
6399
|
/**
|
|
5260
6400
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
5261
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-from-fill.md
|
|
5262
6402
|
*/
|
|
5263
6403
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
6404
|
+
/**
|
|
6405
|
+
* Disallow front-of-array mutation.
|
|
6406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-front-mutation.md
|
|
6407
|
+
*/
|
|
6408
|
+
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
5264
6409
|
/**
|
|
5265
6410
|
* Disallow using the `this` argument in array methods.
|
|
5266
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-method-this-argument.md
|
|
5267
6412
|
*/
|
|
5268
6413
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
5269
6414
|
/**
|
|
5270
6415
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
5271
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6416
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
5272
6417
|
* @deprecated
|
|
5273
6418
|
*/
|
|
5274
6419
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
5275
6420
|
/**
|
|
5276
6421
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
5277
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-reduce.md
|
|
5278
6423
|
*/
|
|
5279
6424
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
5280
6425
|
/**
|
|
5281
6426
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
5282
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-reverse.md
|
|
5283
6428
|
*/
|
|
5284
6429
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
5285
6430
|
/**
|
|
5286
6431
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
5287
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-sort.md
|
|
5288
6433
|
*/
|
|
5289
6434
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
6435
|
+
/**
|
|
6436
|
+
* Disallow sorting arrays to get the minimum or maximum value.
|
|
6437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
6438
|
+
*/
|
|
6439
|
+
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
6440
|
+
/**
|
|
6441
|
+
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
6442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-array-splice.md
|
|
6443
|
+
*/
|
|
6444
|
+
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
6445
|
+
/**
|
|
6446
|
+
* Disallow asterisk prefixes in documentation comments.
|
|
6447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
6448
|
+
*/
|
|
6449
|
+
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
5290
6450
|
/**
|
|
5291
6451
|
* Disallow member access from await expression.
|
|
5292
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-await-expression-member.md
|
|
5293
6453
|
*/
|
|
5294
6454
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
5295
6455
|
/**
|
|
5296
6456
|
* Disallow using `await` in `Promise` method parameters.
|
|
5297
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-await-in-promise-methods.md
|
|
5298
6458
|
*/
|
|
5299
6459
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5300
6460
|
/**
|
|
5301
6461
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
5302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-blob-to-file.md
|
|
5303
6463
|
*/
|
|
5304
6464
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
6465
|
+
/**
|
|
6466
|
+
* Disallow boolean-returning sort comparators.
|
|
6467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
6468
|
+
*/
|
|
6469
|
+
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
6470
|
+
/**
|
|
6471
|
+
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
6472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-break-in-nested-loop.md
|
|
6473
|
+
*/
|
|
6474
|
+
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
5305
6475
|
/**
|
|
5306
6476
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
5307
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-canvas-to-image.md
|
|
5308
6478
|
*/
|
|
5309
6479
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
6480
|
+
/**
|
|
6481
|
+
* Disallow chained comparisons such as `a < b < c`.
|
|
6482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-chained-comparison.md
|
|
6483
|
+
*/
|
|
6484
|
+
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
6485
|
+
/**
|
|
6486
|
+
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
6487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-collection-bracket-access.md
|
|
6488
|
+
*/
|
|
6489
|
+
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
6490
|
+
/**
|
|
6491
|
+
* Disallow dynamic object property existence checks.
|
|
6492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-computed-property-existence-check.md
|
|
6493
|
+
*/
|
|
6494
|
+
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
5310
6495
|
/**
|
|
5311
6496
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
5312
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-confusing-array-splice.md
|
|
5313
6498
|
*/
|
|
5314
6499
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
6500
|
+
/**
|
|
6501
|
+
* Disallow confusing uses of `Array#with()`.
|
|
6502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-confusing-array-with.md
|
|
6503
|
+
*/
|
|
6504
|
+
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
5315
6505
|
/**
|
|
5316
6506
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
5317
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-console-spaces.md
|
|
5318
6508
|
*/
|
|
5319
6509
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6510
|
+
/**
|
|
6511
|
+
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
6512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-constant-zero-expression.md
|
|
6513
|
+
*/
|
|
6514
|
+
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
6515
|
+
/**
|
|
6516
|
+
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
6517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
6518
|
+
*/
|
|
6519
|
+
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
5320
6520
|
/**
|
|
5321
6521
|
* Do not use `document.cookie` directly.
|
|
5322
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-document-cookie.md
|
|
5323
6523
|
*/
|
|
5324
6524
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6525
|
+
/**
|
|
6526
|
+
* Disallow two comparisons of the same operands that can be combined into one.
|
|
6527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-double-comparison.md
|
|
6528
|
+
*/
|
|
6529
|
+
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
6530
|
+
/**
|
|
6531
|
+
* Disallow duplicate adjacent branches in if chains.
|
|
6532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-duplicate-if-branches.md
|
|
6533
|
+
*/
|
|
6534
|
+
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
6535
|
+
/**
|
|
6536
|
+
* Disallow adjacent duplicate operands in logical expressions.
|
|
6537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
6538
|
+
*/
|
|
6539
|
+
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
6540
|
+
/**
|
|
6541
|
+
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
6542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-duplicate-loops.md
|
|
6543
|
+
*/
|
|
6544
|
+
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
5325
6545
|
/**
|
|
5326
6546
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
5327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-duplicate-set-values.md
|
|
5328
6548
|
*/
|
|
5329
6549
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
5330
6550
|
/**
|
|
5331
6551
|
* Disallow empty files.
|
|
5332
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-empty-file.md
|
|
5333
6553
|
*/
|
|
5334
6554
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
6555
|
+
/**
|
|
6556
|
+
* Disallow assigning to built-in error properties.
|
|
6557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-error-property-assignment.md
|
|
6558
|
+
*/
|
|
6559
|
+
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
5335
6560
|
/**
|
|
5336
6561
|
* Disallow exports in scripts.
|
|
5337
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-exports-in-scripts.md
|
|
5338
6563
|
*/
|
|
5339
6564
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
6565
|
+
/**
|
|
6566
|
+
* Prefer `for…of` over the `forEach` method.
|
|
6567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-for-each.md
|
|
6568
|
+
*/
|
|
6569
|
+
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
5340
6570
|
/**
|
|
5341
6571
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
5342
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-for-loop.md
|
|
5343
6573
|
*/
|
|
5344
6574
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
5345
6575
|
/**
|
|
5346
|
-
*
|
|
5347
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6576
|
+
* Disallow assigning properties on the global object.
|
|
6577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-global-object-property-assignment.md
|
|
6578
|
+
*/
|
|
6579
|
+
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6580
|
+
/**
|
|
6581
|
+
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
6582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
6583
|
+
* @deprecated
|
|
5348
6584
|
*/
|
|
5349
6585
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
5350
6586
|
/**
|
|
5351
6587
|
* Disallow immediate mutation after variable assignment.
|
|
5352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-immediate-mutation.md
|
|
5353
6589
|
*/
|
|
5354
6590
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
6591
|
+
/**
|
|
6592
|
+
* Disallow impossible comparisons against `.length` or `.size`.
|
|
6593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-impossible-length-comparison.md
|
|
6594
|
+
*/
|
|
6595
|
+
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
5355
6596
|
/**
|
|
5356
6597
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
5357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-incorrect-query-selector.md
|
|
5358
6599
|
*/
|
|
5359
6600
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
6601
|
+
/**
|
|
6602
|
+
* Disallow incorrect template literal interpolation syntax.
|
|
6603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
6604
|
+
*/
|
|
6605
|
+
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
5360
6606
|
/**
|
|
5361
6607
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
5362
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
5363
6609
|
* @deprecated
|
|
5364
6610
|
*/
|
|
5365
6611
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
5366
6612
|
/**
|
|
5367
6613
|
* Disallow `instanceof` with built-in objects
|
|
5368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-instanceof-builtins.md
|
|
5369
6615
|
*/
|
|
5370
6616
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
6617
|
+
/**
|
|
6618
|
+
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
6619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-invalid-argument-count.md
|
|
6620
|
+
*/
|
|
6621
|
+
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
6622
|
+
/**
|
|
6623
|
+
* Disallow comparing a single character from a string to a multi-character string.
|
|
6624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-invalid-character-comparison.md
|
|
6625
|
+
*/
|
|
6626
|
+
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
5371
6627
|
/**
|
|
5372
6628
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-invalid-fetch-options.md
|
|
5374
6630
|
*/
|
|
5375
6631
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5376
6632
|
/**
|
|
5377
6633
|
* Disallow invalid `accept` values on file inputs.
|
|
5378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
5379
6635
|
*/
|
|
5380
6636
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
5381
6637
|
/**
|
|
5382
6638
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
5383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
5384
6640
|
*/
|
|
5385
6641
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
5386
6642
|
/**
|
|
5387
6643
|
* Disallow identifiers starting with `new` or `class`.
|
|
5388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-keyword-prefix.md
|
|
5389
6645
|
*/
|
|
5390
6646
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
5391
6647
|
/**
|
|
5392
6648
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
5393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-late-current-target-access.md
|
|
5394
6650
|
*/
|
|
5395
6651
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
5396
6652
|
/**
|
|
5397
6653
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
5398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
5399
6655
|
* @deprecated
|
|
5400
6656
|
*/
|
|
5401
6657
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
5402
6658
|
/**
|
|
5403
6659
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
5404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-lonely-if.md
|
|
5405
6661
|
*/
|
|
5406
6662
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
6663
|
+
/**
|
|
6664
|
+
* Disallow mutating a loop iterable during iteration.
|
|
6665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
6666
|
+
*/
|
|
6667
|
+
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
5407
6668
|
/**
|
|
5408
6669
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
5409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
5410
6671
|
*/
|
|
5411
6672
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5412
6673
|
/**
|
|
5413
6674
|
* Disallow manually wrapped comments.
|
|
5414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
5415
6676
|
*/
|
|
5416
6677
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
6678
|
+
/**
|
|
6679
|
+
* Disallow checking a Map key before accessing a different key.
|
|
6680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-mismatched-map-key.md
|
|
6681
|
+
*/
|
|
6682
|
+
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
6683
|
+
/**
|
|
6684
|
+
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
6685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-misrefactored-assignment.md
|
|
6686
|
+
*/
|
|
6687
|
+
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
5417
6688
|
/**
|
|
5418
6689
|
* Disallow named usage of default import and export.
|
|
5419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-named-default.md
|
|
5420
6691
|
*/
|
|
5421
6692
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
6693
|
+
/**
|
|
6694
|
+
* Disallow negated array predicate calls.
|
|
6695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-negated-array-predicate.md
|
|
6696
|
+
*/
|
|
6697
|
+
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
6698
|
+
/**
|
|
6699
|
+
* Disallow negated comparisons.
|
|
6700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-negated-comparison.md
|
|
6701
|
+
*/
|
|
6702
|
+
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
5422
6703
|
/**
|
|
5423
6704
|
* Disallow negated conditions.
|
|
5424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-negated-condition.md
|
|
5425
6706
|
*/
|
|
5426
6707
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
5427
6708
|
/**
|
|
5428
6709
|
* Disallow negated expression in equality check.
|
|
5429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-negation-in-equality-check.md
|
|
5430
6711
|
*/
|
|
5431
6712
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
5432
6713
|
/**
|
|
5433
6714
|
* Disallow nested ternary expressions.
|
|
5434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-nested-ternary.md
|
|
5435
6716
|
*/
|
|
5436
6717
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5437
6718
|
/**
|
|
5438
6719
|
* Disallow `new Array()`.
|
|
5439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-new-array.md
|
|
5440
6721
|
*/
|
|
5441
6722
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
5442
6723
|
/**
|
|
5443
6724
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
5444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-new-buffer.md
|
|
5445
6726
|
*/
|
|
5446
6727
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
6728
|
+
/**
|
|
6729
|
+
* Disallow non-function values with function-style verb prefixes.
|
|
6730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
6731
|
+
*/
|
|
6732
|
+
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
6733
|
+
/**
|
|
6734
|
+
* Disallow non-standard properties on built-in objects.
|
|
6735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
6736
|
+
*/
|
|
6737
|
+
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
5447
6738
|
/**
|
|
5448
6739
|
* Disallow the use of the `null` literal.
|
|
5449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-null.md
|
|
5450
6741
|
*/
|
|
5451
6742
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
5452
6743
|
/**
|
|
5453
6744
|
* Disallow the use of objects as default parameters.
|
|
5454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-object-as-default-parameter.md
|
|
5455
6746
|
*/
|
|
5456
6747
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
6748
|
+
/**
|
|
6749
|
+
* Disallow `Object` methods with `Map` or `Set`.
|
|
6750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-object-methods-with-collections.md
|
|
6751
|
+
*/
|
|
6752
|
+
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
6753
|
+
/**
|
|
6754
|
+
* Disallow optional chaining on undeclared variables.
|
|
6755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
6756
|
+
*/
|
|
6757
|
+
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
5457
6758
|
/**
|
|
5458
6759
|
* Disallow `process.exit()`.
|
|
5459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-process-exit.md
|
|
5460
6761
|
*/
|
|
5461
6762
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
6763
|
+
/**
|
|
6764
|
+
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
6765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-redundant-comparison.md
|
|
6766
|
+
*/
|
|
6767
|
+
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
6768
|
+
/**
|
|
6769
|
+
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
6770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-return-array-push.md
|
|
6771
|
+
*/
|
|
6772
|
+
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
6773
|
+
/**
|
|
6774
|
+
* Disallow selector syntax in DOM names.
|
|
6775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-selector-as-dom-name.md
|
|
6776
|
+
*/
|
|
6777
|
+
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
5462
6778
|
/**
|
|
5463
6779
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
5464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
5465
6781
|
*/
|
|
5466
6782
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5467
6783
|
/**
|
|
5468
6784
|
* Disallow classes that only have static members.
|
|
5469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-static-only-class.md
|
|
5470
6786
|
*/
|
|
5471
6787
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
6788
|
+
/**
|
|
6789
|
+
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
6790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-subtraction-comparison.md
|
|
6791
|
+
*/
|
|
6792
|
+
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
5472
6793
|
/**
|
|
5473
6794
|
* Disallow `then` property.
|
|
5474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-thenable.md
|
|
5475
6796
|
*/
|
|
5476
6797
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
5477
6798
|
/**
|
|
5478
6799
|
* Disallow assigning `this` to a variable.
|
|
5479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-this-assignment.md
|
|
5480
6801
|
*/
|
|
5481
6802
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
5482
6803
|
/**
|
|
5483
6804
|
* Disallow `this` outside of classes.
|
|
5484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-this-outside-of-class.md
|
|
5485
6806
|
*/
|
|
5486
6807
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
6808
|
+
/**
|
|
6809
|
+
* Disallow assigning to top-level variables from inside functions.
|
|
6810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
6811
|
+
*/
|
|
6812
|
+
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
6813
|
+
/**
|
|
6814
|
+
* Disallow top-level side effects in exported modules.
|
|
6815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-top-level-side-effects.md
|
|
6816
|
+
*/
|
|
6817
|
+
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
5487
6818
|
/**
|
|
5488
6819
|
* Disallow comparing `undefined` using `typeof`.
|
|
5489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-typeof-undefined.md
|
|
5490
6821
|
*/
|
|
5491
6822
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
6823
|
+
/**
|
|
6824
|
+
* Disallow referencing methods without calling them.
|
|
6825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-uncalled-method.md
|
|
6826
|
+
*/
|
|
6827
|
+
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
6828
|
+
/**
|
|
6829
|
+
* Require class members to be declared.
|
|
6830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-undeclared-class-members.md
|
|
6831
|
+
*/
|
|
6832
|
+
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
5492
6833
|
/**
|
|
5493
6834
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
5494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
5495
6836
|
*/
|
|
5496
6837
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5497
6838
|
/**
|
|
5498
6839
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
5499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
5500
6841
|
*/
|
|
5501
6842
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
5502
6843
|
/**
|
|
5503
6844
|
* Disallow awaiting non-promise values.
|
|
5504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unnecessary-await.md
|
|
5505
6846
|
*/
|
|
5506
6847
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
6848
|
+
/**
|
|
6849
|
+
* Disallow unnecessary comparisons against boolean literals.
|
|
6850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
6851
|
+
*/
|
|
6852
|
+
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
6853
|
+
/**
|
|
6854
|
+
* Disallow unnecessary `globalThis` references.
|
|
6855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unnecessary-global-this.md
|
|
6856
|
+
*/
|
|
6857
|
+
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
5507
6858
|
/**
|
|
5508
6859
|
* Disallow unnecessary nested ternary expressions.
|
|
5509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
5510
6861
|
*/
|
|
5511
6862
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5512
6863
|
/**
|
|
5513
6864
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
5514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
5515
6866
|
*/
|
|
5516
6867
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
5517
6868
|
/**
|
|
5518
6869
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
5519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
5520
6871
|
*/
|
|
5521
6872
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
6873
|
+
/**
|
|
6874
|
+
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
6875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unnecessary-splice.md
|
|
6876
|
+
*/
|
|
6877
|
+
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
5522
6878
|
/**
|
|
5523
6879
|
* Disallow unreadable array destructuring.
|
|
5524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
6881
|
+
*/
|
|
6882
|
+
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
6883
|
+
/**
|
|
6884
|
+
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
6885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
5525
6886
|
*/
|
|
5526
|
-
'unicorn/no-unreadable-
|
|
6887
|
+
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
5527
6888
|
/**
|
|
5528
6889
|
* Disallow unreadable IIFEs.
|
|
5529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unreadable-iife.md
|
|
5530
6891
|
*/
|
|
5531
6892
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
6893
|
+
/**
|
|
6894
|
+
* Disallow unreadable `new` expressions.
|
|
6895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unreadable-new-expression.md
|
|
6896
|
+
*/
|
|
6897
|
+
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
6898
|
+
/**
|
|
6899
|
+
* Disallow unreadable object destructuring.
|
|
6900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
6901
|
+
*/
|
|
6902
|
+
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
6903
|
+
/**
|
|
6904
|
+
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
6905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
6906
|
+
*/
|
|
6907
|
+
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
6908
|
+
/**
|
|
6909
|
+
* Disallow unsafe DOM HTML APIs.
|
|
6910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unsafe-dom-html.md
|
|
6911
|
+
*/
|
|
6912
|
+
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
6913
|
+
/**
|
|
6914
|
+
* Disallow unsafe values as property keys.
|
|
6915
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unsafe-property-key.md
|
|
6916
|
+
*/
|
|
6917
|
+
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
6918
|
+
/**
|
|
6919
|
+
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
6920
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
6921
|
+
*/
|
|
6922
|
+
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
5532
6923
|
/**
|
|
5533
6924
|
* Disallow ignoring the return value of selected array methods.
|
|
5534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unused-array-method-return.md
|
|
5535
6926
|
*/
|
|
5536
6927
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
5537
6928
|
/**
|
|
5538
6929
|
* Disallow unused object properties.
|
|
5539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6930
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-unused-properties.md
|
|
6931
|
+
*/
|
|
6932
|
+
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
6933
|
+
/**
|
|
6934
|
+
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
6935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-boolean-cast.md
|
|
6936
|
+
*/
|
|
6937
|
+
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
6938
|
+
/**
|
|
6939
|
+
* Disallow useless type coercions of values that are already of the target type.
|
|
6940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-coercion.md
|
|
6941
|
+
*/
|
|
6942
|
+
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
6943
|
+
/**
|
|
6944
|
+
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
6945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-collection-argument.md
|
|
6946
|
+
*/
|
|
6947
|
+
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
6948
|
+
/**
|
|
6949
|
+
* Disallow useless compound assignments such as `x += 0`.
|
|
6950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-compound-assignment.md
|
|
6951
|
+
*/
|
|
6952
|
+
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
6953
|
+
/**
|
|
6954
|
+
* Disallow useless concatenation of literals.
|
|
6955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-concat.md
|
|
6956
|
+
*/
|
|
6957
|
+
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
6958
|
+
/**
|
|
6959
|
+
* Disallow useless `continue` statements.
|
|
6960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-continue.md
|
|
6961
|
+
*/
|
|
6962
|
+
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
6963
|
+
/**
|
|
6964
|
+
* Disallow unnecessary existence checks before deletion.
|
|
6965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-delete-check.md
|
|
5540
6966
|
*/
|
|
5541
|
-
'unicorn/no-
|
|
6967
|
+
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
5542
6968
|
/**
|
|
5543
|
-
* Disallow
|
|
5544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6969
|
+
* Disallow `else` after a statement that exits.
|
|
6970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-else.md
|
|
5545
6971
|
*/
|
|
5546
|
-
'unicorn/no-useless-
|
|
6972
|
+
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
5547
6973
|
/**
|
|
5548
6974
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
5549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
5550
6976
|
*/
|
|
5551
6977
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
5552
6978
|
/**
|
|
5553
6979
|
* Disallow useless fallback when spreading in object literals.
|
|
5554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
5555
6981
|
*/
|
|
5556
6982
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
5557
6983
|
/**
|
|
5558
6984
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
5559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6985
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
5560
6986
|
*/
|
|
5561
6987
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
5562
6988
|
/**
|
|
5563
6989
|
* Disallow useless array length check.
|
|
5564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6990
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-length-check.md
|
|
5565
6991
|
*/
|
|
5566
6992
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
6993
|
+
/**
|
|
6994
|
+
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
6995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-logical-operand.md
|
|
6996
|
+
*/
|
|
6997
|
+
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
6998
|
+
/**
|
|
6999
|
+
* Disallow useless overrides of class methods.
|
|
7000
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-override.md
|
|
7001
|
+
*/
|
|
7002
|
+
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
5567
7003
|
/**
|
|
5568
7004
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7005
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
5570
7006
|
*/
|
|
5571
7007
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
7008
|
+
/**
|
|
7009
|
+
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
7010
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-recursion.md
|
|
7011
|
+
*/
|
|
7012
|
+
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
5572
7013
|
/**
|
|
5573
7014
|
* Disallow unnecessary spread.
|
|
5574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7015
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-spread.md
|
|
5575
7016
|
*/
|
|
5576
7017
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
5577
7018
|
/**
|
|
5578
7019
|
* Disallow useless case in switch statements.
|
|
5579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7020
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-switch-case.md
|
|
5580
7021
|
*/
|
|
5581
7022
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
7023
|
+
/**
|
|
7024
|
+
* Disallow useless template literal expressions.
|
|
7025
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-template-literals.md
|
|
7026
|
+
*/
|
|
7027
|
+
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
5582
7028
|
/**
|
|
5583
7029
|
* Disallow useless `undefined`.
|
|
5584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7030
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-useless-undefined.md
|
|
5585
7031
|
*/
|
|
5586
7032
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
7033
|
+
/**
|
|
7034
|
+
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
7035
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
7036
|
+
*/
|
|
7037
|
+
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
5587
7038
|
/**
|
|
5588
7039
|
* Disallow number literals with zero fractions or dangling dots.
|
|
5589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7040
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/no-zero-fractions.md
|
|
5590
7041
|
*/
|
|
5591
7042
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
5592
7043
|
/**
|
|
5593
7044
|
* Enforce proper case for numeric literals.
|
|
5594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7045
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/number-literal-case.md
|
|
5595
7046
|
*/
|
|
5596
7047
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
5597
7048
|
/**
|
|
5598
7049
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7050
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/numeric-separators-style.md
|
|
5600
7051
|
*/
|
|
5601
7052
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
7053
|
+
/**
|
|
7054
|
+
* Require assignment operator shorthand where possible.
|
|
7055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/operator-assignment.md
|
|
7056
|
+
*/
|
|
7057
|
+
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
5602
7058
|
/**
|
|
5603
7059
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7060
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-add-event-listener.md
|
|
5605
7061
|
*/
|
|
5606
7062
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
7063
|
+
/**
|
|
7064
|
+
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
7065
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
7066
|
+
*/
|
|
7067
|
+
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
5607
7068
|
/**
|
|
5608
7069
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7070
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-find.md
|
|
5610
7071
|
*/
|
|
5611
7072
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
5612
7073
|
/**
|
|
5613
7074
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7075
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-flat.md
|
|
5615
7076
|
*/
|
|
5616
7077
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
5617
7078
|
/**
|
|
5618
|
-
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
5619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7079
|
+
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
7080
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-flat-map.md
|
|
5620
7081
|
*/
|
|
5621
7082
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7083
|
+
/**
|
|
7084
|
+
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
7085
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-from-async.md
|
|
7086
|
+
*/
|
|
7087
|
+
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
7088
|
+
/**
|
|
7089
|
+
* Prefer using the `Array.from()` mapping function argument.
|
|
7090
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-from-map.md
|
|
7091
|
+
*/
|
|
7092
|
+
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
5622
7093
|
/**
|
|
5623
7094
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7095
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-index-of.md
|
|
5625
7096
|
*/
|
|
5626
7097
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
7098
|
+
/**
|
|
7099
|
+
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
7100
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
7101
|
+
*/
|
|
7102
|
+
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
5627
7103
|
/**
|
|
5628
7104
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
5629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7105
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-last-methods.md
|
|
5630
7106
|
*/
|
|
5631
7107
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
7108
|
+
/**
|
|
7109
|
+
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
7110
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-slice.md
|
|
7111
|
+
*/
|
|
7112
|
+
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
5632
7113
|
/**
|
|
5633
7114
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7115
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-array-some.md
|
|
5635
7116
|
*/
|
|
5636
7117
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
5637
7118
|
/**
|
|
5638
7119
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7120
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-at.md
|
|
5640
7121
|
*/
|
|
5641
7122
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
7123
|
+
/**
|
|
7124
|
+
* Prefer `await` over promise chaining.
|
|
7125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-await.md
|
|
7126
|
+
*/
|
|
7127
|
+
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
5642
7128
|
/**
|
|
5643
7129
|
* Prefer `BigInt` literals over the constructor.
|
|
5644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-bigint-literals.md
|
|
5645
7131
|
*/
|
|
5646
7132
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
5647
7133
|
/**
|
|
5648
7134
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
5649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7135
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
5650
7136
|
*/
|
|
5651
7137
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
7138
|
+
/**
|
|
7139
|
+
* Prefer directly returning boolean expressions over `if` statements.
|
|
7140
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-boolean-return.md
|
|
7141
|
+
*/
|
|
7142
|
+
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
5652
7143
|
/**
|
|
5653
7144
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
5654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7145
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-class-fields.md
|
|
5655
7146
|
*/
|
|
5656
7147
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
5657
7148
|
/**
|
|
5658
7149
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
5659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7150
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-classlist-toggle.md
|
|
5660
7151
|
*/
|
|
5661
7152
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
5662
7153
|
/**
|
|
5663
7154
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
5664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7155
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-code-point.md
|
|
5665
7156
|
*/
|
|
5666
7157
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
7158
|
+
/**
|
|
7159
|
+
* Prefer early continues over whole-loop conditional wrapping.
|
|
7160
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-continue.md
|
|
7161
|
+
*/
|
|
7162
|
+
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
5667
7163
|
/**
|
|
5668
7164
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
5669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-date-now.md
|
|
5670
7166
|
*/
|
|
5671
7167
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
5672
7168
|
/**
|
|
5673
7169
|
* Prefer default parameters over reassignment.
|
|
5674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-default-parameters.md
|
|
5675
7171
|
*/
|
|
5676
7172
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
7173
|
+
/**
|
|
7174
|
+
* Prefer direct iteration over default iterator method calls.
|
|
7175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-direct-iteration.md
|
|
7176
|
+
*/
|
|
7177
|
+
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
7178
|
+
/**
|
|
7179
|
+
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
7180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-dispose.md
|
|
7181
|
+
*/
|
|
7182
|
+
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
5677
7183
|
/**
|
|
5678
7184
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
5679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-dom-node-append.md
|
|
5680
7186
|
*/
|
|
5681
7187
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
5682
7188
|
/**
|
|
5683
7189
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
5684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
5685
7191
|
* @deprecated
|
|
5686
7192
|
*/
|
|
5687
7193
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
7194
|
+
/**
|
|
7195
|
+
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
7196
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
7197
|
+
*/
|
|
7198
|
+
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<[]>;
|
|
5688
7199
|
/**
|
|
5689
7200
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
5690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7201
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-dom-node-remove.md
|
|
5691
7202
|
*/
|
|
5692
7203
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
5693
7204
|
/**
|
|
5694
7205
|
* Prefer `.textContent` over `.innerText`.
|
|
5695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7206
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
5696
7207
|
*/
|
|
5697
7208
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
7209
|
+
/**
|
|
7210
|
+
* Prefer early returns over full-function conditional wrapping.
|
|
7211
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-early-return.md
|
|
7212
|
+
*/
|
|
7213
|
+
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
7214
|
+
/**
|
|
7215
|
+
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
7216
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-else-if.md
|
|
7217
|
+
*/
|
|
7218
|
+
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
5698
7219
|
/**
|
|
5699
7220
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
5700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-event-target.md
|
|
5701
7222
|
*/
|
|
5702
7223
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
5703
7224
|
/**
|
|
5704
7225
|
* Prefer `export…from` when re-exporting.
|
|
5705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7226
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-export-from.md
|
|
5706
7227
|
*/
|
|
5707
7228
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
7229
|
+
/**
|
|
7230
|
+
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
7231
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
7232
|
+
*/
|
|
7233
|
+
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5708
7234
|
/**
|
|
5709
7235
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
5710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7236
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
5711
7237
|
*/
|
|
5712
7238
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
7239
|
+
/**
|
|
7240
|
+
* Prefer global numeric constants over `Number` static properties.
|
|
7241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-global-number-constants.md
|
|
7242
|
+
*/
|
|
7243
|
+
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
5713
7244
|
/**
|
|
5714
7245
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
5715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-global-this.md
|
|
5716
7247
|
*/
|
|
5717
7248
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
7249
|
+
/**
|
|
7250
|
+
* Prefer `.has()` when checking existence.
|
|
7251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-has-check.md
|
|
7252
|
+
*/
|
|
7253
|
+
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
7254
|
+
/**
|
|
7255
|
+
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
7256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
7257
|
+
*/
|
|
7258
|
+
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
5718
7259
|
/**
|
|
5719
7260
|
* Prefer HTTPS over HTTP.
|
|
5720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-https.md
|
|
5721
7262
|
*/
|
|
5722
7263
|
'unicorn/prefer-https'?: Linter.RuleEntry<[]>;
|
|
7264
|
+
/**
|
|
7265
|
+
* Prefer identifiers over string literals in import and export specifiers.
|
|
7266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
7267
|
+
*/
|
|
7268
|
+
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
5723
7269
|
/**
|
|
5724
7270
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
5725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-import-meta-properties.md
|
|
5726
7272
|
*/
|
|
5727
7273
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
5728
7274
|
/**
|
|
5729
7275
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
5730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-includes.md
|
|
5731
7277
|
*/
|
|
5732
7278
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
5733
7279
|
/**
|
|
5734
7280
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
5735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
5736
7282
|
*/
|
|
5737
7283
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
7284
|
+
/**
|
|
7285
|
+
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
7286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
7287
|
+
*/
|
|
7288
|
+
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
5738
7289
|
/**
|
|
5739
7290
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
5740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-iterator-concat.md
|
|
5741
7292
|
*/
|
|
5742
7293
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
7294
|
+
/**
|
|
7295
|
+
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
7296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-iterator-to-array.md
|
|
7297
|
+
*/
|
|
7298
|
+
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
5743
7299
|
/**
|
|
5744
7300
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
5745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
5746
7302
|
*/
|
|
5747
7303
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
5748
7304
|
/**
|
|
5749
7305
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
5750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
5751
7307
|
* @deprecated
|
|
5752
7308
|
*/
|
|
5753
7309
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
5754
7310
|
/**
|
|
5755
7311
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
5756
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7312
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
5757
7313
|
*/
|
|
5758
7314
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
7315
|
+
/**
|
|
7316
|
+
* Prefer `location.assign()` over assigning to `location.href`.
|
|
7317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-location-assign.md
|
|
7318
|
+
*/
|
|
7319
|
+
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
5759
7320
|
/**
|
|
5760
7321
|
* Prefer using a logical operator over a ternary.
|
|
5761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7322
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
5762
7323
|
*/
|
|
5763
7324
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
7325
|
+
/**
|
|
7326
|
+
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
7327
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-map-from-entries.md
|
|
7328
|
+
*/
|
|
7329
|
+
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
5764
7330
|
/**
|
|
5765
7331
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
5766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7332
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-math-abs.md
|
|
5767
7333
|
*/
|
|
5768
7334
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
7335
|
+
/**
|
|
7336
|
+
* Prefer `Math` constants over their approximate numeric values.
|
|
7337
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-math-constants.md
|
|
7338
|
+
*/
|
|
7339
|
+
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
5769
7340
|
/**
|
|
5770
7341
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
5771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7342
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-math-min-max.md
|
|
5772
7343
|
*/
|
|
5773
7344
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5774
7345
|
/**
|
|
5775
|
-
*
|
|
5776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7346
|
+
* Prefer `Math.trunc()` for truncating numbers.
|
|
7347
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-math-trunc.md
|
|
5777
7348
|
*/
|
|
5778
7349
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
5779
7350
|
/**
|
|
5780
|
-
* Prefer
|
|
5781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7351
|
+
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
7352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-minimal-ternary.md
|
|
7353
|
+
*/
|
|
7354
|
+
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
7355
|
+
/**
|
|
7356
|
+
* Prefer modern DOM APIs.
|
|
7357
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
5782
7358
|
*/
|
|
5783
7359
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
5784
7360
|
/**
|
|
5785
7361
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
5786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-modern-math-apis.md
|
|
5787
7363
|
*/
|
|
5788
7364
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
5789
7365
|
/**
|
|
5790
7366
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
5791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7367
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-module.md
|
|
5792
7368
|
*/
|
|
5793
7369
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
5794
7370
|
/**
|
|
5795
7371
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
5796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7372
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
5797
7373
|
*/
|
|
5798
7374
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
5799
7375
|
/**
|
|
5800
7376
|
* Prefer negative index over `.length - index` when possible.
|
|
5801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7377
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-negative-index.md
|
|
5802
7378
|
*/
|
|
5803
7379
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
5804
7380
|
/**
|
|
5805
7381
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
5806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-node-protocol.md
|
|
5807
7383
|
*/
|
|
5808
7384
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
5809
7385
|
/**
|
|
5810
|
-
* Prefer `Number`
|
|
5811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7386
|
+
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
7387
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-number-coercion.md
|
|
7388
|
+
*/
|
|
7389
|
+
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
7390
|
+
/**
|
|
7391
|
+
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
7392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
7393
|
+
*/
|
|
7394
|
+
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
7395
|
+
/**
|
|
7396
|
+
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
7397
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-number-properties.md
|
|
5812
7398
|
*/
|
|
5813
7399
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
7400
|
+
/**
|
|
7401
|
+
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
7402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-object-define-properties.md
|
|
7403
|
+
*/
|
|
7404
|
+
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
7405
|
+
/**
|
|
7406
|
+
* Prefer object destructuring defaults over default object literals with spread.
|
|
7407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
7408
|
+
*/
|
|
7409
|
+
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
5814
7410
|
/**
|
|
5815
7411
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
5816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-object-from-entries.md
|
|
5817
7413
|
*/
|
|
5818
7414
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
7415
|
+
/**
|
|
7416
|
+
* Prefer the most specific `Object` iterable method.
|
|
7417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
7418
|
+
*/
|
|
7419
|
+
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
5819
7420
|
/**
|
|
5820
7421
|
* Prefer omitting the `catch` binding parameter.
|
|
5821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
5822
7423
|
*/
|
|
5823
7424
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
7425
|
+
/**
|
|
7426
|
+
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
7427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-path2d.md
|
|
7428
|
+
*/
|
|
7429
|
+
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
7430
|
+
/**
|
|
7431
|
+
* Prefer private class fields over the underscore-prefix convention.
|
|
7432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-private-class-fields.md
|
|
7433
|
+
*/
|
|
7434
|
+
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
7435
|
+
/**
|
|
7436
|
+
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
7437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
7438
|
+
*/
|
|
7439
|
+
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
5824
7440
|
/**
|
|
5825
7441
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
5826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-prototype-methods.md
|
|
5827
7443
|
*/
|
|
5828
7444
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
5829
7445
|
/**
|
|
5830
7446
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
5831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-query-selector.md
|
|
5832
7448
|
*/
|
|
5833
7449
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
5834
7450
|
/**
|
|
5835
7451
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
5836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-queue-microtask.md
|
|
5837
7453
|
*/
|
|
5838
7454
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
5839
7455
|
/**
|
|
5840
7456
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
5841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-reflect-apply.md
|
|
5842
7458
|
*/
|
|
5843
7459
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
5844
7460
|
/**
|
|
5845
|
-
* Prefer `RegExp
|
|
5846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7461
|
+
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
7462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-regexp-escape.md
|
|
7463
|
+
*/
|
|
7464
|
+
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
7465
|
+
/**
|
|
7466
|
+
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
7467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-regexp-test.md
|
|
5847
7468
|
*/
|
|
5848
7469
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
5849
7470
|
/**
|
|
5850
7471
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
5851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-response-static-json.md
|
|
5852
7473
|
*/
|
|
5853
7474
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
7475
|
+
/**
|
|
7476
|
+
* Prefer `:scope` when using element query selector methods.
|
|
7477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-scoped-selector.md
|
|
7478
|
+
*/
|
|
7479
|
+
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
5854
7480
|
/**
|
|
5855
7481
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
5856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-set-has.md
|
|
5857
7483
|
*/
|
|
5858
7484
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
5859
7485
|
/**
|
|
5860
7486
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
5861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-set-size.md
|
|
5862
7488
|
*/
|
|
5863
7489
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
7490
|
+
/**
|
|
7491
|
+
* Prefer arrow function properties over methods with a single return.
|
|
7492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-short-arrow-method.md
|
|
7493
|
+
*/
|
|
7494
|
+
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<[]>;
|
|
5864
7495
|
/**
|
|
5865
7496
|
* Prefer simple conditions first in logical expressions.
|
|
5866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-simple-condition-first.md
|
|
5867
7498
|
*/
|
|
5868
7499
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
7500
|
+
/**
|
|
7501
|
+
* Prefer a simple comparison function for `Array#sort()`.
|
|
7502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
7503
|
+
*/
|
|
7504
|
+
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7505
|
+
/**
|
|
7506
|
+
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
7507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-single-array-predicate.md
|
|
7508
|
+
*/
|
|
7509
|
+
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
5869
7510
|
/**
|
|
5870
7511
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
5871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-single-call.md
|
|
5872
7513
|
*/
|
|
5873
7514
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
7515
|
+
/**
|
|
7516
|
+
* Prefer a single object destructuring declaration per local const source.
|
|
7517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
7518
|
+
*/
|
|
7519
|
+
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
7520
|
+
/**
|
|
7521
|
+
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
7522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-single-replace.md
|
|
7523
|
+
*/
|
|
7524
|
+
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
7525
|
+
/**
|
|
7526
|
+
* Prefer declaring variables in the smallest possible scope.
|
|
7527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-smaller-scope.md
|
|
7528
|
+
*/
|
|
7529
|
+
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
5874
7530
|
/**
|
|
5875
7531
|
* Prefer `String#split()` with a limit.
|
|
5876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-split-limit.md
|
|
5877
7533
|
*/
|
|
5878
7534
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
5879
7535
|
/**
|
|
5880
|
-
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()
|
|
5881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7536
|
+
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
7537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-spread.md
|
|
5882
7538
|
*/
|
|
5883
7539
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
5884
7540
|
/**
|
|
5885
7541
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
5886
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-string-match-all.md
|
|
5887
7543
|
*/
|
|
5888
7544
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
5889
7545
|
/**
|
|
5890
7546
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
5891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
5892
7548
|
*/
|
|
5893
7549
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
5894
7550
|
/**
|
|
5895
7551
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
5896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-string-raw.md
|
|
5897
7553
|
*/
|
|
5898
7554
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
5899
7555
|
/**
|
|
5900
7556
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
5901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-string-repeat.md
|
|
5902
7558
|
*/
|
|
5903
7559
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
5904
7560
|
/**
|
|
5905
7561
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
5906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-string-replace-all.md
|
|
5907
7563
|
*/
|
|
5908
7564
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
5909
7565
|
/**
|
|
5910
7566
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
5911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-string-slice.md
|
|
5912
7568
|
*/
|
|
5913
7569
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
5914
7570
|
/**
|
|
5915
|
-
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
5916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7571
|
+
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()` and `String#indexOf() === 0`.
|
|
7572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
5917
7573
|
*/
|
|
5918
7574
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
5919
7575
|
/**
|
|
5920
7576
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
5921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
5922
7578
|
*/
|
|
5923
7579
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
5924
7580
|
/**
|
|
5925
7581
|
* Prefer using `structuredClone` to create a deep clone.
|
|
5926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-structured-clone.md
|
|
5927
7583
|
*/
|
|
5928
7584
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
5929
7585
|
/**
|
|
5930
7586
|
* Prefer `switch` over multiple `else-if`.
|
|
5931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-switch.md
|
|
5932
7588
|
*/
|
|
5933
7589
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
5934
7590
|
/**
|
|
5935
|
-
* Prefer
|
|
5936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7591
|
+
* Prefer `Temporal` over `Date`.
|
|
7592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-temporal.md
|
|
7593
|
+
*/
|
|
7594
|
+
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
7595
|
+
/**
|
|
7596
|
+
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
7597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-ternary.md
|
|
5937
7598
|
*/
|
|
5938
7599
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
5939
7600
|
/**
|
|
5940
7601
|
* Prefer top-level await over top-level promises and async function calls.
|
|
5941
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-top-level-await.md
|
|
5942
7603
|
*/
|
|
5943
7604
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
5944
7605
|
/**
|
|
5945
7606
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
5946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-type-error.md
|
|
5947
7608
|
*/
|
|
5948
7609
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
5949
7610
|
/**
|
|
5950
|
-
*
|
|
5951
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7611
|
+
* Require type literals to be last in union types.
|
|
7612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-type-literal-last.md
|
|
7613
|
+
*/
|
|
7614
|
+
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
7615
|
+
/**
|
|
7616
|
+
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
7617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-uint8array-base64.md
|
|
7618
|
+
*/
|
|
7619
|
+
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
7620
|
+
/**
|
|
7621
|
+
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
7622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-unary-minus.md
|
|
7623
|
+
*/
|
|
7624
|
+
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
7625
|
+
/**
|
|
7626
|
+
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
7627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
7628
|
+
*/
|
|
7629
|
+
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
7630
|
+
/**
|
|
7631
|
+
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
7632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-url-can-parse.md
|
|
7633
|
+
*/
|
|
7634
|
+
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
7635
|
+
/**
|
|
7636
|
+
* Prefer `URL#href` over stringifying a `URL`.
|
|
7637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-url-href.md
|
|
7638
|
+
*/
|
|
7639
|
+
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
7640
|
+
/**
|
|
7641
|
+
* Prefer putting the condition in the while statement.
|
|
7642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/prefer-while-loop-condition.md
|
|
7643
|
+
*/
|
|
7644
|
+
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
7645
|
+
/**
|
|
7646
|
+
* Renamed to `unicorn/name-replacements`.
|
|
7647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
7648
|
+
* @deprecated
|
|
5952
7649
|
*/
|
|
5953
|
-
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<
|
|
7650
|
+
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
5954
7651
|
/**
|
|
5955
7652
|
* Enforce consistent relative URL style.
|
|
5956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/relative-url-style.md
|
|
5957
7654
|
*/
|
|
5958
7655
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
5959
7656
|
/**
|
|
5960
7657
|
* Enforce using the separator argument with `Array#join()`.
|
|
5961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/require-array-join-separator.md
|
|
5962
7659
|
*/
|
|
5963
7660
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
7661
|
+
/**
|
|
7662
|
+
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
7663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/require-array-sort-compare.md
|
|
7664
|
+
*/
|
|
7665
|
+
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
5964
7666
|
/**
|
|
5965
7667
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
5966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/require-css-escape.md
|
|
5967
7669
|
*/
|
|
5968
7670
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
5969
7671
|
/**
|
|
5970
7672
|
* Require non-empty module attributes for imports and exports
|
|
5971
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/require-module-attributes.md
|
|
5972
7674
|
*/
|
|
5973
7675
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
5974
7676
|
/**
|
|
5975
7677
|
* Require non-empty specifier list in import and export statements.
|
|
5976
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/require-module-specifiers.md
|
|
5977
7679
|
*/
|
|
5978
7680
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
5979
7681
|
/**
|
|
5980
7682
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
5981
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
5982
7684
|
*/
|
|
5983
7685
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
5984
7686
|
/**
|
|
5985
7687
|
* Require passive event listeners for high-frequency events.
|
|
5986
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/require-passive-events.md
|
|
5987
7689
|
*/
|
|
5988
7690
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
5989
7691
|
/**
|
|
5990
7692
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
5991
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/require-post-message-target-origin.md
|
|
5992
7694
|
*/
|
|
5993
7695
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
7696
|
+
/**
|
|
7697
|
+
* Require boolean-returning Proxy traps to return booleans.
|
|
7698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
7699
|
+
*/
|
|
7700
|
+
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
5994
7701
|
/**
|
|
5995
7702
|
* Enforce better string content.
|
|
5996
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/string-content.md
|
|
5997
7704
|
*/
|
|
5998
7705
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
5999
7706
|
/**
|
|
6000
7707
|
* Enforce consistent brace style for `case` clauses.
|
|
6001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/switch-case-braces.md
|
|
6002
7709
|
*/
|
|
6003
7710
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
6004
7711
|
/**
|
|
6005
7712
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
6006
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/switch-case-break-position.md
|
|
6007
7714
|
*/
|
|
6008
7715
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
6009
7716
|
/**
|
|
6010
7717
|
* Fix whitespace-insensitive template indentation.
|
|
6011
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/template-indent.md
|
|
6012
7719
|
*/
|
|
6013
7720
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
6014
7721
|
/**
|
|
6015
7722
|
* Enforce consistent case for text encoding identifiers.
|
|
6016
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/text-encoding-identifier-case.md
|
|
6017
7724
|
*/
|
|
6018
7725
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
6019
7726
|
/**
|
|
6020
7727
|
* Require `new` when creating an error.
|
|
6021
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/throw-new-error.md
|
|
6022
7729
|
*/
|
|
6023
7730
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
6024
7731
|
/**
|
|
6025
7732
|
* Limit the complexity of `try` blocks.
|
|
6026
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v68.0.0/docs/rules/try-complexity.md
|
|
6027
7734
|
*/
|
|
6028
7735
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
6029
7736
|
/**
|
|
@@ -8100,7 +9807,49 @@ interface ESLintSchema {
|
|
|
8100
9807
|
'zod/schema-error-property-style'?: Linter.RuleEntry<ZodSchemaErrorPropertyStyle>;
|
|
8101
9808
|
}
|
|
8102
9809
|
/* ======= Declarations ======= */
|
|
8103
|
-
// ----- @
|
|
9810
|
+
// ----- @eslint-react/dom-no-unknown-property -----
|
|
9811
|
+
type EslintReactDomNoUnknownProperty = [] | [{
|
|
9812
|
+
ignore?: string[];
|
|
9813
|
+
requireDataLowercase?: boolean;
|
|
9814
|
+
}]; // ----- @eslint-react/exhaustive-deps -----
|
|
9815
|
+
type EslintReactExhaustiveDeps = [] | [{
|
|
9816
|
+
additionalHooks?: string;
|
|
9817
|
+
enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean;
|
|
9818
|
+
experimental_autoDependenciesHooks?: string[];
|
|
9819
|
+
requireExplicitEffectDeps?: boolean;
|
|
9820
|
+
}]; // ----- @eslint-react/jsx-no-useless-fragment -----
|
|
9821
|
+
type EslintReactJsxNoUselessFragment = [] | [{
|
|
9822
|
+
allowEmptyFragment?: boolean;
|
|
9823
|
+
allowExpressions?: boolean;
|
|
9824
|
+
}]; // ----- @eslint-react/no-unstable-default-props -----
|
|
9825
|
+
type EslintReactNoUnstableDefaultProps = [] | [{
|
|
9826
|
+
safeDefaultProps?: string[];
|
|
9827
|
+
}]; // ----- @eslint-react/rules-of-hooks -----
|
|
9828
|
+
type EslintReactRulesOfHooks = [] | [{
|
|
9829
|
+
additionalHooks?: string;
|
|
9830
|
+
}]; // ----- @eslint-react/use-state -----
|
|
9831
|
+
type EslintReactUseState = [] | [{
|
|
9832
|
+
enforceAssignment?: boolean;
|
|
9833
|
+
enforceLazyInitialization?: boolean;
|
|
9834
|
+
enforceSetterName?: boolean;
|
|
9835
|
+
}]; // ----- @eslint-react/x-exhaustive-deps -----
|
|
9836
|
+
type EslintReactXExhaustiveDeps = [] | [{
|
|
9837
|
+
additionalHooks?: string;
|
|
9838
|
+
enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean;
|
|
9839
|
+
experimental_autoDependenciesHooks?: string[];
|
|
9840
|
+
requireExplicitEffectDeps?: boolean;
|
|
9841
|
+
}]; // ----- @eslint-react/x-no-unstable-default-props -----
|
|
9842
|
+
type EslintReactXNoUnstableDefaultProps = [] | [{
|
|
9843
|
+
safeDefaultProps?: string[];
|
|
9844
|
+
}]; // ----- @eslint-react/x-rules-of-hooks -----
|
|
9845
|
+
type EslintReactXRulesOfHooks = [] | [{
|
|
9846
|
+
additionalHooks?: string;
|
|
9847
|
+
}]; // ----- @eslint-react/x-use-state -----
|
|
9848
|
+
type EslintReactXUseState = [] | [{
|
|
9849
|
+
enforceAssignment?: boolean;
|
|
9850
|
+
enforceLazyInitialization?: boolean;
|
|
9851
|
+
enforceSetterName?: boolean;
|
|
9852
|
+
}]; // ----- @html-eslint/attrs-newline -----
|
|
8104
9853
|
type HtmlEslintAttrsNewline = [] | [{
|
|
8105
9854
|
closeStyle?: ("newline" | "sameline");
|
|
8106
9855
|
ifAttrsMoreThan?: number;
|
|
@@ -8178,6 +9927,22 @@ type HtmlEslintNoWhitespaceOnlyChildren = [] | [{
|
|
|
8178
9927
|
}]; // ----- @html-eslint/quotes -----
|
|
8179
9928
|
type HtmlEslintQuotes = [] | [("single" | "double")] | [("single" | "double"), {
|
|
8180
9929
|
enforceTemplatedAttrValue?: boolean;
|
|
9930
|
+
}]; // ----- @html-eslint/react/classname-spacing -----
|
|
9931
|
+
type HtmlEslintReactClassnameSpacing = [] | [{
|
|
9932
|
+
callees?: string[];
|
|
9933
|
+
}]; // ----- @html-eslint/react/no-duplicate-classname -----
|
|
9934
|
+
type HtmlEslintReactNoDuplicateClassname = [] | [{
|
|
9935
|
+
callees?: string[];
|
|
9936
|
+
}]; // ----- @html-eslint/react/no-invalid-attr-value -----
|
|
9937
|
+
type HtmlEslintReactNoInvalidAttrValue = [] | [{
|
|
9938
|
+
allow?: {
|
|
9939
|
+
tag: string;
|
|
9940
|
+
attr: string;
|
|
9941
|
+
valuePattern?: string;
|
|
9942
|
+
}[];
|
|
9943
|
+
}]; // ----- @html-eslint/react/use-baseline -----
|
|
9944
|
+
type HtmlEslintReactUseBaseline = [] | [{
|
|
9945
|
+
available?: (("widely" | "newly") | number);
|
|
8181
9946
|
}]; // ----- @html-eslint/require-attrs -----
|
|
8182
9947
|
type HtmlEslintRequireAttrs = {
|
|
8183
9948
|
tag: string;
|
|
@@ -10473,6 +12238,26 @@ type AstroSortAttributes = [] | [{
|
|
|
10473
12238
|
type?: ("alphabetical" | "line-length");
|
|
10474
12239
|
ignoreCase?: boolean;
|
|
10475
12240
|
order?: ("asc" | "desc");
|
|
12241
|
+
}]; // ----- baseline-js/use-baseline -----
|
|
12242
|
+
type BaselineJsUseBaseline = [] | [{
|
|
12243
|
+
baseline?: (("widely" | "newly") | number);
|
|
12244
|
+
available?: (("widely" | "newly") | number);
|
|
12245
|
+
ignoreFeatures?: string[];
|
|
12246
|
+
ignoreNodeTypes?: string[];
|
|
12247
|
+
includeWebApis?: (boolean | {
|
|
12248
|
+
preset?: ("auto" | "safe" | "type-aware" | "heuristic");
|
|
12249
|
+
useTypes?: ("off" | "auto" | "require");
|
|
12250
|
+
heuristics?: ("off" | "conservative" | "aggressive");
|
|
12251
|
+
only?: string[];
|
|
12252
|
+
ignore?: string[];
|
|
12253
|
+
});
|
|
12254
|
+
includeJsBuiltins?: (boolean | {
|
|
12255
|
+
preset?: ("auto" | "safe" | "type-aware" | "heuristic");
|
|
12256
|
+
useTypes?: ("off" | "auto" | "require");
|
|
12257
|
+
heuristics?: ("off" | "conservative" | "aggressive");
|
|
12258
|
+
only?: string[];
|
|
12259
|
+
ignore?: string[];
|
|
12260
|
+
});
|
|
10476
12261
|
}]; // ----- better-tailwindcss/enforce-canonical-classes -----
|
|
10477
12262
|
type BetterTailwindcssEnforceCanonicalClasses = [] | [{
|
|
10478
12263
|
selectors?: ({
|
|
@@ -13837,7 +15622,7 @@ type ImportXNoAbsolutePath = [] | [{
|
|
|
13837
15622
|
commonjs?: boolean;
|
|
13838
15623
|
amd?: boolean;
|
|
13839
15624
|
esmodule?: boolean;
|
|
13840
|
-
ignore?: [
|
|
15625
|
+
ignore?: [unknown, ...(unknown)[]];
|
|
13841
15626
|
}]; // ----- import-x/no-anonymous-default-export -----
|
|
13842
15627
|
type ImportXNoAnonymousDefaultExport = [] | [{
|
|
13843
15628
|
allowArray?: boolean;
|
|
@@ -13858,7 +15643,7 @@ type ImportXNoCycle = [] | [{
|
|
|
13858
15643
|
commonjs?: boolean;
|
|
13859
15644
|
amd?: boolean;
|
|
13860
15645
|
esmodule?: boolean;
|
|
13861
|
-
ignore?: [
|
|
15646
|
+
ignore?: [unknown, ...(unknown)[]];
|
|
13862
15647
|
maxDepth?: (number | "∞");
|
|
13863
15648
|
ignoreExternal?: boolean;
|
|
13864
15649
|
allowUnsafeDynamicCyclicDependency?: boolean;
|
|
@@ -13899,13 +15684,13 @@ type ImportXNoRelativePackages = [] | [{
|
|
|
13899
15684
|
commonjs?: boolean;
|
|
13900
15685
|
amd?: boolean;
|
|
13901
15686
|
esmodule?: boolean;
|
|
13902
|
-
ignore?: [
|
|
15687
|
+
ignore?: [unknown, ...(unknown)[]];
|
|
13903
15688
|
}]; // ----- import-x/no-relative-parent-imports -----
|
|
13904
15689
|
type ImportXNoRelativeParentImports = [] | [{
|
|
13905
15690
|
commonjs?: boolean;
|
|
13906
15691
|
amd?: boolean;
|
|
13907
15692
|
esmodule?: boolean;
|
|
13908
|
-
ignore?: [
|
|
15693
|
+
ignore?: [unknown, ...(unknown)[]];
|
|
13909
15694
|
}]; // ----- import-x/no-rename-default -----
|
|
13910
15695
|
type ImportXNoRenameDefault = [] | [{
|
|
13911
15696
|
commonjs?: boolean;
|
|
@@ -13935,7 +15720,7 @@ type ImportXNoUnresolved = [] | [{
|
|
|
13935
15720
|
commonjs?: boolean;
|
|
13936
15721
|
amd?: boolean;
|
|
13937
15722
|
esmodule?: boolean;
|
|
13938
|
-
ignore?: [
|
|
15723
|
+
ignore?: [unknown, ...(unknown)[]];
|
|
13939
15724
|
caseSensitive?: boolean;
|
|
13940
15725
|
caseSensitiveStrict?: boolean;
|
|
13941
15726
|
}]; // ----- import-x/no-unused-modules -----
|
|
@@ -14048,7 +15833,171 @@ type IndentLegacy = [] | [("tab" | number)] | [("tab" | number), {
|
|
|
14048
15833
|
}]; // ----- init-declarations -----
|
|
14049
15834
|
type InitDeclarations = ([] | ["always"] | [] | ["never"] | ["never", {
|
|
14050
15835
|
ignoreForLoopInit?: boolean;
|
|
14051
|
-
}]); // ----- jsx-
|
|
15836
|
+
}]); // ----- jsx-a11y/accessible-emoji -----
|
|
15837
|
+
type JsxA11YAccessibleEmoji = [] | [{
|
|
15838
|
+
[k: string]: unknown | undefined;
|
|
15839
|
+
}]; // ----- jsx-a11y/alt-text -----
|
|
15840
|
+
type JsxA11YAltText = [] | [{
|
|
15841
|
+
elements?: string[];
|
|
15842
|
+
img?: string[];
|
|
15843
|
+
object?: string[];
|
|
15844
|
+
area?: string[];
|
|
15845
|
+
"input[type=\"image\"]"?: string[];
|
|
15846
|
+
[k: string]: unknown | undefined;
|
|
15847
|
+
}]; // ----- jsx-a11y/anchor-ambiguous-text -----
|
|
15848
|
+
type JsxA11YAnchorAmbiguousText = [] | [{
|
|
15849
|
+
words?: string[];
|
|
15850
|
+
[k: string]: unknown | undefined;
|
|
15851
|
+
}]; // ----- jsx-a11y/anchor-has-content -----
|
|
15852
|
+
type JsxA11YAnchorHasContent = [] | [{
|
|
15853
|
+
components?: string[];
|
|
15854
|
+
[k: string]: unknown | undefined;
|
|
15855
|
+
}]; // ----- jsx-a11y/anchor-is-valid -----
|
|
15856
|
+
type JsxA11YAnchorIsValid = [] | [{
|
|
15857
|
+
components?: string[];
|
|
15858
|
+
specialLink?: string[];
|
|
15859
|
+
aspects?: [("noHref" | "invalidHref" | "preferButton"), ...(("noHref" | "invalidHref" | "preferButton"))[]];
|
|
15860
|
+
[k: string]: unknown | undefined;
|
|
15861
|
+
}]; // ----- jsx-a11y/aria-activedescendant-has-tabindex -----
|
|
15862
|
+
type JsxA11YAriaActivedescendantHasTabindex = [] | [{
|
|
15863
|
+
[k: string]: unknown | undefined;
|
|
15864
|
+
}]; // ----- jsx-a11y/aria-props -----
|
|
15865
|
+
type JsxA11YAriaProps = [] | [{
|
|
15866
|
+
[k: string]: unknown | undefined;
|
|
15867
|
+
}]; // ----- jsx-a11y/aria-proptypes -----
|
|
15868
|
+
type JsxA11YAriaProptypes = [] | [{
|
|
15869
|
+
[k: string]: unknown | undefined;
|
|
15870
|
+
}]; // ----- jsx-a11y/aria-role -----
|
|
15871
|
+
type JsxA11YAriaRole = [] | [{
|
|
15872
|
+
allowedInvalidRoles?: string[];
|
|
15873
|
+
ignoreNonDOM?: boolean;
|
|
15874
|
+
[k: string]: unknown | undefined;
|
|
15875
|
+
}]; // ----- jsx-a11y/aria-unsupported-elements -----
|
|
15876
|
+
type JsxA11YAriaUnsupportedElements = [] | [{
|
|
15877
|
+
[k: string]: unknown | undefined;
|
|
15878
|
+
}]; // ----- jsx-a11y/autocomplete-valid -----
|
|
15879
|
+
type JsxA11YAutocompleteValid = [] | [{
|
|
15880
|
+
inputComponents?: string[];
|
|
15881
|
+
[k: string]: unknown | undefined;
|
|
15882
|
+
}]; // ----- jsx-a11y/click-events-have-key-events -----
|
|
15883
|
+
type JsxA11YClickEventsHaveKeyEvents = [] | [{
|
|
15884
|
+
[k: string]: unknown | undefined;
|
|
15885
|
+
}]; // ----- jsx-a11y/control-has-associated-label -----
|
|
15886
|
+
type JsxA11YControlHasAssociatedLabel = [] | [{
|
|
15887
|
+
labelAttributes?: string[];
|
|
15888
|
+
controlComponents?: string[];
|
|
15889
|
+
ignoreElements?: string[];
|
|
15890
|
+
ignoreRoles?: string[];
|
|
15891
|
+
depth?: number;
|
|
15892
|
+
[k: string]: unknown | undefined;
|
|
15893
|
+
}]; // ----- jsx-a11y/heading-has-content -----
|
|
15894
|
+
type JsxA11YHeadingHasContent = [] | [{
|
|
15895
|
+
components?: string[];
|
|
15896
|
+
[k: string]: unknown | undefined;
|
|
15897
|
+
}]; // ----- jsx-a11y/html-has-lang -----
|
|
15898
|
+
type JsxA11YHtmlHasLang = [] | [{
|
|
15899
|
+
[k: string]: unknown | undefined;
|
|
15900
|
+
}]; // ----- jsx-a11y/iframe-has-title -----
|
|
15901
|
+
type JsxA11YIframeHasTitle = [] | [{
|
|
15902
|
+
[k: string]: unknown | undefined;
|
|
15903
|
+
}]; // ----- jsx-a11y/img-redundant-alt -----
|
|
15904
|
+
type JsxA11YImgRedundantAlt = [] | [{
|
|
15905
|
+
components?: string[];
|
|
15906
|
+
words?: string[];
|
|
15907
|
+
[k: string]: unknown | undefined;
|
|
15908
|
+
}]; // ----- jsx-a11y/interactive-supports-focus -----
|
|
15909
|
+
type JsxA11YInteractiveSupportsFocus = [] | [{
|
|
15910
|
+
tabbable?: ("button" | "checkbox" | "columnheader" | "combobox" | "grid" | "gridcell" | "link" | "listbox" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "option" | "progressbar" | "radio" | "radiogroup" | "row" | "rowheader" | "scrollbar" | "searchbox" | "slider" | "spinbutton" | "switch" | "tab" | "tablist" | "textbox" | "tree" | "treegrid" | "treeitem" | "doc-backlink" | "doc-biblioref" | "doc-glossref" | "doc-noteref")[];
|
|
15911
|
+
[k: string]: unknown | undefined;
|
|
15912
|
+
}]; // ----- jsx-a11y/label-has-associated-control -----
|
|
15913
|
+
type JsxA11YLabelHasAssociatedControl = [] | [{
|
|
15914
|
+
labelComponents?: string[];
|
|
15915
|
+
labelAttributes?: string[];
|
|
15916
|
+
controlComponents?: string[];
|
|
15917
|
+
assert?: ("htmlFor" | "nesting" | "both" | "either");
|
|
15918
|
+
depth?: number;
|
|
15919
|
+
[k: string]: unknown | undefined;
|
|
15920
|
+
}]; // ----- jsx-a11y/label-has-for -----
|
|
15921
|
+
type JsxA11YLabelHasFor = [] | [{
|
|
15922
|
+
components?: string[];
|
|
15923
|
+
required?: (("nesting" | "id") | {
|
|
15924
|
+
some: ("nesting" | "id")[];
|
|
15925
|
+
[k: string]: unknown | undefined;
|
|
15926
|
+
} | {
|
|
15927
|
+
every: ("nesting" | "id")[];
|
|
15928
|
+
[k: string]: unknown | undefined;
|
|
15929
|
+
});
|
|
15930
|
+
allowChildren?: boolean;
|
|
15931
|
+
[k: string]: unknown | undefined;
|
|
15932
|
+
}]; // ----- jsx-a11y/lang -----
|
|
15933
|
+
type JsxA11YLang = [] | [{
|
|
15934
|
+
[k: string]: unknown | undefined;
|
|
15935
|
+
}]; // ----- jsx-a11y/media-has-caption -----
|
|
15936
|
+
type JsxA11YMediaHasCaption = [] | [{
|
|
15937
|
+
audio?: string[];
|
|
15938
|
+
video?: string[];
|
|
15939
|
+
track?: string[];
|
|
15940
|
+
[k: string]: unknown | undefined;
|
|
15941
|
+
}]; // ----- jsx-a11y/mouse-events-have-key-events -----
|
|
15942
|
+
type JsxA11YMouseEventsHaveKeyEvents = [] | [{
|
|
15943
|
+
hoverInHandlers?: string[];
|
|
15944
|
+
hoverOutHandlers?: string[];
|
|
15945
|
+
[k: string]: unknown | undefined;
|
|
15946
|
+
}]; // ----- jsx-a11y/no-access-key -----
|
|
15947
|
+
type JsxA11YNoAccessKey = [] | [{
|
|
15948
|
+
[k: string]: unknown | undefined;
|
|
15949
|
+
}]; // ----- jsx-a11y/no-aria-hidden-on-focusable -----
|
|
15950
|
+
type JsxA11YNoAriaHiddenOnFocusable = [] | [{
|
|
15951
|
+
[k: string]: unknown | undefined;
|
|
15952
|
+
}]; // ----- jsx-a11y/no-autofocus -----
|
|
15953
|
+
type JsxA11YNoAutofocus = [] | [{
|
|
15954
|
+
ignoreNonDOM?: boolean;
|
|
15955
|
+
[k: string]: unknown | undefined;
|
|
15956
|
+
}]; // ----- jsx-a11y/no-distracting-elements -----
|
|
15957
|
+
type JsxA11YNoDistractingElements = [] | [{
|
|
15958
|
+
elements?: ("marquee" | "blink")[];
|
|
15959
|
+
[k: string]: unknown | undefined;
|
|
15960
|
+
}]; // ----- jsx-a11y/no-interactive-element-to-noninteractive-role -----
|
|
15961
|
+
type JsxA11YNoInteractiveElementToNoninteractiveRole = [] | [{
|
|
15962
|
+
[k: string]: string[] | undefined;
|
|
15963
|
+
}]; // ----- jsx-a11y/no-noninteractive-element-interactions -----
|
|
15964
|
+
type JsxA11YNoNoninteractiveElementInteractions = [] | [{
|
|
15965
|
+
handlers?: string[];
|
|
15966
|
+
[k: string]: unknown | undefined;
|
|
15967
|
+
}]; // ----- jsx-a11y/no-noninteractive-element-to-interactive-role -----
|
|
15968
|
+
type JsxA11YNoNoninteractiveElementToInteractiveRole = [] | [{
|
|
15969
|
+
[k: string]: string[] | undefined;
|
|
15970
|
+
}]; // ----- jsx-a11y/no-noninteractive-tabindex -----
|
|
15971
|
+
type JsxA11YNoNoninteractiveTabindex = [] | [{
|
|
15972
|
+
roles?: string[];
|
|
15973
|
+
tags?: string[];
|
|
15974
|
+
[k: string]: unknown | undefined;
|
|
15975
|
+
}]; // ----- jsx-a11y/no-onchange -----
|
|
15976
|
+
type JsxA11YNoOnchange = [] | [{
|
|
15977
|
+
[k: string]: unknown | undefined;
|
|
15978
|
+
}]; // ----- jsx-a11y/no-redundant-roles -----
|
|
15979
|
+
type JsxA11YNoRedundantRoles = [] | [{
|
|
15980
|
+
[k: string]: string[] | undefined;
|
|
15981
|
+
}]; // ----- jsx-a11y/no-static-element-interactions -----
|
|
15982
|
+
type JsxA11YNoStaticElementInteractions = [] | [{
|
|
15983
|
+
handlers?: string[];
|
|
15984
|
+
[k: string]: unknown | undefined;
|
|
15985
|
+
}]; // ----- jsx-a11y/prefer-tag-over-role -----
|
|
15986
|
+
type JsxA11YPreferTagOverRole = [] | [{
|
|
15987
|
+
[k: string]: unknown | undefined;
|
|
15988
|
+
}]; // ----- jsx-a11y/role-has-required-aria-props -----
|
|
15989
|
+
type JsxA11YRoleHasRequiredAriaProps = [] | [{
|
|
15990
|
+
[k: string]: unknown | undefined;
|
|
15991
|
+
}]; // ----- jsx-a11y/role-supports-aria-props -----
|
|
15992
|
+
type JsxA11YRoleSupportsAriaProps = [] | [{
|
|
15993
|
+
[k: string]: unknown | undefined;
|
|
15994
|
+
}]; // ----- jsx-a11y/scope -----
|
|
15995
|
+
type JsxA11YScope = [] | [{
|
|
15996
|
+
[k: string]: unknown | undefined;
|
|
15997
|
+
}]; // ----- jsx-a11y/tabindex-no-positive -----
|
|
15998
|
+
type JsxA11YTabindexNoPositive = [] | [{
|
|
15999
|
+
[k: string]: unknown | undefined;
|
|
16000
|
+
}]; // ----- jsx-quotes -----
|
|
14052
16001
|
type JsxQuotes = [] | [("prefer-single" | "prefer-double")]; // ----- key-spacing -----
|
|
14053
16002
|
type KeySpacing = [] | [({
|
|
14054
16003
|
align?: (("colon" | "value") | {
|
|
@@ -14836,7 +16785,8 @@ type NewParens = [] | [("always" | "never")]; // ----- newline-after-var -----
|
|
|
14836
16785
|
type NewlineAfterVar = [] | [("never" | "always")]; // ----- newline-per-chained-call -----
|
|
14837
16786
|
type NewlinePerChainedCall = [] | [{
|
|
14838
16787
|
ignoreChainWithDepth?: number;
|
|
14839
|
-
}]; // ----- no-
|
|
16788
|
+
}]; // ----- next/no-html-link-for-pages -----
|
|
16789
|
+
type NextNoHtmlLinkForPages = [] | [(string | string[])]; // ----- no-bitwise -----
|
|
14840
16790
|
type NoBitwise = [] | [{
|
|
14841
16791
|
allow?: ("^" | "|" | "&" | "<<" | ">>" | ">>>" | "^=" | "|=" | "&=" | "<<=" | ">>=" | ">>>=" | "~")[];
|
|
14842
16792
|
int32Hint?: boolean;
|
|
@@ -15377,7 +17327,10 @@ type PackageJsonRestrictTopLevelProperties = [] | [{
|
|
|
15377
17327
|
property: string;
|
|
15378
17328
|
})[];
|
|
15379
17329
|
}]; // ----- package-json/sort-collections -----
|
|
15380
|
-
type PackageJsonSortCollections = [] | [string
|
|
17330
|
+
type PackageJsonSortCollections = [] | [(string | {
|
|
17331
|
+
key: string;
|
|
17332
|
+
order: string[];
|
|
17333
|
+
})[]]; // ----- padded-blocks -----
|
|
15381
17334
|
type PaddedBlocks = [] | [(("always" | "never") | {
|
|
15382
17335
|
blocks?: ("always" | "never");
|
|
15383
17336
|
switches?: ("always" | "never");
|
|
@@ -18257,6 +20210,29 @@ type UnicodeBom = [] | [("always" | "never")]; // ----- unicorn/catch-error-name
|
|
|
18257
20210
|
type UnicornCatchErrorName = [] | [{
|
|
18258
20211
|
name?: string;
|
|
18259
20212
|
ignore?: unknown[];
|
|
20213
|
+
}]; // ----- unicorn/class-reference-in-static-methods -----
|
|
20214
|
+
type UnicornClassReferenceInStaticMethods = [] | [{
|
|
20215
|
+
preferThis?: boolean;
|
|
20216
|
+
preferSuper?: boolean;
|
|
20217
|
+
}]; // ----- unicorn/comment-content -----
|
|
20218
|
+
type UnicornCommentContent = [] | [{
|
|
20219
|
+
checkUniformCase?: boolean;
|
|
20220
|
+
extendDefaultReplacements?: boolean;
|
|
20221
|
+
replacements?: {
|
|
20222
|
+
[k: string]: (false | string | {
|
|
20223
|
+
replacement: string;
|
|
20224
|
+
caseSensitive?: boolean;
|
|
20225
|
+
}) | undefined;
|
|
20226
|
+
};
|
|
20227
|
+
}]; // ----- unicorn/consistent-boolean-name -----
|
|
20228
|
+
type UnicornConsistentBooleanName = [] | [{
|
|
20229
|
+
checkProperties?: boolean;
|
|
20230
|
+
prefixes?: {
|
|
20231
|
+
[k: string]: boolean | undefined;
|
|
20232
|
+
};
|
|
20233
|
+
}]; // ----- unicorn/consistent-class-member-order -----
|
|
20234
|
+
type UnicornConsistentClassMemberOrder = [] | [{
|
|
20235
|
+
order?: [("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method")];
|
|
18260
20236
|
}]; // ----- unicorn/consistent-compound-words -----
|
|
18261
20237
|
type UnicornConsistentCompoundWords = [] | [{
|
|
18262
20238
|
checkProperties?: boolean;
|
|
@@ -18273,11 +20249,26 @@ interface _UnicornConsistentCompoundWords_Replacements {
|
|
|
18273
20249
|
}
|
|
18274
20250
|
interface _UnicornConsistentCompoundWords_TrueObject {
|
|
18275
20251
|
[k: string]: true | undefined;
|
|
18276
|
-
} // ----- unicorn/consistent-
|
|
20252
|
+
} // ----- unicorn/consistent-conditional-object-spread -----
|
|
20253
|
+
type UnicornConsistentConditionalObjectSpread = [] | [("logical" | "ternary")]; // ----- unicorn/consistent-export-decorator-position -----
|
|
20254
|
+
type UnicornConsistentExportDecoratorPosition = [] | [("above" | "before" | "after")]; // ----- unicorn/consistent-function-scoping -----
|
|
18277
20255
|
type UnicornConsistentFunctionScoping = [] | [{
|
|
18278
20256
|
checkArrowFunctions?: boolean;
|
|
20257
|
+
}]; // ----- unicorn/consistent-function-style -----
|
|
20258
|
+
type UnicornConsistentFunctionStyle = [] | [{
|
|
20259
|
+
default?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
20260
|
+
namedFunctions?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
20261
|
+
namedExports?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
20262
|
+
callbacks?: ("function-expression" | "arrow-function" | "ignore");
|
|
20263
|
+
objectProperties?: ("method" | "function-expression" | "arrow-function" | "ignore");
|
|
20264
|
+
reassignedVariables?: ("function-expression" | "arrow-function" | "ignore");
|
|
20265
|
+
typedVariables?: ("function-expression" | "arrow-function" | "ignore");
|
|
18279
20266
|
}]; // ----- unicorn/consistent-json-file-read -----
|
|
18280
|
-
type UnicornConsistentJsonFileRead = [] | [("string" | "buffer")]; // ----- unicorn/
|
|
20267
|
+
type UnicornConsistentJsonFileRead = [] | [("string" | "buffer")]; // ----- unicorn/default-export-style -----
|
|
20268
|
+
type UnicornDefaultExportStyle = [] | [{
|
|
20269
|
+
functions?: ("inline" | "separate" | "ignore");
|
|
20270
|
+
classes?: ("inline" | "separate" | "ignore");
|
|
20271
|
+
}]; // ----- unicorn/dom-node-dataset -----
|
|
18281
20272
|
type UnicornDomNodeDataset = [] | [{
|
|
18282
20273
|
preferAttributes?: boolean;
|
|
18283
20274
|
}]; // ----- unicorn/escape-case -----
|
|
@@ -18292,15 +20283,17 @@ type UnicornExpiringTodoComments = [] | [{
|
|
|
18292
20283
|
}]; // ----- unicorn/explicit-length-check -----
|
|
18293
20284
|
type UnicornExplicitLengthCheck = [] | [{
|
|
18294
20285
|
"non-zero"?: ("greater-than" | "not-equal");
|
|
18295
|
-
}]; // ----- unicorn/
|
|
20286
|
+
}]; // ----- unicorn/explicit-timer-delay -----
|
|
20287
|
+
type UnicornExplicitTimerDelay = [] | [("always" | "never")]; // ----- unicorn/filename-case -----
|
|
18296
20288
|
type UnicornFilenameCase = [] | [({
|
|
18297
|
-
case?: ("camelCase" | "snakeCase" | "kebabCase" | "pascalCase");
|
|
20289
|
+
case?: ("camelCase" | "camelCaseWithAcronyms" | "snakeCase" | "kebabCase" | "pascalCase");
|
|
18298
20290
|
ignore?: unknown[];
|
|
18299
20291
|
multipleFileExtensions?: boolean;
|
|
18300
20292
|
checkDirectories?: boolean;
|
|
18301
20293
|
} | {
|
|
18302
20294
|
cases?: {
|
|
18303
20295
|
camelCase?: boolean;
|
|
20296
|
+
camelCaseWithAcronyms?: boolean;
|
|
18304
20297
|
snakeCase?: boolean;
|
|
18305
20298
|
kebabCase?: boolean;
|
|
18306
20299
|
pascalCase?: boolean;
|
|
@@ -18308,7 +20301,14 @@ type UnicornFilenameCase = [] | [({
|
|
|
18308
20301
|
ignore?: unknown[];
|
|
18309
20302
|
multipleFileExtensions?: boolean;
|
|
18310
20303
|
checkDirectories?: boolean;
|
|
18311
|
-
})]; // ----- unicorn/
|
|
20304
|
+
})]; // ----- unicorn/id-match -----
|
|
20305
|
+
type UnicornIdMatch = [] | [string] | [string, {
|
|
20306
|
+
properties?: boolean;
|
|
20307
|
+
classFields?: boolean;
|
|
20308
|
+
onlyDeclarations?: boolean;
|
|
20309
|
+
ignoreDestructuring?: boolean;
|
|
20310
|
+
checkNamedSpecifiers?: boolean;
|
|
20311
|
+
}]; // ----- unicorn/import-style -----
|
|
18312
20312
|
type UnicornImportStyle = [] | [{
|
|
18313
20313
|
checkImport?: boolean;
|
|
18314
20314
|
checkDynamicImport?: boolean;
|
|
@@ -18331,7 +20331,36 @@ type UnicornIsolatedFunctions = [] | [{
|
|
|
18331
20331
|
functions?: string[];
|
|
18332
20332
|
selectors?: string[];
|
|
18333
20333
|
comments?: string[];
|
|
18334
|
-
}]; // ----- unicorn/
|
|
20334
|
+
}]; // ----- unicorn/logical-assignment-operators -----
|
|
20335
|
+
type UnicornLogicalAssignmentOperators = (([] | ["always"] | ["always", {
|
|
20336
|
+
enforceForIfStatements?: boolean;
|
|
20337
|
+
}] | ["never"]) & unknown[]); // ----- unicorn/max-nested-calls -----
|
|
20338
|
+
type UnicornMaxNestedCalls = [] | [{
|
|
20339
|
+
max?: number;
|
|
20340
|
+
}]; // ----- unicorn/name-replacements -----
|
|
20341
|
+
type UnicornNameReplacements = [] | [{
|
|
20342
|
+
checkProperties?: boolean;
|
|
20343
|
+
checkVariables?: boolean;
|
|
20344
|
+
checkDefaultAndNamespaceImports?: (boolean | string);
|
|
20345
|
+
checkShorthandImports?: (boolean | string);
|
|
20346
|
+
checkShorthandProperties?: boolean;
|
|
20347
|
+
checkFilenames?: boolean;
|
|
20348
|
+
extendDefaultReplacements?: boolean;
|
|
20349
|
+
replacements?: _UnicornNameReplacements_NameReplacements;
|
|
20350
|
+
extendDefaultAllowList?: boolean;
|
|
20351
|
+
allowList?: _UnicornNameReplacements_BooleanObject;
|
|
20352
|
+
ignore?: unknown[];
|
|
20353
|
+
}];
|
|
20354
|
+
type _UnicornNameReplacementsReplacements = (false | _UnicornNameReplacements_BooleanObject) | undefined;
|
|
20355
|
+
interface _UnicornNameReplacements_NameReplacements {
|
|
20356
|
+
[k: string]: _UnicornNameReplacementsReplacements | undefined;
|
|
20357
|
+
}
|
|
20358
|
+
interface _UnicornNameReplacements_BooleanObject {
|
|
20359
|
+
[k: string]: boolean | undefined;
|
|
20360
|
+
}
|
|
20361
|
+
interface _UnicornNameReplacements_BooleanObject {
|
|
20362
|
+
[k: string]: boolean | undefined;
|
|
20363
|
+
} // ----- unicorn/no-array-callback-reference -----
|
|
18335
20364
|
type UnicornNoArrayCallbackReference = [] | [{
|
|
18336
20365
|
ignore?: string[];
|
|
18337
20366
|
}]; // ----- unicorn/no-array-reduce -----
|
|
@@ -18352,11 +20381,23 @@ type UnicornNoInstanceofBuiltins = [] | [{
|
|
|
18352
20381
|
strategy?: ("loose" | "strict");
|
|
18353
20382
|
include?: string[];
|
|
18354
20383
|
exclude?: string[];
|
|
20384
|
+
}]; // ----- unicorn/no-invalid-argument-count -----
|
|
20385
|
+
type UnicornNoInvalidArgumentCount = [] | [{
|
|
20386
|
+
[k: string]: (number | [number, ...(number)[]] | {
|
|
20387
|
+
min?: number;
|
|
20388
|
+
max?: number;
|
|
20389
|
+
}) | undefined;
|
|
18355
20390
|
}]; // ----- unicorn/no-keyword-prefix -----
|
|
18356
20391
|
type UnicornNoKeywordPrefix = [] | [{
|
|
18357
20392
|
disallowedPrefixes?: [] | [string];
|
|
18358
20393
|
checkProperties?: boolean;
|
|
18359
20394
|
onlyCamelCase?: boolean;
|
|
20395
|
+
}]; // ----- unicorn/no-negated-comparison -----
|
|
20396
|
+
type UnicornNoNegatedComparison = [] | [{
|
|
20397
|
+
checkLogicalExpressions?: boolean;
|
|
20398
|
+
}]; // ----- unicorn/no-non-function-verb-prefix -----
|
|
20399
|
+
type UnicornNoNonFunctionVerbPrefix = [] | [{
|
|
20400
|
+
verbs?: string[];
|
|
18360
20401
|
}]; // ----- unicorn/no-null -----
|
|
18361
20402
|
type UnicornNoNull = [] | [{
|
|
18362
20403
|
checkArguments?: boolean;
|
|
@@ -18369,6 +20410,9 @@ type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
|
18369
20410
|
targets?: (string | unknown[] | {
|
|
18370
20411
|
[k: string]: unknown | undefined;
|
|
18371
20412
|
});
|
|
20413
|
+
}]; // ----- unicorn/no-unreadable-array-destructuring -----
|
|
20414
|
+
type UnicornNoUnreadableArrayDestructuring = [] | [{
|
|
20415
|
+
maximumIgnoredElements?: number;
|
|
18372
20416
|
}]; // ----- unicorn/no-useless-undefined -----
|
|
18373
20417
|
type UnicornNoUselessUndefined = [] | [{
|
|
18374
20418
|
checkArguments?: boolean;
|
|
@@ -18400,7 +20444,8 @@ type UnicornNumericSeparatorsStyle = [] | [{
|
|
|
18400
20444
|
fractionGroupLength?: number;
|
|
18401
20445
|
};
|
|
18402
20446
|
onlyIfContainsSeparator?: boolean;
|
|
18403
|
-
}]; // ----- unicorn/
|
|
20447
|
+
}]; // ----- unicorn/operator-assignment -----
|
|
20448
|
+
type UnicornOperatorAssignment = [] | [("always" | "never")]; // ----- unicorn/prefer-add-event-listener -----
|
|
18404
20449
|
type UnicornPreferAddEventListener = [] | [{
|
|
18405
20450
|
excludedPackages?: string[];
|
|
18406
20451
|
}]; // ----- unicorn/prefer-array-find -----
|
|
@@ -18413,12 +20458,21 @@ type UnicornPreferArrayFlat = [] | [{
|
|
|
18413
20458
|
type UnicornPreferAt = [] | [{
|
|
18414
20459
|
getLastElementFunctions?: unknown[];
|
|
18415
20460
|
checkAllIndexAccess?: boolean;
|
|
20461
|
+
}]; // ----- unicorn/prefer-continue -----
|
|
20462
|
+
type UnicornPreferContinue = [] | [{
|
|
20463
|
+
maximumStatements?: number;
|
|
20464
|
+
}]; // ----- unicorn/prefer-early-return -----
|
|
20465
|
+
type UnicornPreferEarlyReturn = [] | [{
|
|
20466
|
+
maximumStatements?: number;
|
|
18416
20467
|
}]; // ----- unicorn/prefer-export-from -----
|
|
18417
20468
|
type UnicornPreferExportFrom = [] | [{
|
|
18418
20469
|
checkUsedVariables?: boolean;
|
|
18419
20470
|
}]; // ----- unicorn/prefer-includes-over-repeated-comparisons -----
|
|
18420
20471
|
type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
18421
20472
|
minimumComparisons?: number;
|
|
20473
|
+
}]; // ----- unicorn/prefer-minimal-ternary -----
|
|
20474
|
+
type UnicornPreferMinimalTernary = [] | [{
|
|
20475
|
+
checkComputedMemberAccess?: boolean;
|
|
18422
20476
|
}]; // ----- unicorn/prefer-number-properties -----
|
|
18423
20477
|
type UnicornPreferNumberProperties = [] | [{
|
|
18424
20478
|
checkInfinity?: boolean;
|
|
@@ -18449,31 +20503,13 @@ type UnicornPreferStructuredClone = [] | [{
|
|
|
18449
20503
|
type UnicornPreferSwitch = [] | [{
|
|
18450
20504
|
minimumCases?: number;
|
|
18451
20505
|
emptyDefaultCase?: ("no-default-comment" | "do-nothing-comment" | "no-default-case");
|
|
20506
|
+
}]; // ----- unicorn/prefer-temporal -----
|
|
20507
|
+
type UnicornPreferTemporal = [] | [{
|
|
20508
|
+
checkDateNow?: boolean;
|
|
20509
|
+
checkReferences?: boolean;
|
|
20510
|
+
checkMethods?: boolean;
|
|
18452
20511
|
}]; // ----- unicorn/prefer-ternary -----
|
|
18453
|
-
type UnicornPreferTernary = [] | [("always" | "only-single-line")]; // ----- unicorn/
|
|
18454
|
-
type UnicornPreventAbbreviations = [] | [{
|
|
18455
|
-
checkProperties?: boolean;
|
|
18456
|
-
checkVariables?: boolean;
|
|
18457
|
-
checkDefaultAndNamespaceImports?: (boolean | string);
|
|
18458
|
-
checkShorthandImports?: (boolean | string);
|
|
18459
|
-
checkShorthandProperties?: boolean;
|
|
18460
|
-
checkFilenames?: boolean;
|
|
18461
|
-
extendDefaultReplacements?: boolean;
|
|
18462
|
-
replacements?: _UnicornPreventAbbreviations_Abbreviations;
|
|
18463
|
-
extendDefaultAllowList?: boolean;
|
|
18464
|
-
allowList?: _UnicornPreventAbbreviations_BooleanObject;
|
|
18465
|
-
ignore?: unknown[];
|
|
18466
|
-
}];
|
|
18467
|
-
type _UnicornPreventAbbreviationsReplacements = (false | _UnicornPreventAbbreviations_BooleanObject) | undefined;
|
|
18468
|
-
interface _UnicornPreventAbbreviations_Abbreviations {
|
|
18469
|
-
[k: string]: _UnicornPreventAbbreviationsReplacements | undefined;
|
|
18470
|
-
}
|
|
18471
|
-
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
18472
|
-
[k: string]: boolean | undefined;
|
|
18473
|
-
}
|
|
18474
|
-
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
18475
|
-
[k: string]: boolean | undefined;
|
|
18476
|
-
} // ----- unicorn/relative-url-style -----
|
|
20512
|
+
type UnicornPreferTernary = [] | [("always" | "only-single-line")]; // ----- unicorn/relative-url-style -----
|
|
18477
20513
|
type UnicornRelativeUrlStyle = [] | [("never" | "always")]; // ----- unicorn/require-css-escape -----
|
|
18478
20514
|
type UnicornRequireCssEscape = [] | [{
|
|
18479
20515
|
checkAllSelectors?: boolean;
|
|
@@ -18489,7 +20525,7 @@ type UnicornStringContent = [] | [{
|
|
|
18489
20525
|
};
|
|
18490
20526
|
selectors?: string[];
|
|
18491
20527
|
}]; // ----- unicorn/switch-case-braces -----
|
|
18492
|
-
type UnicornSwitchCaseBraces = [] | [("always" | "avoid")]; // ----- unicorn/template-indent -----
|
|
20528
|
+
type UnicornSwitchCaseBraces = [] | [("always" | "avoid" | "single-statement")]; // ----- unicorn/template-indent -----
|
|
18493
20529
|
type UnicornTemplateIndent = [] | [{
|
|
18494
20530
|
indent?: (string | number);
|
|
18495
20531
|
tags?: string[];
|