@icebreakers/eslint-config 4.0.10 → 4.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,1340 +1,12 @@
1
1
  import { Awaitable, ConfigNames, OptionsConfig, TypedFlatConfigItem, TypedFlatConfigItem as TypedFlatConfigItem$1 } from "@antfu/eslint-config";
2
2
  import { IcebreakerStylelintOptions } from "@icebreakers/stylelint-config";
3
+ import { FlatConfigComposer, FlatConfigComposer as FlatConfigComposer$1 } from "eslint-flat-config-utils";
3
4
 
4
5
  //#region src/antfu.d.ts
5
6
 
6
7
  import * as import__antfu_eslint_config from "@antfu/eslint-config";
7
8
  //#endregion
8
- //#region ../../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts
9
- // ==================================================================================================
10
- // JSON Schema Draft 04
11
- // ==================================================================================================
12
- /**
13
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
14
- */
15
- type JSONSchema4TypeName = "string" //
16
- | "number" | "integer" | "boolean" | "object" | "array" | "null" | "any";
17
- /**
18
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5
19
- */
20
- type JSONSchema4Type = string //
21
- | number | boolean | JSONSchema4Object | JSONSchema4Array | null;
22
- // Workaround for infinite type recursion
23
- interface JSONSchema4Object {
24
- [key: string]: JSONSchema4Type;
25
- }
26
- // Workaround for infinite type recursion
27
- // https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
28
- interface JSONSchema4Array extends Array<JSONSchema4Type> {}
29
- /**
30
- * Meta schema
31
- *
32
- * Recommended values:
33
- * - 'http://json-schema.org/schema#'
34
- * - 'http://json-schema.org/hyper-schema#'
35
- * - 'http://json-schema.org/draft-04/schema#'
36
- * - 'http://json-schema.org/draft-04/hyper-schema#'
37
- * - 'http://json-schema.org/draft-03/schema#'
38
- * - 'http://json-schema.org/draft-03/hyper-schema#'
39
- *
40
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
41
- */
42
- type JSONSchema4Version = string;
43
- /**
44
- * JSON Schema V4
45
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-04
46
- */
47
- interface JSONSchema4 {
48
- id?: string | undefined;
49
- $ref?: string | undefined;
50
- $schema?: JSONSchema4Version | undefined;
51
- /**
52
- * This attribute is a string that provides a short description of the
53
- * instance property.
54
- *
55
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21
56
- */
57
- title?: string | undefined;
58
- /**
59
- * This attribute is a string that provides a full description of the of
60
- * purpose the instance property.
61
- *
62
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22
63
- */
64
- description?: string | undefined;
65
- default?: JSONSchema4Type | undefined;
66
- multipleOf?: number | undefined;
67
- maximum?: number | undefined;
68
- exclusiveMaximum?: boolean | undefined;
69
- minimum?: number | undefined;
70
- exclusiveMinimum?: boolean | undefined;
71
- maxLength?: number | undefined;
72
- minLength?: number | undefined;
73
- pattern?: string | undefined;
74
- /**
75
- * May only be defined when "items" is defined, and is a tuple of JSONSchemas.
76
- *
77
- * This provides a definition for additional items in an array instance
78
- * when tuple definitions of the items is provided. This can be false
79
- * to indicate additional items in the array are not allowed, or it can
80
- * be a schema that defines the schema of the additional items.
81
- *
82
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6
83
- */
84
- additionalItems?: boolean | JSONSchema4 | undefined;
85
- /**
86
- * This attribute defines the allowed items in an instance array, and
87
- * MUST be a schema or an array of schemas. The default value is an
88
- * empty schema which allows any value for items in the instance array.
89
- *
90
- * When this attribute value is a schema and the instance value is an
91
- * array, then all the items in the array MUST be valid according to the
92
- * schema.
93
- *
94
- * When this attribute value is an array of schemas and the instance
95
- * value is an array, each position in the instance array MUST conform
96
- * to the schema in the corresponding position for this array. This
97
- * called tuple typing. When tuple typing is used, additional items are
98
- * allowed, disallowed, or constrained by the "additionalItems"
99
- * (Section 5.6) attribute using the same rules as
100
- * "additionalProperties" (Section 5.4) for objects.
101
- *
102
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5
103
- */
104
- items?: JSONSchema4 | JSONSchema4[] | undefined;
105
- maxItems?: number | undefined;
106
- minItems?: number | undefined;
107
- uniqueItems?: boolean | undefined;
108
- maxProperties?: number | undefined;
109
- minProperties?: number | undefined;
110
- /**
111
- * This attribute indicates if the instance must have a value, and not
112
- * be undefined. This is false by default, making the instance
113
- * optional.
114
- *
115
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7
116
- */
117
- required?: boolean | string[] | undefined;
118
- /**
119
- * This attribute defines a schema for all properties that are not
120
- * explicitly defined in an object type definition. If specified, the
121
- * value MUST be a schema or a boolean. If false is provided, no
122
- * additional properties are allowed beyond the properties defined in
123
- * the schema. The default value is an empty schema which allows any
124
- * value for additional properties.
125
- *
126
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4
127
- */
128
- additionalProperties?: boolean | JSONSchema4 | undefined;
129
- definitions?: {
130
- [k: string]: JSONSchema4;
131
- } | undefined;
132
- /**
133
- * This attribute is an object with property definitions that define the
134
- * valid values of instance object property values. When the instance
135
- * value is an object, the property values of the instance object MUST
136
- * conform to the property definitions in this object. In this object,
137
- * each property definition's value MUST be a schema, and the property's
138
- * name MUST be the name of the instance property that it defines. The
139
- * instance property value MUST be valid according to the schema from
140
- * the property definition. Properties are considered unordered, the
141
- * order of the instance properties MAY be in any order.
142
- *
143
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2
144
- */
145
- properties?: {
146
- [k: string]: JSONSchema4;
147
- } | undefined;
148
- /**
149
- * This attribute is an object that defines the schema for a set of
150
- * property names of an object instance. The name of each property of
151
- * this attribute's object is a regular expression pattern in the ECMA
152
- * 262/Perl 5 format, while the value is a schema. If the pattern
153
- * matches the name of a property on the instance object, the value of
154
- * the instance's property MUST be valid against the pattern name's
155
- * schema value.
156
- *
157
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3
158
- */
159
- patternProperties?: {
160
- [k: string]: JSONSchema4;
161
- } | undefined;
162
- dependencies?: {
163
- [k: string]: JSONSchema4 | string[];
164
- } | undefined;
165
- /**
166
- * This provides an enumeration of all possible values that are valid
167
- * for the instance property. This MUST be an array, and each item in
168
- * the array represents a possible value for the instance value. If
169
- * this attribute is defined, the instance value MUST be one of the
170
- * values in the array in order for the schema to be valid.
171
- *
172
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
173
- */
174
- enum?: JSONSchema4Type[] | undefined;
175
- /**
176
- * A single type, or a union of simple types
177
- */
178
- type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined;
179
- allOf?: JSONSchema4[] | undefined;
180
- anyOf?: JSONSchema4[] | undefined;
181
- oneOf?: JSONSchema4[] | undefined;
182
- not?: JSONSchema4 | undefined;
183
- /**
184
- * The value of this property MUST be another schema which will provide
185
- * a base schema which the current schema will inherit from. The
186
- * inheritance rules are such that any instance that is valid according
187
- * to the current schema MUST be valid according to the referenced
188
- * schema. This MAY also be an array, in which case, the instance MUST
189
- * be valid for all the schemas in the array. A schema that extends
190
- * another schema MAY define additional attributes, constrain existing
191
- * attributes, or add other constraints.
192
- *
193
- * Conceptually, the behavior of extends can be seen as validating an
194
- * instance against all constraints in the extending schema as well as
195
- * the extended schema(s).
196
- *
197
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26
198
- */
199
- extends?: string | string[] | undefined;
200
- /**
201
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6
202
- */
203
- [k: string]: any;
204
- format?: string | undefined;
205
- }
206
- //#endregion
207
- //#region ../../node_modules/.pnpm/@eslint+core@1.1.1/node_modules/@eslint/core/dist/esm/types.d.ts
208
- /**
209
- * Represents an error inside of a file.
210
- */
211
- interface FileError$1 {
212
- message: string;
213
- line: number;
214
- column: number;
215
- endLine?: number;
216
- endColumn?: number;
217
- }
218
- /**
219
- * Represents a problem found in a file.
220
- */
221
- interface FileProblem$1 {
222
- ruleId: string | null;
223
- message: string;
224
- loc: SourceLocation$3;
225
- }
226
- /**
227
- * Represents the start and end coordinates of a node inside the source.
228
- */
229
- interface SourceLocation$3 {
230
- start: Position$2;
231
- end: Position$2;
232
- }
233
- /**
234
- * Represents a location coordinate inside the source. ESLint-style formats
235
- * have just `line` and `column` while others may have `offset` as well.
236
- */
237
- interface Position$2 {
238
- line: number;
239
- column: number;
240
- }
241
- /**
242
- * Represents a range of characters in the source.
243
- */
244
- type SourceRange$1 = [number, number];
245
- /**
246
- * What the rule is responsible for finding:
247
- * - `problem` means the rule has noticed a potential error.
248
- * - `suggestion` means the rule suggests an alternate or better approach.
249
- * - `layout` means the rule is looking at spacing, indentation, etc.
250
- */
251
- type RuleType$1 = "problem" | "suggestion" | "layout";
252
- /**
253
- * The type of fix the rule can provide:
254
- * - `code` means the rule can fix syntax.
255
- * - `whitespace` means the rule can fix spacing and indentation.
256
- */
257
- type RuleFixType$1 = "code" | "whitespace";
258
- /**
259
- * An object containing visitor information for a rule. Each method is either the
260
- * name of a node type or a selector, or is a method that will be called at specific
261
- * times during the traversal.
262
- */
263
- type RuleVisitor$2 = Record<string, ((...args: any[]) => void) | undefined>;
264
- /**
265
- * Rule meta information used for documentation.
266
- */
267
- interface RulesMetaDocs$1 {
268
- /**
269
- * A short description of the rule.
270
- */
271
- description?: string | undefined;
272
- /**
273
- * The URL to the documentation for the rule.
274
- */
275
- url?: string | undefined;
276
- /**
277
- * Indicates if the rule is generally recommended for all users.
278
- *
279
- * Note - this will always be a boolean for core rules, but may be used in any way by plugins.
280
- */
281
- recommended?: unknown;
282
- /**
283
- * Indicates if the rule is frozen (no longer accepting feature requests).
284
- */
285
- frozen?: boolean | undefined;
286
- }
287
- /**
288
- * Meta information about a rule.
289
- */
290
- interface RulesMeta$1<MessageIds extends string = string, RuleOptions = unknown[], ExtRuleDocs = unknown> {
291
- /**
292
- * Properties that are used when documenting the rule.
293
- */
294
- docs?: (RulesMetaDocs$1 & ExtRuleDocs) | undefined;
295
- /**
296
- * The type of rule.
297
- */
298
- type?: RuleType$1 | undefined;
299
- /**
300
- * The schema for the rule options. Required if the rule has options.
301
- */
302
- schema?: JSONSchema4 | JSONSchema4[] | false | undefined;
303
- /**
304
- * Any default options to be recursively merged on top of any user-provided options.
305
- */
306
- defaultOptions?: RuleOptions;
307
- /**
308
- * The messages that the rule can report.
309
- */
310
- messages?: Record<MessageIds, string>;
311
- /**
312
- * Indicates whether the rule has been deprecated or provides additional metadata about the deprecation. Omit if not deprecated.
313
- */
314
- deprecated?: boolean | DeprecatedInfo$1 | undefined;
315
- /**
316
- * @deprecated Use deprecated.replacedBy instead.
317
- * The name of the rule(s) this rule was replaced by, if it was deprecated.
318
- */
319
- replacedBy?: readonly string[] | undefined;
320
- /**
321
- * Indicates if the rule is fixable, and if so, what type of fix it provides.
322
- */
323
- fixable?: RuleFixType$1 | undefined;
324
- /**
325
- * Indicates if the rule may provide suggestions.
326
- */
327
- hasSuggestions?: boolean | undefined;
328
- /**
329
- * The language the rule is intended to lint.
330
- */
331
- language?: string;
332
- /**
333
- * The dialects of `language` that the rule is intended to lint.
334
- */
335
- dialects?: string[];
336
- }
337
- /**
338
- * Provides additional metadata about a deprecation.
339
- */
340
- interface DeprecatedInfo$1 {
341
- /**
342
- * General message presented to the user, e.g. for the key rule why the rule
343
- * is deprecated or for info how to replace the rule.
344
- */
345
- message?: string;
346
- /**
347
- * URL to more information about this deprecation in general.
348
- */
349
- url?: string;
350
- /**
351
- * An empty array explicitly states that there is no replacement.
352
- */
353
- replacedBy?: ReplacedByInfo$1[];
354
- /**
355
- * The package version since when the rule is deprecated (should use full
356
- * semver without a leading "v").
357
- */
358
- deprecatedSince?: string;
359
- /**
360
- * The estimated version when the rule is removed (probably the next major
361
- * version). null means the rule is "frozen" (will be available but will not
362
- * be changed).
363
- */
364
- availableUntil?: string | null;
365
- }
366
- /**
367
- * Provides metadata about a replacement
368
- */
369
- interface ReplacedByInfo$1 {
370
- /**
371
- * General message presented to the user, e.g. how to replace the rule
372
- */
373
- message?: string;
374
- /**
375
- * URL to more information about this replacement in general
376
- */
377
- url?: string;
378
- /**
379
- * Name should be "eslint" if the replacement is an ESLint core rule. Omit
380
- * the property if the replacement is in the same plugin.
381
- */
382
- plugin?: ExternalSpecifier$1;
383
- /**
384
- * Name and documentation of the replacement rule
385
- */
386
- rule?: ExternalSpecifier$1;
387
- }
388
- /**
389
- * Specifies the name and url of an external resource. At least one property
390
- * should be set.
391
- */
392
- interface ExternalSpecifier$1 {
393
- /**
394
- * Name of the referenced plugin / rule.
395
- */
396
- name?: string;
397
- /**
398
- * URL pointing to documentation for the plugin / rule.
399
- */
400
- url?: string;
401
- }
402
- /**
403
- * Generic type for `RuleContext`.
404
- */
405
- interface RuleContextTypeOptions$1 {
406
- LangOptions: LanguageOptions$1;
407
- Code: SourceCode$2;
408
- RuleOptions: unknown[];
409
- Node: unknown;
410
- MessageIds: string;
411
- }
412
- /**
413
- * Represents the context object that is passed to a rule. This object contains
414
- * information about the current state of the linting process and is the rule's
415
- * view into the outside world.
416
- */
417
- interface RuleContext$2<Options extends RuleContextTypeOptions$1 = RuleContextTypeOptions$1> {
418
- /**
419
- * The current working directory for the session.
420
- */
421
- cwd: string;
422
- /**
423
- * The filename of the file being linted.
424
- */
425
- filename: string;
426
- /**
427
- * The physical filename of the file being linted.
428
- */
429
- physicalFilename: string;
430
- /**
431
- * The source code object that the rule is running on.
432
- */
433
- sourceCode: Options["Code"];
434
- /**
435
- * Shared settings for the configuration.
436
- */
437
- settings: SettingsConfig$1;
438
- /**
439
- * The language options for the configuration.
440
- */
441
- languageOptions: Options["LangOptions"];
442
- /**
443
- * The rule ID.
444
- */
445
- id: string;
446
- /**
447
- * The rule's configured options.
448
- */
449
- options: Options["RuleOptions"];
450
- /**
451
- * The report function that the rule should use to report problems.
452
- * @param violation The violation to report.
453
- */
454
- report(violation: ViolationReport$1<Options["Node"], Options["MessageIds"]>): void;
455
- }
456
- /**
457
- * Manager of text edits for a rule fix.
458
- */
459
- interface RuleTextEditor$1<EditableSyntaxElement = unknown> {
460
- /**
461
- * Inserts text after the specified node or token.
462
- * @param syntaxElement The node or token to insert after.
463
- * @param text The edit to insert after the node or token.
464
- */
465
- insertTextAfter(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit$1;
466
- /**
467
- * Inserts text after the specified range.
468
- * @param range The range to insert after.
469
- * @param text The edit to insert after the range.
470
- */
471
- insertTextAfterRange(range: SourceRange$1, text: string): RuleTextEdit$1;
472
- /**
473
- * Inserts text before the specified node or token.
474
- * @param syntaxElement A syntax element with location information to insert before.
475
- * @param text The edit to insert before the node or token.
476
- */
477
- insertTextBefore(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit$1;
478
- /**
479
- * Inserts text before the specified range.
480
- * @param range The range to insert before.
481
- * @param text The edit to insert before the range.
482
- */
483
- insertTextBeforeRange(range: SourceRange$1, text: string): RuleTextEdit$1;
484
- /**
485
- * Removes the specified node or token.
486
- * @param syntaxElement A syntax element with location information to remove.
487
- * @returns The edit to remove the node or token.
488
- */
489
- remove(syntaxElement: EditableSyntaxElement): RuleTextEdit$1;
490
- /**
491
- * Removes the specified range.
492
- * @param range The range to remove.
493
- * @returns The edit to remove the range.
494
- */
495
- removeRange(range: SourceRange$1): RuleTextEdit$1;
496
- /**
497
- * Replaces the specified node or token with the given text.
498
- * @param syntaxElement A syntax element with location information to replace.
499
- * @param text The text to replace the node or token with.
500
- * @returns The edit to replace the node or token.
501
- */
502
- replaceText(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit$1;
503
- /**
504
- * Replaces the specified range with the given text.
505
- * @param range The range to replace.
506
- * @param text The text to replace the range with.
507
- * @returns The edit to replace the range.
508
- */
509
- replaceTextRange(range: SourceRange$1, text: string): RuleTextEdit$1;
510
- }
511
- /**
512
- * Represents a fix for a rule violation implemented as a text edit.
513
- */
514
- interface RuleTextEdit$1 {
515
- /**
516
- * The range to replace.
517
- */
518
- range: SourceRange$1;
519
- /**
520
- * The text to insert.
521
- */
522
- text: string;
523
- }
524
- /**
525
- * Fixes a violation.
526
- * @param fixer The text editor to apply the fix.
527
- * @returns The fix(es) for the violation.
528
- */
529
- type RuleFixer$1 = (fixer: RuleTextEditor$1) => RuleTextEdit$1 | Iterable<RuleTextEdit$1> | null;
530
- /**
531
- * Data that can be used to fill placeholders in error messages.
532
- */
533
- type MessagePlaceholderData$1 = Record<string, string | number | boolean | bigint | null | undefined>;
534
- interface ViolationReportBase$1<MessageIds extends string = string> {
535
- /**
536
- * The data to insert into the message.
537
- */
538
- data?: MessagePlaceholderData$1 | undefined;
539
- /**
540
- * The fix to be applied for the violation.
541
- */
542
- fix?: RuleFixer$1 | null | undefined;
543
- /**
544
- * An array of suggested fixes for the problem. These fixes may change the
545
- * behavior of the code, so they are not applied automatically.
546
- */
547
- suggest?: SuggestedEdit$1<MessageIds>[] | null | undefined;
548
- }
549
- type ViolationMessage$1<MessageIds extends string = string> = {
550
- message: string;
551
- } | {
552
- messageId: MessageIds;
553
- };
554
- type ViolationLocation$1<Node> = {
555
- loc: SourceLocation$3 | Position$2;
556
- } | {
557
- node: Node;
558
- };
559
- type ViolationReport$1<Node = unknown, MessageIds extends string = string> = ViolationReportBase$1<MessageIds> & ViolationMessage$1<MessageIds> & ViolationLocation$1<Node>;
560
- interface SuggestedEditBase$1 {
561
- /**
562
- * The data to insert into the message.
563
- */
564
- data?: MessagePlaceholderData$1 | undefined;
565
- /**
566
- * The fix to be applied for the suggestion.
567
- */
568
- fix: RuleFixer$1;
569
- }
570
- type SuggestionMessage$1<MessageIds extends string = string> = {
571
- desc: string;
572
- } | {
573
- messageId: MessageIds;
574
- };
575
- /**
576
- * A suggested edit for a rule violation.
577
- */
578
- type SuggestedEdit$1<MessageIds extends string = string> = SuggestedEditBase$1 & SuggestionMessage$1<MessageIds>;
579
- /**
580
- * The normalized version of a lint suggestion.
581
- */
582
- interface LintSuggestion$1 {
583
- /** A short description. */
584
- desc: string;
585
- /** Fix result info. */
586
- fix: RuleTextEdit$1;
587
- /** Id referencing a message for the description. */
588
- messageId?: string | undefined;
589
- }
590
- /**
591
- * The normalized version of a lint violation message.
592
- */
593
- interface LintMessage$2 {
594
- /** The 1-based column number. */
595
- column: number;
596
- /** The 1-based line number. */
597
- line: number;
598
- /** The 1-based column number of the end location. */
599
- endColumn?: number | undefined;
600
- /** The 1-based line number of the end location. */
601
- endLine?: number | undefined;
602
- /** The ID of the rule which makes this message. */
603
- ruleId: string | null;
604
- /** The reported message. */
605
- message: string;
606
- /** The ID of the message in the rule's meta. */
607
- messageId?: string | undefined;
608
- /** If `true` then this is a fatal error. */
609
- fatal?: true | undefined;
610
- /** The severity of this message. */
611
- severity: Exclude<SeverityLevel$1, 0>;
612
- /** Information for autofix. */
613
- fix?: RuleTextEdit$1 | undefined;
614
- /** Information for suggestions. */
615
- suggestions?: LintSuggestion$1[] | undefined;
616
- }
617
- /**
618
- * Generic options for the `RuleDefinition` type.
619
- */
620
- interface RuleDefinitionTypeOptions$1 {
621
- LangOptions: LanguageOptions$1;
622
- Code: SourceCode$2;
623
- RuleOptions: unknown[];
624
- Visitor: RuleVisitor$2;
625
- Node: unknown;
626
- MessageIds: string;
627
- ExtRuleDocs: unknown;
628
- }
629
- /**
630
- * The definition of an ESLint rule.
631
- */
632
- interface RuleDefinition$1<Options extends RuleDefinitionTypeOptions$1 = RuleDefinitionTypeOptions$1> {
633
- /**
634
- * The meta information for the rule.
635
- */
636
- meta?: RulesMeta$1<Options["MessageIds"], Options["RuleOptions"], Options["ExtRuleDocs"]>;
637
- /**
638
- * Creates the visitor that ESLint uses to apply the rule during traversal.
639
- * @param context The rule context.
640
- * @returns The rule visitor.
641
- */
642
- create(context: RuleContext$2<{
643
- LangOptions: Options["LangOptions"];
644
- Code: Options["Code"];
645
- RuleOptions: Options["RuleOptions"];
646
- Node: Options["Node"];
647
- MessageIds: Options["MessageIds"];
648
- }>): Options["Visitor"];
649
- }
650
- /**
651
- * The human readable severity level used in a configuration.
652
- */
653
- type SeverityName$1 = "off" | "warn" | "error";
654
- /**
655
- * The numeric severity level for a rule.
656
- *
657
- * - `0` means off.
658
- * - `1` means warn.
659
- * - `2` means error.
660
- */
661
- type SeverityLevel$1 = 0 | 1 | 2;
662
- /**
663
- * The severity of a rule in a configuration.
664
- */
665
- type Severity$1 = SeverityName$1 | SeverityLevel$1;
666
- /**
667
- * Represents the metadata for an object, such as a plugin or processor.
668
- */
669
- interface ObjectMetaProperties$1 {
670
- /** @deprecated Use `meta.name` instead. */
671
- name?: string | undefined;
672
- /** @deprecated Use `meta.version` instead. */
673
- version?: string | undefined;
674
- meta?: {
675
- name?: string | undefined;
676
- version?: string | undefined;
677
- };
678
- }
679
- /**
680
- * Represents the configuration options for the core linter.
681
- */
682
- interface LinterOptionsConfig$1 {
683
- /**
684
- * Indicates whether or not inline configuration is evaluated.
685
- */
686
- noInlineConfig?: boolean;
687
- /**
688
- * Indicates what to do when an unused disable directive is found.
689
- */
690
- reportUnusedDisableDirectives?: boolean | Severity$1;
691
- /**
692
- * A severity value indicating if and how unused inline configs should be
693
- * tracked and reported.
694
- */
695
- reportUnusedInlineConfigs?: Severity$1;
696
- }
697
- /**
698
- * The configuration for a rule.
699
- */
700
- type RuleConfig$1<RuleOptions extends unknown[] = unknown[]> = Severity$1 | [Severity$1, ...Partial<RuleOptions>];
701
- /**
702
- * A collection of rules and their configurations.
703
- */
704
- interface RulesConfig$1 {
705
- [key: string]: RuleConfig$1;
706
- }
707
- /**
708
- * A collection of settings.
709
- */
710
- interface SettingsConfig$1 {
711
- [key: string]: unknown;
712
- }
713
- /**
714
- * The configuration for a set of files.
715
- */
716
- interface ConfigObject$1<Rules extends RulesConfig$1 = RulesConfig$1> {
717
- /**
718
- * A string to identify the configuration object. Used in error messages and
719
- * inspection tools.
720
- */
721
- name?: string;
722
- /**
723
- * Path to the directory where the configuration object should apply.
724
- * `files` and `ignores` patterns in the configuration object are
725
- * interpreted as relative to this path.
726
- */
727
- basePath?: string;
728
- /**
729
- * An array of glob patterns indicating the files that the configuration
730
- * object should apply to. If not specified, the configuration object applies
731
- * to all files
732
- */
733
- files?: (string | string[])[];
734
- /**
735
- * An array of glob patterns indicating the files that the configuration
736
- * object should not apply to. If not specified, the configuration object
737
- * applies to all files matched by files
738
- */
739
- ignores?: string[];
740
- /**
741
- * The name of the language used for linting. This is used to determine the
742
- * parser and other language-specific settings.
743
- * @since 9.7.0
744
- */
745
- language?: string;
746
- /**
747
- * An object containing settings related to how the language is configured for
748
- * linting.
749
- */
750
- languageOptions?: LanguageOptions$1;
751
- /**
752
- * An object containing settings related to the linting process
753
- */
754
- linterOptions?: LinterOptionsConfig$1;
755
- /**
756
- * Either an object containing preprocess() and postprocess() methods or a
757
- * string indicating the name of a processor inside of a plugin
758
- * (i.e., "pluginName/processorName").
759
- */
760
- processor?: string | Processor$1;
761
- /**
762
- * An object containing a name-value mapping of plugin names to plugin objects.
763
- * When files is specified, these plugins are only available to the matching files.
764
- */
765
- plugins?: Record<string, Plugin$3>;
766
- /**
767
- * An object containing the configured rules. When files or ignores are specified,
768
- * these rule configurations are only available to the matching files.
769
- */
770
- rules?: Partial<Rules>;
771
- /**
772
- * An object containing name-value pairs of information that should be
773
- * available to all rules.
774
- */
775
- settings?: SettingsConfig$1;
776
- }
777
- /** @deprecated Only supported in legacy eslintrc config format. */
778
- type GlobalAccess$1 = boolean | "off" | "readable" | "readonly" | "writable" | "writeable";
779
- /** @deprecated Only supported in legacy eslintrc config format. */
780
- interface GlobalsConfig$1 {
781
- [name: string]: GlobalAccess$1;
782
- }
783
- /**
784
- * The ECMAScript version of the code being linted.
785
- * @deprecated Only supported in legacy eslintrc config format.
786
- */
787
- type EcmaVersion$2 = 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";
788
- /**
789
- * The type of JavaScript source code.
790
- * @deprecated Only supported in legacy eslintrc config format.
791
- */
792
- type JavaScriptSourceType$1 = "script" | "module" | "commonjs";
793
- /**
794
- * Parser options.
795
- * @deprecated Only supported in legacy eslintrc config format.
796
- * @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options#specifying-parser-options)
797
- */
798
- interface JavaScriptParserOptionsConfig$1 {
799
- /**
800
- * Allow the use of reserved words as identifiers (if `ecmaVersion` is 3).
801
- *
802
- * @default false
803
- */
804
- allowReserved?: boolean | undefined;
805
- /**
806
- * Accepts any valid ECMAScript version number or `'latest'`:
807
- *
808
- * - A version: es3, es5, es6, es7, es8, es9, es10, es11, es12, es13, es14, ..., or
809
- * - A year: es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, ..., or
810
- * - `'latest'`
811
- *
812
- * When it's a version or a year, the value must be a number - so do not include the `es` prefix.
813
- *
814
- * 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
815
- *
816
- * @default 5
817
- */
818
- ecmaVersion?: EcmaVersion$2 | undefined;
819
- /**
820
- * The type of JavaScript source code. Possible values are "script" for
821
- * traditional script files, "module" for ECMAScript modules (ESM), and
822
- * "commonjs" for CommonJS files.
823
- *
824
- * @default 'script'
825
- *
826
- * @see https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options
827
- */
828
- sourceType?: JavaScriptSourceType$1 | undefined;
829
- /**
830
- * An object indicating which additional language features you'd like to use.
831
- *
832
- * @see https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options
833
- */
834
- ecmaFeatures?: {
835
- globalReturn?: boolean | undefined;
836
- impliedStrict?: boolean | undefined;
837
- jsx?: boolean | undefined;
838
- [key: string]: any;
839
- } | undefined;
840
- [key: string]: any;
841
- }
842
- /** @deprecated Only supported in legacy eslintrc config format. */
843
- interface EnvironmentConfig$1 {
844
- /** The definition of global variables. */
845
- globals?: GlobalsConfig$1 | undefined;
846
- /** The parser options that will be enabled under this environment. */
847
- parserOptions?: JavaScriptParserOptionsConfig$1 | undefined;
848
- }
849
- /**
850
- * A configuration object that may have a `rules` block.
851
- */
852
- interface HasRules$1<Rules extends RulesConfig$1 = RulesConfig$1> {
853
- rules?: Partial<Rules> | undefined;
854
- }
855
- /**
856
- * ESLint legacy configuration.
857
- *
858
- * @see [ESLint Legacy Configuration](https://eslint.org/docs/latest/use/configure/)
859
- */
860
- interface BaseConfig$1<Rules extends RulesConfig$1 = RulesConfig$1, OverrideRules extends RulesConfig$1 = Rules> extends HasRules$1<Rules> {
861
- $schema?: string | undefined;
862
- /**
863
- * An environment provides predefined global variables.
864
- *
865
- * @see [Environments](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-environments)
866
- */
867
- env?: {
868
- [name: string]: boolean;
869
- } | undefined;
870
- /**
871
- * Extending configuration files.
872
- *
873
- * @see [Extends](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#extending-configuration-files)
874
- */
875
- extends?: string | string[] | undefined;
876
- /**
877
- * Specifying globals.
878
- *
879
- * @see [Globals](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-globals)
880
- */
881
- globals?: GlobalsConfig$1 | undefined;
882
- /**
883
- * Disable processing of inline comments.
884
- *
885
- * @see [Disabling Inline Comments](https://eslint.org/docs/latest/use/configure/rules-deprecated#disabling-inline-comments)
886
- */
887
- noInlineConfig?: boolean | undefined;
888
- /**
889
- * Overrides can be used to use a differing configuration for matching sub-directories and files.
890
- *
891
- * @see [How do overrides work](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#how-do-overrides-work)
892
- */
893
- overrides?: ConfigOverride$1<OverrideRules>[] | undefined;
894
- /**
895
- * Parser.
896
- *
897
- * @see [Working with Custom Parsers](https://eslint.org/docs/latest/extend/custom-parsers)
898
- * @see [Specifying Parser](https://eslint.org/docs/latest/use/configure/parser-deprecated)
899
- */
900
- parser?: string | undefined;
901
- /**
902
- * Parser options.
903
- *
904
- * @see [Working with Custom Parsers](https://eslint.org/docs/latest/extend/custom-parsers)
905
- * @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options)
906
- */
907
- parserOptions?: JavaScriptParserOptionsConfig$1 | undefined;
908
- /**
909
- * Which third-party plugins define additional rules, environments, configs, etc. for ESLint to use.
910
- *
911
- * @see [Configuring Plugins](https://eslint.org/docs/latest/use/configure/plugins-deprecated#configure-plugins)
912
- */
913
- plugins?: string[] | undefined;
914
- /**
915
- * Specifying processor.
916
- *
917
- * @see [processor](https://eslint.org/docs/latest/use/configure/plugins-deprecated#specify-a-processor)
918
- */
919
- processor?: string | undefined;
920
- /**
921
- * Report unused eslint-disable comments as warning.
922
- *
923
- * @see [Report unused eslint-disable comments](https://eslint.org/docs/latest/use/configure/rules-deprecated#report-unused-eslint-disable-comments)
924
- */
925
- reportUnusedDisableDirectives?: boolean | undefined;
926
- /**
927
- * Settings.
928
- *
929
- * @see [Settings](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#adding-shared-settings)
930
- */
931
- settings?: SettingsConfig$1 | undefined;
932
- }
933
- /**
934
- * The overwrites that apply more differing configuration to specific files or directories.
935
- */
936
- interface ConfigOverride$1<Rules extends RulesConfig$1 = RulesConfig$1> extends BaseConfig$1<Rules> {
937
- /**
938
- * The glob patterns for excluded files.
939
- */
940
- excludedFiles?: string | string[] | undefined;
941
- /**
942
- * The glob patterns for target files.
943
- */
944
- files: string | string[];
945
- }
946
- /**
947
- * ESLint legacy configuration.
948
- *
949
- * @see [ESLint Legacy Configuration](https://eslint.org/docs/latest/use/configure/)
950
- */
951
- interface LegacyConfigObject$1<Rules extends RulesConfig$1 = RulesConfig$1, OverrideRules extends RulesConfig$1 = Rules> extends BaseConfig$1<Rules, OverrideRules> {
952
- /**
953
- * Tell ESLint to ignore specific files and directories.
954
- *
955
- * @see [Ignore Patterns](https://eslint.org/docs/latest/use/configure/ignore-deprecated#ignorepatterns-in-config-files)
956
- */
957
- ignorePatterns?: string | string[] | undefined;
958
- /**
959
- * @see [Using Configuration Files](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#using-configuration-files)
960
- */
961
- root?: boolean | undefined;
962
- }
963
- /**
964
- * File information passed to a processor.
965
- */
966
- interface ProcessorFile$2 {
967
- text: string;
968
- filename: string;
969
- }
970
- /**
971
- * A processor is an object that can preprocess and postprocess files.
972
- */
973
- interface Processor$1<T extends string | ProcessorFile$2 = string | ProcessorFile$2> extends ObjectMetaProperties$1 {
974
- /** If `true` then it means the processor supports autofix. */
975
- supportsAutofix?: boolean | undefined;
976
- /** The function to extract code blocks. */
977
- preprocess?(text: string, filename: string): T[];
978
- /** The function to merge messages. */
979
- postprocess?(messages: LintMessage$2[][], filename: string): LintMessage$2[];
980
- }
981
- interface Plugin$3 extends ObjectMetaProperties$1 {
982
- meta?: ObjectMetaProperties$1["meta"] & {
983
- namespace?: string | undefined;
984
- };
985
- configs?: Record<string, LegacyConfigObject$1 | ConfigObject$1 | ConfigObject$1[]> | undefined;
986
- environments?: Record<string, EnvironmentConfig$1> | undefined;
987
- languages?: Record<string, Language$1> | undefined;
988
- processors?: Record<string, Processor$1> | undefined;
989
- rules?: Record<string, RuleDefinition$1> | undefined;
990
- }
991
- /**
992
- * Generic options for the `Language` type.
993
- */
994
- interface LanguageTypeOptions$1 {
995
- LangOptions: LanguageOptions$1;
996
- Code: SourceCode$2;
997
- RootNode: unknown;
998
- Node: unknown;
999
- }
1000
- /**
1001
- * Represents a plugin language.
1002
- */
1003
- interface Language$1<Options extends LanguageTypeOptions$1 = {
1004
- LangOptions: LanguageOptions$1;
1005
- Code: SourceCode$2;
1006
- RootNode: unknown;
1007
- Node: unknown;
1008
- }> {
1009
- /**
1010
- * Indicates how ESLint should read the file.
1011
- */
1012
- fileType: "text";
1013
- /**
1014
- * First line number returned from the parser (text mode only).
1015
- */
1016
- lineStart: 0 | 1;
1017
- /**
1018
- * First column number returned from the parser (text mode only).
1019
- */
1020
- columnStart: 0 | 1;
1021
- /**
1022
- * The property to read the node type from. Used in selector querying.
1023
- */
1024
- nodeTypeKey: string;
1025
- /**
1026
- * The traversal path that tools should take when evaluating the AST
1027
- */
1028
- visitorKeys?: Record<string, string[]>;
1029
- /**
1030
- * Default language options. User-defined options are merged with this object.
1031
- */
1032
- defaultLanguageOptions?: LanguageOptions$1;
1033
- /**
1034
- * Validates languageOptions for this language.
1035
- */
1036
- validateLanguageOptions(languageOptions: Options["LangOptions"]): void;
1037
- /**
1038
- * Normalizes languageOptions for this language.
1039
- */
1040
- normalizeLanguageOptions?(languageOptions: Options["LangOptions"]): Options["LangOptions"];
1041
- /**
1042
- * Helper for esquery that allows languages to match nodes against
1043
- * class. esquery currently has classes like `function` that will
1044
- * match all the various function nodes. This method allows languages
1045
- * to implement similar shorthands.
1046
- */
1047
- matchesSelectorClass?(className: string, node: Options["Node"], ancestry: Options["Node"][]): boolean;
1048
- /**
1049
- * Parses the given file input into its component parts. This file should not
1050
- * throws errors for parsing errors but rather should return any parsing
1051
- * errors as parse of the ParseResult object.
1052
- */
1053
- parse(file: File$1, context: LanguageContext$1<Options["LangOptions"]>): ParseResult$1<Options["RootNode"]>;
1054
- /**
1055
- * Creates SourceCode object that ESLint uses to work with a file.
1056
- */
1057
- createSourceCode(file: File$1, input: OkParseResult$1<Options["RootNode"]>, context: LanguageContext$1<Options["LangOptions"]>): Options["Code"];
1058
- }
1059
- /**
1060
- * Plugin-defined options for the language.
1061
- */
1062
- type LanguageOptions$1 = Record<string, unknown>;
1063
- /**
1064
- * The context object that is passed to the language plugin methods.
1065
- */
1066
- interface LanguageContext$1<LangOptions = LanguageOptions$1> {
1067
- languageOptions: LangOptions;
1068
- }
1069
- /**
1070
- * Represents a file read by ESLint.
1071
- */
1072
- interface File$1 {
1073
- /**
1074
- * The path that ESLint uses for this file. May be a virtual path
1075
- * if it was returned by a processor.
1076
- */
1077
- path: string;
1078
- /**
1079
- * The path to the file on disk. This always maps directly to a file
1080
- * regardless of whether it was returned from a processor.
1081
- */
1082
- physicalPath: string;
1083
- /**
1084
- * Indicates if the original source contained a byte-order marker.
1085
- * ESLint strips the BOM from the `body`, but this info is needed
1086
- * to correctly apply autofixing.
1087
- */
1088
- bom: boolean;
1089
- /**
1090
- * The body of the file to parse.
1091
- */
1092
- body: string | Uint8Array;
1093
- }
1094
- /**
1095
- * Represents the successful result of parsing a file.
1096
- */
1097
- interface OkParseResult$1<RootNode = unknown> {
1098
- /**
1099
- * Indicates if the parse was successful. If true, the parse was successful
1100
- * and ESLint should continue on to create a SourceCode object and run rules;
1101
- * if false, ESLint should just report the error(s) without doing anything
1102
- * else.
1103
- */
1104
- ok: true;
1105
- /**
1106
- * The abstract syntax tree created by the parser. (only when ok: true)
1107
- */
1108
- ast: RootNode;
1109
- /**
1110
- * Any additional data that the parser wants to provide.
1111
- */
1112
- [key: string]: any;
1113
- }
1114
- /**
1115
- * Represents the unsuccessful result of parsing a file.
1116
- */
1117
- interface NotOkParseResult$1 {
1118
- /**
1119
- * Indicates if the parse was successful. If true, the parse was successful
1120
- * and ESLint should continue on to create a SourceCode object and run rules;
1121
- * if false, ESLint should just report the error(s) without doing anything
1122
- * else.
1123
- */
1124
- ok: false;
1125
- /**
1126
- * Any parsing errors, whether fatal or not. (only when ok: false)
1127
- */
1128
- errors: FileError$1[];
1129
- /**
1130
- * Any additional data that the parser wants to provide.
1131
- */
1132
- [key: string]: any;
1133
- }
1134
- type ParseResult$1<RootNode = unknown> = OkParseResult$1<RootNode> | NotOkParseResult$1;
1135
- /**
1136
- * Represents inline configuration found in the source code.
1137
- */
1138
- interface InlineConfigElement$1 {
1139
- /**
1140
- * The location of the inline config element.
1141
- */
1142
- loc: SourceLocation$3;
1143
- /**
1144
- * The interpreted configuration from the inline config element.
1145
- */
1146
- config: {
1147
- rules: RulesConfig$1;
1148
- };
1149
- }
1150
- /**
1151
- * Generic options for the `SourceCodeBase` type.
1152
- */
1153
- interface SourceCodeBaseTypeOptions$1 {
1154
- LangOptions: LanguageOptions$1;
1155
- RootNode: unknown;
1156
- SyntaxElementWithLoc: unknown;
1157
- ConfigNode: unknown;
1158
- }
1159
- /**
1160
- * Represents the basic interface for a source code object.
1161
- */
1162
- interface SourceCodeBase$1<Options extends SourceCodeBaseTypeOptions$1 = {
1163
- LangOptions: LanguageOptions$1;
1164
- RootNode: unknown;
1165
- SyntaxElementWithLoc: unknown;
1166
- ConfigNode: unknown;
1167
- }> {
1168
- /**
1169
- * Root of the AST.
1170
- */
1171
- ast: Options["RootNode"];
1172
- /**
1173
- * The traversal path that tools should take when evaluating the AST.
1174
- * When present, this overrides the `visitorKeys` on the language for
1175
- * just this source code object.
1176
- */
1177
- visitorKeys?: Record<string, string[]>;
1178
- /**
1179
- * Retrieves the equivalent of `loc` for a given node or token.
1180
- * @param syntaxElement The node or token to get the location for.
1181
- * @returns The location of the node or token.
1182
- */
1183
- getLoc(syntaxElement: Options["SyntaxElementWithLoc"]): SourceLocation$3;
1184
- /**
1185
- * Retrieves the equivalent of `range` for a given node or token.
1186
- * @param syntaxElement The node or token to get the range for.
1187
- * @returns The range of the node or token.
1188
- */
1189
- getRange(syntaxElement: Options["SyntaxElementWithLoc"]): SourceRange$1;
1190
- /**
1191
- * Traversal of AST.
1192
- */
1193
- traverse(): Iterable<TraversalStep$1>;
1194
- /**
1195
- * Applies language options passed in from the ESLint core.
1196
- */
1197
- applyLanguageOptions?(languageOptions: Options["LangOptions"]): void;
1198
- /**
1199
- * Return all of the inline areas where ESLint should be disabled/enabled
1200
- * along with any problems found in evaluating the directives.
1201
- */
1202
- getDisableDirectives?(): {
1203
- directives: Directive$2[];
1204
- problems: FileProblem$1[];
1205
- };
1206
- /**
1207
- * Returns an array of all inline configuration nodes found in the
1208
- * source code.
1209
- */
1210
- getInlineConfigNodes?(): Options["ConfigNode"][];
1211
- /**
1212
- * Applies configuration found inside of the source code. This method is only
1213
- * called when ESLint is running with inline configuration allowed.
1214
- */
1215
- applyInlineConfig?(): {
1216
- configs: InlineConfigElement$1[];
1217
- problems: FileProblem$1[];
1218
- };
1219
- /**
1220
- * Called by ESLint core to indicate that it has finished providing
1221
- * information. We now add in all the missing variables and ensure that
1222
- * state-changing methods cannot be called by rules.
1223
- * @returns {void}
1224
- */
1225
- finalize?(): void;
1226
- }
1227
- /**
1228
- * Represents the source of a text file being linted.
1229
- */
1230
- interface TextSourceCode$1<Options extends SourceCodeBaseTypeOptions$1 = {
1231
- LangOptions: LanguageOptions$1;
1232
- RootNode: unknown;
1233
- SyntaxElementWithLoc: unknown;
1234
- ConfigNode: unknown;
1235
- }> extends SourceCodeBase$1<Options> {
1236
- /**
1237
- * The body of the file that you'd like rule developers to access.
1238
- */
1239
- text: string;
1240
- }
1241
- /**
1242
- * Represents the source of a binary file being linted.
1243
- */
1244
- interface BinarySourceCode$1<Options extends SourceCodeBaseTypeOptions$1 = {
1245
- LangOptions: LanguageOptions$1;
1246
- RootNode: unknown;
1247
- SyntaxElementWithLoc: unknown;
1248
- ConfigNode: unknown;
1249
- }> extends SourceCodeBase$1<Options> {
1250
- /**
1251
- * The body of the file that you'd like rule developers to access.
1252
- */
1253
- body: Uint8Array;
1254
- }
1255
- type SourceCode$2<Options extends SourceCodeBaseTypeOptions$1 = {
1256
- LangOptions: LanguageOptions$1;
1257
- RootNode: unknown;
1258
- SyntaxElementWithLoc: unknown;
1259
- ConfigNode: unknown;
1260
- }> = TextSourceCode$1<Options> | BinarySourceCode$1<Options>;
1261
- /**
1262
- * Represents a traversal step visiting the AST.
1263
- */
1264
- interface VisitTraversalStep$1 {
1265
- kind: 1;
1266
- target: unknown;
1267
- phase: 1 | 2;
1268
- args: unknown[];
1269
- }
1270
- /**
1271
- * Represents a traversal step calling a function.
1272
- */
1273
- interface CallTraversalStep$1 {
1274
- kind: 2;
1275
- target: string;
1276
- phase?: string;
1277
- args: unknown[];
1278
- }
1279
- type TraversalStep$1 = VisitTraversalStep$1 | CallTraversalStep$1;
1280
- /**
1281
- * The type of disable directive. This determines how ESLint will disable rules.
1282
- */
1283
- type DirectiveType$1 = "disable" | "enable" | "disable-line" | "disable-next-line";
1284
- /**
1285
- * Represents a disable directive.
1286
- */
1287
- interface Directive$2 {
1288
- /**
1289
- * The type of directive.
1290
- */
1291
- type: DirectiveType$1;
1292
- /**
1293
- * The node of the directive. May be in the AST or a comment/token.
1294
- */
1295
- node: unknown;
1296
- /**
1297
- * The value of the directive.
1298
- */
1299
- value: string;
1300
- /**
1301
- * The justification for the directive.
1302
- */
1303
- justification?: string;
1304
- }
1305
- //#endregion
1306
- //#region ../../node_modules/.pnpm/@eslint+config-helpers@0.5.3/node_modules/@eslint/config-helpers/dist/esm/types.d.ts
1307
- /**
1308
- * Infinite array type.
1309
- */
1310
- type InfiniteArray<T> = T | InfiniteArray<T>[];
1311
- /**
1312
- * A config object that may appear inside of `extends`.
1313
- * `basePath` and nested `extends` are not allowed on extension config objects.
1314
- */
1315
- type ExtensionConfigObject = Omit<ConfigObject$1, "basePath"> & {
1316
- extends?: never;
1317
- };
1318
- /**
1319
- * The type of array element in the `extends` property after flattening.
1320
- */
1321
- type SimpleExtendsElement = string | ExtensionConfigObject;
1322
- /**
1323
- * The type of array element in the `extends` property before flattening.
1324
- */
1325
- type ExtendsElement = SimpleExtendsElement | InfiniteArray<ExtensionConfigObject>;
1326
- /**
1327
- * Config with extends. Valid only inside of `defineConfig()`.
1328
- */
1329
- interface ConfigWithExtends$1 extends ConfigObject$1 {
1330
- extends?: ExtendsElement[];
1331
- }
1332
- //#endregion
1333
- //#region ../../node_modules/.pnpm/@eslint+config-helpers@0.5.3/node_modules/@eslint/config-helpers/dist/esm/index.d.ts
1334
- type Plugin$2 = Plugin$3;
1335
- type ConfigWithExtends = ConfigWithExtends$1;
1336
- //#endregion
1337
- //#region ../../node_modules/.pnpm/@types+estree@1.0.8/node_modules/@types/estree/index.d.ts
9
+ //#region ../../node_modules/.pnpm/@types+estree@1.0.9/node_modules/@types/estree/index.d.ts
1338
10
  // This definition file follows a somewhat unusual format. ESTree allows
1339
11
  // runtime type checks based on the `type` parameter. In order to explain this
1340
12
  // to typescript we want to use discriminated union types:
@@ -1584,7 +256,7 @@ interface PrivateIdentifier extends BaseNode {
1584
256
  }
1585
257
  interface Property extends BaseNode {
1586
258
  type: "Property";
1587
- key: Expression | PrivateIdentifier;
259
+ key: Expression;
1588
260
  value: Expression | Pattern; // Could be an AssignmentProperty
1589
261
  kind: "init" | "get" | "set";
1590
262
  method: boolean;
@@ -1858,7 +530,206 @@ interface AwaitExpression extends BaseExpression {
1858
530
  argument: Expression;
1859
531
  }
1860
532
  //#endregion
1861
- //#region ../../node_modules/.pnpm/@eslint+core@1.2.1/node_modules/@eslint/core/dist/esm/types.d.ts
533
+ //#region ../../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts
534
+ // ==================================================================================================
535
+ // JSON Schema Draft 04
536
+ // ==================================================================================================
537
+ /**
538
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
539
+ */
540
+ type JSONSchema4TypeName = "string" //
541
+ | "number" | "integer" | "boolean" | "object" | "array" | "null" | "any";
542
+ /**
543
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5
544
+ */
545
+ type JSONSchema4Type = string //
546
+ | number | boolean | JSONSchema4Object | JSONSchema4Array | null;
547
+ // Workaround for infinite type recursion
548
+ interface JSONSchema4Object {
549
+ [key: string]: JSONSchema4Type;
550
+ }
551
+ // Workaround for infinite type recursion
552
+ // https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
553
+ interface JSONSchema4Array extends Array<JSONSchema4Type> {}
554
+ /**
555
+ * Meta schema
556
+ *
557
+ * Recommended values:
558
+ * - 'http://json-schema.org/schema#'
559
+ * - 'http://json-schema.org/hyper-schema#'
560
+ * - 'http://json-schema.org/draft-04/schema#'
561
+ * - 'http://json-schema.org/draft-04/hyper-schema#'
562
+ * - 'http://json-schema.org/draft-03/schema#'
563
+ * - 'http://json-schema.org/draft-03/hyper-schema#'
564
+ *
565
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
566
+ */
567
+ type JSONSchema4Version = string;
568
+ /**
569
+ * JSON Schema V4
570
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-04
571
+ */
572
+ interface JSONSchema4 {
573
+ id?: string | undefined;
574
+ $ref?: string | undefined;
575
+ $schema?: JSONSchema4Version | undefined;
576
+ /**
577
+ * This attribute is a string that provides a short description of the
578
+ * instance property.
579
+ *
580
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21
581
+ */
582
+ title?: string | undefined;
583
+ /**
584
+ * This attribute is a string that provides a full description of the of
585
+ * purpose the instance property.
586
+ *
587
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22
588
+ */
589
+ description?: string | undefined;
590
+ default?: JSONSchema4Type | undefined;
591
+ multipleOf?: number | undefined;
592
+ maximum?: number | undefined;
593
+ exclusiveMaximum?: boolean | undefined;
594
+ minimum?: number | undefined;
595
+ exclusiveMinimum?: boolean | undefined;
596
+ maxLength?: number | undefined;
597
+ minLength?: number | undefined;
598
+ pattern?: string | undefined;
599
+ /**
600
+ * May only be defined when "items" is defined, and is a tuple of JSONSchemas.
601
+ *
602
+ * This provides a definition for additional items in an array instance
603
+ * when tuple definitions of the items is provided. This can be false
604
+ * to indicate additional items in the array are not allowed, or it can
605
+ * be a schema that defines the schema of the additional items.
606
+ *
607
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6
608
+ */
609
+ additionalItems?: boolean | JSONSchema4 | undefined;
610
+ /**
611
+ * This attribute defines the allowed items in an instance array, and
612
+ * MUST be a schema or an array of schemas. The default value is an
613
+ * empty schema which allows any value for items in the instance array.
614
+ *
615
+ * When this attribute value is a schema and the instance value is an
616
+ * array, then all the items in the array MUST be valid according to the
617
+ * schema.
618
+ *
619
+ * When this attribute value is an array of schemas and the instance
620
+ * value is an array, each position in the instance array MUST conform
621
+ * to the schema in the corresponding position for this array. This
622
+ * called tuple typing. When tuple typing is used, additional items are
623
+ * allowed, disallowed, or constrained by the "additionalItems"
624
+ * (Section 5.6) attribute using the same rules as
625
+ * "additionalProperties" (Section 5.4) for objects.
626
+ *
627
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5
628
+ */
629
+ items?: JSONSchema4 | JSONSchema4[] | undefined;
630
+ maxItems?: number | undefined;
631
+ minItems?: number | undefined;
632
+ uniqueItems?: boolean | undefined;
633
+ maxProperties?: number | undefined;
634
+ minProperties?: number | undefined;
635
+ /**
636
+ * This attribute indicates if the instance must have a value, and not
637
+ * be undefined. This is false by default, making the instance
638
+ * optional.
639
+ *
640
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7
641
+ */
642
+ required?: boolean | string[] | undefined;
643
+ /**
644
+ * This attribute defines a schema for all properties that are not
645
+ * explicitly defined in an object type definition. If specified, the
646
+ * value MUST be a schema or a boolean. If false is provided, no
647
+ * additional properties are allowed beyond the properties defined in
648
+ * the schema. The default value is an empty schema which allows any
649
+ * value for additional properties.
650
+ *
651
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4
652
+ */
653
+ additionalProperties?: boolean | JSONSchema4 | undefined;
654
+ definitions?: {
655
+ [k: string]: JSONSchema4;
656
+ } | undefined;
657
+ /**
658
+ * This attribute is an object with property definitions that define the
659
+ * valid values of instance object property values. When the instance
660
+ * value is an object, the property values of the instance object MUST
661
+ * conform to the property definitions in this object. In this object,
662
+ * each property definition's value MUST be a schema, and the property's
663
+ * name MUST be the name of the instance property that it defines. The
664
+ * instance property value MUST be valid according to the schema from
665
+ * the property definition. Properties are considered unordered, the
666
+ * order of the instance properties MAY be in any order.
667
+ *
668
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2
669
+ */
670
+ properties?: {
671
+ [k: string]: JSONSchema4;
672
+ } | undefined;
673
+ /**
674
+ * This attribute is an object that defines the schema for a set of
675
+ * property names of an object instance. The name of each property of
676
+ * this attribute's object is a regular expression pattern in the ECMA
677
+ * 262/Perl 5 format, while the value is a schema. If the pattern
678
+ * matches the name of a property on the instance object, the value of
679
+ * the instance's property MUST be valid against the pattern name's
680
+ * schema value.
681
+ *
682
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3
683
+ */
684
+ patternProperties?: {
685
+ [k: string]: JSONSchema4;
686
+ } | undefined;
687
+ dependencies?: {
688
+ [k: string]: JSONSchema4 | string[];
689
+ } | undefined;
690
+ /**
691
+ * This provides an enumeration of all possible values that are valid
692
+ * for the instance property. This MUST be an array, and each item in
693
+ * the array represents a possible value for the instance value. If
694
+ * this attribute is defined, the instance value MUST be one of the
695
+ * values in the array in order for the schema to be valid.
696
+ *
697
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
698
+ */
699
+ enum?: JSONSchema4Type[] | undefined;
700
+ /**
701
+ * A single type, or a union of simple types
702
+ */
703
+ type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined;
704
+ allOf?: JSONSchema4[] | undefined;
705
+ anyOf?: JSONSchema4[] | undefined;
706
+ oneOf?: JSONSchema4[] | undefined;
707
+ not?: JSONSchema4 | undefined;
708
+ /**
709
+ * The value of this property MUST be another schema which will provide
710
+ * a base schema which the current schema will inherit from. The
711
+ * inheritance rules are such that any instance that is valid according
712
+ * to the current schema MUST be valid according to the referenced
713
+ * schema. This MAY also be an array, in which case, the instance MUST
714
+ * be valid for all the schemas in the array. A schema that extends
715
+ * another schema MAY define additional attributes, constrain existing
716
+ * attributes, or add other constraints.
717
+ *
718
+ * Conceptually, the behavior of extends can be seen as validating an
719
+ * instance against all constraints in the extending schema as well as
720
+ * the extended schema(s).
721
+ *
722
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26
723
+ */
724
+ extends?: string | string[] | undefined;
725
+ /**
726
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6
727
+ */
728
+ [k: string]: any;
729
+ format?: string | undefined;
730
+ }
731
+ //#endregion
732
+ //#region ../../node_modules/.pnpm/@eslint+core@0.17.0/node_modules/@eslint/core/dist/esm/types.d.ts
1862
733
  /**
1863
734
  * Represents an error inside of a file.
1864
735
  */
@@ -1914,7 +785,7 @@ type RuleFixType = "code" | "whitespace";
1914
785
  * name of a node type or a selector, or is a method that will be called at specific
1915
786
  * times during the traversal.
1916
787
  */
1917
- type RuleVisitor$1 = Record<string, ((...args: any[]) => void) | undefined>;
788
+ type RuleVisitor = Record<string, ((...args: any[]) => void) | undefined>;
1918
789
  /**
1919
790
  * Rule meta information used for documentation.
1920
791
  */
@@ -1927,6 +798,11 @@ interface RulesMetaDocs {
1927
798
  * The URL to the documentation for the rule.
1928
799
  */
1929
800
  url?: string | undefined;
801
+ /**
802
+ * The category the rule falls under.
803
+ * @deprecated No longer used.
804
+ */
805
+ category?: string | undefined;
1930
806
  /**
1931
807
  * Indicates if the rule is generally recommended for all users.
1932
808
  *
@@ -1937,12 +813,6 @@ interface RulesMetaDocs {
1937
813
  * Indicates if the rule is frozen (no longer accepting feature requests).
1938
814
  */
1939
815
  frozen?: boolean | undefined;
1940
- /**
1941
- * The dialects of the languages that the rule is intended to lint.
1942
- * @example
1943
- * ["JavaScript", "TypeScript"]
1944
- */
1945
- dialects?: string[] | undefined;
1946
816
  }
1947
817
  /**
1948
818
  * Meta information about a rule.
@@ -1987,21 +857,12 @@ interface RulesMeta<MessageIds extends string = string, RuleOptions = unknown[],
1987
857
  hasSuggestions?: boolean | undefined;
1988
858
  /**
1989
859
  * The language the rule is intended to lint.
1990
- * @deprecated Use `languages` instead.
1991
860
  */
1992
861
  language?: string;
1993
862
  /**
1994
863
  * The dialects of `language` that the rule is intended to lint.
1995
- * @deprecated Use `docs.dialects` instead.
1996
864
  */
1997
865
  dialects?: string[];
1998
- /**
1999
- * Languages supported by this rule in the format `"plugin/language"`.
2000
- * Use `"*"` for any language or `"plugin/*"` for any language from a specific plugin.
2001
- * @example
2002
- * ["js/js", "markdown/gfm", "json/jsonc", "css/css"]
2003
- */
2004
- languages?: string[] | undefined;
2005
866
  }
2006
867
  /**
2007
868
  * Provides additional metadata about a deprecation.
@@ -2088,26 +949,56 @@ interface RuleContext$1<Options extends RuleContextTypeOptions = RuleContextType
2088
949
  * The current working directory for the session.
2089
950
  */
2090
951
  cwd: string;
952
+ /**
953
+ * Returns the current working directory for the session.
954
+ * @deprecated Use `cwd` instead.
955
+ */
956
+ getCwd(): string;
2091
957
  /**
2092
958
  * The filename of the file being linted.
2093
959
  */
2094
960
  filename: string;
961
+ /**
962
+ * Returns the filename of the file being linted.
963
+ * @deprecated Use `filename` instead.
964
+ */
965
+ getFilename(): string;
2095
966
  /**
2096
967
  * The physical filename of the file being linted.
2097
968
  */
2098
969
  physicalFilename: string;
970
+ /**
971
+ * Returns the physical filename of the file being linted.
972
+ * @deprecated Use `physicalFilename` instead.
973
+ */
974
+ getPhysicalFilename(): string;
2099
975
  /**
2100
976
  * The source code object that the rule is running on.
2101
977
  */
2102
978
  sourceCode: Options["Code"];
979
+ /**
980
+ * Returns the source code object that the rule is running on.
981
+ * @deprecated Use `sourceCode` instead.
982
+ */
983
+ getSourceCode(): Options["Code"];
2103
984
  /**
2104
985
  * Shared settings for the configuration.
2105
986
  */
2106
987
  settings: SettingsConfig;
988
+ /**
989
+ * Parser-specific options for the configuration.
990
+ * @deprecated Use `languageOptions.parserOptions` instead.
991
+ */
992
+ parserOptions: Record<string, unknown>;
2107
993
  /**
2108
994
  * The language options for the configuration.
2109
995
  */
2110
996
  languageOptions: Options["LangOptions"];
997
+ /**
998
+ * The CommonJS path to the parser used while parsing this file.
999
+ * @deprecated No longer used.
1000
+ */
1001
+ parserPath: string | undefined;
2111
1002
  /**
2112
1003
  * The rule ID.
2113
1004
  */
@@ -2196,15 +1087,11 @@ interface RuleTextEdit {
2196
1087
  * @returns The fix(es) for the violation.
2197
1088
  */
2198
1089
  type RuleFixer = (fixer: RuleTextEditor) => RuleTextEdit | Iterable<RuleTextEdit> | null;
2199
- /**
2200
- * Data that can be used to fill placeholders in error messages.
2201
- */
2202
- type MessagePlaceholderData = Record<string, string | number | boolean | bigint | null | undefined>;
2203
- interface ViolationReportBase<MessageIds extends string = string> {
1090
+ interface ViolationReportBase {
2204
1091
  /**
2205
1092
  * The data to insert into the message.
2206
1093
  */
2207
- data?: MessagePlaceholderData | undefined;
1094
+ data?: Record<string, unknown> | undefined;
2208
1095
  /**
2209
1096
  * The fix to be applied for the violation.
2210
1097
  */
@@ -2213,9 +1100,9 @@ interface ViolationReportBase<MessageIds extends string = string> {
2213
1100
  * An array of suggested fixes for the problem. These fixes may change the
2214
1101
  * behavior of the code, so they are not applied automatically.
2215
1102
  */
2216
- suggest?: SuggestedEdit<MessageIds>[] | null | undefined;
1103
+ suggest?: SuggestedEdit[] | null | undefined;
2217
1104
  }
2218
- type ViolationMessage<MessageIds extends string = string> = {
1105
+ type ViolationMessage<MessageIds = string> = {
2219
1106
  message: string;
2220
1107
  } | {
2221
1108
  messageId: MessageIds;
@@ -2225,26 +1112,26 @@ type ViolationLocation<Node> = {
2225
1112
  } | {
2226
1113
  node: Node;
2227
1114
  };
2228
- type ViolationReport<Node = unknown, MessageIds extends string = string> = ViolationReportBase<MessageIds> & ViolationMessage<MessageIds> & ViolationLocation<Node>;
1115
+ type ViolationReport<Node = unknown, MessageIds = string> = ViolationReportBase & ViolationMessage<MessageIds> & ViolationLocation<Node>;
2229
1116
  interface SuggestedEditBase {
2230
1117
  /**
2231
1118
  * The data to insert into the message.
2232
1119
  */
2233
- data?: MessagePlaceholderData | undefined;
1120
+ data?: Record<string, unknown> | undefined;
2234
1121
  /**
2235
1122
  * The fix to be applied for the suggestion.
2236
1123
  */
2237
1124
  fix: RuleFixer;
2238
1125
  }
2239
- type SuggestionMessage<MessageIds extends string = string> = {
1126
+ type SuggestionMessage = {
2240
1127
  desc: string;
2241
1128
  } | {
2242
- messageId: MessageIds;
1129
+ messageId: string;
2243
1130
  };
2244
1131
  /**
2245
1132
  * A suggested edit for a rule violation.
2246
1133
  */
2247
- type SuggestedEdit<MessageIds extends string = string> = SuggestedEditBase & SuggestionMessage<MessageIds>;
1134
+ type SuggestedEdit = SuggestedEditBase & SuggestionMessage;
2248
1135
  /**
2249
1136
  * The normalized version of a lint suggestion.
2250
1137
  */
@@ -2274,6 +1161,11 @@ interface LintMessage$1 {
2274
1161
  message: string;
2275
1162
  /** The ID of the message in the rule's meta. */
2276
1163
  messageId?: string | undefined;
1164
+ /**
1165
+ * Type of node.
1166
+ * @deprecated `nodeType` is deprecated and will be removed in the next major version.
1167
+ */
1168
+ nodeType?: string | undefined;
2277
1169
  /** If `true` then this is a fatal error. */
2278
1170
  fatal?: true | undefined;
2279
1171
  /** The severity of this message. */
@@ -2290,7 +1182,7 @@ interface RuleDefinitionTypeOptions {
2290
1182
  LangOptions: LanguageOptions;
2291
1183
  Code: SourceCode$1;
2292
1184
  RuleOptions: unknown[];
2293
- Visitor: RuleVisitor$1;
1185
+ Visitor: RuleVisitor;
2294
1186
  Node: unknown;
2295
1187
  MessageIds: string;
2296
1188
  ExtRuleDocs: unknown;
@@ -2441,7 +1333,7 @@ interface ConfigObject<Rules extends RulesConfig = RulesConfig> {
2441
1333
  * An object containing name-value pairs of information that should be
2442
1334
  * available to all rules.
2443
1335
  */
2444
- settings?: SettingsConfig;
1336
+ settings?: Record<string, unknown>;
2445
1337
  }
2446
1338
  /** @deprecated Only supported in legacy eslintrc config format. */
2447
1339
  type GlobalAccess = boolean | "off" | "readable" | "readonly" | "writable" | "writeable";
@@ -2504,6 +1396,7 @@ interface JavaScriptParserOptionsConfig {
2504
1396
  globalReturn?: boolean | undefined;
2505
1397
  impliedStrict?: boolean | undefined;
2506
1398
  jsx?: boolean | undefined;
1399
+ experimentalObjectRestSpread?: boolean | undefined;
2507
1400
  [key: string]: any;
2508
1401
  } | undefined;
2509
1402
  [key: string]: any;
@@ -2698,7 +1591,7 @@ interface Language<Options extends LanguageTypeOptions = {
2698
1591
  /**
2699
1592
  * Default language options. User-defined options are merged with this object.
2700
1593
  */
2701
- defaultLanguageOptions?: Options["LangOptions"];
1594
+ defaultLanguageOptions?: LanguageOptions;
2702
1595
  /**
2703
1596
  * Validates languageOptions for this language.
2704
1597
  */
@@ -2972,17 +1865,7 @@ interface Directive {
2972
1865
  justification?: string;
2973
1866
  }
2974
1867
  //#endregion
2975
- //#region ../../node_modules/.pnpm/@eslint+plugin-kit@0.7.1/node_modules/@eslint/plugin-kit/dist/esm/types.d.ts
2976
- /**
2977
- * Adds matching `:exit` selector properties for each key of a `RuleVisitor`.
2978
- */
2979
- type CustomRuleVisitorWithExit$1<RuleVisitorType extends RuleVisitor$1> = { [Key in keyof RuleVisitorType as Key | `${Key & string}:exit`]: RuleVisitorType[Key] };
2980
- //#endregion
2981
- //#region ../../node_modules/.pnpm/@eslint+plugin-kit@0.7.1/node_modules/@eslint/plugin-kit/dist/esm/index.d.ts
2982
- type RuleVisitor = RuleVisitor$1;
2983
- type CustomRuleVisitorWithExit<RuleVisitorType extends RuleVisitor> = CustomRuleVisitorWithExit$1<RuleVisitorType>;
2984
- //#endregion
2985
- //#region ../../node_modules/.pnpm/eslint@10.2.1_jiti@2.6.1/node_modules/eslint/lib/types/index.d.ts
1868
+ //#region ../../node_modules/.pnpm/eslint@9.39.4_jiti@2.7.0/node_modules/eslint/lib/types/index.d.ts
2986
1869
  //------------------------------------------------------------------------------
2987
1870
  // Exports
2988
1871
  //------------------------------------------------------------------------------
@@ -2998,7 +1881,7 @@ declare namespace AST {
2998
1881
  start: Position$1;
2999
1882
  end: Position$1;
3000
1883
  }
3001
- type Range = SourceRange;
1884
+ type Range = [number, number];
3002
1885
  interface Program extends Program {
3003
1886
  comments: Comment[];
3004
1887
  tokens: Token[];
@@ -3006,20 +1889,15 @@ declare namespace AST {
3006
1889
  range: Range;
3007
1890
  }
3008
1891
  }
3009
- interface JSXIdentifier extends BaseNode {
3010
- type: "JSXIdentifier";
3011
- name: string;
3012
- }
3013
1892
  declare namespace Scope {
3014
1893
  interface ScopeManager {
3015
1894
  scopes: Scope[];
3016
1895
  globalScope: Scope | null;
3017
1896
  acquire(node: Node$1, inner?: boolean): Scope | null;
3018
1897
  getDeclaredVariables(node: Node$1): Variable[];
3019
- addGlobals(names: ReadonlyArray<string>): void;
3020
1898
  }
3021
1899
  interface Scope {
3022
- type: "block" | "catch" | "class" | "class-field-initializer" | "class-static-block" | "for" | "function" | "function-expression-name" | "global" | "module" | "switch" | "with";
1900
+ type: "block" | "catch" | "class" | "class-field-initializer" | "class-static-block" | "for" | "function" | "function-expression-name" | "global" | "module" | "switch" | "with" | "TDZ";
3023
1901
  isStrict: boolean;
3024
1902
  upper: Scope | null;
3025
1903
  childScopes: Scope[];
@@ -3043,11 +1921,11 @@ declare namespace Scope {
3043
1921
  defs: Definition[];
3044
1922
  }
3045
1923
  interface Reference {
3046
- identifier: Identifier | JSXIdentifier;
1924
+ identifier: Identifier;
3047
1925
  from: Scope;
3048
1926
  resolved: Variable | null;
3049
- writeExpr?: Expression | null;
3050
- init?: boolean;
1927
+ writeExpr: Node$1 | null;
1928
+ init: boolean;
3051
1929
  isWrite(): boolean;
3052
1930
  isRead(): boolean;
3053
1931
  isWriteOnly(): boolean;
@@ -3078,6 +1956,10 @@ declare namespace Scope {
3078
1956
  type: "Parameter";
3079
1957
  node: FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
3080
1958
  parent: null;
1959
+ } | {
1960
+ type: "TDZ";
1961
+ node: any;
1962
+ parent: null;
3081
1963
  } | {
3082
1964
  type: "Variable";
3083
1965
  node: VariableDeclarator;
@@ -3111,7 +1993,11 @@ declare class SourceCode implements TextSourceCode<{
3111
1993
  getAllComments(): Comment[];
3112
1994
  getAncestors(node: Node$1): Node$1[];
3113
1995
  getDeclaredVariables(node: Node$1): Scope.Variable[];
1996
+ /** @deprecated */
1997
+ getJSDocComment(node: Node$1): Comment | null;
3114
1998
  getNodeByRangeIndex(index: number): Node$1 | null;
1999
+ /** @deprecated Use `isSpaceBetween()` instead. */
2000
+ isSpaceBetweenTokens(first: Node$1 | AST.Token, second: Node$1 | AST.Token): boolean;
3115
2001
  getLocFromIndex(index: number): Position$1;
3116
2002
  getIndexFromLoc(location: Position$1): number; // Inherited methods from TokenStore
3117
2003
  // ---------------------------------
@@ -3129,6 +2015,10 @@ declare class SourceCode implements TextSourceCode<{
3129
2015
  getTokensBefore: SourceCode.UnaryCursorWithCountOptions;
3130
2016
  getTokenAfter: SourceCode.UnaryCursorWithSkipOptions;
3131
2017
  getTokensAfter: SourceCode.UnaryCursorWithCountOptions;
2018
+ /** @deprecated Use `getTokenBefore()` instead. */
2019
+ getTokenOrCommentBefore(node: Node$1 | AST.Token | Comment, skip?: number | undefined): AST.Token | Comment | null;
2020
+ /** @deprecated Use `getTokenAfter()` instead. */
2021
+ getTokenOrCommentAfter(node: Node$1 | AST.Token | Comment, skip?: number | undefined): AST.Token | Comment | null;
3132
2022
  getFirstTokenBetween: SourceCode.BinaryCursorWithSkipOptions;
3133
2023
  getFirstTokensBetween: SourceCode.BinaryCursorWithCountOptions;
3134
2024
  getLastTokenBetween: SourceCode.BinaryCursorWithSkipOptions;
@@ -3309,10 +2199,150 @@ declare namespace Rule {
3309
2199
  create(context: RuleContext): RuleListener;
3310
2200
  }
3311
2201
  type NodeTypes = Node$1["type"];
3312
- interface NodeListener extends CustomRuleVisitorWithExit<{ [Node in Rule.Node as Node["type"]]?: ((node: Node) => void) | undefined } & {
3313
- // A `Program` visitor's node type has no `parent` property.
2202
+ interface NodeListener extends RuleVisitor {
2203
+ ArrayExpression?: ((node: ArrayExpression & NodeParentExtension) => void) | undefined;
2204
+ "ArrayExpression:exit"?: ((node: ArrayExpression & NodeParentExtension) => void) | undefined;
2205
+ ArrayPattern?: ((node: ArrayPattern & NodeParentExtension) => void) | undefined;
2206
+ "ArrayPattern:exit"?: ((node: ArrayPattern & NodeParentExtension) => void) | undefined;
2207
+ ArrowFunctionExpression?: ((node: ArrowFunctionExpression & NodeParentExtension) => void) | undefined;
2208
+ "ArrowFunctionExpression:exit"?: ((node: ArrowFunctionExpression & NodeParentExtension) => void) | undefined;
2209
+ AssignmentExpression?: ((node: AssignmentExpression & NodeParentExtension) => void) | undefined;
2210
+ "AssignmentExpression:exit"?: ((node: AssignmentExpression & NodeParentExtension) => void) | undefined;
2211
+ AssignmentPattern?: ((node: AssignmentPattern & NodeParentExtension) => void) | undefined;
2212
+ "AssignmentPattern:exit"?: ((node: AssignmentPattern & NodeParentExtension) => void) | undefined;
2213
+ AwaitExpression?: ((node: AwaitExpression & NodeParentExtension) => void) | undefined;
2214
+ "AwaitExpression:exit"?: ((node: AwaitExpression & NodeParentExtension) => void) | undefined;
2215
+ BinaryExpression?: ((node: BinaryExpression & NodeParentExtension) => void) | undefined;
2216
+ "BinaryExpression:exit"?: ((node: BinaryExpression & NodeParentExtension) => void) | undefined;
2217
+ BlockStatement?: ((node: BlockStatement & NodeParentExtension) => void) | undefined;
2218
+ "BlockStatement:exit"?: ((node: BlockStatement & NodeParentExtension) => void) | undefined;
2219
+ BreakStatement?: ((node: BreakStatement & NodeParentExtension) => void) | undefined;
2220
+ "BreakStatement:exit"?: ((node: BreakStatement & NodeParentExtension) => void) | undefined;
2221
+ CallExpression?: ((node: SimpleCallExpression & NodeParentExtension) => void) | undefined;
2222
+ "CallExpression:exit"?: ((node: SimpleCallExpression & NodeParentExtension) => void) | undefined;
2223
+ CatchClause?: ((node: CatchClause & NodeParentExtension) => void) | undefined;
2224
+ "CatchClause:exit"?: ((node: CatchClause & NodeParentExtension) => void) | undefined;
2225
+ ChainExpression?: ((node: ChainExpression & NodeParentExtension) => void) | undefined;
2226
+ "ChainExpression:exit"?: ((node: ChainExpression & NodeParentExtension) => void) | undefined;
2227
+ ClassBody?: ((node: ClassBody & NodeParentExtension) => void) | undefined;
2228
+ "ClassBody:exit"?: ((node: ClassBody & NodeParentExtension) => void) | undefined;
2229
+ ClassDeclaration?: ((node: ClassDeclaration & NodeParentExtension) => void) | undefined;
2230
+ "ClassDeclaration:exit"?: ((node: ClassDeclaration & NodeParentExtension) => void) | undefined;
2231
+ ClassExpression?: ((node: ClassExpression & NodeParentExtension) => void) | undefined;
2232
+ "ClassExpression:exit"?: ((node: ClassExpression & NodeParentExtension) => void) | undefined;
2233
+ ConditionalExpression?: ((node: ConditionalExpression & NodeParentExtension) => void) | undefined;
2234
+ "ConditionalExpression:exit"?: ((node: ConditionalExpression & NodeParentExtension) => void) | undefined;
2235
+ ContinueStatement?: ((node: ContinueStatement & NodeParentExtension) => void) | undefined;
2236
+ "ContinueStatement:exit"?: ((node: ContinueStatement & NodeParentExtension) => void) | undefined;
2237
+ DebuggerStatement?: ((node: DebuggerStatement & NodeParentExtension) => void) | undefined;
2238
+ "DebuggerStatement:exit"?: ((node: DebuggerStatement & NodeParentExtension) => void) | undefined;
2239
+ DoWhileStatement?: ((node: DoWhileStatement & NodeParentExtension) => void) | undefined;
2240
+ "DoWhileStatement:exit"?: ((node: DoWhileStatement & NodeParentExtension) => void) | undefined;
2241
+ EmptyStatement?: ((node: EmptyStatement & NodeParentExtension) => void) | undefined;
2242
+ "EmptyStatement:exit"?: ((node: EmptyStatement & NodeParentExtension) => void) | undefined;
2243
+ ExportAllDeclaration?: ((node: ExportAllDeclaration & NodeParentExtension) => void) | undefined;
2244
+ "ExportAllDeclaration:exit"?: ((node: ExportAllDeclaration & NodeParentExtension) => void) | undefined;
2245
+ ExportDefaultDeclaration?: ((node: ExportDefaultDeclaration & NodeParentExtension) => void) | undefined;
2246
+ "ExportDefaultDeclaration:exit"?: ((node: ExportDefaultDeclaration & NodeParentExtension) => void) | undefined;
2247
+ ExportNamedDeclaration?: ((node: ExportNamedDeclaration & NodeParentExtension) => void) | undefined;
2248
+ "ExportNamedDeclaration:exit"?: ((node: ExportNamedDeclaration & NodeParentExtension) => void) | undefined;
2249
+ ExportSpecifier?: ((node: ExportSpecifier & NodeParentExtension) => void) | undefined;
2250
+ "ExportSpecifier:exit"?: ((node: ExportSpecifier & NodeParentExtension) => void) | undefined;
2251
+ ExpressionStatement?: ((node: ExpressionStatement & NodeParentExtension) => void) | undefined;
2252
+ "ExpressionStatement:exit"?: ((node: ExpressionStatement & NodeParentExtension) => void) | undefined;
2253
+ ForInStatement?: ((node: ForInStatement & NodeParentExtension) => void) | undefined;
2254
+ "ForInStatement:exit"?: ((node: ForInStatement & NodeParentExtension) => void) | undefined;
2255
+ ForOfStatement?: ((node: ForOfStatement & NodeParentExtension) => void) | undefined;
2256
+ "ForOfStatement:exit"?: ((node: ForOfStatement & NodeParentExtension) => void) | undefined;
2257
+ ForStatement?: ((node: ForStatement & NodeParentExtension) => void) | undefined;
2258
+ "ForStatement:exit"?: ((node: ForStatement & NodeParentExtension) => void) | undefined;
2259
+ FunctionDeclaration?: ((node: FunctionDeclaration & NodeParentExtension) => void) | undefined;
2260
+ "FunctionDeclaration:exit"?: ((node: FunctionDeclaration & NodeParentExtension) => void) | undefined;
2261
+ FunctionExpression?: ((node: FunctionExpression & NodeParentExtension) => void) | undefined;
2262
+ "FunctionExpression:exit"?: ((node: FunctionExpression & NodeParentExtension) => void) | undefined;
2263
+ Identifier?: ((node: Identifier & NodeParentExtension) => void) | undefined;
2264
+ "Identifier:exit"?: ((node: Identifier & NodeParentExtension) => void) | undefined;
2265
+ IfStatement?: ((node: IfStatement & NodeParentExtension) => void) | undefined;
2266
+ "IfStatement:exit"?: ((node: IfStatement & NodeParentExtension) => void) | undefined;
2267
+ ImportDeclaration?: ((node: ImportDeclaration & NodeParentExtension) => void) | undefined;
2268
+ "ImportDeclaration:exit"?: ((node: ImportDeclaration & NodeParentExtension) => void) | undefined;
2269
+ ImportDefaultSpecifier?: ((node: ImportDefaultSpecifier & NodeParentExtension) => void) | undefined;
2270
+ "ImportDefaultSpecifier:exit"?: ((node: ImportDefaultSpecifier & NodeParentExtension) => void) | undefined;
2271
+ ImportExpression?: ((node: ImportExpression & NodeParentExtension) => void) | undefined;
2272
+ "ImportExpression:exit"?: ((node: ImportExpression & NodeParentExtension) => void) | undefined;
2273
+ ImportNamespaceSpecifier?: ((node: ImportNamespaceSpecifier & NodeParentExtension) => void) | undefined;
2274
+ "ImportNamespaceSpecifier:exit"?: ((node: ImportNamespaceSpecifier & NodeParentExtension) => void) | undefined;
2275
+ ImportSpecifier?: ((node: ImportSpecifier & NodeParentExtension) => void) | undefined;
2276
+ "ImportSpecifier:exit"?: ((node: ImportSpecifier & NodeParentExtension) => void) | undefined;
2277
+ LabeledStatement?: ((node: LabeledStatement & NodeParentExtension) => void) | undefined;
2278
+ "LabeledStatement:exit"?: ((node: LabeledStatement & NodeParentExtension) => void) | undefined;
2279
+ Literal?: ((node: Literal & NodeParentExtension) => void) | undefined;
2280
+ "Literal:exit"?: ((node: Literal & NodeParentExtension) => void) | undefined;
2281
+ LogicalExpression?: ((node: LogicalExpression & NodeParentExtension) => void) | undefined;
2282
+ "LogicalExpression:exit"?: ((node: LogicalExpression & NodeParentExtension) => void) | undefined;
2283
+ MemberExpression?: ((node: MemberExpression & NodeParentExtension) => void) | undefined;
2284
+ "MemberExpression:exit"?: ((node: MemberExpression & NodeParentExtension) => void) | undefined;
2285
+ MetaProperty?: ((node: MetaProperty & NodeParentExtension) => void) | undefined;
2286
+ "MetaProperty:exit"?: ((node: MetaProperty & NodeParentExtension) => void) | undefined;
2287
+ MethodDefinition?: ((node: MethodDefinition & NodeParentExtension) => void) | undefined;
2288
+ "MethodDefinition:exit"?: ((node: MethodDefinition & NodeParentExtension) => void) | undefined;
2289
+ NewExpression?: ((node: NewExpression & NodeParentExtension) => void) | undefined;
2290
+ "NewExpression:exit"?: ((node: NewExpression & NodeParentExtension) => void) | undefined;
2291
+ ObjectExpression?: ((node: ObjectExpression & NodeParentExtension) => void) | undefined;
2292
+ "ObjectExpression:exit"?: ((node: ObjectExpression & NodeParentExtension) => void) | undefined;
2293
+ ObjectPattern?: ((node: ObjectPattern & NodeParentExtension) => void) | undefined;
2294
+ "ObjectPattern:exit"?: ((node: ObjectPattern & NodeParentExtension) => void) | undefined;
2295
+ PrivateIdentifier?: ((node: PrivateIdentifier & NodeParentExtension) => void) | undefined;
2296
+ "PrivateIdentifier:exit"?: ((node: PrivateIdentifier & NodeParentExtension) => void) | undefined;
3314
2297
  Program?: ((node: AST.Program) => void) | undefined;
3315
- }> {}
2298
+ "Program:exit"?: ((node: AST.Program) => void) | undefined;
2299
+ Property?: ((node: Property & NodeParentExtension) => void) | undefined;
2300
+ "Property:exit"?: ((node: Property & NodeParentExtension) => void) | undefined;
2301
+ PropertyDefinition?: ((node: PropertyDefinition & NodeParentExtension) => void) | undefined;
2302
+ "PropertyDefinition:exit"?: ((node: PropertyDefinition & NodeParentExtension) => void) | undefined;
2303
+ RestElement?: ((node: RestElement & NodeParentExtension) => void) | undefined;
2304
+ "RestElement:exit"?: ((node: RestElement & NodeParentExtension) => void) | undefined;
2305
+ ReturnStatement?: ((node: ReturnStatement & NodeParentExtension) => void) | undefined;
2306
+ "ReturnStatement:exit"?: ((node: ReturnStatement & NodeParentExtension) => void) | undefined;
2307
+ SequenceExpression?: ((node: SequenceExpression & NodeParentExtension) => void) | undefined;
2308
+ "SequenceExpression:exit"?: ((node: SequenceExpression & NodeParentExtension) => void) | undefined;
2309
+ SpreadElement?: ((node: SpreadElement & NodeParentExtension) => void) | undefined;
2310
+ "SpreadElement:exit"?: ((node: SpreadElement & NodeParentExtension) => void) | undefined;
2311
+ StaticBlock?: ((node: StaticBlock & NodeParentExtension) => void) | undefined;
2312
+ "StaticBlock:exit"?: ((node: StaticBlock & NodeParentExtension) => void) | undefined;
2313
+ Super?: ((node: Super & NodeParentExtension) => void) | undefined;
2314
+ "Super:exit"?: ((node: Super & NodeParentExtension) => void) | undefined;
2315
+ SwitchCase?: ((node: SwitchCase & NodeParentExtension) => void) | undefined;
2316
+ "SwitchCase:exit"?: ((node: SwitchCase & NodeParentExtension) => void) | undefined;
2317
+ SwitchStatement?: ((node: SwitchStatement & NodeParentExtension) => void) | undefined;
2318
+ "SwitchStatement:exit"?: ((node: SwitchStatement & NodeParentExtension) => void) | undefined;
2319
+ TaggedTemplateExpression?: ((node: TaggedTemplateExpression & NodeParentExtension) => void) | undefined;
2320
+ "TaggedTemplateExpression:exit"?: ((node: TaggedTemplateExpression & NodeParentExtension) => void) | undefined;
2321
+ TemplateElement?: ((node: TemplateElement & NodeParentExtension) => void) | undefined;
2322
+ "TemplateElement:exit"?: ((node: TemplateElement & NodeParentExtension) => void) | undefined;
2323
+ TemplateLiteral?: ((node: TemplateLiteral & NodeParentExtension) => void) | undefined;
2324
+ "TemplateLiteral:exit"?: ((node: TemplateLiteral & NodeParentExtension) => void) | undefined;
2325
+ ThisExpression?: ((node: ThisExpression & NodeParentExtension) => void) | undefined;
2326
+ "ThisExpression:exit"?: ((node: ThisExpression & NodeParentExtension) => void) | undefined;
2327
+ ThrowStatement?: ((node: ThrowStatement & NodeParentExtension) => void) | undefined;
2328
+ "ThrowStatement:exit"?: ((node: ThrowStatement & NodeParentExtension) => void) | undefined;
2329
+ TryStatement?: ((node: TryStatement & NodeParentExtension) => void) | undefined;
2330
+ "TryStatement:exit"?: ((node: TryStatement & NodeParentExtension) => void) | undefined;
2331
+ UnaryExpression?: ((node: UnaryExpression & NodeParentExtension) => void) | undefined;
2332
+ "UnaryExpression:exit"?: ((node: UnaryExpression & NodeParentExtension) => void) | undefined;
2333
+ UpdateExpression?: ((node: UpdateExpression & NodeParentExtension) => void) | undefined;
2334
+ "UpdateExpression:exit"?: ((node: UpdateExpression & NodeParentExtension) => void) | undefined;
2335
+ VariableDeclaration?: ((node: VariableDeclaration & NodeParentExtension) => void) | undefined;
2336
+ "VariableDeclaration:exit"?: ((node: VariableDeclaration & NodeParentExtension) => void) | undefined;
2337
+ VariableDeclarator?: ((node: VariableDeclarator & NodeParentExtension) => void) | undefined;
2338
+ "VariableDeclarator:exit"?: ((node: VariableDeclarator & NodeParentExtension) => void) | undefined;
2339
+ WhileStatement?: ((node: WhileStatement & NodeParentExtension) => void) | undefined;
2340
+ "WhileStatement:exit"?: ((node: WhileStatement & NodeParentExtension) => void) | undefined;
2341
+ WithStatement?: ((node: WithStatement & NodeParentExtension) => void) | undefined;
2342
+ "WithStatement:exit"?: ((node: WithStatement & NodeParentExtension) => void) | undefined;
2343
+ YieldExpression?: ((node: YieldExpression & NodeParentExtension) => void) | undefined;
2344
+ "YieldExpression:exit"?: ((node: YieldExpression & NodeParentExtension) => void) | undefined;
2345
+ }
3316
2346
  interface NodeParentExtension {
3317
2347
  parent: Node;
3318
2348
  }
@@ -3356,14 +2386,14 @@ declare namespace Rule {
3356
2386
  }> {}
3357
2387
  type ReportFixer = RuleFixer;
3358
2388
  /** @deprecated Use `ReportDescriptorOptions` instead. */
3359
- type ReportDescriptorOptionsBase = Omit<ViolationReportBase, "suggest">;
2389
+ type ReportDescriptorOptionsBase = ViolationReportBase;
3360
2390
  type SuggestionReportOptions = SuggestedEditBase;
3361
2391
  type SuggestionDescriptorMessage = SuggestionMessage;
3362
2392
  type SuggestionReportDescriptor = SuggestedEdit; // redundant with ReportDescriptorOptionsBase but kept for clarity
3363
2393
  type ReportDescriptorOptions = ViolationReportBase;
3364
- type ReportDescriptor = ViolationReport<JSSyntaxElement>;
2394
+ type ReportDescriptor = ViolationReport<Node$1>;
3365
2395
  type ReportDescriptorMessage = ViolationMessage;
3366
- type ReportDescriptorLocation = ViolationLocation<JSSyntaxElement>;
2396
+ type ReportDescriptorLocation = ViolationLocation<Node$1>;
3367
2397
  type RuleFixer = RuleTextEditor<Node$1 | AST.Token>;
3368
2398
  type Fix = RuleTextEdit;
3369
2399
  }
@@ -3373,13 +2403,19 @@ declare class Linter {
3373
2403
  version: string;
3374
2404
  constructor(options?: {
3375
2405
  cwd?: string | undefined;
3376
- configType?: "flat";
2406
+ configType?: "flat" | "eslintrc";
3377
2407
  });
3378
- verify(code: SourceCode | string, config: Linter.Config | Linter.Config[], filename?: string): Linter.LintMessage[];
3379
- verify(code: SourceCode | string, config: Linter.Config | Linter.Config[], options: Linter.LintOptions): Linter.LintMessage[];
3380
- verifyAndFix(code: string, config: Linter.Config | Linter.Config[], filename?: string): Linter.FixReport;
3381
- verifyAndFix(code: string, config: Linter.Config | Linter.Config[], options: Linter.FixOptions): Linter.FixReport;
2408
+ verify(code: SourceCode | string, config: Linter.LegacyConfig | Linter.Config | Linter.Config[], filename?: string): Linter.LintMessage[];
2409
+ verify(code: SourceCode | string, config: Linter.LegacyConfig | Linter.Config | Linter.Config[], options: Linter.LintOptions): Linter.LintMessage[];
2410
+ verifyAndFix(code: string, config: Linter.LegacyConfig | Linter.Config | Linter.Config[], filename?: string): Linter.FixReport;
2411
+ verifyAndFix(code: string, config: Linter.LegacyConfig | Linter.Config | Linter.Config[], options: Linter.FixOptions): Linter.FixReport;
3382
2412
  getSourceCode(): SourceCode;
2413
+ defineRule(name: string, rule: Rule.RuleModule): void;
2414
+ defineRules(rules: {
2415
+ [name: string]: Rule.RuleModule;
2416
+ }): void;
2417
+ getRules(): Map<string, Rule.RuleModule>;
2418
+ defineParser(name: string, parser: Linter.Parser): void;
3383
2419
  getTimes(): Linter.Stats["times"];
3384
2420
  getFixPassCount(): Linter.Stats["fixPasses"];
3385
2421
  }
@@ -3456,41 +2492,7 @@ declare namespace Linter {
3456
2492
  *
3457
2493
  * @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options#specifying-parser-options)
3458
2494
  */
3459
- interface ParserOptions {
3460
- /**
3461
- * Allow the use of reserved words as identifiers (if `ecmaVersion` is 3).
3462
- *
3463
- * @default false
3464
- */
3465
- allowReserved?: boolean | undefined;
3466
- /**
3467
- * An object indicating which additional language features you'd like to use.
3468
- *
3469
- * @see https://eslint.org/docs/latest/use/configure/language-options#specifying-parser-options
3470
- */
3471
- ecmaFeatures?: {
3472
- /**
3473
- * Allow `return` statements in the global scope.
3474
- *
3475
- * @default false
3476
- */
3477
- globalReturn?: boolean | undefined;
3478
- /**
3479
- * Enable global [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode) (if `ecmaVersion` is 5 or greater).
3480
- *
3481
- * @default false
3482
- */
3483
- impliedStrict?: boolean | undefined;
3484
- /**
3485
- * Enable [JSX](https://facebook.github.io/jsx/).
3486
- *
3487
- * @default false
3488
- */
3489
- jsx?: boolean | undefined;
3490
- [key: string]: any;
3491
- } | undefined;
3492
- [key: string]: any;
3493
- }
2495
+ type ParserOptions = JavaScriptParserOptionsConfig;
3494
2496
  /**
3495
2497
  * Options used for linting code with `Linter#verify` and `Linter#verifyAndFix`.
3496
2498
  */
@@ -3658,65 +2660,55 @@ declare namespace ESLint {
3658
2660
  type Plugin = Plugin$1;
3659
2661
  type FixType = "directive" | "problem" | "suggestion" | "layout";
3660
2662
  type CacheStrategy = "content" | "metadata";
3661
- /** The options with which to configure the ESLint instance. */
3662
2663
  interface Options {
3663
2664
  // File enumeration
3664
- /** The value to use for the current working directory. */
3665
2665
  cwd?: string | undefined;
3666
- /** If `false` then `ESLint#lintFiles()` doesn't throw even if no target files found. Defaults to `true`. */
3667
2666
  errorOnUnmatchedPattern?: boolean | undefined;
3668
- /**
3669
- * Set to false to skip glob resolution of input file paths to lint (default: true).
3670
- * If false, each input file path is assumed to be a non-glob path to an existing file.
3671
- */
3672
2667
  globInputPaths?: boolean | undefined;
3673
- /** False disables all ignore patterns except for the default ones. */
3674
2668
  ignore?: boolean | undefined;
3675
- /** Ignore file patterns to use in addition to config ignores. These patterns are relative to `cwd`. */
3676
2669
  ignorePatterns?: string[] | null | undefined;
3677
- /** When set to true, missing patterns cause the linting operation to short circuit and not report any failures. */
3678
2670
  passOnNoPatterns?: boolean | undefined;
3679
- /** Show warnings when the file list includes ignored files. */
3680
2671
  warnIgnored?: boolean | undefined; // Linting
3681
- /** Enable or disable inline configuration comments. */
3682
2672
  allowInlineConfig?: boolean | undefined;
3683
- /** Base config, extended by all configs used with this instance. */
3684
2673
  baseConfig?: Linter.Config | Linter.Config[] | null | undefined;
3685
- /** Override config, overrides all configs used with this instance. */
3686
2674
  overrideConfig?: Linter.Config | Linter.Config[] | null | undefined;
3687
- /**
3688
- * Searches for default config file when falsy; doesn't do any config file lookup when `true`; considered to be a config filename when a string.
3689
- */
3690
2675
  overrideConfigFile?: string | true | null | undefined;
3691
- /** An array of plugin implementations. */
3692
2676
  plugins?: Record<string, Plugin> | null | undefined;
3693
- /**
3694
- * Default is `() => true`. A predicate function that filters rules to be run.
3695
- * This function is called with an object containing `ruleId` and `severity`, and returns `true` if the rule should be run.
3696
- */
3697
2677
  ruleFilter?: ((arg: {
3698
2678
  ruleId: string;
3699
2679
  severity: Exclude<Linter.Severity, 0>;
3700
2680
  }) => boolean) | undefined;
3701
- /** True enables added statistics on lint results. */
3702
2681
  stats?: boolean | undefined; // Autofix
3703
- /** Execute in autofix mode. If a function, should return a boolean. */
3704
2682
  fix?: boolean | ((message: Linter.LintMessage) => boolean) | undefined;
3705
- /** Array of rule types to apply fixes for. */
3706
2683
  fixTypes?: FixType[] | null | undefined; // Cache-related
3707
- /** Enable result caching. */
3708
2684
  cache?: boolean | undefined;
3709
- /** The cache file to use instead of .eslintcache. */
3710
2685
  cacheLocation?: string | undefined;
3711
- /** The strategy used to detect changed files. */
3712
- cacheStrategy?: CacheStrategy | undefined;
3713
- /** If true, apply suppressions automatically. Defaults to false. */
3714
- applySuppressions?: boolean | undefined;
3715
- /** Path to suppressions file. Relative to cwd. Defaults to eslint-suppressions.json in cwd. */
3716
- suppressionsLocation?: string | undefined; // Other Options
3717
- /** Maximum number of linting threads, "auto" to choose automatically, "off" for no multithreading. */
2686
+ cacheStrategy?: CacheStrategy | undefined; // Other Options
3718
2687
  concurrency?: number | "auto" | "off" | undefined;
3719
- /** Array of feature flags to enable. */
2688
+ flags?: string[] | undefined;
2689
+ }
2690
+ interface LegacyOptions {
2691
+ // File enumeration
2692
+ cwd?: string | undefined;
2693
+ errorOnUnmatchedPattern?: boolean | undefined;
2694
+ extensions?: string[] | undefined;
2695
+ globInputPaths?: boolean | undefined;
2696
+ ignore?: boolean | undefined;
2697
+ ignorePath?: string | undefined; // Linting
2698
+ allowInlineConfig?: boolean | undefined;
2699
+ baseConfig?: Linter.LegacyConfig | undefined;
2700
+ overrideConfig?: Linter.LegacyConfig | undefined;
2701
+ overrideConfigFile?: string | undefined;
2702
+ plugins?: Record<string, Plugin> | undefined;
2703
+ reportUnusedDisableDirectives?: Linter.StringSeverity | undefined;
2704
+ resolvePluginsRelativeTo?: string | undefined;
2705
+ rulePaths?: string[] | undefined;
2706
+ useEslintrc?: boolean | undefined; // Autofix
2707
+ fix?: boolean | ((message: Linter.LintMessage) => boolean) | undefined;
2708
+ fixTypes?: FixType[] | null | undefined; // Cache-related
2709
+ cache?: boolean | undefined;
2710
+ cacheLocation?: string | undefined;
2711
+ cacheStrategy?: CacheStrategy | undefined; // Other Options
3720
2712
  flags?: string[] | undefined;
3721
2713
  }
3722
2714
  /** A linting result. */
@@ -3759,8 +2751,9 @@ declare namespace ESLint {
3759
2751
  */
3760
2752
  foundWarnings: number;
3761
2753
  }
3762
- interface LintResultData extends ResultsMeta {
2754
+ interface LintResultData {
3763
2755
  cwd: string;
2756
+ maxWarningsExceeded?: MaxWarningsExceeded | undefined;
3764
2757
  rulesMeta: {
3765
2758
  [ruleId: string]: Rule.RuleMetaData;
3766
2759
  };
@@ -3788,13 +2781,6 @@ declare namespace ESLint {
3788
2781
  * Metadata about results for formatters.
3789
2782
  */
3790
2783
  interface ResultsMeta {
3791
- /**
3792
- * Whether or not to use color in the formatter output.
3793
- * - If `--color` was set, this property is `true`.
3794
- * - If `--no-color` was set, it is `false`.
3795
- * - If neither option was provided, the property is omitted.
3796
- */
3797
- color?: boolean | undefined;
3798
2784
  /**
3799
2785
  * Present if the maxWarnings threshold was exceeded.
3800
2786
  */
@@ -3805,9 +2791,9 @@ declare namespace ESLint {
3805
2791
  /**
3806
2792
  * Used to call the underlying formatter.
3807
2793
  * @param results An array of lint results to format.
3808
- * @param resultsMeta An object with optional `color` and `maxWarningsExceeded` properties that will be
2794
+ * @param resultsMeta An object with an optional `maxWarningsExceeded` property that will be
3809
2795
  * passed to the underlying formatter function along with other properties set by ESLint.
3810
- * This argument can be omitted if `color` and `maxWarningsExceeded` are not needed.
2796
+ * This argument can be omitted if `maxWarningsExceeded` is not needed.
3811
2797
  * @return The formatter output.
3812
2798
  */
3813
2799
  format(results: LintResult[], resultsMeta?: ResultsMeta): string | Promise<string>;
@@ -3823,293 +2809,6 @@ declare namespace ESLint {
3823
2809
  type EditInfo = Rule.Fix;
3824
2810
  }
3825
2811
  //#endregion
3826
- //#region ../../node_modules/.pnpm/eslint-flat-config-utils@3.1.0/node_modules/eslint-flat-config-utils/dist/index.d.mts
3827
- /**
3828
- * The options for `renamePluginsInConfigs`
3829
- */
3830
- interface RenamePluginsInConfigsOptions {
3831
- /**
3832
- * Resolve conflicts by merging plugins.
3833
- *
3834
- * Note there is no guarantee that the result works the same as the original configs.
3835
- *
3836
- * @default false
3837
- */
3838
- mergePlugins?: boolean;
3839
- }
3840
- /**
3841
- * Rename plugin names a flat configs array
3842
- *
3843
- * @example
3844
- * ```ts
3845
- * import { renamePluginsInConfigs } from 'eslint-flat-config-utils'
3846
- * import someConfigs from './some-configs'
3847
- *
3848
- * export default renamePluginsInConfigs(someConfigs, {
3849
- * '@typescript-eslint': 'ts',
3850
- * 'import-x': 'import',
3851
- * })
3852
- * ```
3853
- */
3854
- /**
3855
- * A type that can be awaited. Promise<T> or T.
3856
- */
3857
- type Awaitable$1<T> = T | Promise<T>;
3858
- /**
3859
- * A type that can be an array or a single item.
3860
- */
3861
- type Arrayable<T> = T | T[];
3862
- /**
3863
- * Default config names map. Used for type augmentation.
3864
- *
3865
- * @example
3866
- * ```ts
3867
- * declare module 'eslint-flat-config-utils' {
3868
- * interface DefaultConfigNamesMap {
3869
- * 'my-custom-config': true
3870
- * }
3871
- * }
3872
- * ```
3873
- */
3874
- interface DefaultConfigNamesMap {}
3875
- interface Nothing {}
3876
- /**
3877
- * type StringLiteralUnion<'foo'> = 'foo' | string
3878
- * This has auto completion whereas `'foo' | string` doesn't
3879
- * Adapted from https://github.com/microsoft/TypeScript/issues/29729
3880
- */
3881
- type StringLiteralUnion<T extends U, U = string> = T | (U & Nothing);
3882
- type FilterType<T, F> = T extends F ? T : never;
3883
- type NullableObject<T> = { [K in keyof T]?: T[K] | null | undefined };
3884
- type GetRuleRecordFromConfig<T> = T extends {
3885
- rules?: infer R;
3886
- } ? R : Linter.RulesRecord;
3887
- interface DisableFixesOptions {
3888
- builtinRules?: Map<string, Rule.RuleModule> | (() => Awaitable$1<Map<string, Rule.RuleModule>>);
3889
- }
3890
- type PluginConflictsError<T extends Linter.Config = Linter.Config> = (pluginName: string, configs: T[]) => string;
3891
- /**
3892
- * Awaitable array of ESLint flat configs or a composer object.
3893
- */
3894
- type ResolvableFlatConfig<T extends object = ConfigWithExtends> = Awaitable$1<Arrayable<(T | false | undefined | null)>> | Awaitable$1<(ConfigWithExtends | false | undefined | null)[]> | Awaitable$1<(Linter.Config | false | undefined | null)[]> | FlatConfigComposer<any>;
3895
- /**
3896
- * Create a chainable composer object that makes manipulating ESLint flat config easier.
3897
- *
3898
- * It extends Promise, so that you can directly await or export it to `eslint.config.mjs`
3899
- *
3900
- * ```ts
3901
- * // eslint.config.mjs
3902
- * import { composer } from 'eslint-flat-config-utils'
3903
- *
3904
- * export default composer(
3905
- * {
3906
- * plugins: {},
3907
- * rules: {},
3908
- * }
3909
- * // ...some configs, accepts same arguments as `concat`
3910
- * )
3911
- * .append(
3912
- * // appends more configs at the end, accepts same arguments as `concat`
3913
- * )
3914
- * .prepend(
3915
- * // prepends more configs at the beginning, accepts same arguments as `concat`
3916
- * )
3917
- * .insertAfter(
3918
- * 'config-name', // specify the name of the target config, or index
3919
- * // insert more configs after the target, accepts same arguments as `concat`
3920
- * )
3921
- * .renamePlugins({
3922
- * // rename plugins
3923
- * 'old-name': 'new-name',
3924
- * // for example, rename `n` from `eslint-plugin-n` to more a explicit prefix `node`
3925
- * 'n': 'node'
3926
- * // applies to all plugins and rules in the configs
3927
- * })
3928
- * .override(
3929
- * 'config-name', // specify the name of the target config, or index
3930
- * {
3931
- * // merge with the target config
3932
- * rules: {
3933
- * 'no-console': 'off'
3934
- * },
3935
- * }
3936
- * )
3937
- *
3938
- * // And you an directly return the composer object to `eslint.config.mjs`
3939
- * ```
3940
- */
3941
- /**
3942
- * The underlying impolementation of `composer()`.
3943
- */
3944
- declare class FlatConfigComposer<T extends object = ConfigWithExtends, ConfigNames extends string = keyof DefaultConfigNamesMap> extends Promise<Linter.Config[]> {
3945
- private _operations;
3946
- private _operationsOverrides;
3947
- private _operationsResolved;
3948
- private _renames;
3949
- private _renamesOptions;
3950
- private _pluginsConflictsError;
3951
- constructor(...configs: ResolvableFlatConfig<T>[]);
3952
- /**
3953
- * Set plugin renames, like `n` -> `node`, `import-x` -> `import`, etc.
3954
- *
3955
- * This will runs after all config items are resolved. Applies to `plugins` and `rules`.
3956
- */
3957
- renamePlugins(renames: Record<string, string>, options?: RenamePluginsInConfigsOptions): this;
3958
- /**
3959
- * Append configs to the end of the current configs array.
3960
- */
3961
- append(...items: ResolvableFlatConfig<T>[]): this;
3962
- /**
3963
- * Prepend configs to the beginning of the current configs array.
3964
- */
3965
- prepend(...items: ResolvableFlatConfig<T>[]): this;
3966
- /**
3967
- * Insert configs before a specific config.
3968
- */
3969
- insertBefore(nameOrIndex: StringLiteralUnion<ConfigNames, string | number>, ...items: ResolvableFlatConfig<T>[]): this;
3970
- /**
3971
- * Insert configs after a specific config.
3972
- */
3973
- insertAfter(nameOrIndex: StringLiteralUnion<ConfigNames, string | number>, ...items: ResolvableFlatConfig<T>[]): this;
3974
- /**
3975
- * Provide overrides to a specific config.
3976
- *
3977
- * It will be merged with the original config, or provide a custom function to replace the config entirely.
3978
- */
3979
- override(nameOrIndex: StringLiteralUnion<ConfigNames, string | number>, config: T | ((config: T) => Awaitable$1<T>)): this;
3980
- /**
3981
- * Provide overrides to multiple configs as an object map.
3982
- *
3983
- * Same as calling `override` multiple times.
3984
- */
3985
- overrides(overrides: Partial<Record<StringLiteralUnion<ConfigNames, string | number>, T | ((config: T) => Awaitable$1<T>)>>): this;
3986
- /**
3987
- * Override rules and it's options in **all configs**.
3988
- *
3989
- * Pass `null` as the value to remove the rule.
3990
- *
3991
- * @example
3992
- * ```ts
3993
- * composer
3994
- * .overrideRules({
3995
- * 'no-console': 'off',
3996
- * 'no-unused-vars': ['error', { vars: 'all', args: 'after-used' }],
3997
- * // remove the rule from all configs
3998
- * 'no-undef': null,
3999
- * })
4000
- * ```
4001
- */
4002
- overrideRules(rules: NullableObject<GetRuleRecordFromConfig<T>>): this;
4003
- /**
4004
- * Remove rules from **all configs**.
4005
- *
4006
- * @example
4007
- * ```ts
4008
- * composer
4009
- * .removeRules(
4010
- * 'no-console',
4011
- * 'no-unused-vars'
4012
- * )
4013
- * ```
4014
- */
4015
- removeRules(...rules: StringLiteralUnion<FilterType<keyof GetRuleRecordFromConfig<T>, string>, string>[]): this;
4016
- /**
4017
- * Remove plugins by name and all the rules referenced by them.
4018
- *
4019
- * @example
4020
- * ```ts
4021
- * composer
4022
- * .removePlugins(
4023
- * 'node'
4024
- * )
4025
- * ```
4026
- *
4027
- * The `plugins: { node }` and `rules: { 'node/xxx': 'error' }` will be removed from all configs.
4028
- */
4029
- removePlugins(...names: string[]): this;
4030
- /**
4031
- * Remove a specific config by name or index.
4032
- */
4033
- remove(nameOrIndex: StringLiteralUnion<ConfigNames, string | number>): this;
4034
- /**
4035
- * Replace a plugin with another.
4036
- *
4037
- * @example
4038
- * ```ts
4039
- * composer
4040
- * .replacePlugin('foo', (fooPlugin) => ({
4041
- * ...fooPlugin,
4042
- * rules: {
4043
- * ...fooPlugin.rules,
4044
- * someNewRule,
4045
- * },
4046
- * }))
4047
- * ```
4048
- *
4049
- * The `plugins: { foo }` will be replaced from all configs with a new plugin that is a merge of it and the `bar` plugin
4050
- */
4051
- replacePlugin(name: string, replacement: Awaitable$1<Plugin$2> | ((original: Plugin$2) => Awaitable$1<Plugin$2>)): this;
4052
- /**
4053
- * Replace a specific config by name or index.
4054
- *
4055
- * The original config will be removed and replaced with the new one.
4056
- */
4057
- replace(nameOrIndex: StringLiteralUnion<ConfigNames, string | number>, ...items: ResolvableFlatConfig<T>[]): this;
4058
- /**
4059
- * Hijack into plugins to disable fixes for specific rules.
4060
- *
4061
- * Note this mutates the plugin object, use with caution.
4062
- *
4063
- * @example
4064
- * ```ts
4065
- * const config = await composer(...)
4066
- * .disableRulesFix([
4067
- * 'unused-imports/no-unused-imports',
4068
- * 'vitest/no-only-tests'
4069
- * ])
4070
- * ```
4071
- */
4072
- disableRulesFix(ruleIds: string[], options?: DisableFixesOptions): this;
4073
- /**
4074
- * Set a custom warning message for plugins conflicts.
4075
- *
4076
- * The error message can be a string or a function that returns a string.
4077
- *
4078
- * Error message accepts template strings:
4079
- * - `{{pluginName}}`: the name of the plugin that has conflicts
4080
- * - `{{configName1}}`: the name of the first config that uses the plugin
4081
- * - `{{configName2}}`: the name of the second config that uses the plugin
4082
- * - `{{configNames}}`: a list of config names that uses the plugin
4083
- *
4084
- * When only one argument is provided, it will be used as the default error message.
4085
- */
4086
- setPluginConflictsError(warning?: string | PluginConflictsError): this;
4087
- setPluginConflictsError(pluginName: string, warning: string | PluginConflictsError): this;
4088
- private _verifyPluginsConflicts;
4089
- /**
4090
- * Hook when all configs are resolved but before returning the final configs.
4091
- *
4092
- * You can modify the final configs here.
4093
- */
4094
- onResolved(callback: (configs: T[]) => Awaitable$1<T[] | void>): this;
4095
- /**
4096
- * Clone the composer object.
4097
- */
4098
- clone(): FlatConfigComposer<T>;
4099
- /**
4100
- * Resolve the pipeline and return the final configs.
4101
- *
4102
- * This returns a promise. Calling `.then()` has the same effect.
4103
- */
4104
- toConfigs(): Promise<Linter.Config[]>;
4105
- then<T>(onFulfilled: (value: Linter.Config[]) => T, onRejected?: (reason: any) => any): Promise<Awaited<T>>;
4106
- catch(onRejected: (reason: any) => any): Promise<any>;
4107
- finally(onFinally: () => void): Promise<Linter.Config[]>;
4108
- }
4109
- /**
4110
- * @deprecated Renamed to `composer`.
4111
- */
4112
- //#endregion
4113
2812
  //#region src/types.d.ts
4114
2813
  interface TailwindcssOption {
4115
2814
  /**
@@ -4147,7 +2846,7 @@ interface StylelintBridgeOption extends IcebreakerStylelintOptions {
4147
2846
  cwd?: string;
4148
2847
  }
4149
2848
  type StylelintBridgeConfig = boolean | StylelintBridgeOption;
4150
- type ResolvableUserConfig = TypedFlatConfigItem$1 | TypedFlatConfigItem$1[] | FlatConfigComposer<any, any> | Linter.Config[];
2849
+ type ResolvableUserConfig = TypedFlatConfigItem$1 | TypedFlatConfigItem$1[] | FlatConfigComposer$1<any, any> | Linter.Config[];
4151
2850
  type BaseFormatterOptions = Exclude<OptionsConfig['formatters'], boolean | undefined>;
4152
2851
  interface IcebreakerFormatterOptions extends Omit<BaseFormatterOptions, 'css' | 'html' | 'graphql' | 'markdown'> {
4153
2852
  /**