@saasmakers/eslint 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/chunks/formatters.cjs +248 -0
  2. package/dist/chunks/formatters.mjs +246 -0
  3. package/dist/chunks/import.cjs +53 -0
  4. package/dist/chunks/import.mjs +51 -0
  5. package/dist/chunks/index.cjs +120 -0
  6. package/dist/chunks/index.mjs +101 -0
  7. package/dist/chunks/index2.cjs +880 -0
  8. package/dist/chunks/index2.mjs +868 -0
  9. package/dist/chunks/index3.cjs +982 -0
  10. package/dist/chunks/index3.mjs +979 -0
  11. package/dist/chunks/index4.cjs +12099 -0
  12. package/dist/chunks/index4.mjs +12077 -0
  13. package/dist/chunks/jsdoc.cjs +38398 -0
  14. package/dist/chunks/jsdoc.mjs +38391 -0
  15. package/dist/chunks/regexp.cjs +18518 -0
  16. package/dist/chunks/regexp.mjs +18511 -0
  17. package/dist/chunks/stylistic.cjs +23935 -0
  18. package/dist/chunks/stylistic.mjs +23932 -0
  19. package/dist/chunks/typescript.cjs +56168 -0
  20. package/dist/chunks/typescript.mjs +56154 -0
  21. package/dist/chunks/unicorn.cjs +82775 -0
  22. package/dist/chunks/unicorn.mjs +82764 -0
  23. package/dist/chunks/vue.cjs +96233 -0
  24. package/dist/chunks/vue.mjs +96220 -0
  25. package/dist/eslint.config.cjs +19 -10875
  26. package/dist/eslint.config.d.cts +3897 -16
  27. package/dist/eslint.config.d.mts +3897 -16
  28. package/dist/eslint.config.d.ts +3897 -16
  29. package/dist/eslint.config.mjs +18 -10853
  30. package/dist/index.cjs +1 -1
  31. package/dist/index.d.cts +6 -2
  32. package/dist/index.d.mts +6 -2
  33. package/dist/index.d.ts +6 -2
  34. package/dist/index.mjs +1 -1
  35. package/dist/shared/eslint.05nu4VbT.mjs +9 -0
  36. package/dist/shared/eslint.07qTxm9w.mjs +3352 -0
  37. package/dist/shared/eslint.6MAvpL4q.cjs +2141 -0
  38. package/dist/shared/{eslint.CohBuu1-.mjs → eslint.B3ywQ3NK.mjs} +157 -331
  39. package/dist/shared/eslint.BGpVg2tt.cjs +13 -0
  40. package/dist/shared/eslint.BL4sYiVQ.cjs +820 -0
  41. package/dist/shared/eslint.BOOP2x9L.cjs +67 -0
  42. package/dist/shared/eslint.Bf7aat-e.mjs +10 -0
  43. package/dist/shared/eslint.Bh1W2iVQ.cjs +37181 -0
  44. package/dist/shared/eslint.Bl69eiyD.cjs +7073 -0
  45. package/dist/shared/eslint.BtkqW7nC.mjs +818 -0
  46. package/dist/shared/eslint.C12_M0Cw.cjs +9 -0
  47. package/dist/shared/eslint.CMfxPSSy.cjs +14 -0
  48. package/dist/shared/eslint.COweQ1RR.mjs +5 -0
  49. package/dist/shared/eslint.CUi9znUC.mjs +13 -0
  50. package/dist/shared/eslint.Cg6Ty7p7.mjs +2699 -0
  51. package/dist/shared/eslint.CxAZpd0w.cjs +3365 -0
  52. package/dist/shared/eslint.CyJA7jO6.cjs +3813 -0
  53. package/dist/shared/eslint.DDD2xc4l.cjs +25 -0
  54. package/dist/shared/eslint.DI7QBrVD.mjs +6 -0
  55. package/dist/shared/eslint.DUamuDzp.cjs +7 -0
  56. package/dist/shared/eslint.DV_fpPxQ.mjs +3805 -0
  57. package/dist/shared/{eslint.DhFjwkxh.cjs → eslint.Dhg0jKDi.cjs} +167 -330
  58. package/dist/shared/eslint.Difk5awg.mjs +2139 -0
  59. package/dist/shared/eslint.Dlgr3LGM.mjs +7070 -0
  60. package/dist/shared/eslint.DoYGbUIG.cjs +2724 -0
  61. package/dist/shared/eslint.Dprsk9zl.mjs +65 -0
  62. package/dist/shared/eslint.DuJbNenz.mjs +37140 -0
  63. package/dist/shared/eslint.MfgVmFE7.cjs +3054 -0
  64. package/dist/shared/eslint.W7RM7aEw.mjs +3052 -0
  65. package/package.json +2 -1
@@ -1,12 +1,3883 @@
1
1
  import antfu from '@antfu/eslint-config';
2
+ import { Linter, Rule, ESLint } from 'eslint';
2
3
  import saasmakers from '@saasmakers/eslint';
3
4
  import vitest from '@vitest/eslint-plugin';
4
5
  import packageJson from 'eslint-plugin-package-json';
5
- import { Linter, ESLint } from 'eslint';
6
6
  import storybook from 'eslint-plugin-storybook';
7
7
  import turbo from 'eslint-plugin-turbo';
8
8
  import zod from 'eslint-plugin-zod';
9
9
 
