1package eslint
2
3import (
4 "list"
5 "strings"
6 "time"
7 "struct"
8)
9
10#Plugins: {
11 @jsonschema(schema="http://json-schema.org/draft-07/schema#")
12 @jsonschema(id="https://json.schemastore.org/partial-eslint-plugins.json")
13
14 // Classes decorated with @Component must have suffix "Component"
15 // (or custom) in their name. See more at
16 // https://angular.dev/style-guide#style-02-03
17 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-class-suffix.md
18 "@angular-eslint/component-class-suffix"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
19 "suffixes"?: [...string]
20 ...
21 }, ...]])
22
23 // Enforces a maximum number of lines in inline template, styles
24 // and animations. See more at
25 // https://angular.dev/style-guide#style-05-04
26 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-max-inline-declarations.md
27 "@angular-eslint/component-max-inline-declarations"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
28 "template"?: >=0
29 "styles"?: >=0
30 "animations"?: >=0
31 ...
32 }, ...]])
33
34 // Component selectors should follow given naming rules. See more
35 // at https://angular.dev/style-guide#style-02-07,
36 // https://angular.dev/style-guide#style-05-02
37 // and https://angular.dev/style-guide#style-05-03.
38 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-selector.md
39 "@angular-eslint/component-selector"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
40 "type"?: matchN(1, [string, [..."element" | "attribute"]])
41 "prefix"?: string | [...]
42 "style"?: "camelCase" | "kebab-case"
43 ...
44 }, ...]])
45
46 // Ensures consistent usage of `styles`/`styleUrls`/`styleUrl`
47 // within Component metadata
48 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-component-styles.md
49 "@angular-eslint/consistent-component-styles"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
50 ...
51 }, ...]])
52
53 // Ensures that classes use contextual decorators in its body
54 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/contextual-decorator.md
55 "@angular-eslint/contextual-decorator"?: _
56
57 // Ensures that lifecycle methods are used in a correct context
58 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/contextual-lifecycle.md
59 "@angular-eslint/contextual-lifecycle"?: _
60
61 // Classes decorated with @Directive must have suffix "Directive"
62 // (or custom) in their name. See more at
63 // https://angular.dev/style-guide#style-02-03
64 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/directive-class-suffix.md
65 "@angular-eslint/directive-class-suffix"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
66 "suffixes"?: [...string]
67 ...
68 }, ...]])
69
70 // Directive selectors should follow given naming rules. See more
71 // at https://angular.dev/style-guide#style-02-06 and
72 // https://angular.dev/style-guide#style-02-08.
73 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/directive-selector.md
74 "@angular-eslint/directive-selector"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
75 "type"?: matchN(1, [string, [..."element" | "attribute"]])
76 "prefix"?: string | [...]
77 "style"?: "camelCase" | "kebab-case"
78 ...
79 }, ...]])
80
81 // Angular Lifecycle methods should not be async. Angular does not
82 // wait for async lifecycle but the code incorrectly suggests it
83 // does.
84 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-async-lifecycle-method.md
85 "@angular-eslint/no-async-lifecycle-method"?: _
86
87 // The @Attribute decorator is used to obtain a single value for
88 // an attribute. This is a much less common use-case than getting
89 // a stream of values (using @Input), so often the @Attribute
90 // decorator is mistakenly used when @Input was what was
91 // intended. This rule disallows usage of @Attribute decorator
92 // altogether in order to prevent these mistakes.
93 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-attribute-decorator.md
94 "@angular-eslint/no-attribute-decorator"?: _
95
96 // Ensures that directives not implement conflicting lifecycle
97 // interfaces.
98 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-conflicting-lifecycle.md
99 "@angular-eslint/no-conflicting-lifecycle"?: _
100
101 // Ensures that metadata arrays do not contain duplicate entries.
102 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-duplicates-in-metadata-arrays.md
103 "@angular-eslint/no-duplicates-in-metadata-arrays"?: _
104
105 // Disallows declaring empty lifecycle methods
106 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-empty-lifecycle-method.md
107 "@angular-eslint/no-empty-lifecycle-method"?: _
108
109 // Disallows usage of `forwardRef` references for DI
110 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-forward-ref.md
111 "@angular-eslint/no-forward-ref"?: _
112
113 // Disallows usage of the `host` metadata property. NOTE: This
114 // used to be recommended by the Angular Team, but now they
115 // recommend the exact opposite:
116 // https://github.com/angular/angular/issues/54284
117 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-host-metadata-property.md
118 "@angular-eslint/no-host-metadata-property"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
119 "allowStatic"?: bool
120 ...
121 }, ...]])
122
123 // Ensures that input bindings, including aliases, are not named
124 // or prefixed by the configured disallowed prefixes
125 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-input-prefix.md
126 "@angular-eslint/no-input-prefix"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
127 "prefixes"?: [...string]
128 ...
129 }, ...]])
130
131 // Ensures that input bindings are not aliased
132 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-input-rename.md
133 "@angular-eslint/no-input-rename"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
134 // A list with allowed input names
135 "allowedNames"?: list.UniqueItems() & [...string]
136 ...
137 }, ...]])
138
139 // Disallows usage of the `inputs` metadata property. See more at
140 // https://angular.dev/style-guide#style-05-12
141 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-inputs-metadata-property.md
142 "@angular-eslint/no-inputs-metadata-property"?: _
143
144 // Disallows explicit calls to lifecycle methods
145 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-lifecycle-call.md
146 "@angular-eslint/no-lifecycle-call"?: _
147
148 // Ensures that output bindings, including aliases, are not named
149 // as standard DOM events
150 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-native.md
151 "@angular-eslint/no-output-native"?: _
152
153 // Ensures that output bindings, including aliases, are not named
154 // "on", nor prefixed with it. See more at
155 // https://angular.dev/style-guide#style-05-16
156 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-on-prefix.md
157 "@angular-eslint/no-output-on-prefix"?: _
158
159 // Ensures that output bindings are not aliased
160 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-rename.md
161 "@angular-eslint/no-output-rename"?: _
162
163 // Disallows usage of the `outputs` metadata property. See more at
164 // https://angular.dev/style-guide#style-05-12
165 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-outputs-metadata-property.md
166 "@angular-eslint/no-outputs-metadata-property"?: _
167
168 // Disallows the declaration of impure pipes
169 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-pipe-impure.md
170 "@angular-eslint/no-pipe-impure"?: _
171
172 // Disallows usage of the `queries` metadata property. See more at
173 // https://angular.dev/style-guide#style-05-12.
174 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-queries-metadata-property.md
175 "@angular-eslint/no-queries-metadata-property"?: _
176
177 // Enforce consistent prefix for pipes.
178 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/pipe-prefix.md
179 "@angular-eslint/pipe-prefix"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
180 "prefixes"?: list.UniqueItems() & [...string]
181 ...
182 }, ...]])
183
184 // Ensures component's `changeDetection` is set to
185 // `ChangeDetectionStrategy.OnPush`
186 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-on-push-component-change-detection.md
187 "@angular-eslint/prefer-on-push-component-change-detection"?: _
188
189 // Ensures component, directive and pipe `standalone` property is
190 // set to `true` in the component decorator
191 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-standalone.md
192 "@angular-eslint/prefer-standalone"?: _
193
194 // Ensures component `standalone` property is set to `true` in the
195 // component decorator
196 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-standalone-component.md
197 "@angular-eslint/prefer-standalone-component"?: _
198
199 // Prefer to declare `@Output` as `readonly` since they are not
200 // supposed to be reassigned
201 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-output-readonly.md
202 "@angular-eslint/prefer-output-readonly"?: _
203
204 // The ./ and ../ prefix is standard syntax for relative URLs;
205 // don't depend on Angular's current ability to do without that
206 // prefix. See more at
207 // https://angular.dev/style-guide#style-05-04
208 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/relative-url-prefix.md
209 "@angular-eslint/relative-url-prefix"?: _
210
211 // Ensures that $localize tagged messages contain helpful metadata
212 // to aid with translations.
213 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/require-localize-metadata.md
214 "@angular-eslint/require-localize-metadata"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
215 "requireDescription"?: bool
216 "requireMeaning"?: bool
217 ...
218 }, ...]])
219
220 // Ensures that lifecycle methods are declared in order of
221 // execution
222 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/sort-lifecycle-methods.md
223 "@angular-eslint/sort-lifecycle-methods"?: _
224
225 // Ensures ASC alphabetical order for `NgModule` metadata arrays
226 // for easy visual scanning
227 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/sort-ngmodule-metadata-arrays.md
228 "@angular-eslint/sort-ngmodule-metadata-arrays"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
229 // A string with a BCP 47 language tag.
230 "locale"?: string
231 ...
232 }, ...]])
233
234 // Component selector must be declared
235 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-component-selector.md
236 "@angular-eslint/use-component-selector"?: _
237
238 // Disallows using `ViewEncapsulation.None`
239 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-component-view-encapsulation.md
240 "@angular-eslint/use-component-view-encapsulation"?: _
241
242 // Using the `providedIn` property makes `Injectables`
243 // tree-shakable
244 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-injectable-provided-in.md
245 "@angular-eslint/use-injectable-provided-in"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
246 "ignoreClassNamePattern"?: string
247 ...
248 }, ...]])
249
250 // Ensures that classes implement lifecycle interfaces
251 // corresponding to the declared lifecycle methods. See more at
252 // https://angular.dev/style-guide#style-09-01
253 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-lifecycle-interface.md
254 "@angular-eslint/use-lifecycle-interface"?: _
255
256 // Ensures that `Pipes` implement `PipeTransform` interface
257 // https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-pipe-transform-interface.md
258 "@angular-eslint/use-pipe-transform-interface"?: _
259
260 // Ensure imports point to a file/module that can be resolved.
261 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-unresolved.md
262 "eslint-plugin-import/no-unresolved"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
263 "commonjs"?: bool
264 "amd"?: bool
265 "esmodule"?: bool
266 "ignore"?: list.UniqueItems() & [_, ...] & [...string]
267 "caseSensitive"?: bool
268 "caseSensitiveStrict"?: bool
269 ...
270 }, ...]])
271
272 // Ensure named imports correspond to a named export in the remote
273 // file.
274 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/named.md
275 "eslint-plugin-import/named"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
276 "commonjs"?: bool
277 ...
278 }, ...]])
279
280 // Ensure a default export is present, given a default import.
281 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/default.md
282 "eslint-plugin-import/default"?: _
283
284 // Ensure imported namespaces contain dereferenced properties as
285 // they are dereferenced.
286 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/namespace.md
287 "eslint-plugin-import/namespace"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
288 // If `false`, will report computed (and thus, un-lintable)
289 // references to namespace members.
290 "allowComputed"?: bool
291 ...
292 }, ...]])
293
294 // Forbid namespace (a.k.a. "wildcard" `*`) imports.
295 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-namespace.md
296 "eslint-plugin-import/no-namespace"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
297 "ignore"?: list.UniqueItems() & [...string]
298 ...
299 }, ...]])
300
301 // Forbid any invalid exports, i.e. re-export of the same name.
302 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/export.md
303 "eslint-plugin-import/export"?: _
304
305 // Forbid the use of mutable exports with `var` or `let`.
306 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-mutable-exports.md
307 "eslint-plugin-import/no-mutable-exports"?: _
308
309 // Ensure consistent use of file extension within the import path.
310 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/extensions.md
311 "eslint-plugin-import/extensions"?: _
312
313 // Enforce which files can be imported in a given folder.
314 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-restricted-paths.md
315 "eslint-plugin-import/no-restricted-paths"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
316 "zones"?: [_, ...] & [...close({
317 "target"?: matchN(>=1, [string, list.UniqueItems() & [...string] & [_, ...]])
318 "from"?: matchN(>=1, [string, list.UniqueItems() & [...string] & [_, ...]])
319 "except"?: list.UniqueItems() & [...string]
320 "message"?: string
321 })]
322 "basePath"?: string
323 ...
324 }, ...]])
325
326 // Forbid importing the submodules of other modules.
327 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-internal-modules.md
328 "eslint-plugin-import/no-internal-modules"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
329 ...
330 }, ...]])
331
332 // Prefer named exports to be grouped together in a single export
333 // declaration
334 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/group-exports.md
335 "eslint-plugin-import/group-exports"?: _
336
337 // Forbid importing packages through relative paths.
338 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-relative-packages.md
339 "eslint-plugin-import/no-relative-packages"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
340 "commonjs"?: bool
341 "amd"?: bool
342 "esmodule"?: bool
343 "ignore"?: list.UniqueItems() & [_, ...] & [...string]
344 ...
345 }, ...]])
346
347 // Forbid importing modules from parent directories.
348 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-relative-parent-imports.md
349 "eslint-plugin-import/no-relative-parent-imports"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
350 "commonjs"?: bool
351 "amd"?: bool
352 "esmodule"?: bool
353 "ignore"?: list.UniqueItems() & [_, ...] & [...string]
354 ...
355 }, ...]])
356
357 // Enforce or ban the use of inline type-only markers for named
358 // imports.
359 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/consistent-type-specifier-style.md
360 "eslint-plugin-import/consistent-type-specifier-style"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
361 ...
362 }, ...]])
363
364 // Forbid a module from importing itself.
365 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-self-import.md
366 "eslint-plugin-import/no-self-import"?: _
367
368 // Forbid a module from importing a module with a dependency path
369 // back to itself.
370 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-cycle.md
371 "eslint-plugin-import/no-cycle"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
372 "commonjs"?: bool
373 "amd"?: bool
374 "esmodule"?: bool
375 "ignore"?: list.UniqueItems() & [_, ...] & [...string]
376 "maxDepth"?: matchN(>=1, [int & >=1, "∞"])
377
378 // ignore external modules
379 "ignoreExternal"?: bool
380
381 // Allow cyclic dependency if there is at least one dynamic import
382 // in the chain
383 "allowUnsafeDynamicCyclicDependency"?: bool
384 ...
385 }, ...]])
386
387 // Forbid named default exports.
388 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-named-default.md
389 "eslint-plugin-import/no-named-default"?: _
390
391 // Forbid use of exported name as identifier of default export.
392 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-named-as-default.md
393 "eslint-plugin-import/no-named-as-default"?: _
394
395 // Forbid use of exported name as property of default export.
396 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-named-as-default-member.md
397 "eslint-plugin-import/no-named-as-default-member"?: _
398
399 // Forbid anonymous values as default exports.
400 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-anonymous-default-export.md
401 "eslint-plugin-import/no-anonymous-default-export"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
402 // If `false`, will report default export of an array
403 "allowArray"?: bool
404
405 // If `false`, will report default export of an arrow function
406 "allowArrowFunction"?: bool
407
408 // If `false`, will report default export of a function call
409 "allowCallExpression"?: bool
410
411 // If `false`, will report default export of an anonymous class
412 "allowAnonymousClass"?: bool
413
414 // If `false`, will report default export of an anonymous function
415 "allowAnonymousFunction"?: bool
416
417 // If `false`, will report default export of a literal
418 "allowLiteral"?: bool
419
420 // If `false`, will report default export of an object expression
421 "allowObject"?: bool
422
423 // If `false`, will report default export of a class instantiation
424 "allowNew"?: bool
425 ...
426 }, ...]])
427
428 // Forbid modules without exports, or exports without matching
429 // import in another module.
430 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-unused-modules.md
431 "eslint-plugin-import/no-unused-modules"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
432 // files/paths to be analyzed (only for unused exports)
433 "src"?: list.UniqueItems() & [...strings.MinRunes(1)]
434
435 // files/paths for which unused exports will not be reported (e.g
436 // module entry points)
437 "ignoreExports"?: list.UniqueItems() & [...strings.MinRunes(1)]
438
439 // report modules without any exports
440 "missingExports"?: bool
441
442 // report exports without any usage
443 "unusedExports"?: bool
444 ...
445 }, ...]])
446
447 // Forbid CommonJS `require` calls and `module.exports` or
448 // `exports.*`.
449 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-commonjs.md
450 "eslint-plugin-import/no-commonjs"?: _
451
452 // Forbid AMD `require` and `define` calls.
453 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-amd.md
454 "eslint-plugin-import/no-amd"?: _
455
456 // Forbid repeated import of the same module in multiple places.
457 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-duplicates.md
458 "eslint-plugin-import/no-duplicates"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
459 "considerQueryString"?: bool
460 "prefer-inline"?: bool
461 ...
462 }, ...]])
463
464 // Ensure all imports appear before other statements.
465 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/first.md
466 "eslint-plugin-import/first"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
467 ...
468 }, ...]])
469
470 // Enforce the maximum number of dependencies a module can have.
471 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/max-dependencies.md
472 "eslint-plugin-import/max-dependencies"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
473 "max"?: number
474 "ignoreTypeImports"?: bool
475 ...
476 }, ...]])
477
478 // Forbid the use of extraneous packages.
479 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-extraneous-dependencies.md
480 "eslint-plugin-import/no-extraneous-dependencies"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
481 "devDependencies"?: matchN(1, [bool, [...]])
482 "optionalDependencies"?: matchN(1, [bool, [...]])
483 "peerDependencies"?: matchN(1, [bool, [...]])
484 "bundledDependencies"?: matchN(1, [bool, [...]])
485 "packageDir"?: matchN(1, [string, [...]])
486 "includeInternal"?: bool
487 "includeTypes"?: bool
488 ...
489 }, ...]])
490
491 // Forbid import of modules using absolute paths.
492 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-absolute-path.md
493 "eslint-plugin-import/no-absolute-path"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
494 "commonjs"?: bool
495 "amd"?: bool
496 "esmodule"?: bool
497 "ignore"?: list.UniqueItems() & [_, ...] & [...string]
498 ...
499 }, ...]])
500
501 // Forbid Node.js builtin modules.
502 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-nodejs-modules.md
503 "eslint-plugin-import/no-nodejs-modules"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
504 "allow"?: list.UniqueItems() & [...string]
505 ...
506 }, ...]])
507
508 // Forbid webpack loader syntax in imports.
509 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-webpack-loader-syntax.md
510 "eslint-plugin-import/no-webpack-loader-syntax"?: _
511
512 // Enforce a convention in module import order.
513 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/order.md
514 "eslint-plugin-import/order"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
515 "groups"?: [...]
516 "pathGroupsExcludedImportTypes"?: [...]
517 "distinctGroup"?: bool
518 "pathGroups"?: [...close({
519 "pattern"!: string
520 "patternOptions"?: {
521 ...
522 }
523 "group"!: "builtin" | "external" | "internal" | "unknown" | "parent" | "sibling" | "index" | "object" | "type"
524 "position"?: "after" | "before"
525 })]
526 "newlines-between"?: "ignore" | "always" | "always-and-inside-groups" | "never"
527 "alphabetize"?: close({
528 "caseInsensitive"?: bool
529 "order"?: "ignore" | "asc" | "desc"
530 "orderImportKind"?: "ignore" | "asc" | "desc"
531 })
532 "warnOnUnassignedImports"?: bool
533 ...
534 }, ...]])
535
536 // Enforce a newline after import statements.
537 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/newline-after-import.md
538 "eslint-plugin-import/newline-after-import"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
539 "count"?: int & >=1
540 "exactCount"?: bool
541 "considerComments"?: bool
542 ...
543 }, ...]])
544
545 // Prefer a default export if module exports a single name or
546 // multiple names.
547 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/prefer-default-export.md
548 "eslint-plugin-import/prefer-default-export"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
549 "target"?: "single" | "any"
550 ...
551 }, ...]])
552
553 // Forbid default exports.
554 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-default-export.md
555 "eslint-plugin-import/no-default-export"?: _
556
557 // Forbid named exports.
558 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-named-export.md
559 "eslint-plugin-import/no-named-export"?: _
560
561 // Forbid `require()` calls with expressions.
562 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-dynamic-require.md
563 "eslint-plugin-import/no-dynamic-require"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
564 "esmodule"?: bool
565 ...
566 }, ...]])
567
568 // Forbid potentially ambiguous parse goal (`script` vs.
569 // `module`).
570 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/unambiguous.md
571 "eslint-plugin-import/unambiguous"?: _
572
573 // Forbid unassigned imports
574 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-unassigned-import.md
575 "eslint-plugin-import/no-unassigned-import"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
576 "devDependencies"?: matchN(1, [bool, [...]])
577 "optionalDependencies"?: matchN(1, [bool, [...]])
578 "peerDependencies"?: matchN(1, [bool, [...]])
579 "allow"?: [...string]
580 ...
581 }, ...]])
582
583 // Forbid unnecessary path segments in import and require
584 // statements.
585 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-useless-path-segments.md
586 "eslint-plugin-import/no-useless-path-segments"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
587 "commonjs"?: bool
588 "noUselessIndex"?: bool
589 ...
590 }, ...]])
591
592 // Enforce a leading comment with the webpackChunkName for dynamic
593 // imports.
594 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/dynamic-import-chunkname.md
595 "eslint-plugin-import/dynamic-import-chunkname"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
596 "importFunctions"?: list.UniqueItems() & [...string]
597 "webpackChunknameFormat"?: string
598 ...
599 }, ...]])
600
601 // Forbid import statements with CommonJS module.exports.
602 "eslint-plugin-import/no-import-module-exports"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
603 "exceptions"?: [...]
604 ...
605 }, ...]])
606
607 // Forbid empty named import blocks.
608 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-empty-named-blocks.md
609 "eslint-plugin-import/no-empty-named-blocks"?: _
610
611 // Ensure all exports appear after other statements.
612 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/exports-last.md
613 "eslint-plugin-import/exports-last"?: _
614
615 // Forbid imported names marked with `@deprecated` documentation
616 // tag.
617 // https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-deprecated.md
618 "eslint-plugin-import/no-deprecated"?: _
619
620 // Replaced by `import/first`.
621 // https://github.com/import-js/eslint-plugin-import/blob/7b25c1cb95ee18acc1531002fd343e1e6031f9ed/docs/rules/imports-first.md
622 "eslint-plugin-import/imports-first"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
623 ...
624 }, ...]])
625
626 // Improve regexes by making them shorter, consistent, and safer.
627 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/better-regex.md
628 "eslint-plugin-unicorn/better-regex"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
629 "sortCharacterClasses"?: bool
630 ...
631 }, ...]])
632
633 // Enforce a specific parameter name in catch clauses.
634 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/catch-error-name.md
635 "eslint-plugin-unicorn/catch-error-name"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
636 "name"?: string
637 "ignore"?: list.UniqueItems()
638 ...
639 }, ...]])
640
641 // Use destructured variables over properties.
642 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-destructuring.md
643 "eslint-plugin-unicorn/consistent-destructuring"?: _
644
645 // Prefer consistent types when spreading a ternary in an array
646 // literal.
647 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-empty-array-spread.md
648 "eslint-plugin-unicorn/consistent-empty-array-spread"?: _
649
650 // Move function definitions to the highest possible scope.
651 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-function-scoping.md
652 "eslint-plugin-unicorn/consistent-function-scoping"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
653 "checkArrowFunctions"?: bool
654 ...
655 }, ...]])
656
657 // Enforce correct `Error` subclassing.
658 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/custom-error-definition.md
659 "eslint-plugin-unicorn/custom-error-definition"?: _
660
661 // Enforce no spaces between braces.
662 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/empty-brace-spaces.md
663 "eslint-plugin-unicorn/empty-brace-spaces"?: _
664
665 // Enforce passing a `message` value when creating a built-in
666 // error.
667 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/error-message.md
668 "eslint-plugin-unicorn/error-message"?: _
669
670 // Require escape sequences to use uppercase values.
671 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/escape-case.md
672 "eslint-plugin-unicorn/escape-case"?: _
673
674 // Add expiration conditions to TODO comments.
675 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/expiring-todo-comments.md
676 "eslint-plugin-unicorn/expiring-todo-comments"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
677 "terms"?: [...string]
678 "ignore"?: list.UniqueItems()
679 "ignoreDatesOnPullRequests"?: bool
680 "allowWarningComments"?: bool
681 "date"?: time.Format("2006-01-02")
682 ...
683 }, ...]])
684
685 // Enforce explicitly comparing the `length` or `size` property of
686 // a value.
687 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/explicit-length-check.md
688 "eslint-plugin-unicorn/explicit-length-check"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
689 "non-zero"?: "greater-than" | "not-equal"
690 ...
691 }, ...]])
692
693 // Enforce a case style for filenames.
694 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/filename-case.md
695 "eslint-plugin-unicorn/filename-case"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
696 ...
697 }, ...]])
698
699 // Enforce specific import styles per module.
700 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/import-style.md
701 "eslint-plugin-unicorn/import-style"?: _
702
703 // Enforce the use of `new` for all builtins, except `String`,
704 // `Number`, `Boolean`, `Symbol` and `BigInt`.
705 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/new-for-builtins.md
706 "eslint-plugin-unicorn/new-for-builtins"?: _
707
708 // Enforce specifying rules to disable in `eslint-disable`
709 // comments.
710 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-abusive-eslint-disable.md
711 "eslint-plugin-unicorn/no-abusive-eslint-disable"?: _
712
713 // Disallow anonymous functions and classes as the default export.
714 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-anonymous-default-export.md
715 "eslint-plugin-unicorn/no-anonymous-default-export"?: _
716
717 // Prevent passing a function reference directly to iterator
718 // methods.
719 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-callback-reference.md
720 "eslint-plugin-unicorn/no-array-callback-reference"?: _
721
722 // Prefer `for…of` over the `forEach` method.
723 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-for-each.md
724 "eslint-plugin-unicorn/no-array-for-each"?: _
725
726 // Disallow using the `this` argument in array methods.
727 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-method-this-argument.md
728 "eslint-plugin-unicorn/no-array-method-this-argument"?: _
729
730 // Enforce combining multiple `Array#push()` into one call.
731 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-push-push.md
732 "eslint-plugin-unicorn/no-array-push-push"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
733 "ignore"?: list.UniqueItems()
734 ...
735 }, ...]])
736
737 // Disallow `Array#reduce()` and `Array#reduceRight()`.
738 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-reduce.md
739 "eslint-plugin-unicorn/no-array-reduce"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
740 "allowSimpleOperations"?: bool
741 ...
742 }, ...]])
743
744 // Disallow member access from await expression.
745 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-await-expression-member.md
746 "eslint-plugin-unicorn/no-await-expression-member"?: _
747
748 // Disallow using `await` in `Promise` method parameters.
749 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-await-in-promise-methods.md
750 "eslint-plugin-unicorn/no-await-in-promise-methods"?: _
751
752 // Do not use leading/trailing space between `console.log`
753 // parameters.
754 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-console-spaces.md
755 "eslint-plugin-unicorn/no-console-spaces"?: _
756
757 // Do not use `document.cookie` directly.
758 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-document-cookie.md
759 "eslint-plugin-unicorn/no-document-cookie"?: _
760
761 // Disallow empty files.
762 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-empty-file.md
763 "eslint-plugin-unicorn/no-empty-file"?: _
764
765 // Do not use a `for` loop that can be replaced with a `for-of`
766 // loop.
767 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-for-loop.md
768 "eslint-plugin-unicorn/no-for-loop"?: _
769
770 // Enforce the use of Unicode escapes instead of hexadecimal
771 // escapes.
772 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-hex-escape.md
773 "eslint-plugin-unicorn/no-hex-escape"?: _
774
775 // Require `Array.isArray()` instead of `instanceof Array`.
776 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-instanceof-array.md
777 "eslint-plugin-unicorn/no-instanceof-array"?: _
778
779 // Disallow invalid options in `fetch()` and `new Request()`.
780 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-invalid-fetch-options.md
781 "eslint-plugin-unicorn/no-invalid-fetch-options"?: _
782
783 // Prevent calling `EventTarget#removeEventListener()` with the
784 // result of an expression.
785 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-invalid-remove-event-listener.md
786 "eslint-plugin-unicorn/no-invalid-remove-event-listener"?: _
787
788 // Disallow identifiers starting with `new` or `class`.
789 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-keyword-prefix.md
790 "eslint-plugin-unicorn/no-keyword-prefix"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
791 "disallowedPrefixes"?: list.UniqueItems() & list.MaxItems(1) & [string, ...] & [_, ...]
792 "checkProperties"?: bool
793 "onlyCamelCase"?: bool
794 ...
795 }, ...]])
796
797 // Disallow `if` statements as the only statement in `if` blocks
798 // without `else`.
799 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-lonely-if.md
800 "eslint-plugin-unicorn/no-lonely-if"?: _
801
802 // Disallow a magic number as the `depth` argument in
803 // `Array#flat(…).`
804 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-magic-array-flat-depth.md
805 "eslint-plugin-unicorn/no-magic-array-flat-depth"?: _
806
807 // Disallow negated conditions.
808 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-negated-condition.md
809 "eslint-plugin-unicorn/no-negated-condition"?: _
810
811 // Disallow negated expression in equality check.
812 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-negation-in-equality-check.md
813 "eslint-plugin-unicorn/no-negation-in-equality-check"?: _
814
815 // Disallow nested ternary expressions.
816 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-nested-ternary.md
817 "eslint-plugin-unicorn/no-nested-ternary"?: _
818
819 // Disallow `new Array()`.
820 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-new-array.md
821 "eslint-plugin-unicorn/no-new-array"?: _
822
823 // Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead
824 // of the deprecated `new Buffer()`.
825 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-new-buffer.md
826 "eslint-plugin-unicorn/no-new-buffer"?: _
827
828 // Disallow the use of the `null` literal.
829 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-null.md
830 "eslint-plugin-unicorn/no-null"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
831 "checkStrictEquality"?: bool
832 ...
833 }, ...]])
834
835 // Disallow the use of objects as default parameters.
836 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-object-as-default-parameter.md
837 "eslint-plugin-unicorn/no-object-as-default-parameter"?: _
838
839 // Disallow `process.exit()`.
840 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-process-exit.md
841 "eslint-plugin-unicorn/no-process-exit"?: _
842
843 // Disallow passing single-element arrays to `Promise` methods.
844 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-single-promise-in-promise-methods.md
845 "eslint-plugin-unicorn/no-single-promise-in-promise-methods"?: _
846
847 // Disallow classes that only have static members.
848 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-static-only-class.md
849 "eslint-plugin-unicorn/no-static-only-class"?: _
850
851 // Disallow `then` property.
852 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-thenable.md
853 "eslint-plugin-unicorn/no-thenable"?: _
854
855 // Disallow assigning `this` to a variable.
856 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-this-assignment.md
857 "eslint-plugin-unicorn/no-this-assignment"?: _
858
859 // Disallow comparing `undefined` using `typeof`.
860 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-typeof-undefined.md
861 "eslint-plugin-unicorn/no-typeof-undefined"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
862 "checkGlobalVariables"?: bool
863 ...
864 }, ...]])
865
866 // Disallow awaiting non-promise values.
867 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unnecessary-await.md
868 "eslint-plugin-unicorn/no-unnecessary-await"?: _
869
870 // Enforce the use of built-in methods instead of unnecessary
871 // polyfills.
872 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unnecessary-polyfills.md
873 "eslint-plugin-unicorn/no-unnecessary-polyfills"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
874 "targets"?: string | [...] | {
875 ...
876 }
877 ...
878 }, ...]])
879
880 // Disallow unreadable array destructuring.
881 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unreadable-array-destructuring.md
882 "eslint-plugin-unicorn/no-unreadable-array-destructuring"?: _
883
884 // Disallow unreadable IIFEs.
885 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unreadable-iife.md
886 "eslint-plugin-unicorn/no-unreadable-iife"?: _
887
888 // Disallow unused object properties.
889 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unused-properties.md
890 "eslint-plugin-unicorn/no-unused-properties"?: _
891
892 // Disallow useless fallback when spreading in object literals.
893 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-fallback-in-spread.md
894 "eslint-plugin-unicorn/no-useless-fallback-in-spread"?: _
895
896 // Disallow useless array length check.
897 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-length-check.md
898 "eslint-plugin-unicorn/no-useless-length-check"?: _
899
900 // Disallow returning/yielding `Promise.resolve/reject()` in async
901 // functions or promise callbacks
902 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-promise-resolve-reject.md
903 "eslint-plugin-unicorn/no-useless-promise-resolve-reject"?: _
904
905 // Disallow unnecessary spread.
906 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-spread.md
907 "eslint-plugin-unicorn/no-useless-spread"?: _
908
909 // Disallow useless case in switch statements.
910 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-switch-case.md
911 "eslint-plugin-unicorn/no-useless-switch-case"?: _
912
913 // Disallow useless `undefined`.
914 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-undefined.md
915 "eslint-plugin-unicorn/no-useless-undefined"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
916 "checkArguments"?: bool
917 "checkArrowFunctionBody"?: bool
918 ...
919 }, ...]])
920
921 // Disallow number literals with zero fractions or dangling dots.
922 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-zero-fractions.md
923 "eslint-plugin-unicorn/no-zero-fractions"?: _
924
925 // Enforce proper case for numeric literals.
926 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/number-literal-case.md
927 "eslint-plugin-unicorn/number-literal-case"?: _
928
929 // Enforce the style of numeric separators by correctly grouping
930 // digits.
931 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/numeric-separators-style.md
932 "eslint-plugin-unicorn/numeric-separators-style"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
933 "binary"?: close({
934 "onlyIfContainsSeparator"?: bool
935 "minimumDigits"?: int & >=0
936 "groupLength"?: int & >=1
937 })
938 "octal"?: close({
939 "onlyIfContainsSeparator"?: bool
940 "minimumDigits"?: int & >=0
941 "groupLength"?: int & >=1
942 })
943 "hexadecimal"?: close({
944 "onlyIfContainsSeparator"?: bool
945 "minimumDigits"?: int & >=0
946 "groupLength"?: int & >=1
947 })
948 "number"?: close({
949 "onlyIfContainsSeparator"?: bool
950 "minimumDigits"?: int & >=0
951 "groupLength"?: int & >=1
952 })
953 "onlyIfContainsSeparator"?: bool
954 ...
955 }, ...]])
956
957 // Prefer `.addEventListener()` and `.removeEventListener()` over
958 // `on`-functions.
959 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-add-event-listener.md
960 "eslint-plugin-unicorn/prefer-add-event-listener"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
961 "excludedPackages"?: list.UniqueItems() & [...string]
962 ...
963 }, ...]])
964
965 // Prefer `.find(…)` and `.findLast(…)` over the first or last
966 // element from `.filter(…)`.
967 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-find.md
968 "eslint-plugin-unicorn/prefer-array-find"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
969 "checkFromLast"?: bool
970 ...
971 }, ...]])
972
973 // Prefer `.flatMap(…)` over `.map(…).flat()`.
974 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-flat-map.md
975 "eslint-plugin-unicorn/prefer-array-flat-map"?: _
976
977 // Prefer `Array#flat()` over legacy techniques to flatten arrays.
978 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-flat.md
979 "eslint-plugin-unicorn/prefer-array-flat"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
980 "functions"?: list.UniqueItems()
981 ...
982 }, ...]])
983
984 // Prefer `Array#{indexOf,lastIndexOf}()` over
985 // `Array#{findIndex,findLastIndex}()` when looking for the index
986 // of an item.
987 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-index-of.md
988 "eslint-plugin-unicorn/prefer-array-index-of"?: _
989
990 // Prefer `.some(…)` over `.filter(…).length` check and
991 // `.{find,findLast,findIndex,findLastIndex}(…)`.
992 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-some.md
993 "eslint-plugin-unicorn/prefer-array-some"?: _
994
995 // Prefer `.at()` method for index access and `String#charAt()`.
996 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-at.md
997 "eslint-plugin-unicorn/prefer-at"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
998 "getLastElementFunctions"?: list.UniqueItems()
999 "checkAllIndexAccess"?: bool
1000 ...
1001 }, ...]])
1002
1003 // Prefer `Blob#arrayBuffer()` over
1004 // `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over
1005 // `FileReader#readAsText(…)`.
1006 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-blob-reading-methods.md
1007 "eslint-plugin-unicorn/prefer-blob-reading-methods"?: _
1008
1009 // Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and
1010 // `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
1011 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-code-point.md
1012 "eslint-plugin-unicorn/prefer-code-point"?: _
1013
1014 // Prefer `Date.now()` to get the number of milliseconds since the
1015 // Unix Epoch.
1016 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-date-now.md
1017 "eslint-plugin-unicorn/prefer-date-now"?: _
1018
1019 // Prefer default parameters over reassignment.
1020 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-default-parameters.md
1021 "eslint-plugin-unicorn/prefer-default-parameters"?: _
1022
1023 // Prefer `Node#append()` over `Node#appendChild()`.
1024 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-append.md
1025 "eslint-plugin-unicorn/prefer-dom-node-append"?: _
1026
1027 // Prefer using `.dataset` on DOM elements over calling attribute
1028 // methods.
1029 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-dataset.md
1030 "eslint-plugin-unicorn/prefer-dom-node-dataset"?: _
1031
1032 // Prefer `childNode.remove()` over
1033 // `parentNode.removeChild(childNode)`.
1034 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-remove.md
1035 "eslint-plugin-unicorn/prefer-dom-node-remove"?: _
1036
1037 // Prefer `.textContent` over `.innerText`.
1038 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-text-content.md
1039 "eslint-plugin-unicorn/prefer-dom-node-text-content"?: _
1040
1041 // Prefer `EventTarget` over `EventEmitter`.
1042 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-event-target.md
1043 "eslint-plugin-unicorn/prefer-event-target"?: _
1044
1045 // Prefer `export…from` when re-exporting.
1046 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-export-from.md
1047 "eslint-plugin-unicorn/prefer-export-from"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1048 "ignoreUsedVariables"?: bool
1049 ...
1050 }, ...]])
1051
1052 // Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and
1053 // `Array#some()` when checking for existence or non-existence.
1054 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-includes.md
1055 "eslint-plugin-unicorn/prefer-includes"?: _
1056
1057 // Prefer reading a JSON file as a buffer.
1058 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-json-parse-buffer.md
1059 "eslint-plugin-unicorn/prefer-json-parse-buffer"?: _
1060
1061 // Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
1062 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-keyboard-event-key.md
1063 "eslint-plugin-unicorn/prefer-keyboard-event-key"?: _
1064
1065 // Prefer using a logical operator over a ternary.
1066 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-logical-operator-over-ternary.md
1067 "eslint-plugin-unicorn/prefer-logical-operator-over-ternary"?: _
1068
1069 // Enforce the use of `Math.trunc` instead of bitwise operators.
1070 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-math-trunc.md
1071 "eslint-plugin-unicorn/prefer-math-trunc"?: _
1072
1073 // Prefer `.before()` over `.insertBefore()`, `.replaceWith()`
1074 // over `.replaceChild()`, prefer one of `.before()`, `.after()`,
1075 // `.append()` or `.prepend()` over `insertAdjacentText()` and
1076 // `insertAdjacentElement()`.
1077 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-modern-dom-apis.md
1078 "eslint-plugin-unicorn/prefer-modern-dom-apis"?: _
1079
1080 // Prefer modern `Math` APIs over legacy patterns.
1081 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-modern-math-apis.md
1082 "eslint-plugin-unicorn/prefer-modern-math-apis"?: _
1083
1084 // Prefer JavaScript modules (ESM) over CommonJS.
1085 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-module.md
1086 "eslint-plugin-unicorn/prefer-module"?: _
1087
1088 // Prefer using `String`, `Number`, `BigInt`, `Boolean`, and
1089 // `Symbol` directly.
1090 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-native-coercion-functions.md
1091 "eslint-plugin-unicorn/prefer-native-coercion-functions"?: _
1092
1093 // Prefer negative index over `.length - index` when possible.
1094 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-negative-index.md
1095 "eslint-plugin-unicorn/prefer-negative-index"?: _
1096
1097 // Prefer using the `node:` protocol when importing Node.js
1098 // builtin modules.
1099 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-node-protocol.md
1100 "eslint-plugin-unicorn/prefer-node-protocol"?: _
1101
1102 // Prefer `Number` static properties over global ones.
1103 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-number-properties.md
1104 "eslint-plugin-unicorn/prefer-number-properties"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1105 "checkInfinity"?: bool
1106 "checkNaN"?: bool
1107 ...
1108 }, ...]])
1109
1110 // Prefer using `Object.fromEntries(…)` to transform a list of
1111 // key-value pairs into an object.
1112 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-object-from-entries.md
1113 "eslint-plugin-unicorn/prefer-object-from-entries"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1114 "functions"?: list.UniqueItems()
1115 ...
1116 }, ...]])
1117
1118 // Prefer omitting the `catch` binding parameter.
1119 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-optional-catch-binding.md
1120 "eslint-plugin-unicorn/prefer-optional-catch-binding"?: _
1121
1122 // Prefer borrowing methods from the prototype instead of the
1123 // instance.
1124 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-prototype-methods.md
1125 "eslint-plugin-unicorn/prefer-prototype-methods"?: _
1126
1127 // Prefer `.querySelector()` over `.getElementById()`,
1128 // `.querySelectorAll()` over `.getElementsByClassName()` and
1129 // `.getElementsByTagName()`.
1130 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-query-selector.md
1131 "eslint-plugin-unicorn/prefer-query-selector"?: _
1132
1133 // Prefer `Reflect.apply()` over `Function#apply()`.
1134 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-reflect-apply.md
1135 "eslint-plugin-unicorn/prefer-reflect-apply"?: _
1136
1137 // Prefer `RegExp#test()` over `String#match()` and
1138 // `RegExp#exec()`.
1139 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-regexp-test.md
1140 "eslint-plugin-unicorn/prefer-regexp-test"?: _
1141
1142 // Prefer `Set#has()` over `Array#includes()` when checking for
1143 // existence or non-existence.
1144 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-set-has.md
1145 "eslint-plugin-unicorn/prefer-set-has"?: _
1146
1147 // Prefer using `Set#size` instead of `Array#length`.
1148 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-set-size.md
1149 "eslint-plugin-unicorn/prefer-set-size"?: _
1150
1151 // Prefer the spread operator over `Array.from(…)`,
1152 // `Array#concat(…)`, `Array#{slice,toSpliced}()` and
1153 // `String#split('')`.
1154 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-spread.md
1155 "eslint-plugin-unicorn/prefer-spread"?: _
1156
1157 // Prefer using the `String.raw` tag to avoid escaping `\`.
1158 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-raw.md
1159 "eslint-plugin-unicorn/prefer-string-raw"?: _
1160
1161 // Prefer `String#replaceAll()` over regex searches with the
1162 // global flag.
1163 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-replace-all.md
1164 "eslint-plugin-unicorn/prefer-string-replace-all"?: _
1165
1166 // Prefer `String#slice()` over `String#substr()` and
1167 // `String#substring()`.
1168 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-slice.md
1169 "eslint-plugin-unicorn/prefer-string-slice"?: _
1170
1171 // Prefer `String#startsWith()` & `String#endsWith()` over
1172 // `RegExp#test()`.
1173 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-starts-ends-with.md
1174 "eslint-plugin-unicorn/prefer-string-starts-ends-with"?: _
1175
1176 // Prefer `String#trimStart()` / `String#trimEnd()` over
1177 // `String#trimLeft()` / `String#trimRight()`.
1178 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-trim-start-end.md
1179 "eslint-plugin-unicorn/prefer-string-trim-start-end"?: _
1180
1181 // Prefer using `structuredClone` to create a deep clone.
1182 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-structured-clone.md
1183 "eslint-plugin-unicorn/prefer-structured-clone"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1184 "functions"?: list.UniqueItems()
1185 ...
1186 }, ...]])
1187
1188 // Prefer `switch` over multiple `else-if`.
1189 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-switch.md
1190 "eslint-plugin-unicorn/prefer-switch"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1191 "minimumCases"?: int & >=2
1192 "emptyDefaultCase"?: "no-default-comment" | "do-nothing-comment" | "no-default-case"
1193 ...
1194 }, ...]])
1195
1196 // Prefer ternary expressions over simple `if-else` statements.
1197 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-ternary.md
1198 "eslint-plugin-unicorn/prefer-ternary"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1199 ...
1200 }, ...]])
1201
1202 // Prefer top-level await over top-level promises and async
1203 // function calls.
1204 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-top-level-await.md
1205 "eslint-plugin-unicorn/prefer-top-level-await"?: _
1206
1207 // Enforce throwing `TypeError` in type checking conditions.
1208 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-type-error.md
1209 "eslint-plugin-unicorn/prefer-type-error"?: _
1210
1211 // Prevent abbreviations.
1212 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prevent-abbreviations.md
1213 "eslint-plugin-unicorn/prevent-abbreviations"?: _
1214
1215 // Enforce consistent relative URL style.
1216 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/relative-url-style.md
1217 "eslint-plugin-unicorn/relative-url-style"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1218 ...
1219 }, ...]])
1220
1221 // Enforce using the separator argument with `Array#join()`.
1222 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-array-join-separator.md
1223 "eslint-plugin-unicorn/require-array-join-separator"?: _
1224
1225 // Enforce using the digits argument with `Number#toFixed()`.
1226 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-number-to-fixed-digits-argument.md
1227 "eslint-plugin-unicorn/require-number-to-fixed-digits-argument"?: _
1228
1229 // Enforce using the `targetOrigin` argument with
1230 // `window.postMessage()`.
1231 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-post-message-target-origin.md
1232 "eslint-plugin-unicorn/require-post-message-target-origin"?: _
1233
1234 // Enforce better string content.
1235 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/string-content.md
1236 "eslint-plugin-unicorn/string-content"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1237 "patterns"?: [string]: matchN(>=1, [string, close({
1238 "suggest"!: string
1239 "fix"?: bool
1240 "message"?: string
1241 })])
1242 ...
1243 }, ...]])
1244
1245 // Enforce consistent brace style for `case` clauses.
1246 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/switch-case-braces.md
1247 "eslint-plugin-unicorn/switch-case-braces"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1248 ...
1249 }, ...]])
1250
1251 // Fix whitespace-insensitive template indentation.
1252 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/template-indent.md
1253 "eslint-plugin-unicorn/template-indent"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1254 "indent"?: matchN(1, [=~"^\\s+$", int & >=1])
1255 "tags"?: list.UniqueItems() & [...string]
1256 "functions"?: list.UniqueItems() & [...string]
1257 "selectors"?: list.UniqueItems() & [...string]
1258 "comments"?: list.UniqueItems() & [...string]
1259 ...
1260 }, ...]])
1261
1262 // Enforce consistent case for text encoding identifiers.
1263 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/text-encoding-identifier-case.md
1264 "eslint-plugin-unicorn/text-encoding-identifier-case"?: _
1265
1266 // Require `new` when creating an error.
1267 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/throw-new-error.md
1268 "eslint-plugin-unicorn/throw-new-error"?: _
1269
1270 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#import-index
1271 "eslint-plugin-unicorn/import-index"?: _
1272
1273 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-array-instanceof
1274 "eslint-plugin-unicorn/no-array-instanceof"?: _
1275
1276 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-fn-reference-in-iterator
1277 "eslint-plugin-unicorn/no-fn-reference-in-iterator"?: _
1278
1279 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-reduce
1280 "eslint-plugin-unicorn/no-reduce"?: _
1281
1282 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-unsafe-regex
1283 "eslint-plugin-unicorn/no-unsafe-regex"?: _
1284
1285 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-dataset
1286 "eslint-plugin-unicorn/prefer-dataset"?: _
1287
1288 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-event-key
1289 "eslint-plugin-unicorn/prefer-event-key"?: _
1290
1291 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-exponentiation-operator
1292 "eslint-plugin-unicorn/prefer-exponentiation-operator"?: _
1293
1294 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-flat-map
1295 "eslint-plugin-unicorn/prefer-flat-map"?: _
1296
1297 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-node-append
1298 "eslint-plugin-unicorn/prefer-node-append"?: _
1299
1300 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-node-remove
1301 "eslint-plugin-unicorn/prefer-node-remove"?: _
1302
1303 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-object-has-own
1304 "eslint-plugin-unicorn/prefer-object-has-own"?: _
1305
1306 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-replace-all
1307 "eslint-plugin-unicorn/prefer-replace-all"?: _
1308
1309 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-starts-ends-with
1310 "eslint-plugin-unicorn/prefer-starts-ends-with"?: _
1311
1312 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-text-content
1313 "eslint-plugin-unicorn/prefer-text-content"?: _
1314
1315 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-trim-start-end
1316 "eslint-plugin-unicorn/prefer-trim-start-end"?: _
1317
1318 // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#regex-shorthand
1319 "eslint-plugin-unicorn/regex-shorthand"?: _
1320
1321 // Enforce linebreaks after opening and before closing array
1322 // brackets in `<template>`
1323 // https://eslint.vuejs.org/rules/array-bracket-newline.html
1324 "eslint-plugin-vue/array-bracket-newline"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1325 ...
1326 }, ...]])
1327
1328 // Enforce consistent spacing inside array brackets in
1329 // `<template>`
1330 // https://eslint.vuejs.org/rules/array-bracket-spacing.html
1331 "eslint-plugin-vue/array-bracket-spacing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1332 ...
1333 }, ...]])
1334
1335 // Enforce line breaks after each array element in `<template>`
1336 // https://eslint.vuejs.org/rules/array-element-newline.html
1337 "eslint-plugin-vue/array-element-newline"?: _
1338
1339 // Enforce consistent spacing before and after the arrow in arrow
1340 // functions in `<template>`
1341 // https://eslint.vuejs.org/rules/arrow-spacing.html
1342 "eslint-plugin-vue/arrow-spacing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1343 "before"?: bool
1344 "after"?: bool
1345 ...
1346 }, ...]])
1347
1348 // enforce attribute naming style on custom components in template
1349 // https://eslint.vuejs.org/rules/attribute-hyphenation.html
1350 "eslint-plugin-vue/attribute-hyphenation"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1351 ...
1352 }, ...]])
1353
1354 // enforce order of attributes
1355 // https://eslint.vuejs.org/rules/attributes-order.html
1356 "eslint-plugin-vue/attributes-order"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1357 "order"?: list.UniqueItems() & [...matchN(>=1, ["DEFINITION" | "LIST_RENDERING" | "CONDITIONALS" | "RENDER_MODIFIERS" | "GLOBAL" | "UNIQUE" | "SLOT" | "TWO_WAY_BINDING" | "OTHER_DIRECTIVES" | "OTHER_ATTR" | "ATTR_STATIC" | "ATTR_DYNAMIC" | "ATTR_SHORTHAND_BOOL" | "EVENTS" | "CONTENT", [..."DEFINITION" | "LIST_RENDERING" | "CONDITIONALS" | "RENDER_MODIFIERS" | "GLOBAL" | "UNIQUE" | "SLOT" | "TWO_WAY_BINDING" | "OTHER_DIRECTIVES" | "OTHER_ATTR" | "ATTR_STATIC" | "ATTR_DYNAMIC" | "ATTR_SHORTHAND_BOOL" | "EVENTS" | "CONTENT"]])]
1358 "alphabetical"?: bool
1359 ...
1360 }, ...]])
1361
1362 // disallow use other than available `lang`
1363 // https://eslint.vuejs.org/rules/block-lang.html
1364 "eslint-plugin-vue/block-lang"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1365 ...
1366 }, ...]])
1367
1368 // enforce order of component top-level elements
1369 // https://eslint.vuejs.org/rules/block-order.html
1370 "eslint-plugin-vue/block-order"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1371 "order"?: list.UniqueItems() & [...matchN(>=1, [string, list.UniqueItems() & [...string]])]
1372 ...
1373 }, ...]])
1374
1375 // Disallow or enforce spaces inside of blocks after opening block
1376 // and before closing block in `<template>`
1377 // https://eslint.vuejs.org/rules/block-spacing.html
1378 "eslint-plugin-vue/block-spacing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1379 ...
1380 }, ...]])
1381
1382 // enforce line breaks after opening and before closing
1383 // block-level tags
1384 // https://eslint.vuejs.org/rules/block-tag-newline.html
1385 "eslint-plugin-vue/block-tag-newline"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1386 "singleline"?: "always" | "never" | "consistent" | "ignore"
1387 "multiline"?: "always" | "never" | "consistent" | "ignore"
1388 "maxEmptyLines"?: >=0
1389 "blocks"?: close({
1390 {[=~"^(?:\\S+)$"]: close({
1391 "singleline"?: "always" | "never" | "consistent" | "ignore", "multiline"?: "always" | "never" | "consistent" | "ignore", "maxEmptyLines"?: >=0
1392 })
1393 }
1394 })
1395 ...
1396 }, ...]])
1397
1398 // Enforce consistent brace style for blocks in `<template>`
1399 // https://eslint.vuejs.org/rules/brace-style.html
1400 "eslint-plugin-vue/brace-style"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1401 ...
1402 }, ...]])
1403
1404 // Enforce camelcase naming convention in `<template>`
1405 // https://eslint.vuejs.org/rules/camelcase.html
1406 "eslint-plugin-vue/camelcase"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1407 "ignoreDestructuring"?: bool
1408 "ignoreImports"?: bool
1409 "ignoreGlobals"?: bool
1410 "properties"?: "always" | "never"
1411 "allow"?: list.UniqueItems() & [string, ...] & [...]
1412 ...
1413 }, ...]])
1414
1415 // Require or disallow trailing commas in `<template>`
1416 // https://eslint.vuejs.org/rules/comma-dangle.html
1417 "eslint-plugin-vue/comma-dangle"?: _
1418
1419 // Enforce consistent spacing before and after commas in
1420 // `<template>`
1421 // https://eslint.vuejs.org/rules/comma-spacing.html
1422 "eslint-plugin-vue/comma-spacing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1423 "before"?: bool
1424 "after"?: bool
1425 ...
1426 }, ...]])
1427
1428 // Enforce consistent comma style in `<template>`
1429 // https://eslint.vuejs.org/rules/comma-style.html
1430 "eslint-plugin-vue/comma-style"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1431 ...
1432 }, ...]])
1433
1434 // support comment-directives in `<template>`
1435 // https://eslint.vuejs.org/rules/comment-directive.html
1436 "eslint-plugin-vue/comment-directive"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1437 "reportUnusedDisableDirectives"?: bool
1438 ...
1439 }, ...]])
1440
1441 // enforce component API style
1442 // https://eslint.vuejs.org/rules/component-api-style.html
1443 "eslint-plugin-vue/component-api-style"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1444 ...
1445 }, ...]])
1446
1447 // enforce specific casing for component definition name
1448 // https://eslint.vuejs.org/rules/component-definition-name-casing.html
1449 "eslint-plugin-vue/component-definition-name-casing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1450 ...
1451 }, ...]])
1452
1453 // enforce specific casing for the component naming style in
1454 // template
1455 // https://eslint.vuejs.org/rules/component-name-in-template-casing.html
1456 "eslint-plugin-vue/component-name-in-template-casing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1457 ...
1458 }, ...]])
1459
1460 // enforce the casing of component name in `components` options
1461 // https://eslint.vuejs.org/rules/component-options-name-casing.html
1462 "eslint-plugin-vue/component-options-name-casing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1463 ...
1464 }, ...]])
1465
1466 // enforce order of component top-level elements
1467 // https://eslint.vuejs.org/rules/component-tags-order.html
1468 "eslint-plugin-vue/component-tags-order"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1469 "order"?: list.UniqueItems() & [...matchN(>=1, [string, list.UniqueItems() & [...string]])]
1470 ...
1471 }, ...]])
1472
1473 // enforce specific casing for custom event name
1474 // https://eslint.vuejs.org/rules/custom-event-name-casing.html
1475 "eslint-plugin-vue/custom-event-name-casing"?: _
1476
1477 // enforce declaration style of `defineEmits`
1478 // https://eslint.vuejs.org/rules/define-emits-declaration.html
1479 "eslint-plugin-vue/define-emits-declaration"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1480 ...
1481 }, ...]])
1482
1483 // enforce order of `defineEmits` and `defineProps` compiler
1484 // macros
1485 // https://eslint.vuejs.org/rules/define-macros-order.html
1486 "eslint-plugin-vue/define-macros-order"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1487 "order"?: list.UniqueItems() & [..."defineEmits" | "defineProps" | "defineOptions" | "defineSlots" | "defineModel"]
1488 "defineExposeLast"?: bool
1489 ...
1490 }, ...]])
1491
1492 // enforce declaration style of `defineProps`
1493 // https://eslint.vuejs.org/rules/define-props-declaration.html
1494 "eslint-plugin-vue/define-props-declaration"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1495 ...
1496 }, ...]])
1497
1498 // Enforce consistent newlines before and after dots in
1499 // `<template>`
1500 // https://eslint.vuejs.org/rules/dot-location.html
1501 "eslint-plugin-vue/dot-location"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1502 ...
1503 }, ...]])
1504
1505 // Enforce dot notation whenever possible in `<template>`
1506 // https://eslint.vuejs.org/rules/dot-notation.html
1507 "eslint-plugin-vue/dot-notation"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1508 "allowKeywords"?: bool
1509 "allowPattern"?: string
1510 ...
1511 }, ...]])
1512
1513 // enforce or forbid the use of the `scoped` and `module`
1514 // attributes in SFC top level style tags
1515 // https://eslint.vuejs.org/rules/enforce-style-attribute.html
1516 "eslint-plugin-vue/enforce-style-attribute"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1517 "allow"?: list.UniqueItems() & [_, ...] & [..."plain" | "scoped" | "module"]
1518 ...
1519 }, ...]])
1520
1521 // Require the use of `===` and `!==` in `<template>`
1522 // https://eslint.vuejs.org/rules/eqeqeq.html
1523 "eslint-plugin-vue/eqeqeq"?: _
1524
1525 // enforce the location of first attribute
1526 // https://eslint.vuejs.org/rules/first-attribute-linebreak.html
1527 "eslint-plugin-vue/first-attribute-linebreak"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1528 "multiline"?: "below" | "beside" | "ignore"
1529 "singleline"?: "below" | "beside" | "ignore"
1530 ...
1531 }, ...]])
1532
1533 // Require or disallow spacing between function identifiers and
1534 // their invocations in `<template>`
1535 // https://eslint.vuejs.org/rules/func-call-spacing.html
1536 "eslint-plugin-vue/func-call-spacing"?: _
1537
1538 // disallow usage of button without an explicit type attribute
1539 // https://eslint.vuejs.org/rules/html-button-has-type.html
1540 "eslint-plugin-vue/html-button-has-type"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1541 "button"?: bool
1542 "submit"?: bool
1543 "reset"?: bool
1544 ...
1545 }, ...]])
1546
1547 // require or disallow a line break before tag's closing brackets
1548 // https://eslint.vuejs.org/rules/html-closing-bracket-newline.html
1549 "eslint-plugin-vue/html-closing-bracket-newline"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1550 "singleline"?: "always" | "never"
1551 "multiline"?: "always" | "never"
1552 "selfClosingTag"?: struct.MinFields(1) & close({
1553 "singleline"?: "always" | "never"
1554 "multiline"?: "always" | "never"
1555 })
1556 ...
1557 }, ...]])
1558
1559 // require or disallow a space before tag's closing brackets
1560 // https://eslint.vuejs.org/rules/html-closing-bracket-spacing.html
1561 "eslint-plugin-vue/html-closing-bracket-spacing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1562 "startTag"?: "always" | "never"
1563 "endTag"?: "always" | "never"
1564 "selfClosingTag"?: "always" | "never"
1565 ...
1566 }, ...]])
1567
1568 // enforce unified line brake in HTML comments
1569 // https://eslint.vuejs.org/rules/html-comment-content-newline.html
1570 "eslint-plugin-vue/html-comment-content-newline"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1571 ...
1572 }, ...]])
1573
1574 // enforce unified spacing in HTML comments
1575 // https://eslint.vuejs.org/rules/html-comment-content-spacing.html
1576 "eslint-plugin-vue/html-comment-content-spacing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1577 ...
1578 }, ...]])
1579
1580 // enforce consistent indentation in HTML comments
1581 // https://eslint.vuejs.org/rules/html-comment-indent.html
1582 "eslint-plugin-vue/html-comment-indent"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1583 ...
1584 }, ...]])
1585
1586 // enforce end tag style
1587 // https://eslint.vuejs.org/rules/html-end-tags.html
1588 "eslint-plugin-vue/html-end-tags"?: _
1589
1590 // enforce consistent indentation in `<template>`
1591 // https://eslint.vuejs.org/rules/html-indent.html
1592 "eslint-plugin-vue/html-indent"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1593 ...
1594 }, ...]])
1595
1596 // enforce quotes style of HTML attributes
1597 // https://eslint.vuejs.org/rules/html-quotes.html
1598 "eslint-plugin-vue/html-quotes"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1599 ...
1600 }, ...]])
1601
1602 // enforce self-closing style
1603 // https://eslint.vuejs.org/rules/html-self-closing.html
1604 "eslint-plugin-vue/html-self-closing"?: _
1605
1606 // prevent variables used in JSX to be marked as unused
1607 // https://eslint.vuejs.org/rules/jsx-uses-vars.html
1608 "eslint-plugin-vue/jsx-uses-vars"?: _
1609
1610 // Enforce consistent spacing between keys and values in object
1611 // literal properties in `<template>`
1612 // https://eslint.vuejs.org/rules/key-spacing.html
1613 "eslint-plugin-vue/key-spacing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1614 ...
1615 }, ...]])
1616
1617 // Enforce consistent spacing before and after keywords in
1618 // `<template>`
1619 // https://eslint.vuejs.org/rules/keyword-spacing.html
1620 "eslint-plugin-vue/keyword-spacing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1621 "before"?: bool
1622 "after"?: bool
1623 "overrides"?: close({
1624 "abstract"?: close({
1625 "before"?: bool
1626 "after"?: bool
1627 })
1628 "as"?: close({
1629 "before"?: bool
1630 "after"?: bool
1631 })
1632 "async"?: close({
1633 "before"?: bool
1634 "after"?: bool
1635 })
1636 "await"?: close({
1637 "before"?: bool
1638 "after"?: bool
1639 })
1640 "boolean"?: close({
1641 "before"?: bool
1642 "after"?: bool
1643 })
1644 "break"?: close({
1645 "before"?: bool
1646 "after"?: bool
1647 })
1648 "byte"?: close({
1649 "before"?: bool
1650 "after"?: bool
1651 })
1652 "case"?: close({
1653 "before"?: bool
1654 "after"?: bool
1655 })
1656 "catch"?: close({
1657 "before"?: bool
1658 "after"?: bool
1659 })
1660 "char"?: close({
1661 "before"?: bool
1662 "after"?: bool
1663 })
1664 "class"?: close({
1665 "before"?: bool
1666 "after"?: bool
1667 })
1668 "const"?: close({
1669 "before"?: bool
1670 "after"?: bool
1671 })
1672 "continue"?: close({
1673 "before"?: bool
1674 "after"?: bool
1675 })
1676 "debugger"?: close({
1677 "before"?: bool
1678 "after"?: bool
1679 })
1680 "default"?: close({
1681 "before"?: bool
1682 "after"?: bool
1683 })
1684 "delete"?: close({
1685 "before"?: bool
1686 "after"?: bool
1687 })
1688 "do"?: close({
1689 "before"?: bool
1690 "after"?: bool
1691 })
1692 "double"?: close({
1693 "before"?: bool
1694 "after"?: bool
1695 })
1696 "else"?: close({
1697 "before"?: bool
1698 "after"?: bool
1699 })
1700 "enum"?: close({
1701 "before"?: bool
1702 "after"?: bool
1703 })
1704 "export"?: close({
1705 "before"?: bool
1706 "after"?: bool
1707 })
1708 "extends"?: close({
1709 "before"?: bool
1710 "after"?: bool
1711 })
1712 "false"?: close({
1713 "before"?: bool
1714 "after"?: bool
1715 })
1716 "final"?: close({
1717 "before"?: bool
1718 "after"?: bool
1719 })
1720 "finally"?: close({
1721 "before"?: bool
1722 "after"?: bool
1723 })
1724 "float"?: close({
1725 "before"?: bool
1726 "after"?: bool
1727 })
1728 "for"?: close({
1729 "before"?: bool
1730 "after"?: bool
1731 })
1732 "from"?: close({
1733 "before"?: bool
1734 "after"?: bool
1735 })
1736 "function"?: close({
1737 "before"?: bool
1738 "after"?: bool
1739 })
1740 "get"?: close({
1741 "before"?: bool
1742 "after"?: bool
1743 })
1744 "goto"?: close({
1745 "before"?: bool
1746 "after"?: bool
1747 })
1748 "if"?: close({
1749 "before"?: bool
1750 "after"?: bool
1751 })
1752 "implements"?: close({
1753 "before"?: bool
1754 "after"?: bool
1755 })
1756 "import"?: close({
1757 "before"?: bool
1758 "after"?: bool
1759 })
1760 "in"?: close({
1761 "before"?: bool
1762 "after"?: bool
1763 })
1764 "instanceof"?: close({
1765 "before"?: bool
1766 "after"?: bool
1767 })
1768 "int"?: close({
1769 "before"?: bool
1770 "after"?: bool
1771 })
1772 "interface"?: close({
1773 "before"?: bool
1774 "after"?: bool
1775 })
1776 "let"?: close({
1777 "before"?: bool
1778 "after"?: bool
1779 })
1780 "long"?: close({
1781 "before"?: bool
1782 "after"?: bool
1783 })
1784 "native"?: close({
1785 "before"?: bool
1786 "after"?: bool
1787 })
1788 "new"?: close({
1789 "before"?: bool
1790 "after"?: bool
1791 })
1792 "null"?: close({
1793 "before"?: bool
1794 "after"?: bool
1795 })
1796 "of"?: close({
1797 "before"?: bool
1798 "after"?: bool
1799 })
1800 "package"?: close({
1801 "before"?: bool
1802 "after"?: bool
1803 })
1804 "private"?: close({
1805 "before"?: bool
1806 "after"?: bool
1807 })
1808 "protected"?: close({
1809 "before"?: bool
1810 "after"?: bool
1811 })
1812 "public"?: close({
1813 "before"?: bool
1814 "after"?: bool
1815 })
1816 "return"?: close({
1817 "before"?: bool
1818 "after"?: bool
1819 })
1820 "set"?: close({
1821 "before"?: bool
1822 "after"?: bool
1823 })
1824 "short"?: close({
1825 "before"?: bool
1826 "after"?: bool
1827 })
1828 "static"?: close({
1829 "before"?: bool
1830 "after"?: bool
1831 })
1832 "super"?: close({
1833 "before"?: bool
1834 "after"?: bool
1835 })
1836 "switch"?: close({
1837 "before"?: bool
1838 "after"?: bool
1839 })
1840 "synchronized"?: close({
1841 "before"?: bool
1842 "after"?: bool
1843 })
1844 "this"?: close({
1845 "before"?: bool
1846 "after"?: bool
1847 })
1848 "throw"?: close({
1849 "before"?: bool
1850 "after"?: bool
1851 })
1852 "throws"?: close({
1853 "before"?: bool
1854 "after"?: bool
1855 })
1856 "transient"?: close({
1857 "before"?: bool
1858 "after"?: bool
1859 })
1860 "true"?: close({
1861 "before"?: bool
1862 "after"?: bool
1863 })
1864 "try"?: close({
1865 "before"?: bool
1866 "after"?: bool
1867 })
1868 "typeof"?: close({
1869 "before"?: bool
1870 "after"?: bool
1871 })
1872 "var"?: close({
1873 "before"?: bool
1874 "after"?: bool
1875 })
1876 "void"?: close({
1877 "before"?: bool
1878 "after"?: bool
1879 })
1880 "volatile"?: close({
1881 "before"?: bool
1882 "after"?: bool
1883 })
1884 "while"?: close({
1885 "before"?: bool
1886 "after"?: bool
1887 })
1888 "with"?: close({
1889 "before"?: bool
1890 "after"?: bool
1891 })
1892 "yield"?: close({
1893 "before"?: bool
1894 "after"?: bool
1895 })
1896 })
1897 ...
1898 }, ...]])
1899
1900 // require component name property to match its file name
1901 // https://eslint.vuejs.org/rules/match-component-file-name.html
1902 "eslint-plugin-vue/match-component-file-name"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1903 "extensions"?: list.UniqueItems() & [...string]
1904 "shouldMatchCase"?: bool
1905 ...
1906 }, ...]])
1907
1908 // require the registered component name to match the imported
1909 // component name
1910 // https://eslint.vuejs.org/rules/match-component-import-name.html
1911 "eslint-plugin-vue/match-component-import-name"?: _
1912
1913 // enforce the maximum number of attributes per line
1914 // https://eslint.vuejs.org/rules/max-attributes-per-line.html
1915 "eslint-plugin-vue/max-attributes-per-line"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1916 "singleline"?: matchN(>=1, [>=1, close({
1917 "max"?: >=1
1918 })])
1919 "multiline"?: matchN(>=1, [>=1, close({
1920 "max"?: >=1
1921 })])
1922 ...
1923 }, ...]])
1924
1925 // enforce a maximum line length in `.vue` files
1926 // https://eslint.vuejs.org/rules/max-len.html
1927 "eslint-plugin-vue/max-len"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1928 ...
1929 }, ...]])
1930
1931 // enforce maximum number of lines in Vue SFC blocks
1932 // https://eslint.vuejs.org/rules/max-lines-per-block.html
1933 "eslint-plugin-vue/max-lines-per-block"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1934 "style"?: int & >=1
1935 "template"?: int & >=1
1936 "script"?: int & >=1
1937 "skipBlankLines"?: bool
1938 ...
1939 }, ...]])
1940
1941 // require component names to be always multi-word
1942 // https://eslint.vuejs.org/rules/multi-word-component-names.html
1943 "eslint-plugin-vue/multi-word-component-names"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1944 "ignores"?: list.UniqueItems() & [...string]
1945 ...
1946 }, ...]])
1947
1948 // require a line break before and after the contents of a
1949 // multiline element
1950 // https://eslint.vuejs.org/rules/multiline-html-element-content-newline.html
1951 "eslint-plugin-vue/multiline-html-element-content-newline"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1952 "ignoreWhenEmpty"?: bool
1953 "ignores"?: list.UniqueItems() & [...string]
1954 "allowEmptyLines"?: bool
1955 ...
1956 }, ...]])
1957
1958 // Enforce newlines between operands of ternary expressions in
1959 // `<template>`
1960 // https://eslint.vuejs.org/rules/multiline-ternary.html
1961 "eslint-plugin-vue/multiline-ternary"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1962 ...
1963 }, ...]])
1964
1965 // enforce unified spacing in mustache interpolations
1966 // https://eslint.vuejs.org/rules/mustache-interpolation-spacing.html
1967 "eslint-plugin-vue/mustache-interpolation-spacing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1968 ...
1969 }, ...]])
1970
1971 // enforce new lines between multi-line properties in Vue
1972 // components
1973 // https://eslint.vuejs.org/rules/new-line-between-multi-line-property.html
1974 "eslint-plugin-vue/new-line-between-multi-line-property"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1975 "minLineOfMultilineProperty"?: >=2
1976 ...
1977 }, ...]])
1978
1979 // enforce Promise or callback style in `nextTick`
1980 // https://eslint.vuejs.org/rules/next-tick-style.html
1981 "eslint-plugin-vue/next-tick-style"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1982 ...
1983 }, ...]])
1984
1985 // disallow using arrow functions to define watcher
1986 // https://eslint.vuejs.org/rules/no-arrow-functions-in-watch.html
1987 "eslint-plugin-vue/no-arrow-functions-in-watch"?: _
1988
1989 // disallow asynchronous actions in computed properties
1990 // https://eslint.vuejs.org/rules/no-async-in-computed-properties.html
1991 "eslint-plugin-vue/no-async-in-computed-properties"?: _
1992
1993 // disallow the use of bare strings in `<template>`
1994 // https://eslint.vuejs.org/rules/no-bare-strings-in-template.html
1995 "eslint-plugin-vue/no-bare-strings-in-template"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
1996 "allowlist"?: list.UniqueItems() & [...string]
1997 "attributes"?: close({
1998 {[=~"^(?:\\S+|/.*/[a-z]*)$"]: list.UniqueItems() & [...string]}
1999 })
2000 "directives"?: list.UniqueItems() & [...=~"^v-"]
2001 ...
2002 }, ...]])
2003
2004 // disallow boolean defaults
2005 // https://eslint.vuejs.org/rules/no-boolean-default.html
2006 "eslint-plugin-vue/no-boolean-default"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2007 ...
2008 }, ...]])
2009
2010 // disallow element's child contents which would be overwritten by
2011 // a directive like `v-html` or `v-text`
2012 // https://eslint.vuejs.org/rules/no-child-content.html
2013 "eslint-plugin-vue/no-child-content"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2014 "additionalDirectives"?: list.UniqueItems() & [_, ...] & [...string]
2015 ...
2016 }, ...]])
2017
2018 // disallow accessing computed properties in `data`.
2019 // https://eslint.vuejs.org/rules/no-computed-properties-in-data.html
2020 "eslint-plugin-vue/no-computed-properties-in-data"?: _
2021
2022 // Disallow the use of `console` in `<template>`
2023 // https://eslint.vuejs.org/rules/no-console.html
2024 "eslint-plugin-vue/no-console"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2025 "allow"?: list.UniqueItems() & [...string] & [_, ...]
2026 ...
2027 }, ...]])
2028
2029 // Disallow constant expressions in conditions in `<template>`
2030 // https://eslint.vuejs.org/rules/no-constant-condition.html
2031 "eslint-plugin-vue/no-constant-condition"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2032 "checkLoops"?: bool
2033 ...
2034 }, ...]])
2035
2036 // disallow custom modifiers on v-model used on the component
2037 // https://eslint.vuejs.org/rules/no-custom-modifiers-on-v-model.html
2038 "eslint-plugin-vue/no-custom-modifiers-on-v-model"?: _
2039
2040 // disallow using deprecated object declaration on data (in Vue.js
2041 // 3.0.0+)
2042 // https://eslint.vuejs.org/rules/no-deprecated-data-object-declaration.html
2043 "eslint-plugin-vue/no-deprecated-data-object-declaration"?: _
2044
2045 // disallow using deprecated `destroyed` and `beforeDestroy`
2046 // lifecycle hooks (in Vue.js 3.0.0+)
2047 // https://eslint.vuejs.org/rules/no-deprecated-destroyed-lifecycle.html
2048 "eslint-plugin-vue/no-deprecated-destroyed-lifecycle"?: _
2049
2050 // disallow using deprecated `$listeners` (in Vue.js 3.0.0+)
2051 // https://eslint.vuejs.org/rules/no-deprecated-dollar-listeners-api.html
2052 "eslint-plugin-vue/no-deprecated-dollar-listeners-api"?: _
2053
2054 // disallow using deprecated `$scopedSlots` (in Vue.js 3.0.0+)
2055 // https://eslint.vuejs.org/rules/no-deprecated-dollar-scopedslots-api.html
2056 "eslint-plugin-vue/no-deprecated-dollar-scopedslots-api"?: _
2057
2058 // disallow using deprecated events api (in Vue.js 3.0.0+)
2059 // https://eslint.vuejs.org/rules/no-deprecated-events-api.html
2060 "eslint-plugin-vue/no-deprecated-events-api"?: _
2061
2062 // disallow using deprecated filters syntax (in Vue.js 3.0.0+)
2063 // https://eslint.vuejs.org/rules/no-deprecated-filter.html
2064 "eslint-plugin-vue/no-deprecated-filter"?: _
2065
2066 // disallow using deprecated the `functional` template (in Vue.js
2067 // 3.0.0+)
2068 // https://eslint.vuejs.org/rules/no-deprecated-functional-template.html
2069 "eslint-plugin-vue/no-deprecated-functional-template"?: _
2070
2071 // disallow using deprecated the `is` attribute on HTML elements
2072 // (in Vue.js 3.0.0+)
2073 // https://eslint.vuejs.org/rules/no-deprecated-html-element-is.html
2074 "eslint-plugin-vue/no-deprecated-html-element-is"?: _
2075
2076 // disallow using deprecated `inline-template` attribute (in
2077 // Vue.js 3.0.0+)
2078 // https://eslint.vuejs.org/rules/no-deprecated-inline-template.html
2079 "eslint-plugin-vue/no-deprecated-inline-template"?: _
2080
2081 // disallow deprecated `model` definition (in Vue.js 3.0.0+)
2082 // https://eslint.vuejs.org/rules/no-deprecated-model-definition.html
2083 "eslint-plugin-vue/no-deprecated-model-definition"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2084 "allowVue3Compat"?: bool
2085 ...
2086 }, ...]])
2087
2088 // disallow deprecated `this` access in props default function (in
2089 // Vue.js 3.0.0+)
2090 // https://eslint.vuejs.org/rules/no-deprecated-props-default-this.html
2091 "eslint-plugin-vue/no-deprecated-props-default-this"?: _
2092
2093 // disallow using deprecated `tag` property on `RouterLink` (in
2094 // Vue.js 3.0.0+)
2095 // https://eslint.vuejs.org/rules/no-deprecated-router-link-tag-prop.html
2096 "eslint-plugin-vue/no-deprecated-router-link-tag-prop"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2097 "components"?: list.UniqueItems() & [...string] & [_, ...]
2098 ...
2099 }, ...]])
2100
2101 // disallow deprecated `scope` attribute (in Vue.js 2.5.0+)
2102 // https://eslint.vuejs.org/rules/no-deprecated-scope-attribute.html
2103 "eslint-plugin-vue/no-deprecated-scope-attribute"?: _
2104
2105 // disallow deprecated `slot` attribute (in Vue.js 2.6.0+)
2106 // https://eslint.vuejs.org/rules/no-deprecated-slot-attribute.html
2107 "eslint-plugin-vue/no-deprecated-slot-attribute"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2108 "ignore"?: list.UniqueItems() & [...string]
2109 ...
2110 }, ...]])
2111
2112 // disallow deprecated `slot-scope` attribute (in Vue.js 2.6.0+)
2113 // https://eslint.vuejs.org/rules/no-deprecated-slot-scope-attribute.html
2114 "eslint-plugin-vue/no-deprecated-slot-scope-attribute"?: _
2115
2116 // disallow use of deprecated `.sync` modifier on `v-bind`
2117 // directive (in Vue.js 3.0.0+)
2118 // https://eslint.vuejs.org/rules/no-deprecated-v-bind-sync.html
2119 "eslint-plugin-vue/no-deprecated-v-bind-sync"?: _
2120
2121 // disallow deprecated `v-is` directive (in Vue.js 3.1.0+)
2122 // https://eslint.vuejs.org/rules/no-deprecated-v-is.html
2123 "eslint-plugin-vue/no-deprecated-v-is"?: _
2124
2125 // disallow using deprecated `.native` modifiers (in Vue.js
2126 // 3.0.0+)
2127 // https://eslint.vuejs.org/rules/no-deprecated-v-on-native-modifier.html
2128 "eslint-plugin-vue/no-deprecated-v-on-native-modifier"?: _
2129
2130 // disallow using deprecated number (keycode) modifiers (in Vue.js
2131 // 3.0.0+)
2132 // https://eslint.vuejs.org/rules/no-deprecated-v-on-number-modifiers.html
2133 "eslint-plugin-vue/no-deprecated-v-on-number-modifiers"?: _
2134
2135 // disallow using deprecated `Vue.config.keyCodes` (in Vue.js
2136 // 3.0.0+)
2137 // https://eslint.vuejs.org/rules/no-deprecated-vue-config-keycodes.html
2138 "eslint-plugin-vue/no-deprecated-vue-config-keycodes"?: _
2139
2140 // disallow duplication of field names
2141 // https://eslint.vuejs.org/rules/no-dupe-keys.html
2142 "eslint-plugin-vue/no-dupe-keys"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2143 "groups"?: [...]
2144 ...
2145 }, ...]])
2146
2147 // disallow duplicate conditions in `v-if` / `v-else-if` chains
2148 // https://eslint.vuejs.org/rules/no-dupe-v-else-if.html
2149 "eslint-plugin-vue/no-dupe-v-else-if"?: _
2150
2151 // enforce `inheritAttrs` to be set to `false` when using
2152 // `v-bind="$attrs"`
2153 // https://eslint.vuejs.org/rules/no-duplicate-attr-inheritance.html
2154 "eslint-plugin-vue/no-duplicate-attr-inheritance"?: _
2155
2156 // disallow duplication of attributes
2157 // https://eslint.vuejs.org/rules/no-duplicate-attributes.html
2158 "eslint-plugin-vue/no-duplicate-attributes"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2159 "allowCoexistClass"?: bool
2160 "allowCoexistStyle"?: bool
2161 ...
2162 }, ...]])
2163
2164 // disallow the `<template>` `<script>` `<style>` block to be
2165 // empty
2166 // https://eslint.vuejs.org/rules/no-empty-component-block.html
2167 "eslint-plugin-vue/no-empty-component-block"?: _
2168
2169 // Disallow empty destructuring patterns in `<template>`
2170 // https://eslint.vuejs.org/rules/no-empty-pattern.html
2171 "eslint-plugin-vue/no-empty-pattern"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2172 "allowObjectPatternsAsParameters"?: bool
2173 ...
2174 }, ...]])
2175
2176 // disallow `export` in `<script setup>`
2177 // https://eslint.vuejs.org/rules/no-export-in-script-setup.html
2178 "eslint-plugin-vue/no-export-in-script-setup"?: _
2179
2180 // disallow asynchronously registered `expose`
2181 // https://eslint.vuejs.org/rules/no-expose-after-await.html
2182 "eslint-plugin-vue/no-expose-after-await"?: _
2183
2184 // Disallow unnecessary parentheses in `<template>`
2185 // https://eslint.vuejs.org/rules/no-extra-parens.html
2186 "eslint-plugin-vue/no-extra-parens"?: _
2187
2188 // require valid keys in model option
2189 // https://eslint.vuejs.org/rules/no-invalid-model-keys.html
2190 "eslint-plugin-vue/no-invalid-model-keys"?: _
2191
2192 // disallow irregular whitespace in `.vue` files
2193 // https://eslint.vuejs.org/rules/no-irregular-whitespace.html
2194 "eslint-plugin-vue/no-irregular-whitespace"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2195 "skipComments"?: bool
2196 "skipStrings"?: bool
2197 "skipTemplates"?: bool
2198 "skipRegExps"?: bool
2199 "skipHTMLAttributeValues"?: bool
2200 "skipHTMLTextContents"?: bool
2201 ...
2202 }, ...]])
2203
2204 // disallow asynchronously registered lifecycle hooks
2205 // https://eslint.vuejs.org/rules/no-lifecycle-after-await.html
2206 "eslint-plugin-vue/no-lifecycle-after-await"?: _
2207
2208 // disallow unnecessary `<template>`
2209 // https://eslint.vuejs.org/rules/no-lone-template.html
2210 "eslint-plugin-vue/no-lone-template"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2211 "ignoreAccessible"?: bool
2212 ...
2213 }, ...]])
2214
2215 // Disallow literal numbers that lose precision in `<template>`
2216 // https://eslint.vuejs.org/rules/no-loss-of-precision.html
2217 "eslint-plugin-vue/no-loss-of-precision"?: _
2218
2219 // disallow multiple spaces
2220 // https://eslint.vuejs.org/rules/no-multi-spaces.html
2221 "eslint-plugin-vue/no-multi-spaces"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2222 "ignoreProperties"?: bool
2223 ...
2224 }, ...]])
2225
2226 // disallow to pass multiple objects into array to class
2227 // https://eslint.vuejs.org/rules/no-multiple-objects-in-class.html
2228 "eslint-plugin-vue/no-multiple-objects-in-class"?: _
2229
2230 // disallow to pass multiple arguments to scoped slots
2231 // https://eslint.vuejs.org/rules/no-multiple-slot-args.html
2232 "eslint-plugin-vue/no-multiple-slot-args"?: _
2233
2234 // disallow adding multiple root nodes to the template
2235 // https://eslint.vuejs.org/rules/no-multiple-template-root.html
2236 "eslint-plugin-vue/no-multiple-template-root"?: _
2237
2238 // disallow mutation of component props
2239 // https://eslint.vuejs.org/rules/no-mutating-props.html
2240 "eslint-plugin-vue/no-mutating-props"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2241 "shallowOnly"?: bool
2242 ...
2243 }, ...]])
2244
2245 // disallow parsing errors in `<template>`
2246 // https://eslint.vuejs.org/rules/no-parsing-error.html
2247 "eslint-plugin-vue/no-parsing-error"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2248 "abrupt-closing-of-empty-comment"?: bool
2249 "absence-of-digits-in-numeric-character-reference"?: bool
2250 "cdata-in-html-content"?: bool
2251 "character-reference-outside-unicode-range"?: bool
2252 "control-character-in-input-stream"?: bool
2253 "control-character-reference"?: bool
2254 "eof-before-tag-name"?: bool
2255 "eof-in-cdata"?: bool
2256 "eof-in-comment"?: bool
2257 "eof-in-tag"?: bool
2258 "incorrectly-closed-comment"?: bool
2259 "incorrectly-opened-comment"?: bool
2260 "invalid-first-character-of-tag-name"?: bool
2261 "missing-attribute-value"?: bool
2262 "missing-end-tag-name"?: bool
2263 "missing-semicolon-after-character-reference"?: bool
2264 "missing-whitespace-between-attributes"?: bool
2265 "nested-comment"?: bool
2266 "noncharacter-character-reference"?: bool
2267 "noncharacter-in-input-stream"?: bool
2268 "null-character-reference"?: bool
2269 "surrogate-character-reference"?: bool
2270 "surrogate-in-input-stream"?: bool
2271 "unexpected-character-in-attribute-name"?: bool
2272 "unexpected-character-in-unquoted-attribute-value"?: bool
2273 "unexpected-equals-sign-before-attribute-name"?: bool
2274 "unexpected-null-character"?: bool
2275 "unexpected-question-mark-instead-of-tag-name"?: bool
2276 "unexpected-solidus-in-tag"?: bool
2277 "unknown-named-character-reference"?: bool
2278 "end-tag-with-attributes"?: bool
2279 "duplicate-attribute"?: bool
2280 "end-tag-with-trailing-solidus"?: bool
2281 "non-void-html-element-start-tag-with-trailing-solidus"?: bool
2282 "x-invalid-end-tag"?: bool
2283 "x-invalid-namespace"?: bool
2284 ...
2285 }, ...]])
2286
2287 // disallow a potential typo in your component property
2288 // https://eslint.vuejs.org/rules/no-potential-component-option-typo.html
2289 "eslint-plugin-vue/no-potential-component-option-typo"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2290 "presets"?: list.UniqueItems() & [..."all" | "vue" | "vue-router" | "nuxt"] & [...]
2291 "custom"?: list.UniqueItems() & [...] & [...string]
2292 "threshold"?: >=1
2293 ...
2294 }, ...]])
2295
2296 // disallow use of value wrapped by `ref()` (Composition API) as
2297 // an operand
2298 // https://eslint.vuejs.org/rules/no-ref-as-operand.html
2299 "eslint-plugin-vue/no-ref-as-operand"?: _
2300
2301 // disallow usages of ref objects that can lead to loss of
2302 // reactivity
2303 // https://eslint.vuejs.org/rules/no-ref-object-destructure.html
2304 "eslint-plugin-vue/no-ref-object-destructure"?: _
2305
2306 // disallow usages of ref objects that can lead to loss of
2307 // reactivity
2308 // https://eslint.vuejs.org/rules/no-ref-object-reactivity-loss.html
2309 "eslint-plugin-vue/no-ref-object-reactivity-loss"?: _
2310
2311 // enforce props with default values to be optional
2312 // https://eslint.vuejs.org/rules/no-required-prop-with-default.html
2313 "eslint-plugin-vue/no-required-prop-with-default"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2314 "autofix"?: bool
2315 ...
2316 }, ...]])
2317
2318 // disallow the use of reserved names in component definitions
2319 // https://eslint.vuejs.org/rules/no-reserved-component-names.html
2320 "eslint-plugin-vue/no-reserved-component-names"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2321 "disallowVueBuiltInComponents"?: bool
2322 "disallowVue3BuiltInComponents"?: bool
2323 ...
2324 }, ...]])
2325
2326 // disallow overwriting reserved keys
2327 // https://eslint.vuejs.org/rules/no-reserved-keys.html
2328 "eslint-plugin-vue/no-reserved-keys"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2329 "reserved"?: [...]
2330 "groups"?: [...]
2331 ...
2332 }, ...]])
2333
2334 // disallow reserved names in props
2335 // https://eslint.vuejs.org/rules/no-reserved-props.html
2336 "eslint-plugin-vue/no-reserved-props"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2337 "vueVersion"?: 2 | 3
2338 ...
2339 }, ...]])
2340
2341 // disallow specific block
2342 // https://eslint.vuejs.org/rules/no-restricted-block.html
2343 "eslint-plugin-vue/no-restricted-block"?: _
2344
2345 // disallow asynchronously called restricted methods
2346 // https://eslint.vuejs.org/rules/no-restricted-call-after-await.html
2347 "eslint-plugin-vue/no-restricted-call-after-await"?: _
2348
2349 // disallow specific classes in Vue components
2350 // https://eslint.vuejs.org/rules/no-restricted-class.html
2351 "eslint-plugin-vue/no-restricted-class"?: _
2352
2353 // disallow specific component names
2354 // https://eslint.vuejs.org/rules/no-restricted-component-names.html
2355 "eslint-plugin-vue/no-restricted-component-names"?: _
2356
2357 // disallow specific component option
2358 // https://eslint.vuejs.org/rules/no-restricted-component-options.html
2359 "eslint-plugin-vue/no-restricted-component-options"?: _
2360
2361 // disallow specific custom event
2362 // https://eslint.vuejs.org/rules/no-restricted-custom-event.html
2363 "eslint-plugin-vue/no-restricted-custom-event"?: _
2364
2365 // disallow specific HTML elements
2366 // https://eslint.vuejs.org/rules/no-restricted-html-elements.html
2367 "eslint-plugin-vue/no-restricted-html-elements"?: _
2368
2369 // disallow specific props
2370 // https://eslint.vuejs.org/rules/no-restricted-props.html
2371 "eslint-plugin-vue/no-restricted-props"?: _
2372
2373 // disallow specific attribute
2374 // https://eslint.vuejs.org/rules/no-restricted-static-attribute.html
2375 "eslint-plugin-vue/no-restricted-static-attribute"?: _
2376
2377 // Disallow specified syntax in `<template>`
2378 // https://eslint.vuejs.org/rules/no-restricted-syntax.html
2379 "eslint-plugin-vue/no-restricted-syntax"?: _
2380
2381 // disallow specific argument in `v-bind`
2382 // https://eslint.vuejs.org/rules/no-restricted-v-bind.html
2383 "eslint-plugin-vue/no-restricted-v-bind"?: _
2384
2385 // disallow specific argument in `v-on`
2386 // https://eslint.vuejs.org/rules/no-restricted-v-on.html
2387 "eslint-plugin-vue/no-restricted-v-on"?: _
2388
2389 // disallow `v-if` directives on root element
2390 // https://eslint.vuejs.org/rules/no-root-v-if.html
2391 "eslint-plugin-vue/no-root-v-if"?: _
2392
2393 // disallow usages that lose the reactivity of `props` passed to
2394 // `setup`
2395 // https://eslint.vuejs.org/rules/no-setup-props-destructure.html
2396 "eslint-plugin-vue/no-setup-props-destructure"?: _
2397
2398 // disallow usages that lose the reactivity of `props` passed to
2399 // `setup`
2400 // https://eslint.vuejs.org/rules/no-setup-props-reactivity-loss.html
2401 "eslint-plugin-vue/no-setup-props-reactivity-loss"?: _
2402
2403 // enforce component's data property to be a function
2404 // https://eslint.vuejs.org/rules/no-shared-component-data.html
2405 "eslint-plugin-vue/no-shared-component-data"?: _
2406
2407 // disallow side effects in computed properties
2408 // https://eslint.vuejs.org/rules/no-side-effects-in-computed-properties.html
2409 "eslint-plugin-vue/no-side-effects-in-computed-properties"?: _
2410
2411 // disallow spaces around equal signs in attribute
2412 // https://eslint.vuejs.org/rules/no-spaces-around-equal-signs-in-attribute.html
2413 "eslint-plugin-vue/no-spaces-around-equal-signs-in-attribute"?: _
2414
2415 // Disallow sparse arrays in `<template>`
2416 // https://eslint.vuejs.org/rules/no-sparse-arrays.html
2417 "eslint-plugin-vue/no-sparse-arrays"?: _
2418
2419 // disallow static inline `style` attributes
2420 // https://eslint.vuejs.org/rules/no-static-inline-styles.html
2421 "eslint-plugin-vue/no-static-inline-styles"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2422 "allowBinding"?: bool
2423 ...
2424 }, ...]])
2425
2426 // disallow `key` attribute on `<template>`
2427 // https://eslint.vuejs.org/rules/no-template-key.html
2428 "eslint-plugin-vue/no-template-key"?: _
2429
2430 // disallow variable declarations from shadowing variables
2431 // declared in the outer scope
2432 // https://eslint.vuejs.org/rules/no-template-shadow.html
2433 "eslint-plugin-vue/no-template-shadow"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2434 "allow"?: list.UniqueItems() & [...string]
2435 ...
2436 }, ...]])
2437
2438 // disallow target="_blank" attribute without rel="noopener
2439 // noreferrer"
2440 // https://eslint.vuejs.org/rules/no-template-target-blank.html
2441 "eslint-plugin-vue/no-template-target-blank"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2442 "allowReferrer"?: bool
2443 "enforceDynamicLinks"?: "always" | "never"
2444 ...
2445 }, ...]])
2446
2447 // disallow mustaches in `<textarea>`
2448 // https://eslint.vuejs.org/rules/no-textarea-mustache.html
2449 "eslint-plugin-vue/no-textarea-mustache"?: _
2450
2451 // disallow `this` usage in a `beforeRouteEnter` method
2452 // https://eslint.vuejs.org/rules/no-this-in-before-route-enter.html
2453 "eslint-plugin-vue/no-this-in-before-route-enter"?: _
2454
2455 // disallow use of undefined components in `<template>`
2456 // https://eslint.vuejs.org/rules/no-undef-components.html
2457 "eslint-plugin-vue/no-undef-components"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2458 "ignorePatterns"?: [...]
2459 ...
2460 }, ...]])
2461
2462 // disallow undefined properties
2463 // https://eslint.vuejs.org/rules/no-undef-properties.html
2464 "eslint-plugin-vue/no-undef-properties"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2465 "ignores"?: list.UniqueItems() & [...string]
2466 ...
2467 }, ...]])
2468
2469 // disallow unsupported Vue.js syntax on the specified version
2470 // https://eslint.vuejs.org/rules/no-unsupported-features.html
2471 "eslint-plugin-vue/no-unsupported-features"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2472 "version"?: string
2473 "ignores"?: list.UniqueItems() & [..."slot-scope-attribute" | "dynamic-directive-arguments" | "v-slot" | "script-setup" | "style-css-vars-injection" | "v-model-argument" | "v-model-custom-modifiers" | "v-is" | "is-attribute-with-vue-prefix" | "v-memo" | "v-bind-prop-modifier-shorthand" | "v-bind-attr-modifier" | "define-options" | "define-slots" | "define-model" | "v-bind-same-name-shorthand"]
2474 ...
2475 }, ...]])
2476
2477 // disallow registering components that are not used inside
2478 // templates
2479 // https://eslint.vuejs.org/rules/no-unused-components.html
2480 "eslint-plugin-vue/no-unused-components"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2481 "ignoreWhenBindingPresent"?: bool
2482 ...
2483 }, ...]])
2484
2485 // disallow unused emit declarations
2486 // https://eslint.vuejs.org/rules/no-unused-emit-declarations.html
2487 "eslint-plugin-vue/no-unused-emit-declarations"?: _
2488
2489 // disallow unused properties
2490 // https://eslint.vuejs.org/rules/no-unused-properties.html
2491 "eslint-plugin-vue/no-unused-properties"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2492 "groups"?: list.UniqueItems() & [..."props" | "data" | "asyncData" | "computed" | "methods" | "setup"]
2493 "deepData"?: bool
2494 "ignorePublicMembers"?: bool
2495 "unreferencedOptions"?: list.UniqueItems() & [..."unknownMemberAsUnreferenced" | "returnAsUnreferenced"]
2496 ...
2497 }, ...]])
2498
2499 // disallow unused refs
2500 // https://eslint.vuejs.org/rules/no-unused-refs.html
2501 "eslint-plugin-vue/no-unused-refs"?: _
2502
2503 // disallow unused variable definitions of v-for directives or
2504 // scope attributes
2505 // https://eslint.vuejs.org/rules/no-unused-vars.html
2506 "eslint-plugin-vue/no-unused-vars"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2507 "ignorePattern"?: string
2508 ...
2509 }, ...]])
2510
2511 // disallow use computed property like method
2512 // https://eslint.vuejs.org/rules/no-use-computed-property-like-method.html
2513 "eslint-plugin-vue/no-use-computed-property-like-method"?: _
2514
2515 // disallow using `v-else-if`/`v-else` on the same element as
2516 // `v-for`
2517 // https://eslint.vuejs.org/rules/no-use-v-else-with-v-for.html
2518 "eslint-plugin-vue/no-use-v-else-with-v-for"?: _
2519
2520 // disallow using `v-if` on the same element as `v-for`
2521 // https://eslint.vuejs.org/rules/no-use-v-if-with-v-for.html
2522 "eslint-plugin-vue/no-use-v-if-with-v-for"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2523 "allowUsingIterationVar"?: bool
2524 ...
2525 }, ...]])
2526
2527 // Disallow unnecessary concatenation of literals or template
2528 // literals in `<template>`
2529 // https://eslint.vuejs.org/rules/no-useless-concat.html
2530 "eslint-plugin-vue/no-useless-concat"?: _
2531
2532 // disallow unnecessary mustache interpolations
2533 // https://eslint.vuejs.org/rules/no-useless-mustaches.html
2534 "eslint-plugin-vue/no-useless-mustaches"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2535 "ignoreIncludesComment"?: bool
2536 "ignoreStringEscape"?: bool
2537 ...
2538 }, ...]])
2539
2540 // disallow useless attribute on `<template>`
2541 // https://eslint.vuejs.org/rules/no-useless-template-attributes.html
2542 "eslint-plugin-vue/no-useless-template-attributes"?: _
2543
2544 // disallow unnecessary `v-bind` directives
2545 // https://eslint.vuejs.org/rules/no-useless-v-bind.html
2546 "eslint-plugin-vue/no-useless-v-bind"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2547 "ignoreIncludesComment"?: bool
2548 "ignoreStringEscape"?: bool
2549 ...
2550 }, ...]])
2551
2552 // disallow key of `<template v-for>` placed on child elements
2553 // https://eslint.vuejs.org/rules/no-v-for-template-key-on-child.html
2554 "eslint-plugin-vue/no-v-for-template-key-on-child"?: _
2555
2556 // disallow `key` attribute on `<template v-for>`
2557 // https://eslint.vuejs.org/rules/no-v-for-template-key.html
2558 "eslint-plugin-vue/no-v-for-template-key"?: _
2559
2560 // disallow use of v-html to prevent XSS attack
2561 // https://eslint.vuejs.org/rules/no-v-html.html
2562 "eslint-plugin-vue/no-v-html"?: _
2563
2564 // disallow adding an argument to `v-model` used in custom
2565 // component
2566 // https://eslint.vuejs.org/rules/no-v-model-argument.html
2567 "eslint-plugin-vue/no-v-model-argument"?: _
2568
2569 // disallow v-text / v-html on component
2570 // https://eslint.vuejs.org/rules/no-v-text-v-html-on-component.html
2571 "eslint-plugin-vue/no-v-text-v-html-on-component"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2572 "allow"?: list.UniqueItems() & [...string]
2573 ...
2574 }, ...]])
2575
2576 // disallow use of v-text
2577 // https://eslint.vuejs.org/rules/no-v-text.html
2578 "eslint-plugin-vue/no-v-text"?: _
2579
2580 // disallow asynchronously registered `watch`
2581 // https://eslint.vuejs.org/rules/no-watch-after-await.html
2582 "eslint-plugin-vue/no-watch-after-await"?: _
2583
2584 // Enforce consistent line breaks after opening and before closing
2585 // braces in `<template>`
2586 // https://eslint.vuejs.org/rules/object-curly-newline.html
2587 "eslint-plugin-vue/object-curly-newline"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2588 ...
2589 }, ...]])
2590
2591 // Enforce consistent spacing inside braces in `<template>`
2592 // https://eslint.vuejs.org/rules/object-curly-spacing.html
2593 "eslint-plugin-vue/object-curly-spacing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2594 ...
2595 }, ...]])
2596
2597 // Enforce placing object properties on separate lines in
2598 // `<template>`
2599 // https://eslint.vuejs.org/rules/object-property-newline.html
2600 "eslint-plugin-vue/object-property-newline"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2601 "allowAllPropertiesOnSameLine"?: bool
2602 "allowMultiplePropertiesPerLine"?: bool
2603 ...
2604 }, ...]])
2605
2606 // Require or disallow method and property shorthand syntax for
2607 // object literals in `<template>`
2608 // https://eslint.vuejs.org/rules/object-shorthand.html
2609 "eslint-plugin-vue/object-shorthand"?: _
2610
2611 // enforce that each component should be in its own file
2612 // https://eslint.vuejs.org/rules/one-component-per-file.html
2613 "eslint-plugin-vue/one-component-per-file"?: _
2614
2615 // Enforce consistent linebreak style for operators in
2616 // `<template>`
2617 // https://eslint.vuejs.org/rules/operator-linebreak.html
2618 "eslint-plugin-vue/operator-linebreak"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2619 ...
2620 }, ...]])
2621
2622 // enforce order of properties in components
2623 // https://eslint.vuejs.org/rules/order-in-components.html
2624 "eslint-plugin-vue/order-in-components"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2625 "order"?: [...]
2626 ...
2627 }, ...]])
2628
2629 // require or disallow padding lines between blocks
2630 // https://eslint.vuejs.org/rules/padding-line-between-blocks.html
2631 "eslint-plugin-vue/padding-line-between-blocks"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2632 ...
2633 }, ...]])
2634
2635 // require or disallow newlines between sibling tags in template
2636 // https://eslint.vuejs.org/rules/padding-line-between-tags.html
2637 "eslint-plugin-vue/padding-line-between-tags"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2638 ...
2639 }, ...]])
2640
2641 // require or disallow padding lines in component definition
2642 // https://eslint.vuejs.org/rules/padding-lines-in-component-definition.html
2643 "eslint-plugin-vue/padding-lines-in-component-definition"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2644 ...
2645 }, ...]])
2646
2647 // enforce use of `defineOptions` instead of default export.
2648 // https://eslint.vuejs.org/rules/prefer-define-options.html
2649 "eslint-plugin-vue/prefer-define-options"?: _
2650
2651 // enforce import from 'vue' instead of import from '@vue/*'
2652 // https://eslint.vuejs.org/rules/prefer-import-from-vue.html
2653 "eslint-plugin-vue/prefer-import-from-vue"?: _
2654
2655 // enforce `Boolean` comes first in component prop types
2656 // https://eslint.vuejs.org/rules/prefer-prop-type-boolean-first.html
2657 "eslint-plugin-vue/prefer-prop-type-boolean-first"?: _
2658
2659 // require static class names in template to be in a separate
2660 // `class` attribute
2661 // https://eslint.vuejs.org/rules/prefer-separate-static-class.html
2662 "eslint-plugin-vue/prefer-separate-static-class"?: _
2663
2664 // Require template literals instead of string concatenation in
2665 // `<template>`
2666 // https://eslint.vuejs.org/rules/prefer-template.html
2667 "eslint-plugin-vue/prefer-template"?: _
2668
2669 // require shorthand form attribute when `v-bind` value is `true`
2670 // https://eslint.vuejs.org/rules/prefer-true-attribute-shorthand.html
2671 "eslint-plugin-vue/prefer-true-attribute-shorthand"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2672 ...
2673 }, ...]])
2674
2675 // enforce specific casing for the Prop name in Vue components
2676 // https://eslint.vuejs.org/rules/prop-name-casing.html
2677 "eslint-plugin-vue/prop-name-casing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2678 ...
2679 }, ...]])
2680
2681 // Require quotes around object literal property names in
2682 // `<template>`
2683 // https://eslint.vuejs.org/rules/quote-props.html
2684 "eslint-plugin-vue/quote-props"?: _
2685
2686 // require `v-bind:is` of `<component>` elements
2687 // https://eslint.vuejs.org/rules/require-component-is.html
2688 "eslint-plugin-vue/require-component-is"?: _
2689
2690 // require default value for props
2691 // https://eslint.vuejs.org/rules/require-default-prop.html
2692 "eslint-plugin-vue/require-default-prop"?: _
2693
2694 // require the component to be directly exported
2695 // https://eslint.vuejs.org/rules/require-direct-export.html
2696 "eslint-plugin-vue/require-direct-export"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2697 "disallowFunctionalComponentFunction"?: bool
2698 ...
2699 }, ...]])
2700
2701 // require type definitions in emits
2702 // https://eslint.vuejs.org/rules/require-emit-validator.html
2703 "eslint-plugin-vue/require-emit-validator"?: _
2704
2705 // require `emits` option with name triggered by `$emit()`
2706 // https://eslint.vuejs.org/rules/require-explicit-emits.html
2707 "eslint-plugin-vue/require-explicit-emits"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2708 "allowProps"?: bool
2709 ...
2710 }, ...]])
2711
2712 // require slots to be explicitly defined
2713 // https://eslint.vuejs.org/rules/require-explicit-slots.html
2714 "eslint-plugin-vue/require-explicit-slots"?: _
2715
2716 // require declare public properties using `expose`
2717 // https://eslint.vuejs.org/rules/require-expose.html
2718 "eslint-plugin-vue/require-expose"?: _
2719
2720 // require a certain macro variable name
2721 // https://eslint.vuejs.org/rules/require-macro-variable-name.html
2722 "eslint-plugin-vue/require-macro-variable-name"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2723 "defineProps"?: string
2724 "defineEmits"?: string
2725 "defineSlots"?: string
2726 "useSlots"?: string
2727 "useAttrs"?: string
2728 ...
2729 }, ...]])
2730
2731 // require a name property in Vue components
2732 // https://eslint.vuejs.org/rules/require-name-property.html
2733 "eslint-plugin-vue/require-name-property"?: _
2734
2735 // require props to have a comment
2736 // https://eslint.vuejs.org/rules/require-prop-comment.html
2737 "eslint-plugin-vue/require-prop-comment"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2738 "type"?: "JSDoc" | "line" | "block" | "any"
2739 ...
2740 }, ...]])
2741
2742 // require prop type to be a constructor
2743 // https://eslint.vuejs.org/rules/require-prop-type-constructor.html
2744 "eslint-plugin-vue/require-prop-type-constructor"?: _
2745
2746 // require type definitions in props
2747 // https://eslint.vuejs.org/rules/require-prop-types.html
2748 "eslint-plugin-vue/require-prop-types"?: _
2749
2750 // enforce render function to always return value
2751 // https://eslint.vuejs.org/rules/require-render-return.html
2752 "eslint-plugin-vue/require-render-return"?: _
2753
2754 // enforce properties of `$slots` to be used as a function
2755 // https://eslint.vuejs.org/rules/require-slots-as-functions.html
2756 "eslint-plugin-vue/require-slots-as-functions"?: _
2757
2758 // require control the display of the content inside
2759 // `<transition>`
2760 // https://eslint.vuejs.org/rules/require-toggle-inside-transition.html
2761 "eslint-plugin-vue/require-toggle-inside-transition"?: _
2762
2763 // enforce adding type declarations to object props
2764 // https://eslint.vuejs.org/rules/require-typed-object-prop.html
2765 "eslint-plugin-vue/require-typed-object-prop"?: _
2766
2767 // require `ref` and `shallowRef` functions to be strongly typed
2768 // https://eslint.vuejs.org/rules/require-typed-ref.html
2769 "eslint-plugin-vue/require-typed-ref"?: _
2770
2771 // require `v-bind:key` with `v-for` directives
2772 // https://eslint.vuejs.org/rules/require-v-for-key.html
2773 "eslint-plugin-vue/require-v-for-key"?: _
2774
2775 // enforce props default values to be valid
2776 // https://eslint.vuejs.org/rules/require-valid-default-prop.html
2777 "eslint-plugin-vue/require-valid-default-prop"?: _
2778
2779 // enforce that a return statement is present in computed property
2780 // https://eslint.vuejs.org/rules/return-in-computed-property.html
2781 "eslint-plugin-vue/return-in-computed-property"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2782 "treatUndefinedAsUnspecified"?: bool
2783 ...
2784 }, ...]])
2785
2786 // enforce that a return statement is present in emits validator
2787 // https://eslint.vuejs.org/rules/return-in-emits-validator.html
2788 "eslint-plugin-vue/return-in-emits-validator"?: _
2789
2790 // enforce consistent indentation in `<script>`
2791 // https://eslint.vuejs.org/rules/script-indent.html
2792 "eslint-plugin-vue/script-indent"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2793 ...
2794 }, ...]])
2795
2796 // prevent `<script setup>` variables used in `<template>` to be
2797 // marked as unused
2798 // https://eslint.vuejs.org/rules/script-setup-uses-vars.html
2799 "eslint-plugin-vue/script-setup-uses-vars"?: _
2800
2801 // require a line break before and after the contents of a
2802 // singleline element
2803 // https://eslint.vuejs.org/rules/singleline-html-element-content-newline.html
2804 "eslint-plugin-vue/singleline-html-element-content-newline"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2805 "ignoreWhenNoAttributes"?: bool
2806 "ignoreWhenEmpty"?: bool
2807 "ignores"?: list.UniqueItems() & [...string]
2808 "externalIgnores"?: list.UniqueItems() & [...string]
2809 ...
2810 }, ...]])
2811
2812 // enforce sort-keys in a manner that is compatible with
2813 // order-in-components
2814 // https://eslint.vuejs.org/rules/sort-keys.html
2815 "eslint-plugin-vue/sort-keys"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2816 ...
2817 }, ...]])
2818
2819 // Enforce consistent spacing inside parentheses in `<template>`
2820 // https://eslint.vuejs.org/rules/space-in-parens.html
2821 "eslint-plugin-vue/space-in-parens"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2822 ...
2823 }, ...]])
2824
2825 // Require spacing around infix operators in `<template>`
2826 // https://eslint.vuejs.org/rules/space-infix-ops.html
2827 "eslint-plugin-vue/space-infix-ops"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2828 "int32Hint"?: bool
2829 ...
2830 }, ...]])
2831
2832 // Enforce consistent spacing before or after unary operators in
2833 // `<template>`
2834 // https://eslint.vuejs.org/rules/space-unary-ops.html
2835 "eslint-plugin-vue/space-unary-ops"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2836 "words"?: bool
2837 "nonwords"?: bool
2838 "overrides"?: {
2839 [string]: bool
2840 }
2841 ...
2842 }, ...]])
2843
2844 // enforce static class names order
2845 // https://eslint.vuejs.org/rules/static-class-names-order.html
2846 "eslint-plugin-vue/static-class-names-order"?: _
2847
2848 // Require or disallow spacing around embedded expressions of
2849 // template strings in `<template>`
2850 // https://eslint.vuejs.org/rules/template-curly-spacing.html
2851 "eslint-plugin-vue/template-curly-spacing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2852 ...
2853 }, ...]])
2854
2855 // disallow usage of `this` in template
2856 // https://eslint.vuejs.org/rules/this-in-template.html
2857 "eslint-plugin-vue/this-in-template"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2858 ...
2859 }, ...]])
2860
2861 // enforce usage of `exact` modifier on `v-on`
2862 // https://eslint.vuejs.org/rules/use-v-on-exact.html
2863 "eslint-plugin-vue/use-v-on-exact"?: _
2864
2865 // enforce `v-bind` directive style
2866 // https://eslint.vuejs.org/rules/v-bind-style.html
2867 "eslint-plugin-vue/v-bind-style"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2868 ...
2869 }, ...]])
2870
2871 // enforce `v-for` directive's delimiter style
2872 // https://eslint.vuejs.org/rules/v-for-delimiter-style.html
2873 "eslint-plugin-vue/v-for-delimiter-style"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2874 ...
2875 }, ...]])
2876
2877 // require key attribute for conditionally rendered repeated
2878 // components
2879 // https://eslint.vuejs.org/rules/v-if-else-key.html
2880 "eslint-plugin-vue/v-if-else-key"?: _
2881
2882 // enforce v-on event naming style on custom components in
2883 // template
2884 // https://eslint.vuejs.org/rules/v-on-event-hyphenation.html
2885 "eslint-plugin-vue/v-on-event-hyphenation"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2886 ...
2887 }, ...]])
2888
2889 // enforce or forbid parentheses after method calls without
2890 // arguments in `v-on` directives
2891 // https://eslint.vuejs.org/rules/v-on-function-call.html
2892 "eslint-plugin-vue/v-on-function-call"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2893 ...
2894 }, ...]])
2895
2896 // enforce writing style for handlers in `v-on` directives
2897 // https://eslint.vuejs.org/rules/v-on-handler-style.html
2898 "eslint-plugin-vue/v-on-handler-style"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2899 ...
2900 }, ...]])
2901
2902 // enforce `v-on` directive style
2903 // https://eslint.vuejs.org/rules/v-on-style.html
2904 "eslint-plugin-vue/v-on-style"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2905 ...
2906 }, ...]])
2907
2908 // enforce `v-slot` directive style
2909 // https://eslint.vuejs.org/rules/v-slot-style.html
2910 "eslint-plugin-vue/v-slot-style"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2911 ...
2912 }, ...]])
2913
2914 // require valid attribute names
2915 // https://eslint.vuejs.org/rules/valid-attribute-name.html
2916 "eslint-plugin-vue/valid-attribute-name"?: _
2917
2918 // enforce valid `defineEmits` compiler macro
2919 // https://eslint.vuejs.org/rules/valid-define-emits.html
2920 "eslint-plugin-vue/valid-define-emits"?: _
2921
2922 // enforce valid `defineOptions` compiler macro
2923 // https://eslint.vuejs.org/rules/valid-define-options.html
2924 "eslint-plugin-vue/valid-define-options"?: _
2925
2926 // enforce valid `defineProps` compiler macro
2927 // https://eslint.vuejs.org/rules/valid-define-props.html
2928 "eslint-plugin-vue/valid-define-props"?: _
2929
2930 // require valid keys in model option
2931 // https://eslint.vuejs.org/rules/valid-model-definition.html
2932 "eslint-plugin-vue/valid-model-definition"?: _
2933
2934 // enforce valid `nextTick` function calls
2935 // https://eslint.vuejs.org/rules/valid-next-tick.html
2936 "eslint-plugin-vue/valid-next-tick"?: _
2937
2938 // enforce valid template root
2939 // https://eslint.vuejs.org/rules/valid-template-root.html
2940 "eslint-plugin-vue/valid-template-root"?: _
2941
2942 // enforce valid `.sync` modifier on `v-bind` directives
2943 // https://eslint.vuejs.org/rules/valid-v-bind-sync.html
2944 "eslint-plugin-vue/valid-v-bind-sync"?: _
2945
2946 // enforce valid `v-bind` directives
2947 // https://eslint.vuejs.org/rules/valid-v-bind.html
2948 "eslint-plugin-vue/valid-v-bind"?: _
2949
2950 // enforce valid `v-cloak` directives
2951 // https://eslint.vuejs.org/rules/valid-v-cloak.html
2952 "eslint-plugin-vue/valid-v-cloak"?: _
2953
2954 // enforce valid `v-else-if` directives
2955 // https://eslint.vuejs.org/rules/valid-v-else-if.html
2956 "eslint-plugin-vue/valid-v-else-if"?: _
2957
2958 // enforce valid `v-else` directives
2959 // https://eslint.vuejs.org/rules/valid-v-else.html
2960 "eslint-plugin-vue/valid-v-else"?: _
2961
2962 // enforce valid `v-for` directives
2963 // https://eslint.vuejs.org/rules/valid-v-for.html
2964 "eslint-plugin-vue/valid-v-for"?: _
2965
2966 // enforce valid `v-html` directives
2967 // https://eslint.vuejs.org/rules/valid-v-html.html
2968 "eslint-plugin-vue/valid-v-html"?: _
2969
2970 // enforce valid `v-if` directives
2971 // https://eslint.vuejs.org/rules/valid-v-if.html
2972 "eslint-plugin-vue/valid-v-if"?: _
2973
2974 // enforce valid `v-is` directives
2975 // https://eslint.vuejs.org/rules/valid-v-is.html
2976 "eslint-plugin-vue/valid-v-is"?: _
2977
2978 // enforce valid `v-memo` directives
2979 // https://eslint.vuejs.org/rules/valid-v-memo.html
2980 "eslint-plugin-vue/valid-v-memo"?: _
2981
2982 // enforce valid `v-model` directives
2983 // https://eslint.vuejs.org/rules/valid-v-model.html
2984 "eslint-plugin-vue/valid-v-model"?: _
2985
2986 // enforce valid `v-on` directives
2987 // https://eslint.vuejs.org/rules/valid-v-on.html
2988 "eslint-plugin-vue/valid-v-on"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
2989 "modifiers"?: [...]
2990 ...
2991 }, ...]])
2992
2993 // enforce valid `v-once` directives
2994 // https://eslint.vuejs.org/rules/valid-v-once.html
2995 "eslint-plugin-vue/valid-v-once"?: _
2996
2997 // enforce valid `v-pre` directives
2998 // https://eslint.vuejs.org/rules/valid-v-pre.html
2999 "eslint-plugin-vue/valid-v-pre"?: _
3000
3001 // enforce valid `v-show` directives
3002 // https://eslint.vuejs.org/rules/valid-v-show.html
3003 "eslint-plugin-vue/valid-v-show"?: _
3004
3005 // enforce valid `v-slot` directives
3006 // https://eslint.vuejs.org/rules/valid-v-slot.html
3007 "eslint-plugin-vue/valid-v-slot"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3008 "allowModifiers"?: bool
3009 ...
3010 }, ...]])
3011
3012 // enforce valid `v-text` directives
3013 // https://eslint.vuejs.org/rules/valid-v-text.html
3014 "eslint-plugin-vue/valid-v-text"?: _
3015
3016 // Require that function overload signatures be consecutive
3017 // https://typescript-eslint.io/rules/adjacent-overload-signatures
3018 "@typescript-eslint/adjacent-overload-signatures"?: _
3019
3020 // Require consistently using either `T[]` or `Array<T>` for
3021 // arrays
3022 // https://typescript-eslint.io/rules/array-type
3023 "@typescript-eslint/array-type"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3024 // The array type expected for mutable cases.
3025 "default"?: _
3026
3027 // The array type expected for readonly cases. If omitted, the
3028 // value for `default` will be used.
3029 "readonly"?: _
3030 ...
3031 }, ...]])
3032
3033 // Disallow awaiting a value that is not a Thenable
3034 // https://typescript-eslint.io/rules/await-thenable
3035 "@typescript-eslint/await-thenable"?: _
3036
3037 // Disallow `@ts-<directive>` comments or require descriptions
3038 // after directives
3039 // https://typescript-eslint.io/rules/ban-ts-comment
3040 "@typescript-eslint/ban-ts-comment"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3041 "ts-expect-error"?: _
3042 "ts-ignore"?: _
3043 "ts-nocheck"?: _
3044 "ts-check"?: _
3045 "minimumDescriptionLength"?: number
3046 ...
3047 }, ...]])
3048
3049 // Disallow `// tslint:<rule-flag>` comments
3050 // https://typescript-eslint.io/rules/ban-tslint-comment
3051 "@typescript-eslint/ban-tslint-comment"?: _
3052
3053 // Disallow certain types
3054 // https://typescript-eslint.io/rules/ban-types
3055 "@typescript-eslint/ban-types"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3056 "types"?: [string]: _
3057 "extendDefaults"?: bool
3058 ...
3059 }, ...]])
3060
3061 // Disallow or enforce spaces inside of blocks after opening block
3062 // and before closing block
3063 // https://typescript-eslint.io/rules/block-spacing
3064 "@typescript-eslint/block-spacing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3065 ...
3066 }, ...]])
3067
3068 // Enforce consistent brace style for blocks
3069 // https://typescript-eslint.io/rules/brace-style
3070 "@typescript-eslint/brace-style"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3071 ...
3072 }, ...]])
3073
3074 // Enforce that literals on classes are exposed in a consistent
3075 // style
3076 // https://typescript-eslint.io/rules/class-literal-property-style
3077 "@typescript-eslint/class-literal-property-style"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3078 ...
3079 }, ...]])
3080
3081 // Enforce that class methods utilize `this`
3082 // https://typescript-eslint.io/rules/class-methods-use-this
3083 "@typescript-eslint/class-methods-use-this"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3084 // Allows specified method names to be ignored with this rule
3085 "exceptMethods"?: [...string]
3086
3087 // Enforces that functions used as instance field initializers
3088 // utilize `this`
3089 "enforceForClassFields"?: bool
3090
3091 // Ignore members marked with the `override` modifier
3092 "ignoreOverrideMethods"?: bool
3093
3094 // Ignore classes that specifically implement some interface
3095 "ignoreClassesThatImplementAnInterface"?: matchN(1, [bool, "public-fields"])
3096 ...
3097 }, ...]])
3098
3099 // Require or disallow trailing commas
3100 // https://typescript-eslint.io/rules/comma-dangle
3101 "@typescript-eslint/comma-dangle"?: _
3102
3103 // Enforce consistent spacing before and after commas
3104 // https://typescript-eslint.io/rules/comma-spacing
3105 "@typescript-eslint/comma-spacing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3106 "before"?: bool
3107 "after"?: bool
3108 ...
3109 }, ...]])
3110
3111 // Enforce specifying generic type arguments on type annotation or
3112 // constructor name of a constructor call
3113 // https://typescript-eslint.io/rules/consistent-generic-constructors
3114 "@typescript-eslint/consistent-generic-constructors"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3115 ...
3116 }, ...]])
3117
3118 // Require or disallow the `Record` type
3119 // https://typescript-eslint.io/rules/consistent-indexed-object-style
3120 "@typescript-eslint/consistent-indexed-object-style"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), "record" | "index-signature", ...]])
3121
3122 // Require `return` statements to either always or never specify
3123 // values
3124 // https://typescript-eslint.io/rules/consistent-return
3125 "@typescript-eslint/consistent-return"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3126 "treatUndefinedAsUnspecified"?: bool
3127 ...
3128 }, ...]])
3129
3130 // Enforce consistent usage of type assertions
3131 // https://typescript-eslint.io/rules/consistent-type-assertions
3132 "@typescript-eslint/consistent-type-assertions"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3133 ...
3134 }, ...]])
3135
3136 // Enforce type definitions to consistently use either `interface`
3137 // or `type`
3138 // https://typescript-eslint.io/rules/consistent-type-definitions
3139 "@typescript-eslint/consistent-type-definitions"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), "interface" | "type", ...]])
3140
3141 // Enforce consistent usage of type exports
3142 // https://typescript-eslint.io/rules/consistent-type-exports
3143 "@typescript-eslint/consistent-type-exports"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3144 "fixMixedExportsWithInlineTypeSpecifier"?: bool
3145 ...
3146 }, ...]])
3147
3148 // Enforce consistent usage of type imports
3149 // https://typescript-eslint.io/rules/consistent-type-imports
3150 "@typescript-eslint/consistent-type-imports"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3151 "disallowTypeAnnotations"?: bool
3152 "fixStyle"?: "separate-type-imports" | "inline-type-imports"
3153 "prefer"?: "type-imports" | "no-type-imports"
3154 ...
3155 }, ...]])
3156
3157 // Enforce default parameters to be last
3158 // https://typescript-eslint.io/rules/default-param-last
3159 "@typescript-eslint/default-param-last"?: _
3160
3161 // Enforce dot notation whenever possible
3162 // https://typescript-eslint.io/rules/dot-notation
3163 "@typescript-eslint/dot-notation"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3164 "allowKeywords"?: bool
3165 "allowPattern"?: string
3166 "allowPrivateClassPropertyAccess"?: bool
3167 "allowProtectedClassPropertyAccess"?: bool
3168 "allowIndexSignaturePropertyAccess"?: bool
3169 ...
3170 }, ...]])
3171
3172 // Require explicit return types on functions and class methods
3173 // https://typescript-eslint.io/rules/explicit-function-return-type
3174 "@typescript-eslint/explicit-function-return-type"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3175 // Whether to allow arrow functions that start with the `void`
3176 // keyword.
3177 "allowConciseArrowFunctionExpressionsStartingWithVoid"?: bool
3178
3179 // Whether to ignore function expressions (functions which are not
3180 // part of a declaration).
3181 "allowExpressions"?: bool
3182
3183 // Whether to ignore functions immediately returning another
3184 // function expression.
3185 "allowHigherOrderFunctions"?: bool
3186
3187 // Whether to ignore type annotations on the variable of function
3188 // expressions.
3189 "allowTypedFunctionExpressions"?: bool
3190
3191 // Whether to ignore arrow functions immediately returning a `as
3192 // const` value.
3193 "allowDirectConstAssertionInArrowFunctions"?: bool
3194
3195 // Whether to ignore functions that don't have generic type
3196 // parameters.
3197 "allowFunctionsWithoutTypeParameters"?: bool
3198
3199 // An array of function/method names that will not have their
3200 // arguments or return values checked.
3201 "allowedNames"?: [...string]
3202
3203 // Whether to ignore immediately invoked function expressions
3204 // (IIFEs).
3205 "allowIIFEs"?: bool
3206 ...
3207 }, ...]])
3208
3209 // Require explicit accessibility modifiers on class properties
3210 // and methods
3211 // https://typescript-eslint.io/rules/explicit-member-accessibility
3212 "@typescript-eslint/explicit-member-accessibility"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3213 "accessibility"?: _
3214 "overrides"?: close({
3215 "accessors"?: _
3216 "constructors"?: _
3217 "methods"?: _
3218 "properties"?: _
3219 "parameterProperties"?: _
3220 })
3221 "ignoredMethodNames"?: [...string]
3222 ...
3223 }, ...]])
3224
3225 // Require explicit return and argument types on exported
3226 // functions' and classes' public class methods
3227 // https://typescript-eslint.io/rules/explicit-module-boundary-types
3228 "@typescript-eslint/explicit-module-boundary-types"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3229 // Whether to ignore arguments that are explicitly typed as `any`.
3230 "allowArgumentsExplicitlyTypedAsAny"?: bool
3231
3232 // Whether to ignore return type annotations on body-less arrow
3233 // functions that return an `as const` type assertion.
3234 // You must still type the parameters of the function.
3235 "allowDirectConstAssertionInArrowFunctions"?: bool
3236
3237 // An array of function/method names that will not have their
3238 // arguments or return values checked.
3239 "allowedNames"?: [...string]
3240
3241 // Whether to ignore return type annotations on functions
3242 // immediately returning another function expression.
3243 // You must still type the parameters of the function.
3244 "allowHigherOrderFunctions"?: bool
3245
3246 // Whether to ignore type annotations on the variable of a
3247 // function expression.
3248 "allowTypedFunctionExpressions"?: bool
3249 ...
3250 }, ...]])
3251
3252 // Require or disallow spacing between function identifiers and
3253 // their invocations
3254 // https://typescript-eslint.io/rules/func-call-spacing
3255 "@typescript-eslint/func-call-spacing"?: _
3256
3257 // Enforce consistent indentation
3258 // https://typescript-eslint.io/rules/indent
3259 "@typescript-eslint/indent"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3260 ...
3261 }, ...]])
3262
3263 // Require or disallow initialization in variable declarations
3264 // https://typescript-eslint.io/rules/init-declarations
3265 "@typescript-eslint/init-declarations"?: _
3266
3267 // Enforce consistent spacing between property names and type
3268 // annotations in types and interfaces
3269 // https://typescript-eslint.io/rules/key-spacing
3270 "@typescript-eslint/key-spacing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3271 ...
3272 }, ...]])
3273
3274 // Enforce consistent spacing before and after keywords
3275 // https://typescript-eslint.io/rules/keyword-spacing
3276 "@typescript-eslint/keyword-spacing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3277 "before"?: bool
3278 "after"?: bool
3279 "overrides"?: close({
3280 "abstract"?: close({
3281 "before"?: bool
3282 "after"?: bool
3283 })
3284 "as"?: close({
3285 "before"?: bool
3286 "after"?: bool
3287 })
3288 "async"?: close({
3289 "before"?: bool
3290 "after"?: bool
3291 })
3292 "await"?: close({
3293 "before"?: bool
3294 "after"?: bool
3295 })
3296 "boolean"?: close({
3297 "before"?: bool
3298 "after"?: bool
3299 })
3300 "break"?: close({
3301 "before"?: bool
3302 "after"?: bool
3303 })
3304 "byte"?: close({
3305 "before"?: bool
3306 "after"?: bool
3307 })
3308 "case"?: close({
3309 "before"?: bool
3310 "after"?: bool
3311 })
3312 "catch"?: close({
3313 "before"?: bool
3314 "after"?: bool
3315 })
3316 "char"?: close({
3317 "before"?: bool
3318 "after"?: bool
3319 })
3320 "class"?: close({
3321 "before"?: bool
3322 "after"?: bool
3323 })
3324 "const"?: close({
3325 "before"?: bool
3326 "after"?: bool
3327 })
3328 "continue"?: close({
3329 "before"?: bool
3330 "after"?: bool
3331 })
3332 "debugger"?: close({
3333 "before"?: bool
3334 "after"?: bool
3335 })
3336 "default"?: close({
3337 "before"?: bool
3338 "after"?: bool
3339 })
3340 "delete"?: close({
3341 "before"?: bool
3342 "after"?: bool
3343 })
3344 "do"?: close({
3345 "before"?: bool
3346 "after"?: bool
3347 })
3348 "double"?: close({
3349 "before"?: bool
3350 "after"?: bool
3351 })
3352 "else"?: close({
3353 "before"?: bool
3354 "after"?: bool
3355 })
3356 "enum"?: close({
3357 "before"?: bool
3358 "after"?: bool
3359 })
3360 "export"?: close({
3361 "before"?: bool
3362 "after"?: bool
3363 })
3364 "extends"?: close({
3365 "before"?: bool
3366 "after"?: bool
3367 })
3368 "false"?: close({
3369 "before"?: bool
3370 "after"?: bool
3371 })
3372 "final"?: close({
3373 "before"?: bool
3374 "after"?: bool
3375 })
3376 "finally"?: close({
3377 "before"?: bool
3378 "after"?: bool
3379 })
3380 "float"?: close({
3381 "before"?: bool
3382 "after"?: bool
3383 })
3384 "for"?: close({
3385 "before"?: bool
3386 "after"?: bool
3387 })
3388 "from"?: close({
3389 "before"?: bool
3390 "after"?: bool
3391 })
3392 "function"?: close({
3393 "before"?: bool
3394 "after"?: bool
3395 })
3396 "get"?: close({
3397 "before"?: bool
3398 "after"?: bool
3399 })
3400 "goto"?: close({
3401 "before"?: bool
3402 "after"?: bool
3403 })
3404 "if"?: close({
3405 "before"?: bool
3406 "after"?: bool
3407 })
3408 "implements"?: close({
3409 "before"?: bool
3410 "after"?: bool
3411 })
3412 "import"?: close({
3413 "before"?: bool
3414 "after"?: bool
3415 })
3416 "in"?: close({
3417 "before"?: bool
3418 "after"?: bool
3419 })
3420 "instanceof"?: close({
3421 "before"?: bool
3422 "after"?: bool
3423 })
3424 "int"?: close({
3425 "before"?: bool
3426 "after"?: bool
3427 })
3428 "interface"?: close({
3429 "before"?: bool
3430 "after"?: bool
3431 })
3432 "let"?: close({
3433 "before"?: bool
3434 "after"?: bool
3435 })
3436 "long"?: close({
3437 "before"?: bool
3438 "after"?: bool
3439 })
3440 "native"?: close({
3441 "before"?: bool
3442 "after"?: bool
3443 })
3444 "new"?: close({
3445 "before"?: bool
3446 "after"?: bool
3447 })
3448 "null"?: close({
3449 "before"?: bool
3450 "after"?: bool
3451 })
3452 "of"?: close({
3453 "before"?: bool
3454 "after"?: bool
3455 })
3456 "package"?: close({
3457 "before"?: bool
3458 "after"?: bool
3459 })
3460 "private"?: close({
3461 "before"?: bool
3462 "after"?: bool
3463 })
3464 "protected"?: close({
3465 "before"?: bool
3466 "after"?: bool
3467 })
3468 "public"?: close({
3469 "before"?: bool
3470 "after"?: bool
3471 })
3472 "return"?: close({
3473 "before"?: bool
3474 "after"?: bool
3475 })
3476 "set"?: close({
3477 "before"?: bool
3478 "after"?: bool
3479 })
3480 "short"?: close({
3481 "before"?: bool
3482 "after"?: bool
3483 })
3484 "static"?: close({
3485 "before"?: bool
3486 "after"?: bool
3487 })
3488 "super"?: close({
3489 "before"?: bool
3490 "after"?: bool
3491 })
3492 "switch"?: close({
3493 "before"?: bool
3494 "after"?: bool
3495 })
3496 "synchronized"?: close({
3497 "before"?: bool
3498 "after"?: bool
3499 })
3500 "this"?: close({
3501 "before"?: bool
3502 "after"?: bool
3503 })
3504 "throw"?: close({
3505 "before"?: bool
3506 "after"?: bool
3507 })
3508 "throws"?: close({
3509 "before"?: bool
3510 "after"?: bool
3511 })
3512 "transient"?: close({
3513 "before"?: bool
3514 "after"?: bool
3515 })
3516 "true"?: close({
3517 "before"?: bool
3518 "after"?: bool
3519 })
3520 "try"?: close({
3521 "before"?: bool
3522 "after"?: bool
3523 })
3524 "typeof"?: close({
3525 "before"?: bool
3526 "after"?: bool
3527 })
3528 "var"?: close({
3529 "before"?: bool
3530 "after"?: bool
3531 })
3532 "void"?: close({
3533 "before"?: bool
3534 "after"?: bool
3535 })
3536 "volatile"?: close({
3537 "before"?: bool
3538 "after"?: bool
3539 })
3540 "while"?: close({
3541 "before"?: bool
3542 "after"?: bool
3543 })
3544 "with"?: close({
3545 "before"?: bool
3546 "after"?: bool
3547 })
3548 "yield"?: close({
3549 "before"?: bool
3550 "after"?: bool
3551 })
3552 "type"?: close({
3553 "before"?: bool
3554 "after"?: bool
3555 })
3556 })
3557 ...
3558 }, ...]])
3559
3560 // Require empty lines around comments
3561 // https://typescript-eslint.io/rules/lines-around-comment
3562 "@typescript-eslint/lines-around-comment"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3563 "beforeBlockComment"?: bool
3564 "afterBlockComment"?: bool
3565 "beforeLineComment"?: bool
3566 "afterLineComment"?: bool
3567 "allowBlockStart"?: bool
3568 "allowBlockEnd"?: bool
3569 "allowClassStart"?: bool
3570 "allowClassEnd"?: bool
3571 "allowObjectStart"?: bool
3572 "allowObjectEnd"?: bool
3573 "allowArrayStart"?: bool
3574 "allowArrayEnd"?: bool
3575 "allowInterfaceStart"?: bool
3576 "allowInterfaceEnd"?: bool
3577 "allowTypeStart"?: bool
3578 "allowTypeEnd"?: bool
3579 "allowEnumStart"?: bool
3580 "allowEnumEnd"?: bool
3581 "allowModuleStart"?: bool
3582 "allowModuleEnd"?: bool
3583 "ignorePattern"?: string
3584 "applyDefaultIgnorePatterns"?: bool
3585 ...
3586 }, ...]])
3587
3588 // Require or disallow an empty line between class members
3589 // https://typescript-eslint.io/rules/lines-between-class-members
3590 "@typescript-eslint/lines-between-class-members"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3591 ...
3592 }, ...]])
3593
3594 // Enforce a maximum number of parameters in function definitions
3595 // https://typescript-eslint.io/rules/max-params
3596 "@typescript-eslint/max-params"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3597 "maximum"?: int & >=0
3598 "max"?: int & >=0
3599 "countVoidThis"?: bool
3600 ...
3601 }, ...]])
3602
3603 // Require a specific member delimiter style for interfaces and
3604 // type literals
3605 // https://typescript-eslint.io/rules/member-delimiter-style
3606 "@typescript-eslint/member-delimiter-style"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3607 "multiline"?: close({
3608 "delimiter"?: _
3609 "requireLast"?: bool
3610 })
3611 "singleline"?: close({
3612 "delimiter"?: _
3613 "requireLast"?: bool
3614 })
3615 "overrides"?: close({
3616 "interface"?: _
3617 "typeLiteral"?: _
3618 })
3619 "multilineDetection"?: "brackets" | "last-member"
3620 ...
3621 }, ...]])
3622
3623 // Require a consistent member declaration order
3624 // https://typescript-eslint.io/rules/member-ordering
3625 "@typescript-eslint/member-ordering"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3626 "default"?: _
3627 "classes"?: _
3628 "classExpressions"?: _
3629 "interfaces"?: _
3630 "typeLiterals"?: _
3631 ...
3632 }, ...]])
3633
3634 // Enforce using a particular method signature syntax
3635 // https://typescript-eslint.io/rules/method-signature-style
3636 "@typescript-eslint/method-signature-style"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3637 ...
3638 }, ...]])
3639
3640 // Enforce naming conventions for everything across a codebase
3641 // https://typescript-eslint.io/rules/naming-convention
3642 "@typescript-eslint/naming-convention"?: _
3643
3644 // Disallow generic `Array` constructors
3645 // https://typescript-eslint.io/rules/no-array-constructor
3646 "@typescript-eslint/no-array-constructor"?: _
3647
3648 // Disallow using the `delete` operator on array values
3649 // https://typescript-eslint.io/rules/no-array-delete
3650 "@typescript-eslint/no-array-delete"?: _
3651
3652 // Require `.toString()` to only be called on objects which
3653 // provide useful information when stringified
3654 // https://typescript-eslint.io/rules/no-base-to-string
3655 "@typescript-eslint/no-base-to-string"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3656 "ignoredTypeNames"?: [...string]
3657 ...
3658 }, ...]])
3659
3660 // Disallow non-null assertion in locations that may be confusing
3661 // https://typescript-eslint.io/rules/no-confusing-non-null-assertion
3662 "@typescript-eslint/no-confusing-non-null-assertion"?: _
3663
3664 // Require expressions of type void to appear in statement
3665 // position
3666 // https://typescript-eslint.io/rules/no-confusing-void-expression
3667 "@typescript-eslint/no-confusing-void-expression"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3668 "ignoreArrowShorthand"?: bool
3669 "ignoreVoidOperator"?: bool
3670 ...
3671 }, ...]])
3672
3673 // Disallow duplicate class members
3674 // https://typescript-eslint.io/rules/no-dupe-class-members
3675 "@typescript-eslint/no-dupe-class-members"?: _
3676
3677 // Disallow duplicate enum member values
3678 // https://typescript-eslint.io/rules/no-duplicate-enum-values
3679 "@typescript-eslint/no-duplicate-enum-values"?: _
3680
3681 // Disallow duplicate constituents of union or intersection types
3682 // https://typescript-eslint.io/rules/no-duplicate-type-constituents
3683 "@typescript-eslint/no-duplicate-type-constituents"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3684 "ignoreIntersections"?: bool
3685 "ignoreUnions"?: bool
3686 ...
3687 }, ...]])
3688
3689 // Disallow using the `delete` operator on computed key
3690 // expressions
3691 // https://typescript-eslint.io/rules/no-dynamic-delete
3692 "@typescript-eslint/no-dynamic-delete"?: _
3693
3694 // Disallow empty functions
3695 // https://typescript-eslint.io/rules/no-empty-function
3696 "@typescript-eslint/no-empty-function"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3697 "allow"?: list.UniqueItems() & [..."functions" | "arrowFunctions" | "generatorFunctions" | "methods" | "generatorMethods" | "getters" | "setters" | "constructors" | "private-constructors" | "protected-constructors" | "asyncFunctions" | "asyncMethods" | "decoratedFunctions" | "overrideMethods"]
3698 ...
3699 }, ...]])
3700
3701 // Disallow the declaration of empty interfaces
3702 // https://typescript-eslint.io/rules/no-empty-interface
3703 "@typescript-eslint/no-empty-interface"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3704 "allowSingleExtends"?: bool
3705 ...
3706 }, ...]])
3707
3708 // Disallow the `any` type
3709 // https://typescript-eslint.io/rules/no-explicit-any
3710 "@typescript-eslint/no-explicit-any"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3711 // Whether to enable auto-fixing in which the `any` type is
3712 // converted to the `unknown` type.
3713 "fixToUnknown"?: bool
3714
3715 // Whether to ignore rest parameter arrays.
3716 "ignoreRestArgs"?: bool
3717 ...
3718 }, ...]])
3719
3720 // Disallow extra non-null assertions
3721 // https://typescript-eslint.io/rules/no-extra-non-null-assertion
3722 "@typescript-eslint/no-extra-non-null-assertion"?: _
3723
3724 // Disallow unnecessary parentheses
3725 // https://typescript-eslint.io/rules/no-extra-parens
3726 "@typescript-eslint/no-extra-parens"?: _
3727
3728 // Disallow unnecessary semicolons
3729 // https://typescript-eslint.io/rules/no-extra-semi
3730 "@typescript-eslint/no-extra-semi"?: _
3731
3732 // Disallow classes used as namespaces
3733 // https://typescript-eslint.io/rules/no-extraneous-class
3734 "@typescript-eslint/no-extraneous-class"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3735 // Whether to allow extraneous classes that contain only a
3736 // constructor.
3737 "allowConstructorOnly"?: bool
3738
3739 // Whether to allow extraneous classes that have no body (i.e. are
3740 // empty).
3741 "allowEmpty"?: bool
3742
3743 // Whether to allow extraneous classes that only contain static
3744 // members.
3745 "allowStaticOnly"?: bool
3746
3747 // Whether to allow extraneous classes that include a decorator.
3748 "allowWithDecorator"?: bool
3749 ...
3750 }, ...]])
3751
3752 // Require Promise-like statements to be handled appropriately
3753 // https://typescript-eslint.io/rules/no-floating-promises
3754 "@typescript-eslint/no-floating-promises"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3755 // Whether to ignore `void` expressions.
3756 "ignoreVoid"?: bool
3757
3758 // Whether to ignore async IIFEs (Immediately Invoked Function
3759 // Expressions).
3760 "ignoreIIFE"?: bool
3761 "allowForKnownSafePromises"?: [...matchN(1, [string, close({
3762 "from"!: "file"
3763 "name"!: matchN(1, [string, list.UniqueItems() & [_, ...] & [...string]])
3764 "path"?: string
3765 }), close({
3766 "from"!: "lib"
3767 "name"!: matchN(1, [string, list.UniqueItems() & [_, ...] & [...string]])
3768 }), close({
3769 "from"!: "package"
3770 "name"!: matchN(1, [string, list.UniqueItems() & [_, ...] & [...string]])
3771 "package"!: string
3772 })])]
3773 ...
3774 }, ...]])
3775
3776 // Disallow iterating over an array with a for-in loop
3777 // https://typescript-eslint.io/rules/no-for-in-array
3778 "@typescript-eslint/no-for-in-array"?: _
3779
3780 // Disallow the use of `eval()`-like methods
3781 // https://typescript-eslint.io/rules/no-implied-eval
3782 "@typescript-eslint/no-implied-eval"?: _
3783
3784 // Enforce the use of top-level import type qualifier when an
3785 // import only has specifiers with inline type qualifiers
3786 // https://typescript-eslint.io/rules/no-import-type-side-effects
3787 "@typescript-eslint/no-import-type-side-effects"?: _
3788
3789 // Disallow explicit type declarations for variables or parameters
3790 // initialized to a number, string, or boolean
3791 // https://typescript-eslint.io/rules/no-inferrable-types
3792 "@typescript-eslint/no-inferrable-types"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3793 "ignoreParameters"?: bool
3794 "ignoreProperties"?: bool
3795 ...
3796 }, ...]])
3797
3798 // Disallow `this` keywords outside of classes or class-like
3799 // objects
3800 // https://typescript-eslint.io/rules/no-invalid-this
3801 "@typescript-eslint/no-invalid-this"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3802 "capIsConstructor"?: bool
3803 ...
3804 }, ...]])
3805
3806 // Disallow `void` type outside of generic or return types
3807 // https://typescript-eslint.io/rules/no-invalid-void-type
3808 "@typescript-eslint/no-invalid-void-type"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3809 "allowInGenericTypeArguments"?: matchN(1, [bool, [...string] & [_, ...]])
3810 "allowAsThisParameter"?: bool
3811 ...
3812 }, ...]])
3813
3814 // Disallow function declarations that contain unsafe references
3815 // inside loop statements
3816 // https://typescript-eslint.io/rules/no-loop-func
3817 "@typescript-eslint/no-loop-func"?: _
3818
3819 // Disallow literal numbers that lose precision
3820 // https://typescript-eslint.io/rules/no-loss-of-precision
3821 "@typescript-eslint/no-loss-of-precision"?: _
3822
3823 // Disallow magic numbers
3824 // https://typescript-eslint.io/rules/no-magic-numbers
3825 "@typescript-eslint/no-magic-numbers"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3826 "detectObjects"?: bool
3827 "enforceConst"?: bool
3828 "ignore"?: list.UniqueItems() & [...matchN(>=1, [number, =~"^[+-]?(?:0|[1-9][0-9]*)n$"])]
3829 "ignoreArrayIndexes"?: bool
3830 "ignoreDefaultValues"?: bool
3831 "ignoreClassFieldInitialValues"?: bool
3832 "ignoreNumericLiteralTypes"?: bool
3833 "ignoreEnums"?: bool
3834 "ignoreReadonlyClassProperties"?: bool
3835 "ignoreTypeIndexes"?: bool
3836 ...
3837 }, ...]])
3838
3839 // Disallow the `void` operator except when used to discard a
3840 // value
3841 // https://typescript-eslint.io/rules/no-meaningless-void-operator
3842 "@typescript-eslint/no-meaningless-void-operator"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3843 "checkNever"?: bool
3844 ...
3845 }, ...]])
3846
3847 // Enforce valid definition of `new` and `constructor`
3848 // https://typescript-eslint.io/rules/no-misused-new
3849 "@typescript-eslint/no-misused-new"?: _
3850
3851 // Disallow Promises in places not designed to handle them
3852 // https://typescript-eslint.io/rules/no-misused-promises
3853 "@typescript-eslint/no-misused-promises"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3854 "checksConditionals"?: bool
3855 "checksVoidReturn"?: matchN(1, [bool, close({
3856 "arguments"?: bool
3857 "attributes"?: bool
3858 "properties"?: bool
3859 "returns"?: bool
3860 "variables"?: bool
3861 })])
3862 "checksSpreads"?: bool
3863 ...
3864 }, ...]])
3865
3866 // Disallow enums from having both number and string members
3867 // https://typescript-eslint.io/rules/no-mixed-enums
3868 "@typescript-eslint/no-mixed-enums"?: _
3869
3870 // Disallow TypeScript namespaces
3871 // https://typescript-eslint.io/rules/no-namespace
3872 "@typescript-eslint/no-namespace"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3873 // Whether to allow `declare` with custom TypeScript namespaces.
3874 "allowDeclarations"?: bool
3875
3876 // Whether to allow `declare` with custom TypeScript namespaces
3877 // inside definition files.
3878 "allowDefinitionFiles"?: bool
3879 ...
3880 }, ...]])
3881
3882 // Disallow non-null assertions in the left operand of a nullish
3883 // coalescing operator
3884 // https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing
3885 "@typescript-eslint/no-non-null-asserted-nullish-coalescing"?: _
3886
3887 // Disallow non-null assertions after an optional chain expression
3888 // https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain
3889 "@typescript-eslint/no-non-null-asserted-optional-chain"?: _
3890
3891 // Disallow non-null assertions using the `!` postfix operator
3892 // https://typescript-eslint.io/rules/no-non-null-assertion
3893 "@typescript-eslint/no-non-null-assertion"?: _
3894
3895 // Disallow variable redeclaration
3896 // https://typescript-eslint.io/rules/no-redeclare
3897 "@typescript-eslint/no-redeclare"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3898 "builtinGlobals"?: bool
3899 "ignoreDeclarationMerge"?: bool
3900 ...
3901 }, ...]])
3902
3903 // Disallow members of unions and intersections that do nothing or
3904 // override type information
3905 // https://typescript-eslint.io/rules/no-redundant-type-constituents
3906 "@typescript-eslint/no-redundant-type-constituents"?: _
3907
3908 // Disallow invocation of `require()`
3909 // https://typescript-eslint.io/rules/no-require-imports
3910 "@typescript-eslint/no-require-imports"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3911 // Patterns of import paths to allow requiring from.
3912 "allow"?: [...string]
3913 ...
3914 }, ...]])
3915
3916 // Disallow specified modules when loaded by `import`
3917 // https://typescript-eslint.io/rules/no-restricted-imports
3918 "@typescript-eslint/no-restricted-imports"?: _
3919
3920 // Disallow variable declarations from shadowing variables
3921 // declared in the outer scope
3922 // https://typescript-eslint.io/rules/no-shadow
3923 "@typescript-eslint/no-shadow"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3924 "builtinGlobals"?: bool
3925 "hoist"?: "all" | "functions" | "never"
3926 "allow"?: [...string]
3927 "ignoreOnInitialization"?: bool
3928 "ignoreTypeValueShadow"?: bool
3929 "ignoreFunctionTypeParameterNameValueShadow"?: bool
3930 ...
3931 }, ...]])
3932
3933 // Disallow aliasing `this`
3934 // https://typescript-eslint.io/rules/no-this-alias
3935 "@typescript-eslint/no-this-alias"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3936 // Whether to ignore destructurings, such as `const { props, state
3937 // } = this`.
3938 "allowDestructuring"?: bool
3939
3940 // Names to ignore, such as ["self"] for `const self = this;`.
3941 "allowedNames"?: [...string]
3942 ...
3943 }, ...]])
3944
3945 // Disallow throwing literals as exceptions
3946 // https://typescript-eslint.io/rules/no-throw-literal
3947 "@typescript-eslint/no-throw-literal"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3948 "allowThrowingAny"?: bool
3949 "allowThrowingUnknown"?: bool
3950 ...
3951 }, ...]])
3952
3953 // Disallow type aliases
3954 // https://typescript-eslint.io/rules/no-type-alias
3955 "@typescript-eslint/no-type-alias"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3956 // Whether to allow direct one-to-one type aliases.
3957 "allowAliases"?: _
3958
3959 // Whether to allow type aliases for callbacks.
3960 "allowCallbacks"?: _
3961
3962 // Whether to allow type aliases for conditional types.
3963 "allowConditionalTypes"?: _
3964
3965 // Whether to allow type aliases with constructors.
3966 "allowConstructors"?: _
3967
3968 // Whether to allow type aliases with object literal types.
3969 "allowLiterals"?: _
3970
3971 // Whether to allow type aliases with mapped types.
3972 "allowMappedTypes"?: _
3973
3974 // Whether to allow type aliases with tuple types.
3975 "allowTupleTypes"?: _
3976
3977 // Whether to allow type aliases with generic types.
3978 "allowGenerics"?: _
3979 ...
3980 }, ...]])
3981
3982 // Disallow unnecessary equality comparisons against boolean
3983 // literals
3984 // https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare
3985 "@typescript-eslint/no-unnecessary-boolean-literal-compare"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
3986 // Whether to allow comparisons between nullable boolean variables
3987 // and `true`.
3988 "allowComparingNullableBooleansToTrue"?: bool
3989
3990 // Whether to allow comparisons between nullable boolean variables
3991 // and `false`.
3992 "allowComparingNullableBooleansToFalse"?: bool
3993 ...
3994 }, ...]])
3995
3996 // Disallow conditionals where the type is always truthy or always
3997 // falsy
3998 // https://typescript-eslint.io/rules/no-unnecessary-condition
3999 "@typescript-eslint/no-unnecessary-condition"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4000 // Whether to ignore constant loop conditions, such as `while
4001 // (true)`.
4002 "allowConstantLoopConditions"?: bool
4003
4004 // Whether to not error when running with a tsconfig that has
4005 // strictNullChecks turned.
4006 "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing"?: bool
4007 ...
4008 }, ...]])
4009
4010 // Disallow unnecessary namespace qualifiers
4011 // https://typescript-eslint.io/rules/no-unnecessary-qualifier
4012 "@typescript-eslint/no-unnecessary-qualifier"?: _
4013
4014 // Disallow unnecessary template expressions
4015 // https://typescript-eslint.io/rules/no-unnecessary-template-expression
4016 "@typescript-eslint/no-unnecessary-template-expression"?: _
4017
4018 // Disallow type arguments that are equal to the default
4019 // https://typescript-eslint.io/rules/no-unnecessary-type-arguments
4020 "@typescript-eslint/no-unnecessary-type-arguments"?: _
4021
4022 // Disallow type assertions that do not change the type of an
4023 // expression
4024 // https://typescript-eslint.io/rules/no-unnecessary-type-assertion
4025 "@typescript-eslint/no-unnecessary-type-assertion"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4026 // A list of type names to ignore.
4027 "typesToIgnore"?: [...string]
4028 ...
4029 }, ...]])
4030
4031 // Disallow unnecessary constraints on generic types
4032 // https://typescript-eslint.io/rules/no-unnecessary-type-constraint
4033 "@typescript-eslint/no-unnecessary-type-constraint"?: _
4034
4035 // Disallow calling a function with a value with type `any`
4036 // https://typescript-eslint.io/rules/no-unsafe-argument
4037 "@typescript-eslint/no-unsafe-argument"?: _
4038
4039 // Disallow assigning a value with type `any` to variables and
4040 // properties
4041 // https://typescript-eslint.io/rules/no-unsafe-assignment
4042 "@typescript-eslint/no-unsafe-assignment"?: _
4043
4044 // Disallow calling a value with type `any`
4045 // https://typescript-eslint.io/rules/no-unsafe-call
4046 "@typescript-eslint/no-unsafe-call"?: _
4047
4048 // Disallow unsafe declaration merging
4049 // https://typescript-eslint.io/rules/no-unsafe-declaration-merging
4050 "@typescript-eslint/no-unsafe-declaration-merging"?: _
4051
4052 // Disallow comparing an enum value with a non-enum value
4053 // https://typescript-eslint.io/rules/no-unsafe-enum-comparison
4054 "@typescript-eslint/no-unsafe-enum-comparison"?: _
4055
4056 // Disallow member access on a value with type `any`
4057 // https://typescript-eslint.io/rules/no-unsafe-member-access
4058 "@typescript-eslint/no-unsafe-member-access"?: _
4059
4060 // Disallow returning a value with type `any` from a function
4061 // https://typescript-eslint.io/rules/no-unsafe-return
4062 "@typescript-eslint/no-unsafe-return"?: _
4063
4064 // Require unary negation to take a number
4065 // https://typescript-eslint.io/rules/no-unsafe-unary-minus
4066 "@typescript-eslint/no-unsafe-unary-minus"?: _
4067
4068 // Disallow unused expressions
4069 // https://typescript-eslint.io/rules/no-unused-expressions
4070 "@typescript-eslint/no-unused-expressions"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4071 "allowShortCircuit"?: bool
4072 "allowTernary"?: bool
4073 "allowTaggedTemplates"?: bool
4074 "enforceForJSX"?: bool
4075 ...
4076 }, ...]])
4077
4078 // Disallow unused variables
4079 // https://typescript-eslint.io/rules/no-unused-vars
4080 "@typescript-eslint/no-unused-vars"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4081 ...
4082 }, ...]])
4083
4084 // Disallow the use of variables before they are defined
4085 // https://typescript-eslint.io/rules/no-use-before-define
4086 "@typescript-eslint/no-use-before-define"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4087 ...
4088 }, ...]])
4089
4090 // Disallow unnecessary constructors
4091 // https://typescript-eslint.io/rules/no-useless-constructor
4092 "@typescript-eslint/no-useless-constructor"?: _
4093
4094 // Disallow empty exports that don't change anything in a module
4095 // file
4096 // https://typescript-eslint.io/rules/no-useless-empty-export
4097 "@typescript-eslint/no-useless-empty-export"?: _
4098
4099 // Disallow unnecessary template expressions
4100 // https://typescript-eslint.io/rules/no-useless-template-literals
4101 "@typescript-eslint/no-useless-template-literals"?: _
4102
4103 // Disallow `require` statements except in import statements
4104 // https://typescript-eslint.io/rules/no-var-requires
4105 "@typescript-eslint/no-var-requires"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4106 // Patterns of import paths to allow requiring from.
4107 "allow"?: [...string]
4108 ...
4109 }, ...]])
4110
4111 // Enforce non-null assertions over explicit type casts
4112 // https://typescript-eslint.io/rules/non-nullable-type-assertion-style
4113 "@typescript-eslint/non-nullable-type-assertion-style"?: _
4114
4115 // Enforce consistent spacing inside braces
4116 // https://typescript-eslint.io/rules/object-curly-spacing
4117 "@typescript-eslint/object-curly-spacing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4118 ...
4119 }, ...]])
4120
4121 // Disallow throwing non-`Error` values as exceptions
4122 // https://typescript-eslint.io/rules/only-throw-error
4123 "@typescript-eslint/only-throw-error"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4124 "allowThrowingAny"?: bool
4125 "allowThrowingUnknown"?: bool
4126 ...
4127 }, ...]])
4128
4129 // Require or disallow padding lines between statements
4130 // https://typescript-eslint.io/rules/padding-line-between-statements
4131 "@typescript-eslint/padding-line-between-statements"?: _
4132
4133 // Require or disallow parameter properties in class constructors
4134 // https://typescript-eslint.io/rules/parameter-properties
4135 "@typescript-eslint/parameter-properties"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4136 "allow"?: [...]
4137 "prefer"?: "class-property" | "parameter-property"
4138 ...
4139 }, ...]])
4140
4141 // Enforce the use of `as const` over literal type
4142 // https://typescript-eslint.io/rules/prefer-as-const
4143 "@typescript-eslint/prefer-as-const"?: _
4144
4145 // Require destructuring from arrays and/or objects
4146 // https://typescript-eslint.io/rules/prefer-destructuring
4147 "@typescript-eslint/prefer-destructuring"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4148 ...
4149 }, ...]])
4150
4151 // Require each enum member value to be explicitly initialized
4152 // https://typescript-eslint.io/rules/prefer-enum-initializers
4153 "@typescript-eslint/prefer-enum-initializers"?: _
4154
4155 // Enforce the use of Array.prototype.find() over
4156 // Array.prototype.filter() followed by [0] when looking for a
4157 // single result
4158 // https://typescript-eslint.io/rules/prefer-find
4159 "@typescript-eslint/prefer-find"?: _
4160
4161 // Enforce the use of `for-of` loop over the standard `for` loop
4162 // where possible
4163 // https://typescript-eslint.io/rules/prefer-for-of
4164 "@typescript-eslint/prefer-for-of"?: _
4165
4166 // Enforce using function types instead of interfaces with call
4167 // signatures
4168 // https://typescript-eslint.io/rules/prefer-function-type
4169 "@typescript-eslint/prefer-function-type"?: _
4170
4171 // Enforce `includes` method over `indexOf` method
4172 // https://typescript-eslint.io/rules/prefer-includes
4173 "@typescript-eslint/prefer-includes"?: _
4174
4175 // Require all enum members to be literal values
4176 // https://typescript-eslint.io/rules/prefer-literal-enum-member
4177 "@typescript-eslint/prefer-literal-enum-member"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4178 "allowBitwiseExpressions"?: bool
4179 ...
4180 }, ...]])
4181
4182 // Require using `namespace` keyword over `module` keyword to
4183 // declare custom TypeScript modules
4184 // https://typescript-eslint.io/rules/prefer-namespace-keyword
4185 "@typescript-eslint/prefer-namespace-keyword"?: _
4186
4187 // Enforce using the nullish coalescing operator instead of
4188 // logical assignments or chaining
4189 // https://typescript-eslint.io/rules/prefer-nullish-coalescing
4190 "@typescript-eslint/prefer-nullish-coalescing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4191 "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing"?: bool
4192 "ignoreConditionalTests"?: bool
4193 "ignoreMixedLogicalExpressions"?: bool
4194 "ignorePrimitives"?: matchN(1, [{
4195 "bigint"?: bool
4196 "boolean"?: bool
4197 "number"?: bool
4198 "string"?: bool
4199 ...
4200 }, true])
4201 "ignoreTernaryTests"?: bool
4202 ...
4203 }, ...]])
4204
4205 // Enforce using concise optional chain expressions instead of
4206 // chained logical ands, negated logical ors, or empty objects
4207 // https://typescript-eslint.io/rules/prefer-optional-chain
4208 "@typescript-eslint/prefer-optional-chain"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4209 // Check operands that are typed as `any` when inspecting "loose
4210 // boolean" operands.
4211 "checkAny"?: bool
4212
4213 // Check operands that are typed as `unknown` when inspecting
4214 // "loose boolean" operands.
4215 "checkUnknown"?: bool
4216
4217 // Check operands that are typed as `string` when inspecting
4218 // "loose boolean" operands.
4219 "checkString"?: bool
4220
4221 // Check operands that are typed as `number` when inspecting
4222 // "loose boolean" operands.
4223 "checkNumber"?: bool
4224
4225 // Check operands that are typed as `boolean` when inspecting
4226 // "loose boolean" operands.
4227 "checkBoolean"?: bool
4228
4229 // Check operands that are typed as `bigint` when inspecting
4230 // "loose boolean" operands.
4231 "checkBigInt"?: bool
4232
4233 // Skip operands that are not typed with `null` and/or `undefined`
4234 // when inspecting "loose boolean" operands.
4235 "requireNullish"?: bool
4236
4237 // Allow autofixers that will change the return type of the
4238 // expression. This option is considered unsafe as it may break
4239 // the build.
4240 "allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing"?: bool
4241 ...
4242 }, ...]])
4243
4244 // Require using Error objects as Promise rejection reasons
4245 // https://typescript-eslint.io/rules/prefer-promise-reject-errors
4246 "@typescript-eslint/prefer-promise-reject-errors"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4247 "allowEmptyReject"?: bool
4248 ...
4249 }, ...]])
4250
4251 // Require private members to be marked as `readonly` if they're
4252 // never modified outside of the constructor
4253 // https://typescript-eslint.io/rules/prefer-readonly
4254 "@typescript-eslint/prefer-readonly"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4255 "onlyInlineLambdas"?: bool
4256 ...
4257 }, ...]])
4258
4259 // Require function parameters to be typed as `readonly` to
4260 // prevent accidental mutation of inputs
4261 // https://typescript-eslint.io/rules/prefer-readonly-parameter-types
4262 "@typescript-eslint/prefer-readonly-parameter-types"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4263 "allow"?: [...matchN(1, [string, close({
4264 "from"!: "file"
4265 "name"!: matchN(1, [string, list.UniqueItems() & [_, ...] & [...string]])
4266 "path"?: string
4267 }), close({
4268 "from"!: "lib"
4269 "name"!: matchN(1, [string, list.UniqueItems() & [_, ...] & [...string]])
4270 }), close({
4271 "from"!: "package"
4272 "name"!: matchN(1, [string, list.UniqueItems() & [_, ...] & [...string]])
4273 "package"!: string
4274 })])]
4275 "checkParameterProperties"?: bool
4276 "ignoreInferredTypes"?: bool
4277 "treatMethodsAsReadonly"?: bool
4278 ...
4279 }, ...]])
4280
4281 // Enforce using type parameter when calling `Array#reduce`
4282 // instead of casting
4283 // https://typescript-eslint.io/rules/prefer-reduce-type-parameter
4284 "@typescript-eslint/prefer-reduce-type-parameter"?: _
4285
4286 // Enforce `RegExp#exec` over `String#match` if no global flag is
4287 // provided
4288 // https://typescript-eslint.io/rules/prefer-regexp-exec
4289 "@typescript-eslint/prefer-regexp-exec"?: _
4290
4291 // Enforce that `this` is used when only `this` type is returned
4292 // https://typescript-eslint.io/rules/prefer-return-this-type
4293 "@typescript-eslint/prefer-return-this-type"?: _
4294
4295 // Enforce using `String#startsWith` and `String#endsWith` over
4296 // other equivalent methods of checking substrings
4297 // https://typescript-eslint.io/rules/prefer-string-starts-ends-with
4298 "@typescript-eslint/prefer-string-starts-ends-with"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4299 // Whether to allow equality checks against the first or last
4300 // element of a string.
4301 "allowSingleElementEquality"?: "always" | "never"
4302 ...
4303 }, ...]])
4304
4305 // Enforce using `@ts-expect-error` over `@ts-ignore`
4306 // https://typescript-eslint.io/rules/prefer-ts-expect-error
4307 "@typescript-eslint/prefer-ts-expect-error"?: _
4308
4309 // Require any function or method that returns a Promise to be
4310 // marked async
4311 // https://typescript-eslint.io/rules/promise-function-async
4312 "@typescript-eslint/promise-function-async"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4313 // Whether to consider `any` and `unknown` to be Promises.
4314 "allowAny"?: bool
4315
4316 // Any extra names of classes or interfaces to be considered
4317 // Promises.
4318 "allowedPromiseNames"?: [...string]
4319 "checkArrowFunctions"?: bool
4320 "checkFunctionDeclarations"?: bool
4321 "checkFunctionExpressions"?: bool
4322 "checkMethodDeclarations"?: bool
4323 ...
4324 }, ...]])
4325
4326 // Enforce the consistent use of either backticks, double, or
4327 // single quotes
4328 // https://typescript-eslint.io/rules/quotes
4329 "@typescript-eslint/quotes"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(3) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), "double" | "single" | "backtick", {
4330 // allows strings to use single-quotes or double-quotes so long as
4331 // the string contains a quote that would have to be escaped
4332 // otherwise
4333 "avoidEscape"?: bool
4334
4335 // allows strings to use backticks
4336 "allowTemplateLiterals"?: bool
4337
4338 // Deprecated: The object property avoid-escape is deprecated;
4339 // please use the object property avoidEscape instead.
4340 "avoid-escape"?: bool
4341 ...
4342 }, ...]])
4343
4344 // Require `Array#sort` and `Array#toSorted` calls to always
4345 // provide a `compareFunction`
4346 // https://typescript-eslint.io/rules/require-array-sort-compare
4347 "@typescript-eslint/require-array-sort-compare"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4348 // Whether to ignore arrays in which all elements are strings.
4349 "ignoreStringArrays"?: bool
4350 ...
4351 }, ...]])
4352
4353 // Disallow async functions which do not return promises and have
4354 // no `await` expression
4355 // https://typescript-eslint.io/rules/require-await
4356 "@typescript-eslint/require-await"?: _
4357
4358 // Require both operands of addition to be the same type and be
4359 // `bigint`, `number`, or `string`
4360 // https://typescript-eslint.io/rules/restrict-plus-operands
4361 "@typescript-eslint/restrict-plus-operands"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4362 // Whether to allow `any` typed values.
4363 "allowAny"?: bool
4364
4365 // Whether to allow `boolean` typed values.
4366 "allowBoolean"?: bool
4367
4368 // Whether to allow potentially `null` or `undefined` typed
4369 // values.
4370 "allowNullish"?: bool
4371
4372 // Whether to allow `bigint`/`number` typed values and `string`
4373 // typed values to be added together.
4374 "allowNumberAndString"?: bool
4375
4376 // Whether to allow `regexp` typed values.
4377 "allowRegExp"?: bool
4378
4379 // Whether to skip compound assignments such as `+=`.
4380 "skipCompoundAssignments"?: bool
4381 ...
4382 }, ...]])
4383
4384 // Enforce template literal expressions to be of `string` type
4385 // https://typescript-eslint.io/rules/restrict-template-expressions
4386 "@typescript-eslint/restrict-template-expressions"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4387 // Whether to allow `any` typed values in template expressions.
4388 "allowAny"?: bool
4389
4390 // Whether to allow `array` typed values in template expressions.
4391 "allowArray"?: bool
4392
4393 // Whether to allow `boolean` typed values in template
4394 // expressions.
4395 "allowBoolean"?: bool
4396
4397 // Whether to allow `nullish` typed values in template
4398 // expressions.
4399 "allowNullish"?: bool
4400
4401 // Whether to allow `number` typed values in template expressions.
4402 "allowNumber"?: bool
4403
4404 // Whether to allow `regexp` typed values in template expressions.
4405 "allowRegExp"?: bool
4406
4407 // Whether to allow `never` typed values in template expressions.
4408 "allowNever"?: bool
4409 ...
4410 }, ...]])
4411
4412 // Enforce consistent awaiting of returned promises
4413 // https://typescript-eslint.io/rules/return-await
4414 "@typescript-eslint/return-await"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), matchN(1, ["never", "error-handling-correctness-only", "in-try-catch", "always"]), ...]])
4415
4416 // Require or disallow semicolons instead of ASI
4417 // https://typescript-eslint.io/rules/semi
4418 "@typescript-eslint/semi"?: _
4419
4420 // Enforce constituents of a type union/intersection to be sorted
4421 // alphabetically
4422 // https://typescript-eslint.io/rules/sort-type-constituents
4423 "@typescript-eslint/sort-type-constituents"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4424 // Whether to check intersection types.
4425 "checkIntersections"?: bool
4426
4427 // Whether to check union types.
4428 "checkUnions"?: bool
4429
4430 // Whether to sort using case sensitive sorting.
4431 "caseSensitive"?: bool
4432
4433 // Ordering of the groups.
4434 "groupOrder"?: [..."conditional" | "function" | "import" | "intersection" | "keyword" | "nullish" | "literal" | "named" | "object" | "operator" | "tuple" | "union"]
4435 ...
4436 }, ...]])
4437
4438 // Enforce consistent spacing before blocks
4439 // https://typescript-eslint.io/rules/space-before-blocks
4440 "@typescript-eslint/space-before-blocks"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4441 ...
4442 }, ...]])
4443
4444 // Enforce consistent spacing before function parenthesis
4445 // https://typescript-eslint.io/rules/space-before-function-paren
4446 "@typescript-eslint/space-before-function-paren"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4447 ...
4448 }, ...]])
4449
4450 // Require spacing around infix operators
4451 // https://typescript-eslint.io/rules/space-infix-ops
4452 "@typescript-eslint/space-infix-ops"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4453 "int32Hint"?: bool
4454 ...
4455 }, ...]])
4456
4457 // Disallow certain types in boolean expressions
4458 // https://typescript-eslint.io/rules/strict-boolean-expressions
4459 "@typescript-eslint/strict-boolean-expressions"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4460 "allowString"?: bool
4461 "allowNumber"?: bool
4462 "allowNullableObject"?: bool
4463 "allowNullableBoolean"?: bool
4464 "allowNullableString"?: bool
4465 "allowNullableNumber"?: bool
4466 "allowNullableEnum"?: bool
4467 "allowAny"?: bool
4468 "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing"?: bool
4469 ...
4470 }, ...]])
4471
4472 // Require switch-case statements to be exhaustive
4473 // https://typescript-eslint.io/rules/switch-exhaustiveness-check
4474 "@typescript-eslint/switch-exhaustiveness-check"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4475 // If 'true', allow 'default' cases on switch statements with
4476 // exhaustive cases.
4477 "allowDefaultCaseForExhaustiveSwitch"?: bool
4478
4479 // If 'true', require a 'default' clause for switches on non-union
4480 // types.
4481 "requireDefaultForNonUnion"?: bool
4482 ...
4483 }, ...]])
4484
4485 // Disallow certain triple slash directives in favor of ES6-style
4486 // import declarations
4487 // https://typescript-eslint.io/rules/triple-slash-reference
4488 "@typescript-eslint/triple-slash-reference"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4489 "lib"?: "always" | "never"
4490 "path"?: "always" | "never"
4491 "types"?: "always" | "never" | "prefer-import"
4492 ...
4493 }, ...]])
4494
4495 // Require consistent spacing around type annotations
4496 // https://typescript-eslint.io/rules/type-annotation-spacing
4497 "@typescript-eslint/type-annotation-spacing"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4498 "before"?: bool
4499 "after"?: bool
4500 "overrides"?: close({
4501 "colon"?: _
4502 "arrow"?: _
4503 "variable"?: _
4504 "parameter"?: _
4505 "property"?: _
4506 "returnType"?: _
4507 })
4508 ...
4509 }, ...]])
4510
4511 // Require type annotations in certain places
4512 // https://typescript-eslint.io/rules/typedef
4513 "@typescript-eslint/typedef"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4514 "arrayDestructuring"?: bool
4515 "arrowParameter"?: bool
4516 "memberVariableDeclaration"?: bool
4517 "objectDestructuring"?: bool
4518 "parameter"?: bool
4519 "propertyDeclaration"?: bool
4520 "variableDeclaration"?: bool
4521 "variableDeclarationIgnoreFunction"?: bool
4522 ...
4523 }, ...]])
4524
4525 // Enforce unbound methods are called with their expected scope
4526 // https://typescript-eslint.io/rules/unbound-method
4527 "@typescript-eslint/unbound-method"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4528 // Whether to skip checking whether `static` methods are correctly
4529 // bound.
4530 "ignoreStatic"?: bool
4531 ...
4532 }, ...]])
4533
4534 // Disallow two overloads that could be unified into one with a
4535 // union or an optional/rest parameter
4536 // https://typescript-eslint.io/rules/unified-signatures
4537 "@typescript-eslint/unified-signatures"?: matchN(1, [#ruleNumber, #ruleString, list.MaxItems(2) & [_, _, ...] & [matchN(1, [#ruleNumber, #ruleString]), {
4538 // Whether two parameters with different names at the same index
4539 // should be considered different even if their types are the
4540 // same.
4541 "ignoreDifferentlyNamedParameters"?: bool
4542 ...
4543 }, ...]])
4544
4545 // Enforce typing arguments in `.catch()` callbacks as `unknown`
4546 // https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable
4547 "@typescript-eslint/use-unknown-in-catch-callback-variable"?: _
4548 ...
4549
4550 #pluginNames: list.UniqueItems() & [...matchN(>=1, ["eslint-plugin-jest" | "eslint-plugin-n" | "eslint-plugin-jsx-a11y" | "eslint-plugin-react" | "eslint-plugin-unused-imports" | "eslint-plugin-react-hooks" | "eslint-plugin-import" | "eslint-plugin-security" | "eslint-plugin-unicorn" | "eslint-plugin-regexp" | "eslint-plugin-ft-flow" | "eslint-plugin-prettier" | "eslint-plugin-cypress" | "eslint-plugin-eslint-plugin" | "eslint-plugin-mocha" | "eslint-plugin-qunit" | "eslint-plugin-jasmine" | "eslint-plugin-ember" | "eslint-plugin-you-dont-need-lodash-underscore" | "@tanstack/eslint-plugin-query" | "eslint-plugin-react-perf" | "eslint-plugin-no-only-tests" | "eslint-plugin-jsdoc" | "eslint-plugin-yml" | "eslint-plugin-vue" | "eslint-plugin-jest-dom" | "eslint-plugin-simple-import-sort" | "eslint-plugin-ava" | "eslint-plugin-es-x" | "eslint-plugin-testing-library" | "eslint-plugin-i18next" | "eslint-plugin-markdown" | "eslint-plugin-local-rules" | "eslint-plugin-html" | "eslint-plugin-sonarjs" | "eslint-plugin-lodash" | "@next/eslint-plugin-next" | "eslint-plugin-perfectionist" | "eslint-plugin-canonical" | "eslint-plugin-jest-formatting" | "eslint-plugin-babel" | "eslint-plugin-tailwindcss" | "eslint-plugin-flowtype" | "eslint-plugin-lit-a11y" | "@rushstack/eslint-plugin-security" | "eslint-plugin-sort-exports" | "eslint-plugin-json" | "eslint-plugin-react-native" | "eslint-plugin-deprecation" | "eslint-plugin-vuejs-accessibility" | "eslint-plugin-chai-friendly" | "eslint-plugin-check-file" | "eslint-plugin-promise" | "eslint-plugin-sort-class-members" | "eslint-plugin-astro" | "eslint-plugin-playwright" | "eslint-plugin-typescript-sort-keys" | "eslint-plugin-react-refresh" | "eslint-plugin-jsonc" | "eslint-plugin-ban" | "eslint-plugin-tsdoc" | "eslint-plugin-vitest" | "eslint-plugin-nuxt" | "eslint-plugin-i" | "eslint-plugin-css-modules" | "eslint-plugin-no-secrets", string])]
4551
4552 // ESLint rule
4553 //
4554 // 0 - turns the rule off
4555 // 1 - turn the rule on as a warning (doesn't affect exit code)
4556 // 2 - turn the rule on as an error (exit code is 1 when
4557 // triggered)
4558 #ruleNumber: int & >=0 & <=2
4559
4560 // ESLint rule
4561 //
4562 // "off" - turns the rule off
4563 // "warn" - turn the rule on as a warning (doesn't affect exit
4564 // code)
4565 // "error" - turn the rule on as an error (exit code is 1 when
4566 // triggered)
4567 #ruleString: "off" | "warn" | "error"
4568}