10
+ // ==================================================================================================
11
+ // JSON Schema Draft 04
12
+ // ==================================================================================================
13
+
14
+ /**
15
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
16
+ */
17
+ type JSONSchema4TypeName =
18
+ | "string" //
19
+ | "number"
20
+ | "integer"
21
+ | "boolean"
22
+ | "object"
23
+ | "array"
24
+ | "null"
25
+ | "any";
26
+
27
+ /**
28
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5
29
+ */
30
+ type JSONSchema4Type =
31
+ | string //
32
+ | number
33
+ | boolean
34
+ | JSONSchema4Object
35
+ | JSONSchema4Array
36
+ | null;
37
+
38
+ // Workaround for infinite type recursion
39
+ interface JSONSchema4Object {
40
+ [key: string]: JSONSchema4Type;
41
+ }
42
+
43
+ // Workaround for infinite type recursion
44
+ // https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
45
+ interface JSONSchema4Array extends Array<JSONSchema4Type> {}
46
+
47
+ /**
48
+ * Meta schema
49
+ *
50
+ * Recommended values:
51
+ * - 'http://json-schema.org/schema#'
52
+ * - 'http://json-schema.org/hyper-schema#'
53
+ * - 'http://json-schema.org/draft-04/schema#'
54
+ * - 'http://json-schema.org/draft-04/hyper-schema#'
55
+ * - 'http://json-schema.org/draft-03/schema#'
56
+ * - 'http://json-schema.org/draft-03/hyper-schema#'
57
+ *
58
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
59
+ */
60
+ type JSONSchema4Version = string;
61
+
62
+ /**
63
+ * JSON Schema V4
64
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-04
65
+ */
66
+ interface JSONSchema4 {
67
+ id?: string | undefined;
68
+ $ref?: string | undefined;
69
+ $schema?: JSONSchema4Version | undefined;
70
+
71
+ /**
72
+ * This attribute is a string that provides a short description of the
73
+ * instance property.
74
+ *
75
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21
76
+ */
77
+ title?: string | undefined;
78
+
79
+ /**
80
+ * This attribute is a string that provides a full description of the of
81
+ * purpose the instance property.
82
+ *
83
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22
84
+ */
85
+ description?: string | undefined;
86
+
87
+ default?: JSONSchema4Type | undefined;
88
+ multipleOf?: number | undefined;
89
+ maximum?: number | undefined;
90
+ exclusiveMaximum?: boolean | undefined;
91
+ minimum?: number | undefined;
92
+ exclusiveMinimum?: boolean | undefined;
93
+ maxLength?: number | undefined;
94
+ minLength?: number | undefined;
95
+ pattern?: string | undefined;
96
+
97
+ /**
98
+ * May only be defined when "items" is defined, and is a tuple of JSONSchemas.
99
+ *
100
+ * This provides a definition for additional items in an array instance
101
+ * when tuple definitions of the items is provided. This can be false
102
+ * to indicate additional items in the array are not allowed, or it can
103
+ * be a schema that defines the schema of the additional items.
104
+ *
105
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6
106
+ */
107
+ additionalItems?: boolean | JSONSchema4 | undefined;
108
+
109
+ /**
110
+ * This attribute defines the allowed items in an instance array, and
111
+ * MUST be a schema or an array of schemas. The default value is an
112
+ * empty schema which allows any value for items in the instance array.
113
+ *
114
+ * When this attribute value is a schema and the instance value is an
115
+ * array, then all the items in the array MUST be valid according to the
116
+ * schema.
117
+ *
118
+ * When this attribute value is an array of schemas and the instance
119
+ * value is an array, each position in the instance array MUST conform
120
+ * to the schema in the corresponding position for this array. This
121
+ * called tuple typing. When tuple typing is used, additional items are
122
+ * allowed, disallowed, or constrained by the "additionalItems"
123
+ * (Section 5.6) attribute using the same rules as
124
+ * "additionalProperties" (Section 5.4) for objects.
125
+ *
126
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5
127
+ */
128
+ items?: JSONSchema4 | JSONSchema4[] | undefined;
129
+
130
+ maxItems?: number | undefined;
131
+ minItems?: number | undefined;
132
+ uniqueItems?: boolean | undefined;
133
+ maxProperties?: number | undefined;
134
+ minProperties?: number | undefined;
135
+
136
+ /**
137
+ * This attribute indicates if the instance must have a value, and not
138
+ * be undefined. This is false by default, making the instance
139
+ * optional.
140
+ *
141
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7
142
+ */
143
+ required?: boolean | string[] | undefined;
144
+
145
+ /**
146
+ * This attribute defines a schema for all properties that are not
147
+ * explicitly defined in an object type definition. If specified, the
148
+ * value MUST be a schema or a boolean. If false is provided, no
149
+ * additional properties are allowed beyond the properties defined in
150
+ * the schema. The default value is an empty schema which allows any
151
+ * value for additional properties.
152
+ *
153
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4
154
+ */
155
+ additionalProperties?: boolean | JSONSchema4 | undefined;
156
+
157
+ definitions?: {
158
+ [k: string]: JSONSchema4;
159
+ } | undefined;
160
+
161
+ /**
162
+ * This attribute is an object with property definitions that define the
163
+ * valid values of instance object property values. When the instance
164
+ * value is an object, the property values of the instance object MUST
165
+ * conform to the property definitions in this object. In this object,
166
+ * each property definition's value MUST be a schema, and the property's
167
+ * name MUST be the name of the instance property that it defines. The
168
+ * instance property value MUST be valid according to the schema from
169
+ * the property definition. Properties are considered unordered, the
170
+ * order of the instance properties MAY be in any order.
171
+ *
172
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2
173
+ */
174
+ properties?: {
175
+ [k: string]: JSONSchema4;
176
+ } | undefined;
177
+
178
+ /**
179
+ * This attribute is an object that defines the schema for a set of
180
+ * property names of an object instance. The name of each property of
181
+ * this attribute's object is a regular expression pattern in the ECMA
182
+ * 262/Perl 5 format, while the value is a schema. If the pattern
183
+ * matches the name of a property on the instance object, the value of
184
+ * the instance's property MUST be valid against the pattern name's
185
+ * schema value.
186
+ *
187
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3
188
+ */
189
+ patternProperties?: {
190
+ [k: string]: JSONSchema4;
191
+ } | undefined;
192
+ dependencies?: {
193
+ [k: string]: JSONSchema4 | string[];
194
+ } | undefined;
195
+
196
+ /**
197
+ * This provides an enumeration of all possible values that are valid
198
+ * for the instance property. This MUST be an array, and each item in
199
+ * the array represents a possible value for the instance value. If
200
+ * this attribute is defined, the instance value MUST be one of the
201
+ * values in the array in order for the schema to be valid.
202
+ *
203
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
204
+ */
205
+ enum?: JSONSchema4Type[] | undefined;
206
+
207
+ /**
208
+ * A single type, or a union of simple types
209
+ */
210
+ type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined;
211
+
212
+ allOf?: JSONSchema4[] | undefined;
213
+ anyOf?: JSONSchema4[] | undefined;
214
+ oneOf?: JSONSchema4[] | undefined;
215
+ not?: JSONSchema4 | undefined;
216
+
217
+ /**
218
+ * The value of this property MUST be another schema which will provide
219
+ * a base schema which the current schema will inherit from. The
220
+ * inheritance rules are such that any instance that is valid according
221
+ * to the current schema MUST be valid according to the referenced
222
+ * schema. This MAY also be an array, in which case, the instance MUST
223
+ * be valid for all the schemas in the array. A schema that extends
224
+ * another schema MAY define additional attributes, constrain existing
225
+ * attributes, or add other constraints.
226
+ *
227
+ * Conceptually, the behavior of extends can be seen as validating an
228
+ * instance against all constraints in the extending schema as well as
229
+ * the extended schema(s).
230
+ *
231
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26
232
+ */
233
+ extends?: string | string[] | undefined;
234
+
235
+ /**
236
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6
237
+ */
238
+ [k: string]: any;
239
+
240
+ format?: string | undefined;
241
+ }
242
+
243
+ /**
244
+ * @fileoverview Shared types for ESLint Core.
245
+ */
246
+
247
+ /**
248
+ * Represents an error inside of a file.
249
+ */
250
+ interface FileError {
251
+ message: string;
252
+ line: number;
253
+ column: number;
254
+ endLine?: number;
255
+ endColumn?: number;
256
+ }
257
+ /**
258
+ * Represents a problem found in a file.
259
+ */
260
+ interface FileProblem {
261
+ ruleId: string | null;
262
+ message: string;
263
+ loc: SourceLocation;
264
+ }
265
+ /**
266
+ * Represents the start and end coordinates of a node inside the source.
267
+ */
268
+ interface SourceLocation {
269
+ start: Position;
270
+ end: Position;
271
+ }
272
+ /**
273
+ * Represents a location coordinate inside the source. ESLint-style formats
274
+ * have just `line` and `column` while others may have `offset` as well.
275
+ */
276
+ interface Position {
277
+ line: number;
278
+ column: number;
279
+ }
280
+ /**
281
+ * Represents a range of characters in the source.
282
+ */
283
+ type SourceRange = [number, number];
284
+ /**
285
+ * What the rule is responsible for finding:
286
+ * - `problem` means the rule has noticed a potential error.
287
+ * - `suggestion` means the rule suggests an alternate or better approach.
288
+ * - `layout` means the rule is looking at spacing, indentation, etc.
289
+ */
290
+ type RuleType = "problem" | "suggestion" | "layout";
291
+ /**
292
+ * The type of fix the rule can provide:
293
+ * - `code` means the rule can fix syntax.
294
+ * - `whitespace` means the rule can fix spacing and indentation.
295
+ */
296
+ type RuleFixType = "code" | "whitespace";
297
+ /**
298
+ * An object containing visitor information for a rule. Each method is either the
299
+ * name of a node type or a selector, or is a method that will be called at specific
300
+ * times during the traversal.
301
+ */
302
+ type RuleVisitor = Record<string, ((...args: any[]) => void) | undefined>;
303
+ /**
304
+ * Rule meta information used for documentation.
305
+ */
306
+ interface RulesMetaDocs {
307
+ /**
308
+ * A short description of the rule.
309
+ */
310
+ description?: string | undefined;
311
+ /**
312
+ * The URL to the documentation for the rule.
313
+ */
314
+ url?: string | undefined;
315
+ /**
316
+ * Indicates if the rule is generally recommended for all users.
317
+ *
318
+ * Note - this will always be a boolean for core rules, but may be used in any way by plugins.
319
+ */
320
+ recommended?: unknown;
321
+ /**
322
+ * Indicates if the rule is frozen (no longer accepting feature requests).
323
+ */
324
+ frozen?: boolean | undefined;
325
+ }
326
+ /**
327
+ * Meta information about a rule.
328
+ */
329
+ interface RulesMeta<MessageIds extends string = string, RuleOptions = unknown[], ExtRuleDocs = unknown> {
330
+ /**
331
+ * Properties that are used when documenting the rule.
332
+ */
333
+ docs?: (RulesMetaDocs & ExtRuleDocs) | undefined;
334
+ /**
335
+ * The type of rule.
336
+ */
337
+ type?: RuleType | undefined;
338
+ /**
339
+ * The schema for the rule options. Required if the rule has options.
340
+ */
341
+ schema?: JSONSchema4 | JSONSchema4[] | false | undefined;
342
+ /**
343
+ * Any default options to be recursively merged on top of any user-provided options.
344
+ */
345
+ defaultOptions?: RuleOptions;
346
+ /**
347
+ * The messages that the rule can report.
348
+ */
349
+ messages?: Record<MessageIds, string>;
350
+ /**
351
+ * Indicates whether the rule has been deprecated or provides additional metadata about the deprecation. Omit if not deprecated.
352
+ */
353
+ deprecated?: boolean | DeprecatedInfo | undefined;
354
+ /**
355
+ * @deprecated Use deprecated.replacedBy instead.
356
+ * The name of the rule(s) this rule was replaced by, if it was deprecated.
357
+ */
358
+ replacedBy?: readonly string[] | undefined;
359
+ /**
360
+ * Indicates if the rule is fixable, and if so, what type of fix it provides.
361
+ */
362
+ fixable?: RuleFixType | undefined;
363
+ /**
364
+ * Indicates if the rule may provide suggestions.
365
+ */
366
+ hasSuggestions?: boolean | undefined;
367
+ /**
368
+ * The language the rule is intended to lint.
369
+ */
370
+ language?: string;
371
+ /**
372
+ * The dialects of `language` that the rule is intended to lint.
373
+ */
374
+ dialects?: string[];
375
+ }
376
+ /**
377
+ * Provides additional metadata about a deprecation.
378
+ */
379
+ interface DeprecatedInfo {
380
+ /**
381
+ * General message presented to the user, e.g. for the key rule why the rule
382
+ * is deprecated or for info how to replace the rule.
383
+ */
384
+ message?: string;
385
+ /**
386
+ * URL to more information about this deprecation in general.
387
+ */
388
+ url?: string;
389
+ /**
390
+ * An empty array explicitly states that there is no replacement.
391
+ */
392
+ replacedBy?: ReplacedByInfo[];
393
+ /**
394
+ * The package version since when the rule is deprecated (should use full
395
+ * semver without a leading "v").
396
+ */
397
+ deprecatedSince?: string;
398
+ /**
399
+ * The estimated version when the rule is removed (probably the next major
400
+ * version). null means the rule is "frozen" (will be available but will not
401
+ * be changed).
402
+ */
403
+ availableUntil?: string | null;
404
+ }
405
+ /**
406
+ * Provides metadata about a replacement
407
+ */
408
+ interface ReplacedByInfo {
409
+ /**
410
+ * General message presented to the user, e.g. how to replace the rule
411
+ */
412
+ message?: string;
413
+ /**
414
+ * URL to more information about this replacement in general
415
+ */
416
+ url?: string;
417
+ /**
418
+ * Name should be "eslint" if the replacement is an ESLint core rule. Omit
419
+ * the property if the replacement is in the same plugin.
420
+ */
421
+ plugin?: ExternalSpecifier;
422
+ /**
423
+ * Name and documentation of the replacement rule
424
+ */
425
+ rule?: ExternalSpecifier;
426
+ }
427
+ /**
428
+ * Specifies the name and url of an external resource. At least one property
429
+ * should be set.
430
+ */
431
+ interface ExternalSpecifier {
432
+ /**
433
+ * Name of the referenced plugin / rule.
434
+ */
435
+ name?: string;
436
+ /**
437
+ * URL pointing to documentation for the plugin / rule.
438
+ */
439
+ url?: string;
440
+ }
441
+ /**
442
+ * Generic type for `RuleContext`.
443
+ */
444
+ interface RuleContextTypeOptions {
445
+ LangOptions: LanguageOptions;
446
+ Code: SourceCode;
447
+ RuleOptions: unknown[];
448
+ Node: unknown;
449
+ MessageIds: string;
450
+ }
451
+ /**
452
+ * Represents the context object that is passed to a rule. This object contains
453
+ * information about the current state of the linting process and is the rule's
454
+ * view into the outside world.
455
+ */
456
+ interface RuleContext<Options extends RuleContextTypeOptions = RuleContextTypeOptions> {
457
+ /**
458
+ * The current working directory for the session.
459
+ */
460
+ cwd: string;
461
+ /**
462
+ * The filename of the file being linted.
463
+ */
464
+ filename: string;
465
+ /**
466
+ * The physical filename of the file being linted.
467
+ */
468
+ physicalFilename: string;
469
+ /**
470
+ * The source code object that the rule is running on.
471
+ */
472
+ sourceCode: Options["Code"];
473
+ /**
474
+ * Shared settings for the configuration.
475
+ */
476
+ settings: SettingsConfig;
477
+ /**
478
+ * The language options for the configuration.
479
+ */
480
+ languageOptions: Options["LangOptions"];
481
+ /**
482
+ * The rule ID.
483
+ */
484
+ id: string;
485
+ /**
486
+ * The rule's configured options.
487
+ */
488
+ options: Options["RuleOptions"];
489
+ /**
490
+ * The report function that the rule should use to report problems.
491
+ * @param violation The violation to report.
492
+ */
493
+ report(violation: ViolationReport<Options["Node"], Options["MessageIds"]>): void;
494
+ }
495
+ /**
496
+ * Manager of text edits for a rule fix.
497
+ */
498
+ interface RuleTextEditor<EditableSyntaxElement = unknown> {
499
+ /**
500
+ * Inserts text after the specified node or token.
501
+ * @param syntaxElement The node or token to insert after.
502
+ * @param text The edit to insert after the node or token.
503
+ */
504
+ insertTextAfter(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit;
505
+ /**
506
+ * Inserts text after the specified range.
507
+ * @param range The range to insert after.
508
+ * @param text The edit to insert after the range.
509
+ */
510
+ insertTextAfterRange(range: SourceRange, text: string): RuleTextEdit;
511
+ /**
512
+ * Inserts text before the specified node or token.
513
+ * @param syntaxElement A syntax element with location information to insert before.
514
+ * @param text The edit to insert before the node or token.
515
+ */
516
+ insertTextBefore(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit;
517
+ /**
518
+ * Inserts text before the specified range.
519
+ * @param range The range to insert before.
520
+ * @param text The edit to insert before the range.
521
+ */
522
+ insertTextBeforeRange(range: SourceRange, text: string): RuleTextEdit;
523
+ /**
524
+ * Removes the specified node or token.
525
+ * @param syntaxElement A syntax element with location information to remove.
526
+ * @returns The edit to remove the node or token.
527
+ */
528
+ remove(syntaxElement: EditableSyntaxElement): RuleTextEdit;
529
+ /**
530
+ * Removes the specified range.
531
+ * @param range The range to remove.
532
+ * @returns The edit to remove the range.
533
+ */
534
+ removeRange(range: SourceRange): RuleTextEdit;
535
+ /**
536
+ * Replaces the specified node or token with the given text.
537
+ * @param syntaxElement A syntax element with location information to replace.
538
+ * @param text The text to replace the node or token with.
539
+ * @returns The edit to replace the node or token.
540
+ */
541
+ replaceText(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit;
542
+ /**
543
+ * Replaces the specified range with the given text.
544
+ * @param range The range to replace.
545
+ * @param text The text to replace the range with.
546
+ * @returns The edit to replace the range.
547
+ */
548
+ replaceTextRange(range: SourceRange, text: string): RuleTextEdit;
549
+ }
550
+ /**
551
+ * Represents a fix for a rule violation implemented as a text edit.
552
+ */
553
+ interface RuleTextEdit {
554
+ /**
555
+ * The range to replace.
556
+ */
557
+ range: SourceRange;
558
+ /**
559
+ * The text to insert.
560
+ */
561
+ text: string;
562
+ }
563
+ /**
564
+ * Fixes a violation.
565
+ * @param fixer The text editor to apply the fix.
566
+ * @returns The fix(es) for the violation.
567
+ */
568
+ type RuleFixer = (fixer: RuleTextEditor) => RuleTextEdit | Iterable<RuleTextEdit> | null;
569
+ /**
570
+ * Data that can be used to fill placeholders in error messages.
571
+ */
572
+ type MessagePlaceholderData = Record<string, string | number | boolean | bigint | null | undefined>;
573
+ interface ViolationReportBase {
574
+ /**
575
+ * The data to insert into the message.
576
+ */
577
+ data?: MessagePlaceholderData | undefined;
578
+ /**
579
+ * The fix to be applied for the violation.
580
+ */
581
+ fix?: RuleFixer | null | undefined;
582
+ /**
583
+ * An array of suggested fixes for the problem. These fixes may change the
584
+ * behavior of the code, so they are not applied automatically.
585
+ */
586
+ suggest?: SuggestedEdit[] | null | undefined;
587
+ }
588
+ type ViolationMessage<MessageIds = string> = {
589
+ message: string;
590
+ } | {
591
+ messageId: MessageIds;
592
+ };
593
+ type ViolationLocation<Node> = {
594
+ loc: SourceLocation | Position;
595
+ } | {
596
+ node: Node;
597
+ };
598
+ type ViolationReport<Node = unknown, MessageIds = string> = ViolationReportBase & ViolationMessage<MessageIds> & ViolationLocation<Node>;
599
+ interface SuggestedEditBase {
600
+ /**
601
+ * The data to insert into the message.
602
+ */
603
+ data?: MessagePlaceholderData | undefined;
604
+ /**
605
+ * The fix to be applied for the suggestion.
606
+ */
607
+ fix: RuleFixer;
608
+ }
609
+ type SuggestionMessage = {
610
+ desc: string;
611
+ } | {
612
+ messageId: string;
613
+ };
614
+ /**
615
+ * A suggested edit for a rule violation.
616
+ */
617
+ type SuggestedEdit = SuggestedEditBase & SuggestionMessage;
618
+ /**
619
+ * The normalized version of a lint suggestion.
620
+ */
621
+ interface LintSuggestion {
622
+ /** A short description. */
623
+ desc: string;
624
+ /** Fix result info. */
625
+ fix: RuleTextEdit;
626
+ /** Id referencing a message for the description. */
627
+ messageId?: string | undefined;
628
+ }
629
+ /**
630
+ * The normalized version of a lint violation message.
631
+ */
632
+ interface LintMessage {
633
+ /** The 1-based column number. */
634
+ column: number;
635
+ /** The 1-based line number. */
636
+ line: number;
637
+ /** The 1-based column number of the end location. */
638
+ endColumn?: number | undefined;
639
+ /** The 1-based line number of the end location. */
640
+ endLine?: number | undefined;
641
+ /** The ID of the rule which makes this message. */
642
+ ruleId: string | null;
643
+ /** The reported message. */
644
+ message: string;
645
+ /** The ID of the message in the rule's meta. */
646
+ messageId?: string | undefined;
647
+ /** If `true` then this is a fatal error. */
648
+ fatal?: true | undefined;
649
+ /** The severity of this message. */
650
+ severity: Exclude<SeverityLevel, 0>;
651
+ /** Information for autofix. */
652
+ fix?: RuleTextEdit | undefined;
653
+ /** Information for suggestions. */
654
+ suggestions?: LintSuggestion[] | undefined;
655
+ }
656
+ /**
657
+ * Generic options for the `RuleDefinition` type.
658
+ */
659
+ interface RuleDefinitionTypeOptions {
660
+ LangOptions: LanguageOptions;
661
+ Code: SourceCode;
662
+ RuleOptions: unknown[];
663
+ Visitor: RuleVisitor;
664
+ Node: unknown;
665
+ MessageIds: string;
666
+ ExtRuleDocs: unknown;
667
+ }
668
+ /**
669
+ * The definition of an ESLint rule.
670
+ */
671
+ interface RuleDefinition<Options extends RuleDefinitionTypeOptions = RuleDefinitionTypeOptions> {
672
+ /**
673
+ * The meta information for the rule.
674
+ */
675
+ meta?: RulesMeta<Options["MessageIds"], Options["RuleOptions"], Options["ExtRuleDocs"]>;
676
+ /**
677
+ * Creates the visitor that ESLint uses to apply the rule during traversal.
678
+ * @param context The rule context.
679
+ * @returns The rule visitor.
680
+ */
681
+ create(context: RuleContext<{
682
+ LangOptions: Options["LangOptions"];
683
+ Code: Options["Code"];
684
+ RuleOptions: Options["RuleOptions"];
685
+ Node: Options["Node"];
686
+ MessageIds: Options["MessageIds"];
687
+ }>): Options["Visitor"];
688
+ }
689
+ /**
690
+ * The human readable severity level used in a configuration.
691
+ */
692
+ type SeverityName = "off" | "warn" | "error";
693
+ /**
694
+ * The numeric severity level for a rule.
695
+ *
696
+ * - `0` means off.
697
+ * - `1` means warn.
698
+ * - `2` means error.
699
+ */
700
+ type SeverityLevel = 0 | 1 | 2;
701
+ /**
702
+ * The severity of a rule in a configuration.
703
+ */
704
+ type Severity = SeverityName | SeverityLevel;
705
+ /**
706
+ * Represents the metadata for an object, such as a plugin or processor.
707
+ */
708
+ interface ObjectMetaProperties {
709
+ /** @deprecated Use `meta.name` instead. */
710
+ name?: string | undefined;
711
+ /** @deprecated Use `meta.version` instead. */
712
+ version?: string | undefined;
713
+ meta?: {
714
+ name?: string | undefined;
715
+ version?: string | undefined;
716
+ };
717
+ }
718
+ /**
719
+ * Represents the configuration options for the core linter.
720
+ */
721
+ interface LinterOptionsConfig {
722
+ /**
723
+ * Indicates whether or not inline configuration is evaluated.
724
+ */
725
+ noInlineConfig?: boolean;
726
+ /**
727
+ * Indicates what to do when an unused disable directive is found.
728
+ */
729
+ reportUnusedDisableDirectives?: boolean | Severity;
730
+ /**
731
+ * A severity value indicating if and how unused inline configs should be
732
+ * tracked and reported.
733
+ */
734
+ reportUnusedInlineConfigs?: Severity;
735
+ }
736
+ /**
737
+ * The configuration for a rule.
738
+ */
739
+ type RuleConfig<RuleOptions extends unknown[] = unknown[]> = Severity | [Severity, ...Partial<RuleOptions>];
740
+ /**
741
+ * A collection of rules and their configurations.
742
+ */
743
+ interface RulesConfig {
744
+ [key: string]: RuleConfig;
745
+ }
746
+ /**
747
+ * A collection of settings.
748
+ */
749
+ interface SettingsConfig {
750
+ [key: string]: unknown;
751
+ }
752
+ /**
753
+ * The configuration for a set of files.
754
+ */
755
+ interface ConfigObject<Rules extends RulesConfig = RulesConfig> {
756
+ /**
757
+ * A string to identify the configuration object. Used in error messages and
758
+ * inspection tools.
759
+ */
760
+ name?: string;
761
+ /**
762
+ * Path to the directory where the configuration object should apply.
763
+ * `files` and `ignores` patterns in the configuration object are
764
+ * interpreted as relative to this path.
765
+ */
766
+ basePath?: string;
767
+ /**
768
+ * An array of glob patterns indicating the files that the configuration
769
+ * object should apply to. If not specified, the configuration object applies
770
+ * to all files
771
+ */
772
+ files?: (string | string[])[];
773
+ /**
774
+ * An array of glob patterns indicating the files that the configuration
775
+ * object should not apply to. If not specified, the configuration object
776
+ * applies to all files matched by files
777
+ */
778
+ ignores?: string[];
779
+ /**
780
+ * The name of the language used for linting. This is used to determine the
781
+ * parser and other language-specific settings.
782
+ * @since 9.7.0
783
+ */
784
+ language?: string;
785
+ /**
786
+ * An object containing settings related to how the language is configured for
787
+ * linting.
788
+ */
789
+ languageOptions?: LanguageOptions;
790
+ /**
791
+ * An object containing settings related to the linting process
792
+ */
793
+ linterOptions?: LinterOptionsConfig;
794
+ /**
795
+ * Either an object containing preprocess() and postprocess() methods or a
796
+ * string indicating the name of a processor inside of a plugin
797
+ * (i.e., "pluginName/processorName").
798
+ */
799
+ processor?: string | Processor;
800
+ /**
801
+ * An object containing a name-value mapping of plugin names to plugin objects.
802
+ * When files is specified, these plugins are only available to the matching files.
803
+ */
804
+ plugins?: Record<string, Plugin>;
805
+ /**
806
+ * An object containing the configured rules. When files or ignores are specified,
807
+ * these rule configurations are only available to the matching files.
808
+ */
809
+ rules?: Partial<Rules>;
810
+ /**
811
+ * An object containing name-value pairs of information that should be
812
+ * available to all rules.
813
+ */
814
+ settings?: SettingsConfig;
815
+ }
816
+ /** @deprecated Only supported in legacy eslintrc config format. */
817
+ type GlobalAccess = boolean | "off" | "readable" | "readonly" | "writable" | "writeable";
818
+ /** @deprecated Only supported in legacy eslintrc config format. */
819
+ interface GlobalsConfig {
820
+ [name: string]: GlobalAccess;
821
+ }
822
+ /**
823
+ * The ECMAScript version of the code being linted.
824
+ * @deprecated Only supported in legacy eslintrc config format.
825
+ */
826
+ type EcmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | "latest";
827
+ /**
828
+ * The type of JavaScript source code.
829
+ * @deprecated Only supported in legacy eslintrc config format.
830
+ */
831
+ type JavaScriptSourceType = "script" | "module" | "commonjs";
832
+ /**
833
+ * Parser options.
834
+ * @deprecated Only supported in legacy eslintrc config format.
835
+ * @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options#specifying-parser-options)
836
+ */
837
+ interface JavaScriptParserOptionsConfig {
838
+ /**
839
+ * Allow the use of reserved words as identifiers (if `ecmaVersion` is 3).
840
+ *
841
+ * @default false
842
+ */
843
+ allowReserved?: boolean | undefined;
844
+ /**
845
+ * Accepts any valid ECMAScript version number or `'latest'`:
846
+ *
847
+ * - A version: es3, es5, es6, es7, es8, es9, es10, es11, es12, es13, es14, ..., or
848
+ * - A year: es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, ..., or
849
+ * - `'latest'`
850
+ *
851
+ * When it's a version or a year, the value must be a number - so do not include the `es` prefix.
852
+ *
853
+ * Specifies the version of ECMAScript syntax you want to use. This is used by the parser to determine how to perform scope analysis, and it affects the default
854
+ *
855
+ * @default 5
856
+ */
857
+ ecmaVersion?: EcmaVersion | undefined;
858
+ /**
859
+ * The type of JavaScript source code. Possible values are "script" for
860
+ * traditional script files, "module" for ECMAScript modules (ESM), and
861
+ * "commonjs" for CommonJS files.
862
+ *
863
+ * @default 'script'
864
+ *
865
+ * @see https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options
866
+ */
867
+ sourceType?: JavaScriptSourceType | undefined;
868
+ /**
869
+ * An object indicating which additional language features you'd like to use.
870
+ *
871
+ * @see https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options
872
+ */
873
+ ecmaFeatures?: {
874
+ globalReturn?: boolean | undefined;
875
+ impliedStrict?: boolean | undefined;
876
+ jsx?: boolean | undefined;
877
+ [key: string]: any;
878
+ } | undefined;
879
+ [key: string]: any;
880
+ }
881
+ /** @deprecated Only supported in legacy eslintrc config format. */
882
+ interface EnvironmentConfig {
883
+ /** The definition of global variables. */
884
+ globals?: GlobalsConfig | undefined;
885
+ /** The parser options that will be enabled under this environment. */
886
+ parserOptions?: JavaScriptParserOptionsConfig | undefined;
887
+ }
888
+ /**
889
+ * A configuration object that may have a `rules` block.
890
+ */
891
+ interface HasRules<Rules extends RulesConfig = RulesConfig> {
892
+ rules?: Partial<Rules> | undefined;
893
+ }
894
+ /**
895
+ * ESLint legacy configuration.
896
+ *
897
+ * @see [ESLint Legacy Configuration](https://eslint.org/docs/latest/use/configure/)
898
+ */
899
+ interface BaseConfig$1<Rules extends RulesConfig = RulesConfig, OverrideRules extends RulesConfig = Rules> extends HasRules<Rules> {
900
+ $schema?: string | undefined;
901
+ /**
902
+ * An environment provides predefined global variables.
903
+ *
904
+ * @see [Environments](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-environments)
905
+ */
906
+ env?: {
907
+ [name: string]: boolean;
908
+ } | undefined;
909
+ /**
910
+ * Extending configuration files.
911
+ *
912
+ * @see [Extends](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#extending-configuration-files)
913
+ */
914
+ extends?: string | string[] | undefined;
915
+ /**
916
+ * Specifying globals.
917
+ *
918
+ * @see [Globals](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-globals)
919
+ */
920
+ globals?: GlobalsConfig | undefined;
921
+ /**
922
+ * Disable processing of inline comments.
923
+ *
924
+ * @see [Disabling Inline Comments](https://eslint.org/docs/latest/use/configure/rules-deprecated#disabling-inline-comments)
925
+ */
926
+ noInlineConfig?: boolean | undefined;
927
+ /**
928
+ * Overrides can be used to use a differing configuration for matching sub-directories and files.
929
+ *
930
+ * @see [How do overrides work](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#how-do-overrides-work)
931
+ */
932
+ overrides?: ConfigOverride<OverrideRules>[] | undefined;
933
+ /**
934
+ * Parser.
935
+ *
936
+ * @see [Working with Custom Parsers](https://eslint.org/docs/latest/extend/custom-parsers)
937
+ * @see [Specifying Parser](https://eslint.org/docs/latest/use/configure/parser-deprecated)
938
+ */
939
+ parser?: string | undefined;
940
+ /**
941
+ * Parser options.
942
+ *
943
+ * @see [Working with Custom Parsers](https://eslint.org/docs/latest/extend/custom-parsers)
944
+ * @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options)
945
+ */
946
+ parserOptions?: JavaScriptParserOptionsConfig | undefined;
947
+ /**
948
+ * Which third-party plugins define additional rules, environments, configs, etc. for ESLint to use.
949
+ *
950
+ * @see [Configuring Plugins](https://eslint.org/docs/latest/use/configure/plugins-deprecated#configure-plugins)
951
+ */
952
+ plugins?: string[] | undefined;
953
+ /**
954
+ * Specifying processor.
955
+ *
956
+ * @see [processor](https://eslint.org/docs/latest/use/configure/plugins-deprecated#specify-a-processor)
957
+ */
958
+ processor?: string | undefined;
959
+ /**
960
+ * Report unused eslint-disable comments as warning.
961
+ *
962
+ * @see [Report unused eslint-disable comments](https://eslint.org/docs/latest/use/configure/rules-deprecated#report-unused-eslint-disable-comments)
963
+ */
964
+ reportUnusedDisableDirectives?: boolean | undefined;
965
+ /**
966
+ * Settings.
967
+ *
968
+ * @see [Settings](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#adding-shared-settings)
969
+ */
970
+ settings?: SettingsConfig | undefined;
971
+ }
972
+ /**
973
+ * The overwrites that apply more differing configuration to specific files or directories.
974
+ */
975
+ interface ConfigOverride<Rules extends RulesConfig = RulesConfig> extends BaseConfig$1<Rules> {
976
+ /**
977
+ * The glob patterns for excluded files.
978
+ */
979
+ excludedFiles?: string | string[] | undefined;
980
+ /**
981
+ * The glob patterns for target files.
982
+ */
983
+ files: string | string[];
984
+ }
985
+ /**
986
+ * ESLint legacy configuration.
987
+ *
988
+ * @see [ESLint Legacy Configuration](https://eslint.org/docs/latest/use/configure/)
989
+ */
990
+ interface LegacyConfigObject<Rules extends RulesConfig = RulesConfig, OverrideRules extends RulesConfig = Rules> extends BaseConfig$1<Rules, OverrideRules> {
991
+ /**
992
+ * Tell ESLint to ignore specific files and directories.
993
+ *
994
+ * @see [Ignore Patterns](https://eslint.org/docs/latest/use/configure/ignore-deprecated#ignorepatterns-in-config-files)
995
+ */
996
+ ignorePatterns?: string | string[] | undefined;
997
+ /**
998
+ * @see [Using Configuration Files](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#using-configuration-files)
999
+ */
1000
+ root?: boolean | undefined;
1001
+ }
1002
+ /**
1003
+ * File information passed to a processor.
1004
+ */
1005
+ interface ProcessorFile {
1006
+ text: string;
1007
+ filename: string;
1008
+ }
1009
+ /**
1010
+ * A processor is an object that can preprocess and postprocess files.
1011
+ */
1012
+ interface Processor<T extends string | ProcessorFile = string | ProcessorFile> extends ObjectMetaProperties {
1013
+ /** If `true` then it means the processor supports autofix. */
1014
+ supportsAutofix?: boolean | undefined;
1015
+ /** The function to extract code blocks. */
1016
+ preprocess?(text: string, filename: string): T[];
1017
+ /** The function to merge messages. */
1018
+ postprocess?(messages: LintMessage[][], filename: string): LintMessage[];
1019
+ }
1020
+ interface Plugin extends ObjectMetaProperties {
1021
+ meta?: ObjectMetaProperties["meta"] & {
1022
+ namespace?: string | undefined;
1023
+ };
1024
+ configs?: Record<string, LegacyConfigObject | ConfigObject | ConfigObject[]> | undefined;
1025
+ environments?: Record<string, EnvironmentConfig> | undefined;
1026
+ languages?: Record<string, Language> | undefined;
1027
+ processors?: Record<string, Processor> | undefined;
1028
+ rules?: Record<string, RuleDefinition> | undefined;
1029
+ }
1030
+ /**
1031
+ * Generic options for the `Language` type.
1032
+ */
1033
+ interface LanguageTypeOptions {
1034
+ LangOptions: LanguageOptions;
1035
+ Code: SourceCode;
1036
+ RootNode: unknown;
1037
+ Node: unknown;
1038
+ }
1039
+ /**
1040
+ * Represents a plugin language.
1041
+ */
1042
+ interface Language<Options extends LanguageTypeOptions = {
1043
+ LangOptions: LanguageOptions;
1044
+ Code: SourceCode;
1045
+ RootNode: unknown;
1046
+ Node: unknown;
1047
+ }> {
1048
+ /**
1049
+ * Indicates how ESLint should read the file.
1050
+ */
1051
+ fileType: "text";
1052
+ /**
1053
+ * First line number returned from the parser (text mode only).
1054
+ */
1055
+ lineStart: 0 | 1;
1056
+ /**
1057
+ * First column number returned from the parser (text mode only).
1058
+ */
1059
+ columnStart: 0 | 1;
1060
+ /**
1061
+ * The property to read the node type from. Used in selector querying.
1062
+ */
1063
+ nodeTypeKey: string;
1064
+ /**
1065
+ * The traversal path that tools should take when evaluating the AST
1066
+ */
1067
+ visitorKeys?: Record<string, string[]>;
1068
+ /**
1069
+ * Default language options. User-defined options are merged with this object.
1070
+ */
1071
+ defaultLanguageOptions?: LanguageOptions;
1072
+ /**
1073
+ * Validates languageOptions for this language.
1074
+ */
1075
+ validateLanguageOptions(languageOptions: Options["LangOptions"]): void;
1076
+ /**
1077
+ * Normalizes languageOptions for this language.
1078
+ */
1079
+ normalizeLanguageOptions?(languageOptions: Options["LangOptions"]): Options["LangOptions"];
1080
+ /**
1081
+ * Helper for esquery that allows languages to match nodes against
1082
+ * class. esquery currently has classes like `function` that will
1083
+ * match all the various function nodes. This method allows languages
1084
+ * to implement similar shorthands.
1085
+ */
1086
+ matchesSelectorClass?(className: string, node: Options["Node"], ancestry: Options["Node"][]): boolean;
1087
+ /**
1088
+ * Parses the given file input into its component parts. This file should not
1089
+ * throws errors for parsing errors but rather should return any parsing
1090
+ * errors as parse of the ParseResult object.
1091
+ */
1092
+ parse(file: File, context: LanguageContext<Options["LangOptions"]>): ParseResult<Options["RootNode"]>;
1093
+ /**
1094
+ * Creates SourceCode object that ESLint uses to work with a file.
1095
+ */
1096
+ createSourceCode(file: File, input: OkParseResult<Options["RootNode"]>, context: LanguageContext<Options["LangOptions"]>): Options["Code"];
1097
+ }
1098
+ /**
1099
+ * Plugin-defined options for the language.
1100
+ */
1101
+ type LanguageOptions = Record<string, unknown>;
1102
+ /**
1103
+ * The context object that is passed to the language plugin methods.
1104
+ */
1105
+ interface LanguageContext<LangOptions = LanguageOptions> {
1106
+ languageOptions: LangOptions;
1107
+ }
1108
+ /**
1109
+ * Represents a file read by ESLint.
1110
+ */
1111
+ interface File {
1112
+ /**
1113
+ * The path that ESLint uses for this file. May be a virtual path
1114
+ * if it was returned by a processor.
1115
+ */
1116
+ path: string;
1117
+ /**
1118
+ * The path to the file on disk. This always maps directly to a file
1119
+ * regardless of whether it was returned from a processor.
1120
+ */
1121
+ physicalPath: string;
1122
+ /**
1123
+ * Indicates if the original source contained a byte-order marker.
1124
+ * ESLint strips the BOM from the `body`, but this info is needed
1125
+ * to correctly apply autofixing.
1126
+ */
1127
+ bom: boolean;
1128
+ /**
1129
+ * The body of the file to parse.
1130
+ */
1131
+ body: string | Uint8Array;
1132
+ }
1133
+ /**
1134
+ * Represents the successful result of parsing a file.
1135
+ */
1136
+ interface OkParseResult<RootNode = unknown> {
1137
+ /**
1138
+ * Indicates if the parse was successful. If true, the parse was successful
1139
+ * and ESLint should continue on to create a SourceCode object and run rules;
1140
+ * if false, ESLint should just report the error(s) without doing anything
1141
+ * else.
1142
+ */
1143
+ ok: true;
1144
+ /**
1145
+ * The abstract syntax tree created by the parser. (only when ok: true)
1146
+ */
1147
+ ast: RootNode;
1148
+ /**
1149
+ * Any additional data that the parser wants to provide.
1150
+ */
1151
+ [key: string]: any;
1152
+ }
1153
+ /**
1154
+ * Represents the unsuccessful result of parsing a file.
1155
+ */
1156
+ interface NotOkParseResult {
1157
+ /**
1158
+ * Indicates if the parse was successful. If true, the parse was successful
1159
+ * and ESLint should continue on to create a SourceCode object and run rules;
1160
+ * if false, ESLint should just report the error(s) without doing anything
1161
+ * else.
1162
+ */
1163
+ ok: false;
1164
+ /**
1165
+ * Any parsing errors, whether fatal or not. (only when ok: false)
1166
+ */
1167
+ errors: FileError[];
1168
+ /**
1169
+ * Any additional data that the parser wants to provide.
1170
+ */
1171
+ [key: string]: any;
1172
+ }
1173
+ type ParseResult<RootNode = unknown> = OkParseResult<RootNode> | NotOkParseResult;
1174
+ /**
1175
+ * Represents inline configuration found in the source code.
1176
+ */
1177
+ interface InlineConfigElement {
1178
+ /**
1179
+ * The location of the inline config element.
1180
+ */
1181
+ loc: SourceLocation;
1182
+ /**
1183
+ * The interpreted configuration from the inline config element.
1184
+ */
1185
+ config: {
1186
+ rules: RulesConfig;
1187
+ };
1188
+ }
1189
+ /**
1190
+ * Generic options for the `SourceCodeBase` type.
1191
+ */
1192
+ interface SourceCodeBaseTypeOptions {
1193
+ LangOptions: LanguageOptions;
1194
+ RootNode: unknown;
1195
+ SyntaxElementWithLoc: unknown;
1196
+ ConfigNode: unknown;
1197
+ }
1198
+ /**
1199
+ * Represents the basic interface for a source code object.
1200
+ */
1201
+ interface SourceCodeBase<Options extends SourceCodeBaseTypeOptions = {
1202
+ LangOptions: LanguageOptions;
1203
+ RootNode: unknown;
1204
+ SyntaxElementWithLoc: unknown;
1205
+ ConfigNode: unknown;
1206
+ }> {
1207
+ /**
1208
+ * Root of the AST.
1209
+ */
1210
+ ast: Options["RootNode"];
1211
+ /**
1212
+ * The traversal path that tools should take when evaluating the AST.
1213
+ * When present, this overrides the `visitorKeys` on the language for
1214
+ * just this source code object.
1215
+ */
1216
+ visitorKeys?: Record<string, string[]>;
1217
+ /**
1218
+ * Retrieves the equivalent of `loc` for a given node or token.
1219
+ * @param syntaxElement The node or token to get the location for.
1220
+ * @returns The location of the node or token.
1221
+ */
1222
+ getLoc(syntaxElement: Options["SyntaxElementWithLoc"]): SourceLocation;
1223
+ /**
1224
+ * Retrieves the equivalent of `range` for a given node or token.
1225
+ * @param syntaxElement The node or token to get the range for.
1226
+ * @returns The range of the node or token.
1227
+ */
1228
+ getRange(syntaxElement: Options["SyntaxElementWithLoc"]): SourceRange;
1229
+ /**
1230
+ * Traversal of AST.
1231
+ */
1232
+ traverse(): Iterable<TraversalStep>;
1233
+ /**
1234
+ * Applies language options passed in from the ESLint core.
1235
+ */
1236
+ applyLanguageOptions?(languageOptions: Options["LangOptions"]): void;
1237
+ /**
1238
+ * Return all of the inline areas where ESLint should be disabled/enabled
1239
+ * along with any problems found in evaluating the directives.
1240
+ */
1241
+ getDisableDirectives?(): {
1242
+ directives: Directive[];
1243
+ problems: FileProblem[];
1244
+ };
1245
+ /**
1246
+ * Returns an array of all inline configuration nodes found in the
1247
+ * source code.
1248
+ */
1249
+ getInlineConfigNodes?(): Options["ConfigNode"][];
1250
+ /**
1251
+ * Applies configuration found inside of the source code. This method is only
1252
+ * called when ESLint is running with inline configuration allowed.
1253
+ */
1254
+ applyInlineConfig?(): {
1255
+ configs: InlineConfigElement[];
1256
+ problems: FileProblem[];
1257
+ };
1258
+ /**
1259
+ * Called by ESLint core to indicate that it has finished providing
1260
+ * information. We now add in all the missing variables and ensure that
1261
+ * state-changing methods cannot be called by rules.
1262
+ * @returns {void}
1263
+ */
1264
+ finalize?(): void;
1265
+ }
1266
+ /**
1267
+ * Represents the source of a text file being linted.
1268
+ */
1269
+ interface TextSourceCode<Options extends SourceCodeBaseTypeOptions = {
1270
+ LangOptions: LanguageOptions;
1271
+ RootNode: unknown;
1272
+ SyntaxElementWithLoc: unknown;
1273
+ ConfigNode: unknown;
1274
+ }> extends SourceCodeBase<Options> {
1275
+ /**
1276
+ * The body of the file that you'd like rule developers to access.
1277
+ */
1278
+ text: string;
1279
+ }
1280
+ /**
1281
+ * Represents the source of a binary file being linted.
1282
+ */
1283
+ interface BinarySourceCode<Options extends SourceCodeBaseTypeOptions = {
1284
+ LangOptions: LanguageOptions;
1285
+ RootNode: unknown;
1286
+ SyntaxElementWithLoc: unknown;
1287
+ ConfigNode: unknown;
1288
+ }> extends SourceCodeBase<Options> {
1289
+ /**
1290
+ * The body of the file that you'd like rule developers to access.
1291
+ */
1292
+ body: Uint8Array;
1293
+ }
1294
+ type SourceCode<Options extends SourceCodeBaseTypeOptions = {
1295
+ LangOptions: LanguageOptions;
1296
+ RootNode: unknown;
1297
+ SyntaxElementWithLoc: unknown;
1298
+ ConfigNode: unknown;
1299
+ }> = TextSourceCode<Options> | BinarySourceCode<Options>;
1300
+ /**
1301
+ * Represents a traversal step visiting the AST.
1302
+ */
1303
+ interface VisitTraversalStep {
1304
+ kind: 1;
1305
+ target: unknown;
1306
+ phase: 1 | 2;
1307
+ args: unknown[];
1308
+ }
1309
+ /**
1310
+ * Represents a traversal step calling a function.
1311
+ */
1312
+ interface CallTraversalStep {
1313
+ kind: 2;
1314
+ target: string;
1315
+ phase?: string;
1316
+ args: unknown[];
1317
+ }
1318
+ type TraversalStep = VisitTraversalStep | CallTraversalStep;
1319
+ /**
1320
+ * The type of disable directive. This determines how ESLint will disable rules.
1321
+ */
1322
+ type DirectiveType = "disable" | "enable" | "disable-line" | "disable-next-line";
1323
+ /**
1324
+ * Represents a disable directive.
1325
+ */
1326
+ interface Directive {
1327
+ /**
1328
+ * The type of directive.
1329
+ */
1330
+ type: DirectiveType;
1331
+ /**
1332
+ * The node of the directive. May be in the AST or a comment/token.
1333
+ */
1334
+ node: unknown;
1335
+ /**
1336
+ * The value of the directive.
1337
+ */
1338
+ value: string;
1339
+ /**
1340
+ * The justification for the directive.
1341
+ */
1342
+ justification?: string;
1343
+ }
1344
+
1345
+ /**
1346
+ * @fileoverview Types for this package.
1347
+ */
1348
+
1349
+
1350
+
1351
+ /**
1352
+ * Infinite array type.
1353
+ */
1354
+ type InfiniteArray<T> = T | InfiniteArray<T>[];
1355
+
1356
+ /**
1357
+ * The type of array element in the `extends` property after flattening.
1358
+ */
1359
+ type SimpleExtendsElement = string | ConfigObject;
1360
+
1361
+ /**
1362
+ * The type of array element in the `extends` property before flattening.
1363
+ */
1364
+ type ExtendsElement = SimpleExtendsElement | InfiniteArray<ConfigObject>;
1365
+
1366
+ /**
1367
+ * Config with extends. Valid only inside of `defineConfig()`.
1368
+ */
1369
+ interface ConfigWithExtends$1 extends ConfigObject {
1370
+ extends?: ExtendsElement[];
1371
+ }
1372
+
1373
+ type ConfigWithExtends = ConfigWithExtends$1;
1374
+
1375
+ /**
1376
+ * A type that can be awaited. Promise<T> or T.
1377
+ */
1378
+ type Awaitable<T> = T | Promise<T>;
1379
+ /**
1380
+ * A type that can be an array or a single item.
1381
+ */
1382
+ type Arrayable<T> = T | T[];
1383
+ /**
1384
+ * Default config names map. Used for type augmentation.
1385
+ *
1386
+ * @example
1387
+ * ```ts
1388
+ * declare module 'eslint-flat-config-utils' {
1389
+ * interface DefaultConfigNamesMap {
1390
+ * 'my-custom-config': true
1391
+ * }
1392
+ * }
1393
+ * ```
1394
+ */
1395
+ interface DefaultConfigNamesMap {
1396
+ }
1397
+ interface Nothing {
1398
+ }
1399
+ /**
1400
+ * type StringLiteralUnion<'foo'> = 'foo' | string
1401
+ * This has auto completion whereas `'foo' | string` doesn't
1402
+ * Adapted from https://github.com/microsoft/TypeScript/issues/29729
1403
+ */
1404
+ type StringLiteralUnion<T extends U, U = string> = T | (U & Nothing);
1405
+ type FilterType<T, F> = T extends F ? T : never;
1406
+ type NullableObject<T> = {
1407
+ [K in keyof T]?: T[K] | null | undefined;
1408
+ };
1409
+ type GetRuleRecordFromConfig<T> = T extends {
1410
+ rules?: infer R;
1411
+ } ? R : Linter.RulesRecord;
1412
+ interface DisableFixesOptions {
1413
+ builtinRules?: Map<string, Rule.RuleModule> | (() => Awaitable<Map<string, Rule.RuleModule>>);
1414
+ }
1415
+ type PluginConflictsError<T extends Linter.Config = Linter.Config> = (pluginName: string, configs: T[]) => string;
1416
+ /**
1417
+ * Awaitable array of ESLint flat configs or a composer object.
1418
+ */
1419
+ type ResolvableFlatConfig<T extends object = ConfigWithExtends> = Awaitable<Arrayable<(T | false | undefined | null)>> | Awaitable<(ConfigWithExtends | false | undefined | null)[]> | Awaitable<(Linter.Config | false | undefined | null)[]> | FlatConfigComposer<any>;
1420
+ /**
1421
+ * The underlying impolementation of `composer()`.
1422
+ */
1423
+ declare class FlatConfigComposer<T extends object = ConfigWithExtends, ConfigNames extends string = keyof DefaultConfigNamesMap> extends Promise<Linter.Config[]> {
1424
+ private _operations;
1425
+ private _operationsOverrides;
1426
+ private _operationsResolved;
1427
+ private _renames;
1428
+ private _pluginsConflictsError;
1429
+ constructor(...configs: ResolvableFlatConfig<T>[]);
1430
+ /**
1431
+ * Set plugin renames, like `n` -> `node`, `import-x` -> `import`, etc.
1432
+ *
1433
+ * This will runs after all config items are resolved. Applies to `plugins` and `rules`.
1434
+ */
1435
+ renamePlugins(renames: Record<string, string>): this;
1436
+ /**
1437
+ * Append configs to the end of the current configs array.
1438
+ */
1439
+ append(...items: ResolvableFlatConfig<T>[]): this;
1440
+ /**
1441
+ * Prepend configs to the beginning of the current configs array.
1442
+ */
1443
+ prepend(...items: ResolvableFlatConfig<T>[]): this;
1444
+ /**
1445
+ * Insert configs before a specific config.
1446
+ */
1447
+ insertBefore(nameOrIndex: StringLiteralUnion<ConfigNames, string | number>, ...items: ResolvableFlatConfig<T>[]): this;
1448
+ /**
1449
+ * Insert configs after a specific config.
1450
+ */
1451
+ insertAfter(nameOrIndex: StringLiteralUnion<ConfigNames, string | number>, ...items: ResolvableFlatConfig<T>[]): this;
1452
+ /**
1453
+ * Provide overrides to a specific config.
1454
+ *
1455
+ * It will be merged with the original config, or provide a custom function to replace the config entirely.
1456
+ */
1457
+ override(nameOrIndex: StringLiteralUnion<ConfigNames, string | number>, config: T | ((config: T) => Awaitable<T>)): this;
1458
+ /**
1459
+ * Provide overrides to multiple configs as an object map.
1460
+ *
1461
+ * Same as calling `override` multiple times.
1462
+ */
1463
+ overrides(overrides: Partial<Record<StringLiteralUnion<ConfigNames, string | number>, T | ((config: T) => Awaitable<T>)>>): this;
1464
+ /**
1465
+ * Override rules and it's options in **all configs**.
1466
+ *
1467
+ * Pass `null` as the value to remove the rule.
1468
+ *
1469
+ * @example
1470
+ * ```ts
1471
+ * composer
1472
+ * .overrideRules({
1473
+ * 'no-console': 'off',
1474
+ * 'no-unused-vars': ['error', { vars: 'all', args: 'after-used' }],
1475
+ * // remove the rule from all configs
1476
+ * 'no-undef': null,
1477
+ * })
1478
+ * ```
1479
+ */
1480
+ overrideRules(rules: NullableObject<GetRuleRecordFromConfig<T>>): this;
1481
+ /**
1482
+ * Remove rules from **all configs**.
1483
+ *
1484
+ * @example
1485
+ * ```ts
1486
+ * composer
1487
+ * .removeRules(
1488
+ * 'no-console',
1489
+ * 'no-unused-vars'
1490
+ * )
1491
+ * ```
1492
+ */
1493
+ removeRules(...rules: StringLiteralUnion<FilterType<keyof GetRuleRecordFromConfig<T>, string>, string>[]): this;
1494
+ /**
1495
+ * Remove plugins by name and all the rules referenced by them.
1496
+ *
1497
+ * @example
1498
+ * ```ts
1499
+ * composer
1500
+ * .removePlugins(
1501
+ * 'node'
1502
+ * )
1503
+ * ```
1504
+ *
1505
+ * The `plugins: { node }` and `rules: { 'node/xxx': 'error' }` will be removed from all configs.
1506
+ */
1507
+ removePlugins(...names: string[]): this;
1508
+ /**
1509
+ * Remove a specific config by name or index.
1510
+ */
1511
+ remove(nameOrIndex: ConfigNames | string | number): this;
1512
+ /**
1513
+ * Replace a specific config by name or index.
1514
+ *
1515
+ * The original config will be removed and replaced with the new one.
1516
+ */
1517
+ replace(nameOrIndex: StringLiteralUnion<ConfigNames, string | number>, ...items: ResolvableFlatConfig<T>[]): this;
1518
+ /**
1519
+ * Hijack into plugins to disable fixes for specific rules.
1520
+ *
1521
+ * Note this mutates the plugin object, use with caution.
1522
+ *
1523
+ * @example
1524
+ * ```ts
1525
+ * const config = await composer(...)
1526
+ * .disableRulesFix([
1527
+ * 'unused-imports/no-unused-imports',
1528
+ * 'vitest/no-only-tests'
1529
+ * ])
1530
+ * ```
1531
+ */
1532
+ disableRulesFix(ruleIds: string[], options?: DisableFixesOptions): this;
1533
+ /**
1534
+ * Set a custom warning message for plugins conflicts.
1535
+ *
1536
+ * The error message can be a string or a function that returns a string.
1537
+ *
1538
+ * Error message accepts template strings:
1539
+ * - `{{pluginName}}`: the name of the plugin that has conflicts
1540
+ * - `{{configName1}}`: the name of the first config that uses the plugin
1541
+ * - `{{configName2}}`: the name of the second config that uses the plugin
1542
+ * - `{{configNames}}`: a list of config names that uses the plugin
1543
+ *
1544
+ * When only one argument is provided, it will be used as the default error message.
1545
+ */
1546
+ setPluginConflictsError(warning?: string | PluginConflictsError): this;
1547
+ setPluginConflictsError(pluginName: string, warning: string | PluginConflictsError): this;
1548
+ private _verifyPluginsConflicts;
1549
+ /**
1550
+ * Hook when all configs are resolved but before returning the final configs.
1551
+ *
1552
+ * You can modify the final configs here.
1553
+ */
1554
+ onResolved(callback: (configs: T[]) => Awaitable<T[] | void>): this;
1555
+ /**
1556
+ * Clone the composer object.
1557
+ */
1558
+ clone(): FlatConfigComposer<T>;
1559
+ /**
1560
+ * Resolve the pipeline and return the final configs.
1561
+ *
1562
+ * This returns a promise. Calling `.then()` has the same effect.
1563
+ */
1564
+ toConfigs(): Promise<Linter.Config[]>;
1565
+ then<T>(onFulfilled: (value: Linter.Config[]) => T, onRejected?: (reason: any) => any): Promise<Awaited<T>>;
1566
+ catch(onRejected: (reason: any) => any): Promise<any>;
1567
+ finally(onFinally: () => void): Promise<Linter.Config[]>;
1568
+ }
1569
+
1570
+ //#region rules/array-bracket-newline/types.d.ts
1571
+
1572
+ type ArrayBracketNewlineSchema0 = ('always' | 'never' | 'consistent') | {
1573
+ multiline?: boolean;
1574
+ minItems?: number | null;
1575
+ };
1576
+ type ArrayBracketNewlineRuleOptions = [ArrayBracketNewlineSchema0?];
1577
+ //#endregion
1578
+ //#region rules/array-bracket-spacing/types.d.ts
1579
+
1580
+ type ArrayBracketSpacingSchema0 = 'always' | 'never';
1581
+ interface ArrayBracketSpacingSchema1 {
1582
+ singleValue?: boolean;
1583
+ objectsInArrays?: boolean;
1584
+ arraysInArrays?: boolean;
1585
+ }
1586
+ type ArrayBracketSpacingRuleOptions = [ArrayBracketSpacingSchema0?, ArrayBracketSpacingSchema1?];
1587
+ //#endregion
1588
+ //#region rules/array-element-newline/types.d.ts
1589
+
1590
+ type ArrayElementNewlineSchema0 = [] | [BasicConfig | {
1591
+ ArrayExpression?: BasicConfig;
1592
+ ArrayPattern?: BasicConfig;
1593
+ }];
1594
+ type BasicConfig = ('always' | 'never' | 'consistent') | {
1595
+ consistent?: boolean;
1596
+ multiline?: boolean;
1597
+ minItems?: number | null;
1598
+ };
1599
+ type ArrayElementNewlineRuleOptions = ArrayElementNewlineSchema0;
1600
+ //#endregion
1601
+ //#region rules/arrow-parens/types.d.ts
1602
+
1603
+ type ArrowParensSchema0 = 'always' | 'as-needed';
1604
+ interface ArrowParensSchema1 {
1605
+ requireForBlockBody?: boolean;
1606
+ }
1607
+ type ArrowParensRuleOptions = [ArrowParensSchema0?, ArrowParensSchema1?];
1608
+ //#endregion
1609
+ //#region rules/arrow-spacing/types.d.ts
1610
+
1611
+ interface ArrowSpacingSchema0 {
1612
+ before?: boolean;
1613
+ after?: boolean;
1614
+ }
1615
+ type ArrowSpacingRuleOptions = [ArrowSpacingSchema0?];
1616
+ //#endregion
1617
+ //#region rules/block-spacing/types.d.ts
1618
+
1619
+ type BlockSpacingSchema0 = 'always' | 'never';
1620
+ type BlockSpacingRuleOptions = [BlockSpacingSchema0?];
1621
+ //#endregion
1622
+ //#region rules/brace-style/types.d.ts
1623
+
1624
+ type BraceStyleSchema0 = '1tbs' | 'stroustrup' | 'allman';
1625
+ interface BraceStyleSchema1 {
1626
+ allowSingleLine?: boolean;
1627
+ }
1628
+ type BraceStyleRuleOptions = [BraceStyleSchema0?, BraceStyleSchema1?];
1629
+ //#endregion
1630
+ //#region rules/comma-dangle/types.d.ts
1631
+
1632
+ type CommaDangleSchema0 = [] | [Value | {
1633
+ arrays?: ValueWithIgnore;
1634
+ objects?: ValueWithIgnore;
1635
+ imports?: ValueWithIgnore;
1636
+ exports?: ValueWithIgnore;
1637
+ functions?: ValueWithIgnore;
1638
+ importAttributes?: ValueWithIgnore;
1639
+ dynamicImports?: ValueWithIgnore;
1640
+ enums?: ValueWithIgnore;
1641
+ generics?: ValueWithIgnore;
1642
+ tuples?: ValueWithIgnore;
1643
+ }];
1644
+ type Value = 'always-multiline' | 'always' | 'never' | 'only-multiline';
1645
+ type ValueWithIgnore = 'always-multiline' | 'always' | 'never' | 'only-multiline' | 'ignore';
1646
+ type CommaDangleRuleOptions = CommaDangleSchema0;
1647
+ //#endregion
1648
+ //#region rules/comma-spacing/types.d.ts
1649
+
1650
+ interface CommaSpacingSchema0 {
1651
+ before?: boolean;
1652
+ after?: boolean;
1653
+ }
1654
+ type CommaSpacingRuleOptions = [CommaSpacingSchema0?];
1655
+ //#endregion
1656
+ //#region rules/comma-style/types.d.ts
1657
+
1658
+ type CommaStyleSchema0 = 'first' | 'last';
1659
+ interface CommaStyleSchema1 {
1660
+ exceptions?: {
1661
+ [k: string]: boolean;
1662
+ };
1663
+ }
1664
+ type CommaStyleRuleOptions = [CommaStyleSchema0?, CommaStyleSchema1?];
1665
+ //#endregion
1666
+ //#region rules/computed-property-spacing/types.d.ts
1667
+
1668
+ type ComputedPropertySpacingSchema0 = 'always' | 'never';
1669
+ interface ComputedPropertySpacingSchema1 {
1670
+ enforceForClassMembers?: boolean;
1671
+ }
1672
+ type ComputedPropertySpacingRuleOptions = [ComputedPropertySpacingSchema0?, ComputedPropertySpacingSchema1?];
1673
+ //#endregion
1674
+ //#region rules/curly-newline/types.d.ts
1675
+
1676
+ type CurlyNewlineSchema0 = ('always' | 'never') | {
1677
+ IfStatementConsequent?: ('always' | 'never') | {
1678
+ multiline?: boolean;
1679
+ minElements?: number;
1680
+ consistent?: boolean;
1681
+ };
1682
+ IfStatementAlternative?: ('always' | 'never') | {
1683
+ multiline?: boolean;
1684
+ minElements?: number;
1685
+ consistent?: boolean;
1686
+ };
1687
+ DoWhileStatement?: ('always' | 'never') | {
1688
+ multiline?: boolean;
1689
+ minElements?: number;
1690
+ consistent?: boolean;
1691
+ };
1692
+ ForInStatement?: ('always' | 'never') | {
1693
+ multiline?: boolean;
1694
+ minElements?: number;
1695
+ consistent?: boolean;
1696
+ };
1697
+ ForOfStatement?: ('always' | 'never') | {
1698
+ multiline?: boolean;
1699
+ minElements?: number;
1700
+ consistent?: boolean;
1701
+ };
1702
+ ForStatement?: ('always' | 'never') | {
1703
+ multiline?: boolean;
1704
+ minElements?: number;
1705
+ consistent?: boolean;
1706
+ };
1707
+ WhileStatement?: ('always' | 'never') | {
1708
+ multiline?: boolean;
1709
+ minElements?: number;
1710
+ consistent?: boolean;
1711
+ };
1712
+ SwitchStatement?: ('always' | 'never') | {
1713
+ multiline?: boolean;
1714
+ minElements?: number;
1715
+ consistent?: boolean;
1716
+ };
1717
+ SwitchCase?: ('always' | 'never') | {
1718
+ multiline?: boolean;
1719
+ minElements?: number;
1720
+ consistent?: boolean;
1721
+ };
1722
+ TryStatementBlock?: ('always' | 'never') | {
1723
+ multiline?: boolean;
1724
+ minElements?: number;
1725
+ consistent?: boolean;
1726
+ };
1727
+ TryStatementHandler?: ('always' | 'never') | {
1728
+ multiline?: boolean;
1729
+ minElements?: number;
1730
+ consistent?: boolean;
1731
+ };
1732
+ TryStatementFinalizer?: ('always' | 'never') | {
1733
+ multiline?: boolean;
1734
+ minElements?: number;
1735
+ consistent?: boolean;
1736
+ };
1737
+ BlockStatement?: ('always' | 'never') | {
1738
+ multiline?: boolean;
1739
+ minElements?: number;
1740
+ consistent?: boolean;
1741
+ };
1742
+ ArrowFunctionExpression?: ('always' | 'never') | {
1743
+ multiline?: boolean;
1744
+ minElements?: number;
1745
+ consistent?: boolean;
1746
+ };
1747
+ FunctionDeclaration?: ('always' | 'never') | {
1748
+ multiline?: boolean;
1749
+ minElements?: number;
1750
+ consistent?: boolean;
1751
+ };
1752
+ FunctionExpression?: ('always' | 'never') | {
1753
+ multiline?: boolean;
1754
+ minElements?: number;
1755
+ consistent?: boolean;
1756
+ };
1757
+ Property?: ('always' | 'never') | {
1758
+ multiline?: boolean;
1759
+ minElements?: number;
1760
+ consistent?: boolean;
1761
+ };
1762
+ ClassBody?: ('always' | 'never') | {
1763
+ multiline?: boolean;
1764
+ minElements?: number;
1765
+ consistent?: boolean;
1766
+ };
1767
+ StaticBlock?: ('always' | 'never') | {
1768
+ multiline?: boolean;
1769
+ minElements?: number;
1770
+ consistent?: boolean;
1771
+ };
1772
+ WithStatement?: ('always' | 'never') | {
1773
+ multiline?: boolean;
1774
+ minElements?: number;
1775
+ consistent?: boolean;
1776
+ };
1777
+ TSModuleBlock?: ('always' | 'never') | {
1778
+ multiline?: boolean;
1779
+ minElements?: number;
1780
+ consistent?: boolean;
1781
+ };
1782
+ multiline?: boolean;
1783
+ minElements?: number;
1784
+ consistent?: boolean;
1785
+ };
1786
+ type CurlyNewlineRuleOptions = [CurlyNewlineSchema0?];
1787
+ //#endregion
1788
+ //#region rules/dot-location/types.d.ts
1789
+
1790
+ type DotLocationSchema0 = 'object' | 'property';
1791
+ type DotLocationRuleOptions = [DotLocationSchema0?];
1792
+ //#endregion
1793
+ //#region rules/eol-last/types.d.ts
1794
+
1795
+ type EolLastSchema0 = 'always' | 'never' | 'unix' | 'windows';
1796
+ type EolLastRuleOptions = [EolLastSchema0?];
1797
+ //#endregion
1798
+ //#region rules/function-call-argument-newline/types.d.ts
1799
+
1800
+ type FunctionCallArgumentNewlineSchema0 = 'always' | 'never' | 'consistent';
1801
+ type FunctionCallArgumentNewlineRuleOptions = [FunctionCallArgumentNewlineSchema0?];
1802
+ //#endregion
1803
+ //#region rules/function-call-spacing/types.d.ts
1804
+
1805
+ type FunctionCallSpacingSchema0 = [] | ['never'] | [] | ['always'] | ['always', {
1806
+ allowNewlines?: boolean;
1807
+ optionalChain?: {
1808
+ before?: boolean;
1809
+ after?: boolean;
1810
+ };
1811
+ }];
1812
+ type FunctionCallSpacingRuleOptions = FunctionCallSpacingSchema0;
1813
+ //#endregion
1814
+ //#region rules/function-paren-newline/types.d.ts
1815
+
1816
+ type FunctionParenNewlineSchema0 = ('always' | 'never' | 'consistent' | 'multiline' | 'multiline-arguments') | {
1817
+ minItems?: number;
1818
+ };
1819
+ type FunctionParenNewlineRuleOptions = [FunctionParenNewlineSchema0?];
1820
+ //#endregion
1821
+ //#region rules/generator-star-spacing/types.d.ts
1822
+
1823
+ type GeneratorStarSpacingSchema0 = ('before' | 'after' | 'both' | 'neither') | {
1824
+ before?: boolean;
1825
+ after?: boolean;
1826
+ named?: ('before' | 'after' | 'both' | 'neither') | {
1827
+ before?: boolean;
1828
+ after?: boolean;
1829
+ };
1830
+ anonymous?: ('before' | 'after' | 'both' | 'neither') | {
1831
+ before?: boolean;
1832
+ after?: boolean;
1833
+ };
1834
+ method?: ('before' | 'after' | 'both' | 'neither') | {
1835
+ before?: boolean;
1836
+ after?: boolean;
1837
+ };
1838
+ shorthand?: ('before' | 'after' | 'both' | 'neither') | {
1839
+ before?: boolean;
1840
+ after?: boolean;
1841
+ };
1842
+ };
1843
+ type GeneratorStarSpacingRuleOptions = [GeneratorStarSpacingSchema0?];
1844
+ //#endregion
1845
+ //#region rules/implicit-arrow-linebreak/types.d.ts
1846
+
1847
+ type ImplicitArrowLinebreakSchema0 = 'beside' | 'below';
1848
+ type ImplicitArrowLinebreakRuleOptions = [ImplicitArrowLinebreakSchema0?];
1849
+ //#endregion
1850
+ //#region rules/indent-binary-ops/types.d.ts
1851
+
1852
+ type IndentBinaryOpsSchema0 = number | 'tab';
1853
+ type IndentBinaryOpsRuleOptions = [IndentBinaryOpsSchema0?];
1854
+ //#endregion
1855
+ //#region rules/indent/types.d.ts
1856
+
1857
+ type IndentSchema0 = 'tab' | number;
1858
+ interface IndentSchema1 {
1859
+ SwitchCase?: number;
1860
+ VariableDeclarator?: (number | ('first' | 'off')) | {
1861
+ var?: number | ('first' | 'off');
1862
+ let?: number | ('first' | 'off');
1863
+ const?: number | ('first' | 'off');
1864
+ using?: number | ('first' | 'off');
1865
+ };
1866
+ assignmentOperator?: number | 'off';
1867
+ outerIIFEBody?: number | 'off';
1868
+ MemberExpression?: number | 'off';
1869
+ FunctionDeclaration?: {
1870
+ parameters?: number | ('first' | 'off');
1871
+ body?: number;
1872
+ returnType?: number;
1873
+ };
1874
+ FunctionExpression?: {
1875
+ parameters?: number | ('first' | 'off');
1876
+ body?: number;
1877
+ returnType?: number;
1878
+ };
1879
+ StaticBlock?: {
1880
+ body?: number;
1881
+ };
1882
+ CallExpression?: {
1883
+ arguments?: number | ('first' | 'off');
1884
+ };
1885
+ ArrayExpression?: number | ('first' | 'off');
1886
+ ObjectExpression?: number | ('first' | 'off');
1887
+ ImportDeclaration?: number | ('first' | 'off');
1888
+ flatTernaryExpressions?: boolean;
1889
+ offsetTernaryExpressions?: boolean | {
1890
+ CallExpression?: boolean;
1891
+ AwaitExpression?: boolean;
1892
+ NewExpression?: boolean;
1893
+ };
1894
+ offsetTernaryExpressionsOffsetCallExpressions?: boolean;
1895
+ ignoredNodes?: string[];
1896
+ ignoreComments?: boolean;
1897
+ tabLength?: number;
1898
+ }
1899
+ type IndentRuleOptions$1 = [IndentSchema0?, IndentSchema1?];
1900
+ //#endregion
1901
+ //#region rules/jsx-child-element-spacing/types.d.ts
1902
+
1903
+ type JsxChildElementSpacingRuleOptions = [];
1904
+ //#endregion
1905
+ //#region rules/jsx-closing-bracket-location/types.d.ts
1906
+
1907
+ type JsxClosingBracketLocationSchema0 = ('after-props' | 'props-aligned' | 'tag-aligned' | 'line-aligned') | {
1908
+ location?: 'after-props' | 'props-aligned' | 'tag-aligned' | 'line-aligned';
1909
+ } | {
1910
+ nonEmpty?: ('after-props' | 'props-aligned' | 'tag-aligned' | 'line-aligned') | false;
1911
+ selfClosing?: ('after-props' | 'props-aligned' | 'tag-aligned' | 'line-aligned') | false;
1912
+ };
1913
+ type JsxClosingBracketLocationRuleOptions = [JsxClosingBracketLocationSchema0?];
1914
+ //#endregion
1915
+ //#region rules/jsx-closing-tag-location/types.d.ts
1916
+
1917
+ type JsxClosingTagLocationSchema0 = 'tag-aligned' | 'line-aligned';
1918
+ type JsxClosingTagLocationRuleOptions = [JsxClosingTagLocationSchema0?];
1919
+ //#endregion
1920
+ //#region rules/jsx-curly-brace-presence/types.d.ts
1921
+
1922
+ type JsxCurlyBracePresenceSchema0 = {
1923
+ props?: 'always' | 'never' | 'ignore';
1924
+ children?: 'always' | 'never' | 'ignore';
1925
+ propElementValues?: 'always' | 'never' | 'ignore';
1926
+ } | ('always' | 'never' | 'ignore');
1927
+ type JsxCurlyBracePresenceRuleOptions = [JsxCurlyBracePresenceSchema0?];
1928
+ //#endregion
1929
+ //#region rules/jsx-curly-newline/types.d.ts
1930
+
1931
+ type JsxCurlyNewlineSchema0 = ('consistent' | 'never') | {
1932
+ singleline?: 'consistent' | 'require' | 'forbid';
1933
+ multiline?: 'consistent' | 'require' | 'forbid';
1934
+ };
1935
+ type JsxCurlyNewlineRuleOptions = [JsxCurlyNewlineSchema0?];
1936
+ //#endregion
1937
+ //#region rules/jsx-curly-spacing/types.d.ts
1938
+
1939
+ type JsxCurlySpacingSchema0 = [] | [{
1940
+ when?: 'always' | 'never';
1941
+ allowMultiline?: boolean;
1942
+ spacing?: {
1943
+ objectLiterals?: 'always' | 'never';
1944
+ };
1945
+ attributes?: {
1946
+ when?: 'always' | 'never';
1947
+ allowMultiline?: boolean;
1948
+ spacing?: {
1949
+ objectLiterals?: 'always' | 'never';
1950
+ };
1951
+ } | boolean;
1952
+ children?: {
1953
+ when?: 'always' | 'never';
1954
+ allowMultiline?: boolean;
1955
+ spacing?: {
1956
+ objectLiterals?: 'always' | 'never';
1957
+ };
1958
+ } | boolean;
1959
+ } | ('always' | 'never')] | [({
1960
+ when?: 'always' | 'never';
1961
+ allowMultiline?: boolean;
1962
+ spacing?: {
1963
+ objectLiterals?: 'always' | 'never';
1964
+ };
1965
+ attributes?: {
1966
+ when?: 'always' | 'never';
1967
+ allowMultiline?: boolean;
1968
+ spacing?: {
1969
+ objectLiterals?: 'always' | 'never';
1970
+ };
1971
+ } | boolean;
1972
+ children?: {
1973
+ when?: 'always' | 'never';
1974
+ allowMultiline?: boolean;
1975
+ spacing?: {
1976
+ objectLiterals?: 'always' | 'never';
1977
+ };
1978
+ } | boolean;
1979
+ } | ('always' | 'never')), {
1980
+ allowMultiline?: boolean;
1981
+ spacing?: {
1982
+ objectLiterals?: 'always' | 'never';
1983
+ };
1984
+ }];
1985
+ type JsxCurlySpacingRuleOptions = JsxCurlySpacingSchema0;
1986
+ //#endregion
1987
+ //#region rules/jsx-equals-spacing/types.d.ts
1988
+
1989
+ type JsxEqualsSpacingSchema0 = 'always' | 'never';
1990
+ type JsxEqualsSpacingRuleOptions = [JsxEqualsSpacingSchema0?];
1991
+ //#endregion
1992
+ //#region rules/jsx-first-prop-new-line/types.d.ts
1993
+
1994
+ type JsxFirstPropNewLineSchema0 = 'always' | 'never' | 'multiline' | 'multiline-multiprop' | 'multiprop';
1995
+ type JsxFirstPropNewLineRuleOptions = [JsxFirstPropNewLineSchema0?];
1996
+ //#endregion
1997
+ //#region rules/jsx-function-call-newline/types.d.ts
1998
+
1999
+ type JsxFunctionCallNewlineSchema0 = 'always' | 'multiline';
2000
+ type JsxFunctionCallNewlineRuleOptions = [JsxFunctionCallNewlineSchema0?];
2001
+ //#endregion
2002
+ //#region rules/jsx-indent-props/types.d.ts
2003
+
2004
+ type JsxIndentPropsSchema0 = ('tab' | 'first') | number | {
2005
+ indentMode?: ('tab' | 'first') | number;
2006
+ ignoreTernaryOperator?: boolean;
2007
+ };
2008
+ type JsxIndentPropsRuleOptions = [JsxIndentPropsSchema0?];
2009
+ //#endregion
2010
+ //#region rules/jsx-indent/types.d.ts
2011
+
2012
+ type JsxIndentSchema0 = 'tab' | number;
2013
+ interface JsxIndentSchema1 {
2014
+ checkAttributes?: boolean;
2015
+ indentLogicalExpressions?: boolean;
2016
+ }
2017
+ type JsxIndentRuleOptions = [JsxIndentSchema0?, JsxIndentSchema1?];
2018
+ //#endregion
2019
+ //#region rules/jsx-max-props-per-line/types.d.ts
2020
+
2021
+ type JsxMaxPropsPerLineSchema0 = {
2022
+ maximum?: {
2023
+ single?: number;
2024
+ multi?: number;
2025
+ };
2026
+ } | {
2027
+ maximum?: number;
2028
+ when?: 'always' | 'multiline';
2029
+ };
2030
+ type JsxMaxPropsPerLineRuleOptions = [JsxMaxPropsPerLineSchema0?];
2031
+ //#endregion
2032
+ //#region rules/jsx-newline/types.d.ts
2033
+
2034
+ interface JsxNewlineSchema0 {
2035
+ prevent?: boolean;
2036
+ allowMultilines?: boolean;
2037
+ }
2038
+ type JsxNewlineRuleOptions = [JsxNewlineSchema0?];
2039
+ //#endregion
2040
+ //#region rules/jsx-one-expression-per-line/types.d.ts
2041
+
2042
+ interface JsxOneExpressionPerLineSchema0 {
2043
+ allow?: 'none' | 'literal' | 'single-child' | 'single-line' | 'non-jsx';
2044
+ }
2045
+ type JsxOneExpressionPerLineRuleOptions = [JsxOneExpressionPerLineSchema0?];
2046
+ //#endregion
2047
+ //#region rules/jsx-pascal-case/types.d.ts
2048
+
2049
+ interface JsxPascalCaseSchema0 {
2050
+ allowAllCaps?: boolean;
2051
+ allowLeadingUnderscore?: boolean;
2052
+ allowNamespace?: boolean;
2053
+ ignore?: string[];
2054
+ }
2055
+ type JsxPascalCaseRuleOptions = [JsxPascalCaseSchema0?];
2056
+ //#endregion
2057
+ //#region rules/jsx-props-no-multi-spaces/types.d.ts
2058
+
2059
+ type JsxPropsNoMultiSpacesRuleOptions = [];
2060
+ //#endregion
2061
+ //#region rules/jsx-props-style/types.d.ts
2062
+
2063
+ interface JsxPropsStyleSchema0 {
2064
+ singleLine?: {
2065
+ maxItems?: number;
2066
+ };
2067
+ multiLine?: {
2068
+ minItems?: number;
2069
+ maxItemsPerLine?: number;
2070
+ };
2071
+ }
2072
+ type JsxPropsStyleRuleOptions = [JsxPropsStyleSchema0?];
2073
+ //#endregion
2074
+ //#region rules/jsx-quotes/types.d.ts
2075
+
2076
+ type JsxQuotesSchema0 = 'prefer-single' | 'prefer-double';
2077
+ type JsxQuotesRuleOptions = [JsxQuotesSchema0?];
2078
+ //#endregion
2079
+ //#region rules/jsx-self-closing-comp/types.d.ts
2080
+
2081
+ interface JsxSelfClosingCompSchema0 {
2082
+ component?: boolean;
2083
+ html?: boolean;
2084
+ }
2085
+ type JsxSelfClosingCompRuleOptions = [JsxSelfClosingCompSchema0?];
2086
+ //#endregion
2087
+ //#region rules/jsx-sort-props/types.d.ts
2088
+
2089
+ interface JsxSortPropsSchema0 {
2090
+ callbacksLast?: boolean;
2091
+ shorthandFirst?: boolean;
2092
+ shorthandLast?: boolean;
2093
+ multiline?: 'ignore' | 'first' | 'last';
2094
+ ignoreCase?: boolean;
2095
+ noSortAlphabetically?: boolean;
2096
+ reservedFirst?: string[] | boolean;
2097
+ reservedLast?: string[];
2098
+ locale?: string;
2099
+ }
2100
+ type JsxSortPropsRuleOptions = [JsxSortPropsSchema0?];
2101
+ //#endregion
2102
+ //#region rules/jsx-tag-spacing/types.d.ts
2103
+
2104
+ interface JsxTagSpacingSchema0 {
2105
+ closingSlash?: 'always' | 'never' | 'allow';
2106
+ beforeSelfClosing?: 'always' | 'proportional-always' | 'never' | 'allow';
2107
+ afterOpening?: 'always' | 'allow-multiline' | 'never' | 'allow';
2108
+ beforeClosing?: 'always' | 'proportional-always' | 'never' | 'allow';
2109
+ }
2110
+ type JsxTagSpacingRuleOptions = [JsxTagSpacingSchema0?];
2111
+ //#endregion
2112
+ //#region rules/jsx-wrap-multilines/types.d.ts
2113
+
2114
+ interface JsxWrapMultilinesSchema0 {
2115
+ declaration?: true | false | 'ignore' | 'parens' | 'parens-new-line';
2116
+ assignment?: true | false | 'ignore' | 'parens' | 'parens-new-line';
2117
+ return?: true | false | 'ignore' | 'parens' | 'parens-new-line';
2118
+ arrow?: true | false | 'ignore' | 'parens' | 'parens-new-line';
2119
+ condition?: true | false | 'ignore' | 'parens' | 'parens-new-line';
2120
+ logical?: true | false | 'ignore' | 'parens' | 'parens-new-line';
2121
+ prop?: true | false | 'ignore' | 'parens' | 'parens-new-line';
2122
+ propertyValue?: true | false | 'ignore' | 'parens' | 'parens-new-line';
2123
+ }
2124
+ type JsxWrapMultilinesRuleOptions = [JsxWrapMultilinesSchema0?];
2125
+ //#endregion
2126
+ //#region rules/key-spacing/types.d.ts
2127
+
2128
+ type KeySpacingSchema0 = {
2129
+ align?: ('colon' | 'value') | {
2130
+ mode?: 'strict' | 'minimum';
2131
+ on?: 'colon' | 'value';
2132
+ beforeColon?: boolean;
2133
+ afterColon?: boolean;
2134
+ };
2135
+ mode?: 'strict' | 'minimum';
2136
+ beforeColon?: boolean;
2137
+ afterColon?: boolean;
2138
+ ignoredNodes?: ('ObjectExpression' | 'ObjectPattern' | 'ImportDeclaration' | 'ExportNamedDeclaration' | 'ExportAllDeclaration' | 'TSTypeLiteral' | 'TSInterfaceBody' | 'ClassBody')[];
2139
+ } | {
2140
+ singleLine?: {
2141
+ mode?: 'strict' | 'minimum';
2142
+ beforeColon?: boolean;
2143
+ afterColon?: boolean;
2144
+ };
2145
+ multiLine?: {
2146
+ align?: ('colon' | 'value') | {
2147
+ mode?: 'strict' | 'minimum';
2148
+ on?: 'colon' | 'value';
2149
+ beforeColon?: boolean;
2150
+ afterColon?: boolean;
2151
+ };
2152
+ mode?: 'strict' | 'minimum';
2153
+ beforeColon?: boolean;
2154
+ afterColon?: boolean;
2155
+ };
2156
+ } | {
2157
+ singleLine?: {
2158
+ mode?: 'strict' | 'minimum';
2159
+ beforeColon?: boolean;
2160
+ afterColon?: boolean;
2161
+ };
2162
+ multiLine?: {
2163
+ mode?: 'strict' | 'minimum';
2164
+ beforeColon?: boolean;
2165
+ afterColon?: boolean;
2166
+ };
2167
+ align?: {
2168
+ mode?: 'strict' | 'minimum';
2169
+ on?: 'colon' | 'value';
2170
+ beforeColon?: boolean;
2171
+ afterColon?: boolean;
2172
+ };
2173
+ };
2174
+ type KeySpacingRuleOptions = [KeySpacingSchema0?];
2175
+ //#endregion
2176
+ //#region rules/keyword-spacing/types.d.ts
2177
+
2178
+ interface KeywordSpacingSchema0 {
2179
+ before?: boolean;
2180
+ after?: boolean;
2181
+ overrides?: {
2182
+ abstract?: {
2183
+ before?: boolean;
2184
+ after?: boolean;
2185
+ };
2186
+ boolean?: {
2187
+ before?: boolean;
2188
+ after?: boolean;
2189
+ };
2190
+ break?: {
2191
+ before?: boolean;
2192
+ after?: boolean;
2193
+ };
2194
+ byte?: {
2195
+ before?: boolean;
2196
+ after?: boolean;
2197
+ };
2198
+ case?: {
2199
+ before?: boolean;
2200
+ after?: boolean;
2201
+ };
2202
+ catch?: {
2203
+ before?: boolean;
2204
+ after?: boolean;
2205
+ };
2206
+ char?: {
2207
+ before?: boolean;
2208
+ after?: boolean;
2209
+ };
2210
+ class?: {
2211
+ before?: boolean;
2212
+ after?: boolean;
2213
+ };
2214
+ const?: {
2215
+ before?: boolean;
2216
+ after?: boolean;
2217
+ };
2218
+ continue?: {
2219
+ before?: boolean;
2220
+ after?: boolean;
2221
+ };
2222
+ debugger?: {
2223
+ before?: boolean;
2224
+ after?: boolean;
2225
+ };
2226
+ default?: {
2227
+ before?: boolean;
2228
+ after?: boolean;
2229
+ };
2230
+ delete?: {
2231
+ before?: boolean;
2232
+ after?: boolean;
2233
+ };
2234
+ do?: {
2235
+ before?: boolean;
2236
+ after?: boolean;
2237
+ };
2238
+ double?: {
2239
+ before?: boolean;
2240
+ after?: boolean;
2241
+ };
2242
+ else?: {
2243
+ before?: boolean;
2244
+ after?: boolean;
2245
+ };
2246
+ enum?: {
2247
+ before?: boolean;
2248
+ after?: boolean;
2249
+ };
2250
+ export?: {
2251
+ before?: boolean;
2252
+ after?: boolean;
2253
+ };
2254
+ extends?: {
2255
+ before?: boolean;
2256
+ after?: boolean;
2257
+ };
2258
+ false?: {
2259
+ before?: boolean;
2260
+ after?: boolean;
2261
+ };
2262
+ final?: {
2263
+ before?: boolean;
2264
+ after?: boolean;
2265
+ };
2266
+ finally?: {
2267
+ before?: boolean;
2268
+ after?: boolean;
2269
+ };
2270
+ float?: {
2271
+ before?: boolean;
2272
+ after?: boolean;
2273
+ };
2274
+ for?: {
2275
+ before?: boolean;
2276
+ after?: boolean;
2277
+ };
2278
+ function?: {
2279
+ before?: boolean;
2280
+ after?: boolean;
2281
+ };
2282
+ goto?: {
2283
+ before?: boolean;
2284
+ after?: boolean;
2285
+ };
2286
+ if?: {
2287
+ before?: boolean;
2288
+ after?: boolean;
2289
+ };
2290
+ implements?: {
2291
+ before?: boolean;
2292
+ after?: boolean;
2293
+ };
2294
+ import?: {
2295
+ before?: boolean;
2296
+ after?: boolean;
2297
+ };
2298
+ in?: {
2299
+ before?: boolean;
2300
+ after?: boolean;
2301
+ };
2302
+ instanceof?: {
2303
+ before?: boolean;
2304
+ after?: boolean;
2305
+ };
2306
+ int?: {
2307
+ before?: boolean;
2308
+ after?: boolean;
2309
+ };
2310
+ interface?: {
2311
+ before?: boolean;
2312
+ after?: boolean;
2313
+ };
2314
+ long?: {
2315
+ before?: boolean;
2316
+ after?: boolean;
2317
+ };
2318
+ native?: {
2319
+ before?: boolean;
2320
+ after?: boolean;
2321
+ };
2322
+ new?: {
2323
+ before?: boolean;
2324
+ after?: boolean;
2325
+ };
2326
+ null?: {
2327
+ before?: boolean;
2328
+ after?: boolean;
2329
+ };
2330
+ package?: {
2331
+ before?: boolean;
2332
+ after?: boolean;
2333
+ };
2334
+ private?: {
2335
+ before?: boolean;
2336
+ after?: boolean;
2337
+ };
2338
+ protected?: {
2339
+ before?: boolean;
2340
+ after?: boolean;
2341
+ };
2342
+ public?: {
2343
+ before?: boolean;
2344
+ after?: boolean;
2345
+ };
2346
+ return?: {
2347
+ before?: boolean;
2348
+ after?: boolean;
2349
+ };
2350
+ short?: {
2351
+ before?: boolean;
2352
+ after?: boolean;
2353
+ };
2354
+ static?: {
2355
+ before?: boolean;
2356
+ after?: boolean;
2357
+ };
2358
+ super?: {
2359
+ before?: boolean;
2360
+ after?: boolean;
2361
+ };
2362
+ switch?: {
2363
+ before?: boolean;
2364
+ after?: boolean;
2365
+ };
2366
+ synchronized?: {
2367
+ before?: boolean;
2368
+ after?: boolean;
2369
+ };
2370
+ this?: {
2371
+ before?: boolean;
2372
+ after?: boolean;
2373
+ };
2374
+ throw?: {
2375
+ before?: boolean;
2376
+ after?: boolean;
2377
+ };
2378
+ throws?: {
2379
+ before?: boolean;
2380
+ after?: boolean;
2381
+ };
2382
+ transient?: {
2383
+ before?: boolean;
2384
+ after?: boolean;
2385
+ };
2386
+ true?: {
2387
+ before?: boolean;
2388
+ after?: boolean;
2389
+ };
2390
+ try?: {
2391
+ before?: boolean;
2392
+ after?: boolean;
2393
+ };
2394
+ typeof?: {
2395
+ before?: boolean;
2396
+ after?: boolean;
2397
+ };
2398
+ var?: {
2399
+ before?: boolean;
2400
+ after?: boolean;
2401
+ };
2402
+ void?: {
2403
+ before?: boolean;
2404
+ after?: boolean;
2405
+ };
2406
+ volatile?: {
2407
+ before?: boolean;
2408
+ after?: boolean;
2409
+ };
2410
+ while?: {
2411
+ before?: boolean;
2412
+ after?: boolean;
2413
+ };
2414
+ with?: {
2415
+ before?: boolean;
2416
+ after?: boolean;
2417
+ };
2418
+ arguments?: {
2419
+ before?: boolean;
2420
+ after?: boolean;
2421
+ };
2422
+ as?: {
2423
+ before?: boolean;
2424
+ after?: boolean;
2425
+ };
2426
+ async?: {
2427
+ before?: boolean;
2428
+ after?: boolean;
2429
+ };
2430
+ await?: {
2431
+ before?: boolean;
2432
+ after?: boolean;
2433
+ };
2434
+ eval?: {
2435
+ before?: boolean;
2436
+ after?: boolean;
2437
+ };
2438
+ from?: {
2439
+ before?: boolean;
2440
+ after?: boolean;
2441
+ };
2442
+ get?: {
2443
+ before?: boolean;
2444
+ after?: boolean;
2445
+ };
2446
+ let?: {
2447
+ before?: boolean;
2448
+ after?: boolean;
2449
+ };
2450
+ of?: {
2451
+ before?: boolean;
2452
+ after?: boolean;
2453
+ };
2454
+ set?: {
2455
+ before?: boolean;
2456
+ after?: boolean;
2457
+ };
2458
+ type?: {
2459
+ before?: boolean;
2460
+ after?: boolean;
2461
+ };
2462
+ using?: {
2463
+ before?: boolean;
2464
+ after?: boolean;
2465
+ };
2466
+ yield?: {
2467
+ before?: boolean;
2468
+ after?: boolean;
2469
+ };
2470
+ accessor?: {
2471
+ before?: boolean;
2472
+ after?: boolean;
2473
+ };
2474
+ satisfies?: {
2475
+ before?: boolean;
2476
+ after?: boolean;
2477
+ };
2478
+ };
2479
+ }
2480
+ type KeywordSpacingRuleOptions = [KeywordSpacingSchema0?];
2481
+ //#endregion
2482
+ //#region rules/line-comment-position/types.d.ts
2483
+
2484
+ type LineCommentPositionSchema0 = ('above' | 'beside') | {
2485
+ position?: 'above' | 'beside';
2486
+ ignorePattern?: string;
2487
+ applyDefaultPatterns?: boolean;
2488
+ applyDefaultIgnorePatterns?: boolean;
2489
+ };
2490
+ type LineCommentPositionRuleOptions = [LineCommentPositionSchema0?];
2491
+ //#endregion
2492
+ //#region rules/linebreak-style/types.d.ts
2493
+
2494
+ type LinebreakStyleSchema0 = 'unix' | 'windows';
2495
+ type LinebreakStyleRuleOptions = [LinebreakStyleSchema0?];
2496
+ //#endregion
2497
+ //#region rules/lines-around-comment/types.d.ts
2498
+
2499
+ interface LinesAroundCommentSchema0 {
2500
+ beforeBlockComment?: boolean;
2501
+ afterBlockComment?: boolean;
2502
+ beforeLineComment?: boolean;
2503
+ afterLineComment?: boolean;
2504
+ allowBlockStart?: boolean;
2505
+ allowBlockEnd?: boolean;
2506
+ allowClassStart?: boolean;
2507
+ allowClassEnd?: boolean;
2508
+ allowObjectStart?: boolean;
2509
+ allowObjectEnd?: boolean;
2510
+ allowArrayStart?: boolean;
2511
+ allowArrayEnd?: boolean;
2512
+ allowInterfaceStart?: boolean;
2513
+ allowInterfaceEnd?: boolean;
2514
+ allowTypeStart?: boolean;
2515
+ allowTypeEnd?: boolean;
2516
+ allowEnumStart?: boolean;
2517
+ allowEnumEnd?: boolean;
2518
+ allowModuleStart?: boolean;
2519
+ allowModuleEnd?: boolean;
2520
+ ignorePattern?: string;
2521
+ applyDefaultIgnorePatterns?: boolean;
2522
+ afterHashbangComment?: boolean;
2523
+ }
2524
+ type LinesAroundCommentRuleOptions = [LinesAroundCommentSchema0?];
2525
+ //#endregion
2526
+ //#region rules/lines-between-class-members/types.d.ts
2527
+
2528
+ type LinesBetweenClassMembersSchema0 = {
2529
+ /**
2530
+ * @minItems 1
2531
+ */
2532
+ enforce: [{
2533
+ blankLine: 'always' | 'never';
2534
+ prev: 'method' | 'field' | '*';
2535
+ next: 'method' | 'field' | '*';
2536
+ }, ...{
2537
+ blankLine: 'always' | 'never';
2538
+ prev: 'method' | 'field' | '*';
2539
+ next: 'method' | 'field' | '*';
2540
+ }[]];
2541
+ } | ('always' | 'never');
2542
+ interface LinesBetweenClassMembersSchema1 {
2543
+ exceptAfterSingleLine?: boolean;
2544
+ exceptAfterOverload?: boolean;
2545
+ }
2546
+ type LinesBetweenClassMembersRuleOptions = [LinesBetweenClassMembersSchema0?, LinesBetweenClassMembersSchema1?];
2547
+ //#endregion
2548
+ //#region rules/list-style/types.d.ts
2549
+
2550
+ type OverrideConfig = BaseConfig | 'off';
2551
+ interface ListStyleSchema0 {
2552
+ singleLine?: SingleLineConfig;
2553
+ multiLine?: MultiLineConfig;
2554
+ overrides?: {
2555
+ '()'?: OverrideConfig;
2556
+ '[]'?: OverrideConfig;
2557
+ '{}'?: OverrideConfig;
2558
+ '<>'?: OverrideConfig;
2559
+ 'ArrayExpression'?: OverrideConfig;
2560
+ 'ArrayPattern'?: OverrideConfig;
2561
+ 'ArrowFunctionExpression'?: OverrideConfig;
2562
+ 'CallExpression'?: OverrideConfig;
2563
+ 'ExportNamedDeclaration'?: OverrideConfig;
2564
+ 'FunctionDeclaration'?: OverrideConfig;
2565
+ 'FunctionExpression'?: OverrideConfig;
2566
+ 'IfStatement'?: OverrideConfig;
2567
+ 'ImportAttributes'?: OverrideConfig;
2568
+ 'ImportDeclaration'?: OverrideConfig;
2569
+ 'JSONArrayExpression'?: OverrideConfig;
2570
+ 'JSONObjectExpression'?: OverrideConfig;
2571
+ 'NewExpression'?: OverrideConfig;
2572
+ 'ObjectExpression'?: OverrideConfig;
2573
+ 'ObjectPattern'?: OverrideConfig;
2574
+ 'TSDeclareFunction'?: OverrideConfig;
2575
+ 'TSEnumBody'?: OverrideConfig;
2576
+ 'TSFunctionType'?: OverrideConfig;
2577
+ 'TSInterfaceBody'?: OverrideConfig;
2578
+ 'TSTupleType'?: OverrideConfig;
2579
+ 'TSTypeLiteral'?: OverrideConfig;
2580
+ 'TSTypeParameterDeclaration'?: OverrideConfig;
2581
+ 'TSTypeParameterInstantiation'?: OverrideConfig;
2582
+ };
2583
+ }
2584
+ interface SingleLineConfig {
2585
+ spacing?: 'always' | 'never';
2586
+ maxItems?: number;
2587
+ }
2588
+ interface MultiLineConfig {
2589
+ minItems?: number;
2590
+ }
2591
+ interface BaseConfig {
2592
+ singleLine?: SingleLineConfig;
2593
+ multiline?: MultiLineConfig;
2594
+ }
2595
+ type ListStyleRuleOptions = [ListStyleSchema0?];
2596
+ //#endregion
2597
+ //#region rules/max-len/types.d.ts
2598
+
2599
+ type MaxLenSchema0 = {
2600
+ code?: number;
2601
+ comments?: number;
2602
+ tabWidth?: number;
2603
+ ignorePattern?: string;
2604
+ ignoreComments?: boolean;
2605
+ ignoreStrings?: boolean;
2606
+ ignoreUrls?: boolean;
2607
+ ignoreTemplateLiterals?: boolean;
2608
+ ignoreRegExpLiterals?: boolean;
2609
+ ignoreTrailingComments?: boolean;
2610
+ } | number;
2611
+ type MaxLenSchema1 = {
2612
+ code?: number;
2613
+ comments?: number;
2614
+ tabWidth?: number;
2615
+ ignorePattern?: string;
2616
+ ignoreComments?: boolean;
2617
+ ignoreStrings?: boolean;
2618
+ ignoreUrls?: boolean;
2619
+ ignoreTemplateLiterals?: boolean;
2620
+ ignoreRegExpLiterals?: boolean;
2621
+ ignoreTrailingComments?: boolean;
2622
+ } | number;
2623
+ interface MaxLenSchema2 {
2624
+ code?: number;
2625
+ comments?: number;
2626
+ tabWidth?: number;
2627
+ ignorePattern?: string;
2628
+ ignoreComments?: boolean;
2629
+ ignoreStrings?: boolean;
2630
+ ignoreUrls?: boolean;
2631
+ ignoreTemplateLiterals?: boolean;
2632
+ ignoreRegExpLiterals?: boolean;
2633
+ ignoreTrailingComments?: boolean;
2634
+ }
2635
+ type MaxLenRuleOptions = [MaxLenSchema0?, MaxLenSchema1?, MaxLenSchema2?];
2636
+ //#endregion
2637
+ //#region rules/max-statements-per-line/types.d.ts
2638
+
2639
+ interface MaxStatementsPerLineSchema0 {
2640
+ max?: number;
2641
+ ignoredNodes?: ('BreakStatement' | 'ClassDeclaration' | 'ContinueStatement' | 'DebuggerStatement' | 'DoWhileStatement' | 'ExpressionStatement' | 'ForInStatement' | 'ForOfStatement' | 'ForStatement' | 'FunctionDeclaration' | 'IfStatement' | 'ImportDeclaration' | 'LabeledStatement' | 'ReturnStatement' | 'SwitchStatement' | 'ThrowStatement' | 'TryStatement' | 'VariableDeclaration' | 'WhileStatement' | 'WithStatement' | 'ExportNamedDeclaration' | 'ExportDefaultDeclaration' | 'ExportAllDeclaration')[];
2642
+ }
2643
+ type MaxStatementsPerLineRuleOptions = [MaxStatementsPerLineSchema0?];
2644
+ //#endregion
2645
+ //#region rules/member-delimiter-style/types.d.ts
2646
+
2647
+ type MultiLineOption = 'none' | 'semi' | 'comma';
2648
+ type SingleLineOption = 'semi' | 'comma';
2649
+ interface MemberDelimiterStyleSchema0 {
2650
+ multiline?: {
2651
+ delimiter?: MultiLineOption;
2652
+ requireLast?: boolean;
2653
+ };
2654
+ singleline?: {
2655
+ delimiter?: SingleLineOption;
2656
+ requireLast?: boolean;
2657
+ };
2658
+ overrides?: {
2659
+ interface?: DelimiterConfig;
2660
+ typeLiteral?: DelimiterConfig;
2661
+ };
2662
+ multilineDetection?: 'brackets' | 'last-member';
2663
+ }
2664
+ interface DelimiterConfig {
2665
+ multiline?: {
2666
+ delimiter?: MultiLineOption;
2667
+ requireLast?: boolean;
2668
+ };
2669
+ singleline?: {
2670
+ delimiter?: SingleLineOption;
2671
+ requireLast?: boolean;
2672
+ };
2673
+ }
2674
+ type MemberDelimiterStyleRuleOptions = [MemberDelimiterStyleSchema0?];
2675
+ //#endregion
2676
+ //#region rules/multiline-comment-style/types.d.ts
2677
+
2678
+ type MultilineCommentStyleSchema0 = [] | ['starred-block' | 'bare-block'] | [] | ['separate-lines'] | ['separate-lines', {
2679
+ checkJSDoc?: boolean;
2680
+ checkExclamation?: boolean;
2681
+ }];
2682
+ type MultilineCommentStyleRuleOptions = MultilineCommentStyleSchema0;
2683
+ //#endregion
2684
+ //#region rules/multiline-ternary/types.d.ts
2685
+
2686
+ type MultilineTernarySchema0 = 'always' | 'always-multiline' | 'never';
2687
+ interface MultilineTernarySchema1 {
2688
+ ignoreJSX?: boolean;
2689
+ }
2690
+ type MultilineTernaryRuleOptions = [MultilineTernarySchema0?, MultilineTernarySchema1?];
2691
+ //#endregion
2692
+ //#region rules/new-parens/types.d.ts
2693
+
2694
+ type NewParensSchema0 = 'always' | 'never';
2695
+ type NewParensRuleOptions = [NewParensSchema0?];
2696
+ //#endregion
2697
+ //#region rules/newline-per-chained-call/types.d.ts
2698
+
2699
+ interface NewlinePerChainedCallSchema0 {
2700
+ ignoreChainWithDepth?: number;
2701
+ }
2702
+ type NewlinePerChainedCallRuleOptions = [NewlinePerChainedCallSchema0?];
2703
+ //#endregion
2704
+ //#region rules/no-confusing-arrow/types.d.ts
2705
+
2706
+ interface NoConfusingArrowSchema0 {
2707
+ allowParens?: boolean;
2708
+ onlyOneSimpleParam?: boolean;
2709
+ }
2710
+ type NoConfusingArrowRuleOptions = [NoConfusingArrowSchema0?];
2711
+ //#endregion
2712
+ //#region rules/no-extra-parens/types.d.ts
2713
+
2714
+ type NoExtraParensSchema0 = [] | ['functions'] | [] | ['all'] | ['all', {
2715
+ conditionalAssign?: boolean;
2716
+ ternaryOperandBinaryExpressions?: boolean;
2717
+ nestedBinaryExpressions?: boolean;
2718
+ returnAssign?: boolean;
2719
+ ignoreJSX?: 'none' | 'all' | 'single-line' | 'multi-line';
2720
+ enforceForArrowConditionals?: boolean;
2721
+ enforceForSequenceExpressions?: boolean;
2722
+ enforceForNewInMemberExpressions?: boolean;
2723
+ enforceForFunctionPrototypeMethods?: boolean;
2724
+ allowParensAfterCommentPattern?: string;
2725
+ nestedConditionalExpressions?: boolean;
2726
+ allowNodesInSpreadElement?: {
2727
+ ConditionalExpression?: boolean;
2728
+ LogicalExpression?: boolean;
2729
+ AwaitExpression?: boolean;
2730
+ };
2731
+ ignoredNodes?: string[];
2732
+ }];
2733
+ type NoExtraParensRuleOptions = NoExtraParensSchema0;
2734
+ //#endregion
2735
+ //#region rules/no-extra-semi/types.d.ts
2736
+
2737
+ type NoExtraSemiRuleOptions = [];
2738
+ //#endregion
2739
+ //#region rules/no-floating-decimal/types.d.ts
2740
+
2741
+ type NoFloatingDecimalRuleOptions = [];
2742
+ //#endregion
2743
+ //#region rules/no-mixed-operators/types.d.ts
2744
+
2745
+ interface NoMixedOperatorsSchema0 {
2746
+ groups?: [('+' | '-' | '*' | '/' | '%' | '**' | '&' | '|' | '^' | '~' | '<<' | '>>' | '>>>' | '==' | '!=' | '===' | '!==' | '>' | '>=' | '<' | '<=' | '&&' | '||' | 'in' | 'instanceof' | '?:' | '??'), ('+' | '-' | '*' | '/' | '%' | '**' | '&' | '|' | '^' | '~' | '<<' | '>>' | '>>>' | '==' | '!=' | '===' | '!==' | '>' | '>=' | '<' | '<=' | '&&' | '||' | 'in' | 'instanceof' | '?:' | '??'), ...('+' | '-' | '*' | '/' | '%' | '**' | '&' | '|' | '^' | '~' | '<<' | '>>' | '>>>' | '==' | '!=' | '===' | '!==' | '>' | '>=' | '<' | '<=' | '&&' | '||' | 'in' | 'instanceof' | '?:' | '??')[]][];
2747
+ allowSamePrecedence?: boolean;
2748
+ }
2749
+ type NoMixedOperatorsRuleOptions = [NoMixedOperatorsSchema0?];
2750
+ //#endregion
2751
+ //#region rules/no-mixed-spaces-and-tabs/types.d.ts
2752
+
2753
+ type NoMixedSpacesAndTabsSchema0 = 'smart-tabs' | boolean;
2754
+ type NoMixedSpacesAndTabsRuleOptions = [NoMixedSpacesAndTabsSchema0?];
2755
+ //#endregion
2756
+ //#region rules/no-multi-spaces/types.d.ts
2757
+
2758
+ interface NoMultiSpacesSchema0 {
2759
+ exceptions?: {
2760
+ [k: string]: boolean;
2761
+ };
2762
+ ignoreEOLComments?: boolean;
2763
+ includeTabs?: boolean;
2764
+ }
2765
+ type NoMultiSpacesRuleOptions = [NoMultiSpacesSchema0?];
2766
+ //#endregion
2767
+ //#region rules/no-multiple-empty-lines/types.d.ts
2768
+
2769
+ interface NoMultipleEmptyLinesSchema0 {
2770
+ max: number;
2771
+ maxEOF?: number;
2772
+ maxBOF?: number;
2773
+ }
2774
+ type NoMultipleEmptyLinesRuleOptions = [NoMultipleEmptyLinesSchema0?];
2775
+ //#endregion
2776
+ //#region rules/no-tabs/types.d.ts
2777
+
2778
+ interface NoTabsSchema0 {
2779
+ allowIndentationTabs?: boolean;
2780
+ }
2781
+ type NoTabsRuleOptions = [NoTabsSchema0?];
2782
+ //#endregion
2783
+ //#region rules/no-trailing-spaces/types.d.ts
2784
+
2785
+ interface NoTrailingSpacesSchema0 {
2786
+ skipBlankLines?: boolean;
2787
+ ignoreComments?: boolean;
2788
+ }
2789
+ type NoTrailingSpacesRuleOptions = [NoTrailingSpacesSchema0?];
2790
+ //#endregion
2791
+ //#region rules/no-whitespace-before-property/types.d.ts
2792
+
2793
+ type NoWhitespaceBeforePropertyRuleOptions = [];
2794
+ //#endregion
2795
+ //#region rules/nonblock-statement-body-position/types.d.ts
2796
+
2797
+ type NonblockStatementBodyPositionSchema0 = 'beside' | 'below' | 'any';
2798
+ interface NonblockStatementBodyPositionSchema1 {
2799
+ overrides?: {
2800
+ if?: 'beside' | 'below' | 'any';
2801
+ else?: 'beside' | 'below' | 'any';
2802
+ while?: 'beside' | 'below' | 'any';
2803
+ do?: 'beside' | 'below' | 'any';
2804
+ for?: 'beside' | 'below' | 'any';
2805
+ };
2806
+ }
2807
+ type NonblockStatementBodyPositionRuleOptions = [NonblockStatementBodyPositionSchema0?, NonblockStatementBodyPositionSchema1?];
2808
+ //#endregion
2809
+ //#region rules/object-curly-newline/types.d.ts
2810
+
2811
+ type ObjectCurlyNewlineSchema0 = (('always' | 'never') | {
2812
+ multiline?: boolean;
2813
+ minProperties?: number;
2814
+ consistent?: boolean;
2815
+ }) | {
2816
+ ObjectExpression?: ('always' | 'never') | {
2817
+ multiline?: boolean;
2818
+ minProperties?: number;
2819
+ consistent?: boolean;
2820
+ };
2821
+ ObjectPattern?: ('always' | 'never') | {
2822
+ multiline?: boolean;
2823
+ minProperties?: number;
2824
+ consistent?: boolean;
2825
+ };
2826
+ ImportDeclaration?: ('always' | 'never') | {
2827
+ multiline?: boolean;
2828
+ minProperties?: number;
2829
+ consistent?: boolean;
2830
+ };
2831
+ ExportDeclaration?: ('always' | 'never') | {
2832
+ multiline?: boolean;
2833
+ minProperties?: number;
2834
+ consistent?: boolean;
2835
+ };
2836
+ TSTypeLiteral?: ('always' | 'never') | {
2837
+ multiline?: boolean;
2838
+ minProperties?: number;
2839
+ consistent?: boolean;
2840
+ };
2841
+ TSInterfaceBody?: ('always' | 'never') | {
2842
+ multiline?: boolean;
2843
+ minProperties?: number;
2844
+ consistent?: boolean;
2845
+ };
2846
+ TSEnumBody?: ('always' | 'never') | {
2847
+ multiline?: boolean;
2848
+ minProperties?: number;
2849
+ consistent?: boolean;
2850
+ };
2851
+ };
2852
+ type ObjectCurlyNewlineRuleOptions = [ObjectCurlyNewlineSchema0?];
2853
+ //#endregion
2854
+ //#region rules/object-curly-spacing/types.d.ts
2855
+
2856
+ type ObjectCurlySpacingSchema0 = 'always' | 'never';
2857
+ interface ObjectCurlySpacingSchema1 {
2858
+ arraysInObjects?: boolean;
2859
+ objectsInObjects?: boolean;
2860
+ overrides?: {
2861
+ ObjectPattern?: 'always' | 'never';
2862
+ ObjectExpression?: 'always' | 'never';
2863
+ ImportDeclaration?: 'always' | 'never';
2864
+ ImportAttributes?: 'always' | 'never';
2865
+ ExportNamedDeclaration?: 'always' | 'never';
2866
+ ExportAllDeclaration?: 'always' | 'never';
2867
+ TSMappedType?: 'always' | 'never';
2868
+ TSTypeLiteral?: 'always' | 'never';
2869
+ TSInterfaceBody?: 'always' | 'never';
2870
+ TSEnumBody?: 'always' | 'never';
2871
+ };
2872
+ emptyObjects?: 'ignore' | 'always' | 'never';
2873
+ }
2874
+ type ObjectCurlySpacingRuleOptions = [ObjectCurlySpacingSchema0?, ObjectCurlySpacingSchema1?];
2875
+ //#endregion
2876
+ //#region rules/object-property-newline/types.d.ts
2877
+
2878
+ interface ObjectPropertyNewlineSchema0 {
2879
+ allowAllPropertiesOnSameLine?: boolean;
2880
+ }
2881
+ type ObjectPropertyNewlineRuleOptions = [ObjectPropertyNewlineSchema0?];
2882
+ //#endregion
2883
+ //#region rules/one-var-declaration-per-line/types.d.ts
2884
+
2885
+ type OneVarDeclarationPerLineSchema0 = 'always' | 'initializations';
2886
+ type OneVarDeclarationPerLineRuleOptions = [OneVarDeclarationPerLineSchema0?];
2887
+ //#endregion
2888
+ //#region rules/operator-linebreak/types.d.ts
2889
+
2890
+ type OperatorLinebreakSchema0 = ('after' | 'before' | 'none') | null;
2891
+ interface OperatorLinebreakSchema1 {
2892
+ overrides?: {
2893
+ [k: string]: 'after' | 'before' | 'none' | 'ignore';
2894
+ };
2895
+ }
2896
+ type OperatorLinebreakRuleOptions = [OperatorLinebreakSchema0?, OperatorLinebreakSchema1?];
2897
+ //#endregion
2898
+ //#region rules/padded-blocks/types.d.ts
2899
+
2900
+ type PaddedBlocksSchema0 = ('always' | 'never' | 'start' | 'end') | {
2901
+ blocks?: 'always' | 'never' | 'start' | 'end';
2902
+ switches?: 'always' | 'never' | 'start' | 'end';
2903
+ classes?: 'always' | 'never' | 'start' | 'end';
2904
+ };
2905
+ interface PaddedBlocksSchema1 {
2906
+ allowSingleLineBlocks?: boolean;
2907
+ }
2908
+ type PaddedBlocksRuleOptions = [PaddedBlocksSchema0?, PaddedBlocksSchema1?];
2909
+ //#endregion
2910
+ //#region rules/padding-line-between-statements/types.d.ts
2911
+
2912
+ type PaddingType = 'any' | 'never' | 'always';
2913
+ type StatementOption = StatementMatcher | [StatementMatcher, ...StatementMatcher[]];
2914
+ type StatementMatcher = StatementType | SelectorOption;
2915
+ type StatementType = '*' | 'exports' | 'require' | 'directive' | 'iife' | 'block' | 'empty' | 'function' | 'ts-method' | 'break' | 'case' | 'class' | 'continue' | 'debugger' | 'default' | 'do' | 'for' | 'if' | 'import' | 'switch' | 'throw' | 'try' | 'while' | 'with' | 'cjs-export' | 'cjs-import' | 'enum' | 'interface' | 'function-overload' | 'block-like' | 'singleline-block-like' | 'multiline-block-like' | 'expression' | 'singleline-expression' | 'multiline-expression' | 'return' | 'singleline-return' | 'multiline-return' | 'export' | 'singleline-export' | 'multiline-export' | 'var' | 'singleline-var' | 'multiline-var' | 'let' | 'singleline-let' | 'multiline-let' | 'const' | 'singleline-const' | 'multiline-const' | 'using' | 'singleline-using' | 'multiline-using' | 'type' | 'singleline-type' | 'multiline-type';
2916
+ type PaddingLineBetweenStatementsSchema0 = {
2917
+ blankLine: PaddingType;
2918
+ prev: StatementOption;
2919
+ next: StatementOption;
2920
+ }[];
2921
+ interface SelectorOption {
2922
+ selector: string;
2923
+ lineMode?: 'any' | 'singleline' | 'multiline';
2924
+ }
2925
+ type PaddingLineBetweenStatementsRuleOptions = PaddingLineBetweenStatementsSchema0;
2926
+ //#endregion
2927
+ //#region rules/quote-props/types.d.ts
2928
+
2929
+ type QuotePropsSchema0 = [] | ['always' | 'as-needed' | 'consistent' | 'consistent-as-needed'] | [] | ['always' | 'as-needed' | 'consistent' | 'consistent-as-needed'] | [('always' | 'as-needed' | 'consistent' | 'consistent-as-needed'), {
2930
+ keywords?: boolean;
2931
+ unnecessary?: boolean;
2932
+ numbers?: boolean;
2933
+ }];
2934
+ type QuotePropsRuleOptions = QuotePropsSchema0;
2935
+ //#endregion
2936
+ //#region rules/quotes/types.d.ts
2937
+
2938
+ type QuotesSchema0 = 'single' | 'double' | 'backtick';
2939
+ type QuotesSchema1 = 'avoid-escape' | {
2940
+ avoidEscape?: boolean;
2941
+ allowTemplateLiterals?: boolean | ('never' | 'avoidEscape' | 'always');
2942
+ ignoreStringLiterals?: boolean;
2943
+ };
2944
+ type QuotesRuleOptions = [QuotesSchema0?, QuotesSchema1?];
2945
+ //#endregion
2946
+ //#region rules/rest-spread-spacing/types.d.ts
2947
+
2948
+ type RestSpreadSpacingSchema0 = 'always' | 'never';
2949
+ type RestSpreadSpacingRuleOptions = [RestSpreadSpacingSchema0?];
2950
+ //#endregion
2951
+ //#region rules/semi-spacing/types.d.ts
2952
+
2953
+ interface SemiSpacingSchema0 {
2954
+ before?: boolean;
2955
+ after?: boolean;
2956
+ }
2957
+ type SemiSpacingRuleOptions = [SemiSpacingSchema0?];
2958
+ //#endregion
2959
+ //#region rules/semi-style/types.d.ts
2960
+
2961
+ type SemiStyleSchema0 = 'last' | 'first';
2962
+ type SemiStyleRuleOptions = [SemiStyleSchema0?];
2963
+ //#endregion
2964
+ //#region rules/semi/types.d.ts
2965
+
2966
+ type SemiSchema0 = [] | ['never'] | ['never', {
2967
+ beforeStatementContinuationChars?: 'always' | 'any' | 'never';
2968
+ }] | [] | ['always'] | ['always', {
2969
+ omitLastInOneLineBlock?: boolean;
2970
+ omitLastInOneLineClassBody?: boolean;
2971
+ }];
2972
+ type SemiRuleOptions = SemiSchema0;
2973
+ //#endregion
2974
+ //#region rules/space-before-blocks/types.d.ts
2975
+
2976
+ type SpaceBeforeBlocksSchema0 = ('always' | 'never') | {
2977
+ keywords?: 'always' | 'never' | 'off';
2978
+ functions?: 'always' | 'never' | 'off';
2979
+ classes?: 'always' | 'never' | 'off';
2980
+ modules?: 'always' | 'never' | 'off';
2981
+ };
2982
+ type SpaceBeforeBlocksRuleOptions = [SpaceBeforeBlocksSchema0?];
2983
+ //#endregion
2984
+ //#region rules/space-before-function-paren/types.d.ts
2985
+
2986
+ type SpaceBeforeFunctionParenSchema0 = ('always' | 'never') | {
2987
+ anonymous?: 'always' | 'never' | 'ignore';
2988
+ named?: 'always' | 'never' | 'ignore';
2989
+ asyncArrow?: 'always' | 'never' | 'ignore';
2990
+ catch?: 'always' | 'never' | 'ignore';
2991
+ };
2992
+ type SpaceBeforeFunctionParenRuleOptions = [SpaceBeforeFunctionParenSchema0?];
2993
+ //#endregion
2994
+ //#region rules/space-in-parens/types.d.ts
2995
+
2996
+ type SpaceInParensSchema0 = 'always' | 'never';
2997
+ interface SpaceInParensSchema1 {
2998
+ exceptions?: ('{}' | '[]' | '()' | 'empty')[];
2999
+ }
3000
+ type SpaceInParensRuleOptions = [SpaceInParensSchema0?, SpaceInParensSchema1?];
3001
+ //#endregion
3002
+ //#region rules/space-infix-ops/types.d.ts
3003
+
3004
+ interface SpaceInfixOpsSchema0 {
3005
+ int32Hint?: boolean;
3006
+ ignoreTypes?: boolean;
3007
+ }
3008
+ type SpaceInfixOpsRuleOptions = [SpaceInfixOpsSchema0?];
3009
+ //#endregion
3010
+ //#region rules/space-unary-ops/types.d.ts
3011
+
3012
+ interface SpaceUnaryOpsSchema0 {
3013
+ words?: boolean;
3014
+ nonwords?: boolean;
3015
+ overrides?: {
3016
+ [k: string]: boolean;
3017
+ };
3018
+ }
3019
+ type SpaceUnaryOpsRuleOptions = [SpaceUnaryOpsSchema0?];
3020
+ //#endregion
3021
+ //#region rules/spaced-comment/types.d.ts
3022
+
3023
+ type SpacedCommentSchema0 = 'always' | 'never';
3024
+ interface SpacedCommentSchema1 {
3025
+ exceptions?: string[];
3026
+ markers?: string[];
3027
+ line?: {
3028
+ exceptions?: string[];
3029
+ markers?: string[];
3030
+ };
3031
+ block?: {
3032
+ exceptions?: string[];
3033
+ markers?: string[];
3034
+ balanced?: boolean;
3035
+ };
3036
+ }
3037
+ type SpacedCommentRuleOptions = [SpacedCommentSchema0?, SpacedCommentSchema1?];
3038
+ //#endregion
3039
+ //#region rules/switch-colon-spacing/types.d.ts
3040
+
3041
+ interface SwitchColonSpacingSchema0 {
3042
+ before?: boolean;
3043
+ after?: boolean;
3044
+ }
3045
+ type SwitchColonSpacingRuleOptions = [SwitchColonSpacingSchema0?];
3046
+ //#endregion
3047
+ //#region rules/template-curly-spacing/types.d.ts
3048
+
3049
+ type TemplateCurlySpacingSchema0 = 'always' | 'never';
3050
+ type TemplateCurlySpacingRuleOptions = [TemplateCurlySpacingSchema0?];
3051
+ //#endregion
3052
+ //#region rules/template-tag-spacing/types.d.ts
3053
+
3054
+ type TemplateTagSpacingSchema0 = 'always' | 'never';
3055
+ type TemplateTagSpacingRuleOptions = [TemplateTagSpacingSchema0?];
3056
+ //#endregion
3057
+ //#region rules/type-annotation-spacing/types.d.ts
3058
+
3059
+ interface TypeAnnotationSpacingSchema0 {
3060
+ before?: boolean;
3061
+ after?: boolean;
3062
+ overrides?: {
3063
+ colon?: SpacingConfig;
3064
+ arrow?: 'ignore' | SpacingConfig;
3065
+ variable?: SpacingConfig;
3066
+ parameter?: SpacingConfig;
3067
+ property?: SpacingConfig;
3068
+ returnType?: SpacingConfig;
3069
+ };
3070
+ }
3071
+ interface SpacingConfig {
3072
+ before?: boolean;
3073
+ after?: boolean;
3074
+ }
3075
+ type TypeAnnotationSpacingRuleOptions = [TypeAnnotationSpacingSchema0?];
3076
+ //#endregion
3077
+ //#region rules/type-generic-spacing/types.d.ts
3078
+
3079
+ type TypeGenericSpacingRuleOptions = [];
3080
+ //#endregion
3081
+ //#region rules/type-named-tuple-spacing/types.d.ts
3082
+
3083
+ type TypeNamedTupleSpacingRuleOptions = [];
3084
+ //#endregion
3085
+ //#region rules/wrap-iife/types.d.ts
3086
+
3087
+ type WrapIifeSchema0 = 'outside' | 'inside' | 'any';
3088
+ interface WrapIifeSchema1 {
3089
+ functionPrototypeMethods?: boolean;
3090
+ }
3091
+ type WrapIifeRuleOptions = [WrapIifeSchema0?, WrapIifeSchema1?];
3092
+ //#endregion
3093
+ //#region rules/wrap-regex/types.d.ts
3094
+
3095
+ type WrapRegexRuleOptions = [];
3096
+ //#endregion
3097
+ //#region rules/yield-star-spacing/types.d.ts
3098
+
3099
+ type YieldStarSpacingSchema0 = ('before' | 'after' | 'both' | 'neither') | {
3100
+ before?: boolean;
3101
+ after?: boolean;
3102
+ };
3103
+ type YieldStarSpacingRuleOptions = [YieldStarSpacingSchema0?];
3104
+
3105
+ interface UnprefixedRuleOptions {
3106
+ /**
3107
+ * Enforce linebreaks after opening and before closing array brackets
3108
+ * @see https://eslint.style/rules/array-bracket-newline
3109
+ */
3110
+ 'array-bracket-newline': ArrayBracketNewlineRuleOptions;
3111
+ /**
3112
+ * Enforce consistent spacing inside array brackets
3113
+ * @see https://eslint.style/rules/array-bracket-spacing
3114
+ */
3115
+ 'array-bracket-spacing': ArrayBracketSpacingRuleOptions;
3116
+ /**
3117
+ * Enforce line breaks after each array element
3118
+ * @see https://eslint.style/rules/array-element-newline
3119
+ */
3120
+ 'array-element-newline': ArrayElementNewlineRuleOptions;
3121
+ /**
3122
+ * Require parentheses around arrow function arguments
3123
+ * @see https://eslint.style/rules/arrow-parens
3124
+ */
3125
+ 'arrow-parens': ArrowParensRuleOptions;
3126
+ /**
3127
+ * Enforce consistent spacing before and after the arrow in arrow functions
3128
+ * @see https://eslint.style/rules/arrow-spacing
3129
+ */
3130
+ 'arrow-spacing': ArrowSpacingRuleOptions;
3131
+ /**
3132
+ * Disallow or enforce spaces inside of blocks after opening block and before closing block
3133
+ * @see https://eslint.style/rules/block-spacing
3134
+ */
3135
+ 'block-spacing': BlockSpacingRuleOptions;
3136
+ /**
3137
+ * Enforce consistent brace style for blocks
3138
+ * @see https://eslint.style/rules/brace-style
3139
+ */
3140
+ 'brace-style': BraceStyleRuleOptions;
3141
+ /**
3142
+ * Require or disallow trailing commas
3143
+ * @see https://eslint.style/rules/comma-dangle
3144
+ */
3145
+ 'comma-dangle': CommaDangleRuleOptions;
3146
+ /**
3147
+ * Enforce consistent spacing before and after commas
3148
+ * @see https://eslint.style/rules/comma-spacing
3149
+ */
3150
+ 'comma-spacing': CommaSpacingRuleOptions;
3151
+ /**
3152
+ * Enforce consistent comma style
3153
+ * @see https://eslint.style/rules/comma-style
3154
+ */
3155
+ 'comma-style': CommaStyleRuleOptions;
3156
+ /**
3157
+ * Enforce consistent spacing inside computed property brackets
3158
+ * @see https://eslint.style/rules/computed-property-spacing
3159
+ */
3160
+ 'computed-property-spacing': ComputedPropertySpacingRuleOptions;
3161
+ /**
3162
+ * Enforce consistent line breaks after opening and before closing braces
3163
+ * @see https://eslint.style/rules/curly-newline
3164
+ */
3165
+ 'curly-newline': CurlyNewlineRuleOptions;
3166
+ /**
3167
+ * Enforce consistent newlines before and after dots
3168
+ * @see https://eslint.style/rules/dot-location
3169
+ */
3170
+ 'dot-location': DotLocationRuleOptions;
3171
+ /**
3172
+ * Require or disallow newline at the end of files
3173
+ * @see https://eslint.style/rules/eol-last
3174
+ */
3175
+ 'eol-last': EolLastRuleOptions;
3176
+ /**
3177
+ * Enforce line breaks between arguments of a function call
3178
+ * @see https://eslint.style/rules/function-call-argument-newline
3179
+ */
3180
+ 'function-call-argument-newline': FunctionCallArgumentNewlineRuleOptions;
3181
+ /**
3182
+ * Require or disallow spacing between function identifiers and their invocations
3183
+ * @see https://eslint.style/rules/function-call-spacing
3184
+ */
3185
+ 'function-call-spacing': FunctionCallSpacingRuleOptions;
3186
+ /**
3187
+ * Enforce consistent line breaks inside function parentheses
3188
+ * @see https://eslint.style/rules/function-paren-newline
3189
+ */
3190
+ 'function-paren-newline': FunctionParenNewlineRuleOptions;
3191
+ /**
3192
+ * Enforce consistent spacing around `*` operators in generator functions
3193
+ * @see https://eslint.style/rules/generator-star-spacing
3194
+ */
3195
+ 'generator-star-spacing': GeneratorStarSpacingRuleOptions;
3196
+ /**
3197
+ * Enforce the location of arrow function bodies
3198
+ * @see https://eslint.style/rules/implicit-arrow-linebreak
3199
+ */
3200
+ 'implicit-arrow-linebreak': ImplicitArrowLinebreakRuleOptions;
3201
+ /**
3202
+ * Enforce consistent indentation
3203
+ * @see https://eslint.style/rules/indent
3204
+ */
3205
+ 'indent': IndentRuleOptions$1;
3206
+ /**
3207
+ * Indentation for binary operators
3208
+ * @see https://eslint.style/rules/indent-binary-ops
3209
+ */
3210
+ 'indent-binary-ops': IndentBinaryOpsRuleOptions;
3211
+ /**
3212
+ * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
3213
+ * @see https://eslint.style/rules/jsx-child-element-spacing
3214
+ */
3215
+ 'jsx-child-element-spacing': JsxChildElementSpacingRuleOptions;
3216
+ /**
3217
+ * Enforce closing bracket location in JSX
3218
+ * @see https://eslint.style/rules/jsx-closing-bracket-location
3219
+ */
3220
+ 'jsx-closing-bracket-location': JsxClosingBracketLocationRuleOptions;
3221
+ /**
3222
+ * Enforce closing tag location for multiline JSX
3223
+ * @see https://eslint.style/rules/jsx-closing-tag-location
3224
+ */
3225
+ 'jsx-closing-tag-location': JsxClosingTagLocationRuleOptions;
3226
+ /**
3227
+ * Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes
3228
+ * @see https://eslint.style/rules/jsx-curly-brace-presence
3229
+ */
3230
+ 'jsx-curly-brace-presence': JsxCurlyBracePresenceRuleOptions;
3231
+ /**
3232
+ * Enforce consistent linebreaks in curly braces in JSX attributes and expressions
3233
+ * @see https://eslint.style/rules/jsx-curly-newline
3234
+ */
3235
+ 'jsx-curly-newline': JsxCurlyNewlineRuleOptions;
3236
+ /**
3237
+ * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
3238
+ * @see https://eslint.style/rules/jsx-curly-spacing
3239
+ */
3240
+ 'jsx-curly-spacing': JsxCurlySpacingRuleOptions;
3241
+ /**
3242
+ * Enforce or disallow spaces around equal signs in JSX attributes
3243
+ * @see https://eslint.style/rules/jsx-equals-spacing
3244
+ */
3245
+ 'jsx-equals-spacing': JsxEqualsSpacingRuleOptions;
3246
+ /**
3247
+ * Enforce proper position of the first property in JSX
3248
+ * @see https://eslint.style/rules/jsx-first-prop-new-line
3249
+ */
3250
+ 'jsx-first-prop-new-line': JsxFirstPropNewLineRuleOptions;
3251
+ /**
3252
+ * Enforce line breaks before and after JSX elements when they are used as arguments to a function.
3253
+ * @see https://eslint.style/rules/jsx-function-call-newline
3254
+ */
3255
+ 'jsx-function-call-newline': JsxFunctionCallNewlineRuleOptions;
3256
+ /**
3257
+ * Enforce JSX indentation. Deprecated, use `indent` rule instead.
3258
+ * @see https://eslint.style/rules/jsx-indent
3259
+ */
3260
+ 'jsx-indent': JsxIndentRuleOptions;
3261
+ /**
3262
+ * Enforce props indentation in JSX
3263
+ * @see https://eslint.style/rules/jsx-indent-props
3264
+ */
3265
+ 'jsx-indent-props': JsxIndentPropsRuleOptions;
3266
+ /**
3267
+ * Enforce maximum of props on a single line in JSX
3268
+ * @see https://eslint.style/rules/jsx-max-props-per-line
3269
+ */
3270
+ 'jsx-max-props-per-line': JsxMaxPropsPerLineRuleOptions;
3271
+ /**
3272
+ * Require or prevent a new line after jsx elements and expressions.
3273
+ * @see https://eslint.style/rules/jsx-newline
3274
+ */
3275
+ 'jsx-newline': JsxNewlineRuleOptions;
3276
+ /**
3277
+ * Require one JSX element per line
3278
+ * @see https://eslint.style/rules/jsx-one-expression-per-line
3279
+ */
3280
+ 'jsx-one-expression-per-line': JsxOneExpressionPerLineRuleOptions;
3281
+ /**
3282
+ * Enforce PascalCase for user-defined JSX components
3283
+ * @see https://eslint.style/rules/jsx-pascal-case
3284
+ */
3285
+ 'jsx-pascal-case': JsxPascalCaseRuleOptions;
3286
+ /**
3287
+ * Disallow multiple spaces between inline JSX props. Deprecated, use `no-multi-spaces` rule instead.
3288
+ * @see https://eslint.style/rules/jsx-props-no-multi-spaces
3289
+ */
3290
+ 'jsx-props-no-multi-spaces': JsxPropsNoMultiSpacesRuleOptions;
3291
+ /**
3292
+ * Enforce consistent line break styles for JSX props
3293
+ * @see https://eslint.style/rules/jsx-props-style
3294
+ */
3295
+ 'exp-jsx-props-style': JsxPropsStyleRuleOptions;
3296
+ /**
3297
+ * Enforce the consistent use of either double or single quotes in JSX attributes
3298
+ * @see https://eslint.style/rules/jsx-quotes
3299
+ */
3300
+ 'jsx-quotes': JsxQuotesRuleOptions;
3301
+ /**
3302
+ * Disallow extra closing tags for components without children
3303
+ * @see https://eslint.style/rules/jsx-self-closing-comp
3304
+ */
3305
+ 'jsx-self-closing-comp': JsxSelfClosingCompRuleOptions;
3306
+ /**
3307
+ * Enforce props alphabetical sorting
3308
+ * @see https://eslint.style/rules/jsx-sort-props
3309
+ */
3310
+ 'jsx-sort-props': JsxSortPropsRuleOptions;
3311
+ /**
3312
+ * Enforce whitespace in and around the JSX opening and closing brackets
3313
+ * @see https://eslint.style/rules/jsx-tag-spacing
3314
+ */
3315
+ 'jsx-tag-spacing': JsxTagSpacingRuleOptions;
3316
+ /**
3317
+ * Disallow missing parentheses around multiline JSX
3318
+ * @see https://eslint.style/rules/jsx-wrap-multilines
3319
+ */
3320
+ 'jsx-wrap-multilines': JsxWrapMultilinesRuleOptions;
3321
+ /**
3322
+ * Enforce consistent spacing between property names and type annotations in types and interfaces
3323
+ * @see https://eslint.style/rules/key-spacing
3324
+ */
3325
+ 'key-spacing': KeySpacingRuleOptions;
3326
+ /**
3327
+ * Enforce consistent spacing before and after keywords
3328
+ * @see https://eslint.style/rules/keyword-spacing
3329
+ */
3330
+ 'keyword-spacing': KeywordSpacingRuleOptions;
3331
+ /**
3332
+ * Enforce position of line comments
3333
+ * @see https://eslint.style/rules/line-comment-position
3334
+ */
3335
+ 'line-comment-position': LineCommentPositionRuleOptions;
3336
+ /**
3337
+ * Enforce consistent linebreak style
3338
+ * @see https://eslint.style/rules/linebreak-style
3339
+ */
3340
+ 'linebreak-style': LinebreakStyleRuleOptions;
3341
+ /**
3342
+ * Require empty lines around comments
3343
+ * @see https://eslint.style/rules/lines-around-comment
3344
+ */
3345
+ 'lines-around-comment': LinesAroundCommentRuleOptions;
3346
+ /**
3347
+ * Require or disallow an empty line between class members
3348
+ * @see https://eslint.style/rules/lines-between-class-members
3349
+ */
3350
+ 'lines-between-class-members': LinesBetweenClassMembersRuleOptions;
3351
+ /**
3352
+ * Enforce consistent spacing and line break styles inside brackets.
3353
+ * @see https://eslint.style/rules/list-style
3354
+ */
3355
+ 'exp-list-style': ListStyleRuleOptions;
3356
+ /**
3357
+ * Enforce a maximum line length
3358
+ * @see https://eslint.style/rules/max-len
3359
+ */
3360
+ 'max-len': MaxLenRuleOptions;
3361
+ /**
3362
+ * Enforce a maximum number of statements allowed per line
3363
+ * @see https://eslint.style/rules/max-statements-per-line
3364
+ */
3365
+ 'max-statements-per-line': MaxStatementsPerLineRuleOptions;
3366
+ /**
3367
+ * Require a specific member delimiter style for interfaces and type literals
3368
+ * @see https://eslint.style/rules/member-delimiter-style
3369
+ */
3370
+ 'member-delimiter-style': MemberDelimiterStyleRuleOptions;
3371
+ /**
3372
+ * Enforce a particular style for multiline comments
3373
+ * @see https://eslint.style/rules/multiline-comment-style
3374
+ */
3375
+ 'multiline-comment-style': MultilineCommentStyleRuleOptions;
3376
+ /**
3377
+ * Enforce newlines between operands of ternary expressions
3378
+ * @see https://eslint.style/rules/multiline-ternary
3379
+ */
3380
+ 'multiline-ternary': MultilineTernaryRuleOptions;
3381
+ /**
3382
+ * Enforce or disallow parentheses when invoking a constructor with no arguments
3383
+ * @see https://eslint.style/rules/new-parens
3384
+ */
3385
+ 'new-parens': NewParensRuleOptions;
3386
+ /**
3387
+ * Require a newline after each call in a method chain
3388
+ * @see https://eslint.style/rules/newline-per-chained-call
3389
+ */
3390
+ 'newline-per-chained-call': NewlinePerChainedCallRuleOptions;
3391
+ /**
3392
+ * Disallow arrow functions where they could be confused with comparisons
3393
+ * @see https://eslint.style/rules/no-confusing-arrow
3394
+ */
3395
+ 'no-confusing-arrow': NoConfusingArrowRuleOptions;
3396
+ /**
3397
+ * Disallow unnecessary parentheses
3398
+ * @see https://eslint.style/rules/no-extra-parens
3399
+ */
3400
+ 'no-extra-parens': NoExtraParensRuleOptions;
3401
+ /**
3402
+ * Disallow unnecessary semicolons
3403
+ * @see https://eslint.style/rules/no-extra-semi
3404
+ */
3405
+ 'no-extra-semi': NoExtraSemiRuleOptions;
3406
+ /**
3407
+ * Disallow leading or trailing decimal points in numeric literals
3408
+ * @see https://eslint.style/rules/no-floating-decimal
3409
+ */
3410
+ 'no-floating-decimal': NoFloatingDecimalRuleOptions;
3411
+ /**
3412
+ * Disallow mixed binary operators
3413
+ * @see https://eslint.style/rules/no-mixed-operators
3414
+ */
3415
+ 'no-mixed-operators': NoMixedOperatorsRuleOptions;
3416
+ /**
3417
+ * Disallow mixed spaces and tabs for indentation
3418
+ * @see https://eslint.style/rules/no-mixed-spaces-and-tabs
3419
+ */
3420
+ 'no-mixed-spaces-and-tabs': NoMixedSpacesAndTabsRuleOptions;
3421
+ /**
3422
+ * Disallow multiple spaces
3423
+ * @see https://eslint.style/rules/no-multi-spaces
3424
+ */
3425
+ 'no-multi-spaces': NoMultiSpacesRuleOptions;
3426
+ /**
3427
+ * Disallow multiple empty lines
3428
+ * @see https://eslint.style/rules/no-multiple-empty-lines
3429
+ */
3430
+ 'no-multiple-empty-lines': NoMultipleEmptyLinesRuleOptions;
3431
+ /**
3432
+ * Disallow all tabs
3433
+ * @see https://eslint.style/rules/no-tabs
3434
+ */
3435
+ 'no-tabs': NoTabsRuleOptions;
3436
+ /**
3437
+ * Disallow trailing whitespace at the end of lines
3438
+ * @see https://eslint.style/rules/no-trailing-spaces
3439
+ */
3440
+ 'no-trailing-spaces': NoTrailingSpacesRuleOptions;
3441
+ /**
3442
+ * Disallow whitespace before properties
3443
+ * @see https://eslint.style/rules/no-whitespace-before-property
3444
+ */
3445
+ 'no-whitespace-before-property': NoWhitespaceBeforePropertyRuleOptions;
3446
+ /**
3447
+ * Enforce the location of single-line statements
3448
+ * @see https://eslint.style/rules/nonblock-statement-body-position
3449
+ */
3450
+ 'nonblock-statement-body-position': NonblockStatementBodyPositionRuleOptions;
3451
+ /**
3452
+ * Enforce consistent line breaks after opening and before closing braces
3453
+ * @see https://eslint.style/rules/object-curly-newline
3454
+ */
3455
+ 'object-curly-newline': ObjectCurlyNewlineRuleOptions;
3456
+ /**
3457
+ * Enforce consistent spacing inside braces
3458
+ * @see https://eslint.style/rules/object-curly-spacing
3459
+ */
3460
+ 'object-curly-spacing': ObjectCurlySpacingRuleOptions;
3461
+ /**
3462
+ * Enforce placing object properties on separate lines
3463
+ * @see https://eslint.style/rules/object-property-newline
3464
+ */
3465
+ 'object-property-newline': ObjectPropertyNewlineRuleOptions;
3466
+ /**
3467
+ * Require or disallow newlines around variable declarations
3468
+ * @see https://eslint.style/rules/one-var-declaration-per-line
3469
+ */
3470
+ 'one-var-declaration-per-line': OneVarDeclarationPerLineRuleOptions;
3471
+ /**
3472
+ * Enforce consistent linebreak style for operators
3473
+ * @see https://eslint.style/rules/operator-linebreak
3474
+ */
3475
+ 'operator-linebreak': OperatorLinebreakRuleOptions;
3476
+ /**
3477
+ * Require or disallow padding within blocks
3478
+ * @see https://eslint.style/rules/padded-blocks
3479
+ */
3480
+ 'padded-blocks': PaddedBlocksRuleOptions;
3481
+ /**
3482
+ * Require or disallow padding lines between statements
3483
+ * @see https://eslint.style/rules/padding-line-between-statements
3484
+ */
3485
+ 'padding-line-between-statements': PaddingLineBetweenStatementsRuleOptions;
3486
+ /**
3487
+ * Require quotes around object literal, type literal, interfaces and enums property names
3488
+ * @see https://eslint.style/rules/quote-props
3489
+ */
3490
+ 'quote-props': QuotePropsRuleOptions;
3491
+ /**
3492
+ * Enforce the consistent use of either backticks, double, or single quotes
3493
+ * @see https://eslint.style/rules/quotes
3494
+ */
3495
+ 'quotes': QuotesRuleOptions;
3496
+ /**
3497
+ * Enforce spacing between rest and spread operators and their expressions
3498
+ * @see https://eslint.style/rules/rest-spread-spacing
3499
+ */
3500
+ 'rest-spread-spacing': RestSpreadSpacingRuleOptions;
3501
+ /**
3502
+ * Require or disallow semicolons instead of ASI
3503
+ * @see https://eslint.style/rules/semi
3504
+ */
3505
+ 'semi': SemiRuleOptions;
3506
+ /**
3507
+ * Enforce consistent spacing before and after semicolons
3508
+ * @see https://eslint.style/rules/semi-spacing
3509
+ */
3510
+ 'semi-spacing': SemiSpacingRuleOptions;
3511
+ /**
3512
+ * Enforce location of semicolons
3513
+ * @see https://eslint.style/rules/semi-style
3514
+ */
3515
+ 'semi-style': SemiStyleRuleOptions;
3516
+ /**
3517
+ * Enforce consistent spacing before blocks
3518
+ * @see https://eslint.style/rules/space-before-blocks
3519
+ */
3520
+ 'space-before-blocks': SpaceBeforeBlocksRuleOptions;
3521
+ /**
3522
+ * Enforce consistent spacing before function parenthesis
3523
+ * @see https://eslint.style/rules/space-before-function-paren
3524
+ */
3525
+ 'space-before-function-paren': SpaceBeforeFunctionParenRuleOptions;
3526
+ /**
3527
+ * Enforce consistent spacing inside parentheses
3528
+ * @see https://eslint.style/rules/space-in-parens
3529
+ */
3530
+ 'space-in-parens': SpaceInParensRuleOptions;
3531
+ /**
3532
+ * Require spacing around infix operators
3533
+ * @see https://eslint.style/rules/space-infix-ops
3534
+ */
3535
+ 'space-infix-ops': SpaceInfixOpsRuleOptions;
3536
+ /**
3537
+ * Enforce consistent spacing before or after unary operators
3538
+ * @see https://eslint.style/rules/space-unary-ops
3539
+ */
3540
+ 'space-unary-ops': SpaceUnaryOpsRuleOptions;
3541
+ /**
3542
+ * Enforce consistent spacing after the `//` or `/*` in a comment
3543
+ * @see https://eslint.style/rules/spaced-comment
3544
+ */
3545
+ 'spaced-comment': SpacedCommentRuleOptions;
3546
+ /**
3547
+ * Enforce spacing around colons of switch statements
3548
+ * @see https://eslint.style/rules/switch-colon-spacing
3549
+ */
3550
+ 'switch-colon-spacing': SwitchColonSpacingRuleOptions;
3551
+ /**
3552
+ * Require or disallow spacing around embedded expressions of template strings
3553
+ * @see https://eslint.style/rules/template-curly-spacing
3554
+ */
3555
+ 'template-curly-spacing': TemplateCurlySpacingRuleOptions;
3556
+ /**
3557
+ * Require or disallow spacing between template tags and their literals
3558
+ * @see https://eslint.style/rules/template-tag-spacing
3559
+ */
3560
+ 'template-tag-spacing': TemplateTagSpacingRuleOptions;
3561
+ /**
3562
+ * Require consistent spacing around type annotations
3563
+ * @see https://eslint.style/rules/type-annotation-spacing
3564
+ */
3565
+ 'type-annotation-spacing': TypeAnnotationSpacingRuleOptions;
3566
+ /**
3567
+ * Enforces consistent spacing inside TypeScript type generics
3568
+ * @see https://eslint.style/rules/type-generic-spacing
3569
+ */
3570
+ 'type-generic-spacing': TypeGenericSpacingRuleOptions;
3571
+ /**
3572
+ * Expect space before the type declaration in the named tuple
3573
+ * @see https://eslint.style/rules/type-named-tuple-spacing
3574
+ */
3575
+ 'type-named-tuple-spacing': TypeNamedTupleSpacingRuleOptions;
3576
+ /**
3577
+ * Require parentheses around immediate `function` invocations
3578
+ * @see https://eslint.style/rules/wrap-iife
3579
+ */
3580
+ 'wrap-iife': WrapIifeRuleOptions;
3581
+ /**
3582
+ * Require parenthesis around regex literals
3583
+ * @see https://eslint.style/rules/wrap-regex
3584
+ */
3585
+ 'wrap-regex': WrapRegexRuleOptions;
3586
+ /**
3587
+ * Require or disallow spacing around the `*` in `yield*` expressions
3588
+ * @see https://eslint.style/rules/yield-star-spacing
3589
+ */
3590
+ 'yield-star-spacing': YieldStarSpacingRuleOptions;
3591
+ }
3592
+
3593
+ //#region dts/options.d.ts
3594
+ type IndentRuleOptions = UnprefixedRuleOptions['indent'];
3595
+ interface StylisticCustomizeOptions {
3596
+ /**
3597
+ * The name of the registered plugin, used to prefix rule IDs
3598
+ * @default '@stylistic'
3599
+ */
3600
+ pluginName?: string;
3601
+ /**
3602
+ * Indentation level
3603
+ * Similar to the `tabWidth` and `useTabs` options in Prettier
3604
+ *
3605
+ * @default 2
3606
+ */
3607
+ indent?: IndentRuleOptions[0] | IndentRuleOptions;
3608
+ /**
3609
+ * Quote style
3610
+ * Similar to `singleQuote` option in Prettier
3611
+ *
3612
+ * @default 'single'
3613
+ */
3614
+ quotes?: 'single' | 'double' | 'backtick';
3615
+ /**
3616
+ * Whether to enable semicolons
3617
+ * Similar to `semi` option in Prettier
3618
+ *
3619
+ * @default false
3620
+ */
3621
+ semi?: boolean;
3622
+ /**
3623
+ * Enable JSX support
3624
+ * @default true
3625
+ */
3626
+ jsx?: boolean;
3627
+ /**
3628
+ * When to enable arrow parenthesis
3629
+ * Similar to `arrowParens` option in Prettier
3630
+ *
3631
+ * @default false
3632
+ */
3633
+ arrowParens?: boolean;
3634
+ /**
3635
+ * Which brace style to use
3636
+ * @default 'stroustrup'
3637
+ */
3638
+ braceStyle?: '1tbs' | 'stroustrup' | 'allman';
3639
+ /**
3640
+ * Whether to require spaces around braces
3641
+ * Similar to `bracketSpacing` option in Prettier
3642
+ *
3643
+ * @default true
3644
+ */
3645
+ blockSpacing?: boolean;
3646
+ /**
3647
+ * When to enable prop quoting
3648
+ * Similar to `quoteProps` option in Prettier
3649
+ *
3650
+ * @default 'consistent-as-needed'
3651
+ */
3652
+ quoteProps?: 'always' | 'as-needed' | 'consistent' | 'consistent-as-needed';
3653
+ /**
3654
+ * When to enable comma dangles
3655
+ * Similar to `trailingComma` option in Prettier
3656
+ *
3657
+ * @default 'always-multiline'
3658
+ */
3659
+ commaDangle?: 'never' | 'always' | 'always-multiline' | 'only-multiline';
3660
+ /**
3661
+ * Severity level of the rules
3662
+ * Determines how violations are reported.
3663
+ *
3664
+ * @default 'error'
3665
+ */
3666
+ severity?: 'error' | 'warn';
3667
+ /**
3668
+ * Enable the experimental rules
3669
+ *
3670
+ * @default false
3671
+ */
3672
+ experimental?: boolean;
3673
+ }
3674
+
3675
+ interface ToolingOptions {
3676
+ /**
3677
+ * Enable RegExp rules
3678
+ *
3679
+ * @see https://github.com/ota-meshi/eslint-plugin-regexp
3680
+ * @default true
3681
+ */
3682
+ regexp?: boolean;
3683
+ /**
3684
+ * Enable Unicorn rules
3685
+ *
3686
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn
3687
+ * @default true
3688
+ */
3689
+ unicorn?: boolean;
3690
+ /**
3691
+ * Enable jsdoc rules
3692
+ *
3693
+ * @default true
3694
+ */
3695
+ jsdoc?: boolean;
3696
+ }
3697
+ interface NuxtSpecificOptions {
3698
+ /**
3699
+ * Sort keys in nuxt.config to maintain a consistent order
3700
+ *
3701
+ * @default true when `features.stylistic` is enabled
3702
+ */
3703
+ sortConfigKeys?: boolean;
3704
+ }
3705
+ interface NuxtESLintFeaturesOptions {
3706
+ /**
3707
+ * Setup basic JavaScript, TypeScript and Vue plugins and rules.
3708
+ *
3709
+ * You might want to disable it when you are using other ESLint config that handles the basic setup.
3710
+ *
3711
+ * @default true
3712
+ */
3713
+ standalone?: boolean;
3714
+ /**
3715
+ * Enable rules for Nuxt module authors or library authors
3716
+ *
3717
+ * @experimental Changes might not follow semver
3718
+ * @default false
3719
+ */
3720
+ tooling?: boolean | ToolingOptions;
3721
+ /**
3722
+ * Enable the import plugin
3723
+ *
3724
+ * @default true
3725
+ */
3726
+ import?: boolean | ImportPluginOptions;
3727
+ /**
3728
+ * Enable stylistic ESLint rules for formatting and code style check
3729
+ *
3730
+ * @see https://eslint.style/guide/config-presets
3731
+ * @default false
3732
+ */
3733
+ stylistic?: boolean | StylisticCustomizeOptions;
3734
+ /**
3735
+ * Enable formatters to handling formatting for different file types
3736
+ *
3737
+ * Requires `eslint-plugin-format` to be installed
3738
+ *
3739
+ * @default false
3740
+ */
3741
+ formatters?: boolean | OptionsFormatters;
3742
+ /**
3743
+ * Options for Nuxt specific rules
3744
+ */
3745
+ nuxt?: NuxtSpecificOptions;
3746
+ /**
3747
+ * Enable TypeScript support. Can also be an object to config the options.
3748
+ *
3749
+ * By default it enables automatic when `typescript` is installed in the project.
3750
+ */
3751
+ typescript?: boolean | {
3752
+ /**
3753
+ * Enable strict rules
3754
+ * @see https://typescript-eslint.io/users/configs#strict
3755
+ * @default true
3756
+ */
3757
+ strict?: boolean;
3758
+ /**
3759
+ * Path to the tsconfig file, when this is provide, type-aware rules will be enabled.
3760
+ */
3761
+ tsconfigPath?: string;
3762
+ };
3763
+ }
3764
+ interface ImportPluginOptions {
3765
+ /**
3766
+ * The import plugin to use
3767
+ *
3768
+ * @default 'eslint-plugin-import-x'
3769
+ */
3770
+ package?: 'eslint-plugin-import-lite' | 'eslint-plugin-import-x';
3771
+ }
3772
+ interface NuxtESLintConfigOptions {
3773
+ features?: NuxtESLintFeaturesOptions;
3774
+ dirs?: {
3775
+ /**
3776
+ * Nuxt source directory
3777
+ */
3778
+ src?: string[];
3779
+ /**
3780
+ * Root directory for nuxt project
3781
+ */
3782
+ root?: string[];
3783
+ /**
3784
+ * Directory for pages
3785
+ */
3786
+ pages?: string[];
3787
+ /**
3788
+ * Directory for layouts
3789
+ */
3790
+ layouts?: string[];
3791
+ /**
3792
+ * Directory for components
3793
+ */
3794
+ components?: string[];
3795
+ /**
3796
+ * Directory for components with prefix
3797
+ * Ignore `vue/multi-word-component-names`
3798
+ */
3799
+ componentsPrefixed?: string[];
3800
+ /**
3801
+ * Directory for composobles
3802
+ */
3803
+ composables?: string[];
3804
+ /**
3805
+ * Directory for plugins
3806
+ */
3807
+ plugins?: string[];
3808
+ /**
3809
+ * Directory for modules
3810
+ */
3811
+ modules?: string[];
3812
+ /**
3813
+ * Directory for middleware
3814
+ */
3815
+ middleware?: string[];
3816
+ /**
3817
+ * Directory for server
3818
+ */
3819
+ servers?: string[];
3820
+ };
3821
+ }
3822
+ interface OptionsFormatters {
3823
+ /**
3824
+ * Enable formatting support for CSS, Less, Sass, and SCSS.
3825
+ *
3826
+ * Currently only support Prettier.
3827
+ */
3828
+ css?: 'prettier' | boolean;
3829
+ /**
3830
+ * Enable formatting support for HTML.
3831
+ *
3832
+ * Currently only support Prettier.
3833
+ */
3834
+ html?: 'prettier' | boolean;
3835
+ /**
3836
+ * Enable formatting support for XML.
3837
+ *
3838
+ * Currently only support Prettier.
3839
+ */
3840
+ xml?: 'prettier' | boolean;
3841
+ /**
3842
+ * Enable formatting support for SVG.
3843
+ *
3844
+ * Currently only support Prettier.
3845
+ */
3846
+ svg?: 'prettier' | boolean;
3847
+ /**
3848
+ * Enable formatting support for Markdown.
3849
+ *
3850
+ * Support both Prettier and dprint.
3851
+ *
3852
+ * When set to `true`, it will use Prettier.
3853
+ */
3854
+ markdown?: 'prettier' | 'dprint' | boolean;
3855
+ /**
3856
+ * Enable formatting support for GraphQL.
3857
+ */
3858
+ graphql?: 'prettier' | boolean;
3859
+ /**
3860
+ * Custom options for Prettier.
3861
+ *
3862
+ * By default it's controlled by our own config.
3863
+ */
3864
+ prettierOptions?: any;
3865
+ /**
3866
+ * Custom options for dprint.
3867
+ *
3868
+ * By default it's controlled by our own config.
3869
+ */
3870
+ dprintOptions?: boolean;
3871
+ }
3872
+ /**
3873
+ * Create an array of ESLint flat configs for Nuxt 3, based on the given options.
3874
+ * Accepts appending user configs as rest arguments from the second argument.
3875
+ *
3876
+ * For Nuxt apps, it's recommended to use `@nuxt/eslint` module instead, which will generate the necessary configuration based on your project.
3877
+ * @see https://eslint.nuxt.com/packages/module
3878
+ */
3879
+ declare function createConfigForNuxt(options?: NuxtESLintConfigOptions, ...userConfigs: ResolvableFlatConfig[]): FlatConfigComposer;
3880
+
10
3881
  interface PluginConfigs extends Record<
11
3882
  string,
12
3883
  Linter.LegacyConfig | Linter.Config[] | Linter.Config
@@ -46,6 +3917,15 @@ var eslint_config = antfu(
46
3917
  unocss: true,
47
3918
  vue: { a11y: true }
48
3919
  },
3920
+ // Antfu changes (keep them minimal)
3921
+ {
3922
+ rules: {
3923
+ "antfu/no-top-level-await": "off",
3924
+ "node/prefer-global/process": "off",
3925
+ "pnpm/yaml-enforce-settings": "off",
3926
+ "ts/no-use-before-define": "off"
3927
+ }
3928
+ },
49
3929
  ...storybook.configs["flat/recommended"],
50
3930
  turbo.configs["flat/recommended"],
51
3931
  zod.configs.recommended,
@@ -91,7 +3971,7 @@ var eslint_config = antfu(
91
3971
  }],
92
3972
  "yaml/sort-sequence-values": ["error", {
93
3973
  order: { type: "asc" },
94
- pathPattern: "^services(?:\\.[^.\\[\\]]+|\\[[^\\]]+\\])\\.(?:depends_on|environment|volumes)$"
3974
+ pathPattern: "^services(?:\\.[^.\\[\\]]+|\\[[^\\]]+\\])\\.(?:depends_on|environment|ports|volumes)$"
95
3975
  }]
96
3976
  }
97
3977
  },
@@ -102,17 +3982,9 @@ var eslint_config = antfu(
102
3982
  files: ["**/package.json"],
103
3983
  rules: { "jsonc/sort-keys": "off" }
104
3984
  },
105
- // SaaS Makers
3985
+ // ESLint
106
3986
  {
107
- plugins: { saasmakers },
108
3987
  rules: {
109
- // Override rules defined by Antfu ESLint config
110
- // Try to keep the disabled rules to a minimum
111
- "antfu/no-top-level-await": "off",
112
- "node/prefer-global/process": "off",
113
- "pnpm/yaml-enforce-settings": "off",
114
- "ts/no-use-before-define": "off",
115
- // ESLint
116
3988
  "object-property-newline": ["error", { allowAllPropertiesOnSameLine: false }],
117
3989
  "object-curly-newline": ["error", {
118
3990
  ExportDeclaration: {
@@ -125,8 +3997,14 @@ var eslint_config = antfu(
125
3997
  multiline: true
126
3998
  },
127
3999
  ObjectPattern: "never"
128
- }],
129
- // Perfectionist
4000
+ }]
4001
+ }
4002
+ },
4003
+ // Nuxt
4004
+ createConfigForNuxt({ features: { standalone: false } }),
4005
+ // Perfectionist
4006
+ {
4007
+ rules: {
130
4008
  ..._default.configs["recommended-natural"].rules,
131
4009
  "perfectionist/sort-imports": ["error", {
132
4010
  newlinesBetween: 0,
@@ -140,11 +4018,14 @@ var eslint_config = antfu(
140
4018
  partitionByComment: true,
141
4019
  partitionByNewLine: true,
142
4020
  type: "natural"
143
- }],
144
- // SaaS Makers
145
- "saasmakers/ts-sort-tests": "error"
4021
+ }]
146
4022
  }
147
4023
  },
4024
+ // SaaS Makers
4025
+ {
4026
+ plugins: { saasmakers },
4027
+ rules: { "saasmakers/ts-sort-tests": "error" }
4028
+ },
148
4029
  // Vitest
149
4030
  {
150
4031
  files: ["**/*.test.ts"],