eslint-cli-bundle 1.0.4 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1299 @@
1
+ //#region node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts
2
+ // ==================================================================================================
3
+ // JSON Schema Draft 04
4
+ // ==================================================================================================
5
+ /**
6
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
7
+ */
8
+ type JSONSchema4TypeName = "string" //
9
+ | "number" | "integer" | "boolean" | "object" | "array" | "null" | "any";
10
+ /**
11
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5
12
+ */
13
+ type JSONSchema4Type = string //
14
+ | number | boolean | JSONSchema4Object | JSONSchema4Array | null;
15
+ // Workaround for infinite type recursion
16
+ interface JSONSchema4Object {
17
+ [key: string]: JSONSchema4Type;
18
+ }
19
+ // Workaround for infinite type recursion
20
+ // https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
21
+ interface JSONSchema4Array extends Array<JSONSchema4Type> {}
22
+ /**
23
+ * Meta schema
24
+ *
25
+ * Recommended values:
26
+ * - 'http://json-schema.org/schema#'
27
+ * - 'http://json-schema.org/hyper-schema#'
28
+ * - 'http://json-schema.org/draft-04/schema#'
29
+ * - 'http://json-schema.org/draft-04/hyper-schema#'
30
+ * - 'http://json-schema.org/draft-03/schema#'
31
+ * - 'http://json-schema.org/draft-03/hyper-schema#'
32
+ *
33
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
34
+ */
35
+ type JSONSchema4Version = string;
36
+ /**
37
+ * JSON Schema V4
38
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-04
39
+ */
40
+ interface JSONSchema4 {
41
+ id?: string | undefined;
42
+ $ref?: string | undefined;
43
+ $schema?: JSONSchema4Version | undefined;
44
+ /**
45
+ * This attribute is a string that provides a short description of the
46
+ * instance property.
47
+ *
48
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21
49
+ */
50
+ title?: string | undefined;
51
+ /**
52
+ * This attribute is a string that provides a full description of the of
53
+ * purpose the instance property.
54
+ *
55
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22
56
+ */
57
+ description?: string | undefined;
58
+ default?: JSONSchema4Type | undefined;
59
+ multipleOf?: number | undefined;
60
+ maximum?: number | undefined;
61
+ exclusiveMaximum?: boolean | undefined;
62
+ minimum?: number | undefined;
63
+ exclusiveMinimum?: boolean | undefined;
64
+ maxLength?: number | undefined;
65
+ minLength?: number | undefined;
66
+ pattern?: string | undefined;
67
+ /**
68
+ * May only be defined when "items" is defined, and is a tuple of JSONSchemas.
69
+ *
70
+ * This provides a definition for additional items in an array instance
71
+ * when tuple definitions of the items is provided. This can be false
72
+ * to indicate additional items in the array are not allowed, or it can
73
+ * be a schema that defines the schema of the additional items.
74
+ *
75
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6
76
+ */
77
+ additionalItems?: boolean | JSONSchema4 | undefined;
78
+ /**
79
+ * This attribute defines the allowed items in an instance array, and
80
+ * MUST be a schema or an array of schemas. The default value is an
81
+ * empty schema which allows any value for items in the instance array.
82
+ *
83
+ * When this attribute value is a schema and the instance value is an
84
+ * array, then all the items in the array MUST be valid according to the
85
+ * schema.
86
+ *
87
+ * When this attribute value is an array of schemas and the instance
88
+ * value is an array, each position in the instance array MUST conform
89
+ * to the schema in the corresponding position for this array. This
90
+ * called tuple typing. When tuple typing is used, additional items are
91
+ * allowed, disallowed, or constrained by the "additionalItems"
92
+ * (Section 5.6) attribute using the same rules as
93
+ * "additionalProperties" (Section 5.4) for objects.
94
+ *
95
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5
96
+ */
97
+ items?: JSONSchema4 | JSONSchema4[] | undefined;
98
+ maxItems?: number | undefined;
99
+ minItems?: number | undefined;
100
+ uniqueItems?: boolean | undefined;
101
+ maxProperties?: number | undefined;
102
+ minProperties?: number | undefined;
103
+ /**
104
+ * This attribute indicates if the instance must have a value, and not
105
+ * be undefined. This is false by default, making the instance
106
+ * optional.
107
+ *
108
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7
109
+ */
110
+ required?: boolean | string[] | undefined;
111
+ /**
112
+ * This attribute defines a schema for all properties that are not
113
+ * explicitly defined in an object type definition. If specified, the
114
+ * value MUST be a schema or a boolean. If false is provided, no
115
+ * additional properties are allowed beyond the properties defined in
116
+ * the schema. The default value is an empty schema which allows any
117
+ * value for additional properties.
118
+ *
119
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4
120
+ */
121
+ additionalProperties?: boolean | JSONSchema4 | undefined;
122
+ definitions?: {
123
+ [k: string]: JSONSchema4;
124
+ } | undefined;
125
+ /**
126
+ * This attribute is an object with property definitions that define the
127
+ * valid values of instance object property values. When the instance
128
+ * value is an object, the property values of the instance object MUST
129
+ * conform to the property definitions in this object. In this object,
130
+ * each property definition's value MUST be a schema, and the property's
131
+ * name MUST be the name of the instance property that it defines. The
132
+ * instance property value MUST be valid according to the schema from
133
+ * the property definition. Properties are considered unordered, the
134
+ * order of the instance properties MAY be in any order.
135
+ *
136
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2
137
+ */
138
+ properties?: {
139
+ [k: string]: JSONSchema4;
140
+ } | undefined;
141
+ /**
142
+ * This attribute is an object that defines the schema for a set of
143
+ * property names of an object instance. The name of each property of
144
+ * this attribute's object is a regular expression pattern in the ECMA
145
+ * 262/Perl 5 format, while the value is a schema. If the pattern
146
+ * matches the name of a property on the instance object, the value of
147
+ * the instance's property MUST be valid against the pattern name's
148
+ * schema value.
149
+ *
150
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3
151
+ */
152
+ patternProperties?: {
153
+ [k: string]: JSONSchema4;
154
+ } | undefined;
155
+ dependencies?: {
156
+ [k: string]: JSONSchema4 | string[];
157
+ } | undefined;
158
+ /**
159
+ * This provides an enumeration of all possible values that are valid
160
+ * for the instance property. This MUST be an array, and each item in
161
+ * the array represents a possible value for the instance value. If
162
+ * this attribute is defined, the instance value MUST be one of the
163
+ * values in the array in order for the schema to be valid.
164
+ *
165
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
166
+ */
167
+ enum?: JSONSchema4Type[] | undefined;
168
+ /**
169
+ * A single type, or a union of simple types
170
+ */
171
+ type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined;
172
+ allOf?: JSONSchema4[] | undefined;
173
+ anyOf?: JSONSchema4[] | undefined;
174
+ oneOf?: JSONSchema4[] | undefined;
175
+ not?: JSONSchema4 | undefined;
176
+ /**
177
+ * The value of this property MUST be another schema which will provide
178
+ * a base schema which the current schema will inherit from. The
179
+ * inheritance rules are such that any instance that is valid according
180
+ * to the current schema MUST be valid according to the referenced
181
+ * schema. This MAY also be an array, in which case, the instance MUST
182
+ * be valid for all the schemas in the array. A schema that extends
183
+ * another schema MAY define additional attributes, constrain existing
184
+ * attributes, or add other constraints.
185
+ *
186
+ * Conceptually, the behavior of extends can be seen as validating an
187
+ * instance against all constraints in the extending schema as well as
188
+ * the extended schema(s).
189
+ *
190
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26
191
+ */
192
+ extends?: string | string[] | undefined;
193
+ /**
194
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6
195
+ */
196
+ [k: string]: any;
197
+ format?: string | undefined;
198
+ }
199
+ //#endregion
200
+ //#region node_modules/.pnpm/@eslint+core@1.1.1/node_modules/@eslint/core/dist/esm/types.d.ts
201
+ /**
202
+ * Represents an error inside of a file.
203
+ */
204
+ interface FileError {
205
+ message: string;
206
+ line: number;
207
+ column: number;
208
+ endLine?: number;
209
+ endColumn?: number;
210
+ }
211
+ /**
212
+ * Represents a problem found in a file.
213
+ */
214
+ interface FileProblem {
215
+ ruleId: string | null;
216
+ message: string;
217
+ loc: SourceLocation;
218
+ }
219
+ /**
220
+ * Represents the start and end coordinates of a node inside the source.
221
+ */
222
+ interface SourceLocation {
223
+ start: Position;
224
+ end: Position;
225
+ }
226
+ /**
227
+ * Represents a location coordinate inside the source. ESLint-style formats
228
+ * have just `line` and `column` while others may have `offset` as well.
229
+ */
230
+ interface Position {
231
+ line: number;
232
+ column: number;
233
+ }
234
+ /**
235
+ * Represents a range of characters in the source.
236
+ */
237
+ type SourceRange = [number, number];
238
+ /**
239
+ * What the rule is responsible for finding:
240
+ * - `problem` means the rule has noticed a potential error.
241
+ * - `suggestion` means the rule suggests an alternate or better approach.
242
+ * - `layout` means the rule is looking at spacing, indentation, etc.
243
+ */
244
+ type RuleType = "problem" | "suggestion" | "layout";
245
+ /**
246
+ * The type of fix the rule can provide:
247
+ * - `code` means the rule can fix syntax.
248
+ * - `whitespace` means the rule can fix spacing and indentation.
249
+ */
250
+ type RuleFixType = "code" | "whitespace";
251
+ /**
252
+ * An object containing visitor information for a rule. Each method is either the
253
+ * name of a node type or a selector, or is a method that will be called at specific
254
+ * times during the traversal.
255
+ */
256
+ type RuleVisitor = Record<string, ((...args: any[]) => void) | undefined>;
257
+ /**
258
+ * Rule meta information used for documentation.
259
+ */
260
+ interface RulesMetaDocs {
261
+ /**
262
+ * A short description of the rule.
263
+ */
264
+ description?: string | undefined;
265
+ /**
266
+ * The URL to the documentation for the rule.
267
+ */
268
+ url?: string | undefined;
269
+ /**
270
+ * Indicates if the rule is generally recommended for all users.
271
+ *
272
+ * Note - this will always be a boolean for core rules, but may be used in any way by plugins.
273
+ */
274
+ recommended?: unknown;
275
+ /**
276
+ * Indicates if the rule is frozen (no longer accepting feature requests).
277
+ */
278
+ frozen?: boolean | undefined;
279
+ }
280
+ /**
281
+ * Meta information about a rule.
282
+ */
283
+ interface RulesMeta<MessageIds extends string = string, RuleOptions = unknown[], ExtRuleDocs = unknown> {
284
+ /**
285
+ * Properties that are used when documenting the rule.
286
+ */
287
+ docs?: (RulesMetaDocs & ExtRuleDocs) | undefined;
288
+ /**
289
+ * The type of rule.
290
+ */
291
+ type?: RuleType | undefined;
292
+ /**
293
+ * The schema for the rule options. Required if the rule has options.
294
+ */
295
+ schema?: JSONSchema4 | JSONSchema4[] | false | undefined;
296
+ /**
297
+ * Any default options to be recursively merged on top of any user-provided options.
298
+ */
299
+ defaultOptions?: RuleOptions;
300
+ /**
301
+ * The messages that the rule can report.
302
+ */
303
+ messages?: Record<MessageIds, string>;
304
+ /**
305
+ * Indicates whether the rule has been deprecated or provides additional metadata about the deprecation. Omit if not deprecated.
306
+ */
307
+ deprecated?: boolean | DeprecatedInfo | undefined;
308
+ /**
309
+ * @deprecated Use deprecated.replacedBy instead.
310
+ * The name of the rule(s) this rule was replaced by, if it was deprecated.
311
+ */
312
+ replacedBy?: readonly string[] | undefined;
313
+ /**
314
+ * Indicates if the rule is fixable, and if so, what type of fix it provides.
315
+ */
316
+ fixable?: RuleFixType | undefined;
317
+ /**
318
+ * Indicates if the rule may provide suggestions.
319
+ */
320
+ hasSuggestions?: boolean | undefined;
321
+ /**
322
+ * The language the rule is intended to lint.
323
+ */
324
+ language?: string;
325
+ /**
326
+ * The dialects of `language` that the rule is intended to lint.
327
+ */
328
+ dialects?: string[];
329
+ }
330
+ /**
331
+ * Provides additional metadata about a deprecation.
332
+ */
333
+ interface DeprecatedInfo {
334
+ /**
335
+ * General message presented to the user, e.g. for the key rule why the rule
336
+ * is deprecated or for info how to replace the rule.
337
+ */
338
+ message?: string;
339
+ /**
340
+ * URL to more information about this deprecation in general.
341
+ */
342
+ url?: string;
343
+ /**
344
+ * An empty array explicitly states that there is no replacement.
345
+ */
346
+ replacedBy?: ReplacedByInfo[];
347
+ /**
348
+ * The package version since when the rule is deprecated (should use full
349
+ * semver without a leading "v").
350
+ */
351
+ deprecatedSince?: string;
352
+ /**
353
+ * The estimated version when the rule is removed (probably the next major
354
+ * version). null means the rule is "frozen" (will be available but will not
355
+ * be changed).
356
+ */
357
+ availableUntil?: string | null;
358
+ }
359
+ /**
360
+ * Provides metadata about a replacement
361
+ */
362
+ interface ReplacedByInfo {
363
+ /**
364
+ * General message presented to the user, e.g. how to replace the rule
365
+ */
366
+ message?: string;
367
+ /**
368
+ * URL to more information about this replacement in general
369
+ */
370
+ url?: string;
371
+ /**
372
+ * Name should be "eslint" if the replacement is an ESLint core rule. Omit
373
+ * the property if the replacement is in the same plugin.
374
+ */
375
+ plugin?: ExternalSpecifier;
376
+ /**
377
+ * Name and documentation of the replacement rule
378
+ */
379
+ rule?: ExternalSpecifier;
380
+ }
381
+ /**
382
+ * Specifies the name and url of an external resource. At least one property
383
+ * should be set.
384
+ */
385
+ interface ExternalSpecifier {
386
+ /**
387
+ * Name of the referenced plugin / rule.
388
+ */
389
+ name?: string;
390
+ /**
391
+ * URL pointing to documentation for the plugin / rule.
392
+ */
393
+ url?: string;
394
+ }
395
+ /**
396
+ * Generic type for `RuleContext`.
397
+ */
398
+ interface RuleContextTypeOptions {
399
+ LangOptions: LanguageOptions;
400
+ Code: SourceCode;
401
+ RuleOptions: unknown[];
402
+ Node: unknown;
403
+ MessageIds: string;
404
+ }
405
+ /**
406
+ * Represents the context object that is passed to a rule. This object contains
407
+ * information about the current state of the linting process and is the rule's
408
+ * view into the outside world.
409
+ */
410
+ interface RuleContext<Options extends RuleContextTypeOptions = RuleContextTypeOptions> {
411
+ /**
412
+ * The current working directory for the session.
413
+ */
414
+ cwd: string;
415
+ /**
416
+ * The filename of the file being linted.
417
+ */
418
+ filename: string;
419
+ /**
420
+ * The physical filename of the file being linted.
421
+ */
422
+ physicalFilename: string;
423
+ /**
424
+ * The source code object that the rule is running on.
425
+ */
426
+ sourceCode: Options["Code"];
427
+ /**
428
+ * Shared settings for the configuration.
429
+ */
430
+ settings: SettingsConfig;
431
+ /**
432
+ * The language options for the configuration.
433
+ */
434
+ languageOptions: Options["LangOptions"];
435
+ /**
436
+ * The rule ID.
437
+ */
438
+ id: string;
439
+ /**
440
+ * The rule's configured options.
441
+ */
442
+ options: Options["RuleOptions"];
443
+ /**
444
+ * The report function that the rule should use to report problems.
445
+ * @param violation The violation to report.
446
+ */
447
+ report(violation: ViolationReport<Options["Node"], Options["MessageIds"]>): void;
448
+ }
449
+ /**
450
+ * Manager of text edits for a rule fix.
451
+ */
452
+ interface RuleTextEditor<EditableSyntaxElement = unknown> {
453
+ /**
454
+ * Inserts text after the specified node or token.
455
+ * @param syntaxElement The node or token to insert after.
456
+ * @param text The edit to insert after the node or token.
457
+ */
458
+ insertTextAfter(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit;
459
+ /**
460
+ * Inserts text after the specified range.
461
+ * @param range The range to insert after.
462
+ * @param text The edit to insert after the range.
463
+ */
464
+ insertTextAfterRange(range: SourceRange, text: string): RuleTextEdit;
465
+ /**
466
+ * Inserts text before the specified node or token.
467
+ * @param syntaxElement A syntax element with location information to insert before.
468
+ * @param text The edit to insert before the node or token.
469
+ */
470
+ insertTextBefore(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit;
471
+ /**
472
+ * Inserts text before the specified range.
473
+ * @param range The range to insert before.
474
+ * @param text The edit to insert before the range.
475
+ */
476
+ insertTextBeforeRange(range: SourceRange, text: string): RuleTextEdit;
477
+ /**
478
+ * Removes the specified node or token.
479
+ * @param syntaxElement A syntax element with location information to remove.
480
+ * @returns The edit to remove the node or token.
481
+ */
482
+ remove(syntaxElement: EditableSyntaxElement): RuleTextEdit;
483
+ /**
484
+ * Removes the specified range.
485
+ * @param range The range to remove.
486
+ * @returns The edit to remove the range.
487
+ */
488
+ removeRange(range: SourceRange): RuleTextEdit;
489
+ /**
490
+ * Replaces the specified node or token with the given text.
491
+ * @param syntaxElement A syntax element with location information to replace.
492
+ * @param text The text to replace the node or token with.
493
+ * @returns The edit to replace the node or token.
494
+ */
495
+ replaceText(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit;
496
+ /**
497
+ * Replaces the specified range with the given text.
498
+ * @param range The range to replace.
499
+ * @param text The text to replace the range with.
500
+ * @returns The edit to replace the range.
501
+ */
502
+ replaceTextRange(range: SourceRange, text: string): RuleTextEdit;
503
+ }
504
+ /**
505
+ * Represents a fix for a rule violation implemented as a text edit.
506
+ */
507
+ interface RuleTextEdit {
508
+ /**
509
+ * The range to replace.
510
+ */
511
+ range: SourceRange;
512
+ /**
513
+ * The text to insert.
514
+ */
515
+ text: string;
516
+ }
517
+ /**
518
+ * Fixes a violation.
519
+ * @param fixer The text editor to apply the fix.
520
+ * @returns The fix(es) for the violation.
521
+ */
522
+ type RuleFixer = (fixer: RuleTextEditor) => RuleTextEdit | Iterable<RuleTextEdit> | null;
523
+ /**
524
+ * Data that can be used to fill placeholders in error messages.
525
+ */
526
+ type MessagePlaceholderData = Record<string, string | number | boolean | bigint | null | undefined>;
527
+ interface ViolationReportBase<MessageIds extends string = string> {
528
+ /**
529
+ * The data to insert into the message.
530
+ */
531
+ data?: MessagePlaceholderData | undefined;
532
+ /**
533
+ * The fix to be applied for the violation.
534
+ */
535
+ fix?: RuleFixer | null | undefined;
536
+ /**
537
+ * An array of suggested fixes for the problem. These fixes may change the
538
+ * behavior of the code, so they are not applied automatically.
539
+ */
540
+ suggest?: SuggestedEdit<MessageIds>[] | null | undefined;
541
+ }
542
+ type ViolationMessage<MessageIds extends string = string> = {
543
+ message: string;
544
+ } | {
545
+ messageId: MessageIds;
546
+ };
547
+ type ViolationLocation<Node> = {
548
+ loc: SourceLocation | Position;
549
+ } | {
550
+ node: Node;
551
+ };
552
+ type ViolationReport<Node = unknown, MessageIds extends string = string> = ViolationReportBase<MessageIds> & ViolationMessage<MessageIds> & ViolationLocation<Node>;
553
+ interface SuggestedEditBase {
554
+ /**
555
+ * The data to insert into the message.
556
+ */
557
+ data?: MessagePlaceholderData | undefined;
558
+ /**
559
+ * The fix to be applied for the suggestion.
560
+ */
561
+ fix: RuleFixer;
562
+ }
563
+ type SuggestionMessage<MessageIds extends string = string> = {
564
+ desc: string;
565
+ } | {
566
+ messageId: MessageIds;
567
+ };
568
+ /**
569
+ * A suggested edit for a rule violation.
570
+ */
571
+ type SuggestedEdit<MessageIds extends string = string> = SuggestedEditBase & SuggestionMessage<MessageIds>;
572
+ /**
573
+ * The normalized version of a lint suggestion.
574
+ */
575
+ interface LintSuggestion {
576
+ /** A short description. */
577
+ desc: string;
578
+ /** Fix result info. */
579
+ fix: RuleTextEdit;
580
+ /** Id referencing a message for the description. */
581
+ messageId?: string | undefined;
582
+ }
583
+ /**
584
+ * The normalized version of a lint violation message.
585
+ */
586
+ interface LintMessage {
587
+ /** The 1-based column number. */
588
+ column: number;
589
+ /** The 1-based line number. */
590
+ line: number;
591
+ /** The 1-based column number of the end location. */
592
+ endColumn?: number | undefined;
593
+ /** The 1-based line number of the end location. */
594
+ endLine?: number | undefined;
595
+ /** The ID of the rule which makes this message. */
596
+ ruleId: string | null;
597
+ /** The reported message. */
598
+ message: string;
599
+ /** The ID of the message in the rule's meta. */
600
+ messageId?: string | undefined;
601
+ /** If `true` then this is a fatal error. */
602
+ fatal?: true | undefined;
603
+ /** The severity of this message. */
604
+ severity: Exclude<SeverityLevel, 0>;
605
+ /** Information for autofix. */
606
+ fix?: RuleTextEdit | undefined;
607
+ /** Information for suggestions. */
608
+ suggestions?: LintSuggestion[] | undefined;
609
+ }
610
+ /**
611
+ * Generic options for the `RuleDefinition` type.
612
+ */
613
+ interface RuleDefinitionTypeOptions {
614
+ LangOptions: LanguageOptions;
615
+ Code: SourceCode;
616
+ RuleOptions: unknown[];
617
+ Visitor: RuleVisitor;
618
+ Node: unknown;
619
+ MessageIds: string;
620
+ ExtRuleDocs: unknown;
621
+ }
622
+ /**
623
+ * The definition of an ESLint rule.
624
+ */
625
+ interface RuleDefinition<Options extends RuleDefinitionTypeOptions = RuleDefinitionTypeOptions> {
626
+ /**
627
+ * The meta information for the rule.
628
+ */
629
+ meta?: RulesMeta<Options["MessageIds"], Options["RuleOptions"], Options["ExtRuleDocs"]>;
630
+ /**
631
+ * Creates the visitor that ESLint uses to apply the rule during traversal.
632
+ * @param context The rule context.
633
+ * @returns The rule visitor.
634
+ */
635
+ create(context: RuleContext<{
636
+ LangOptions: Options["LangOptions"];
637
+ Code: Options["Code"];
638
+ RuleOptions: Options["RuleOptions"];
639
+ Node: Options["Node"];
640
+ MessageIds: Options["MessageIds"];
641
+ }>): Options["Visitor"];
642
+ }
643
+ /**
644
+ * The human readable severity level used in a configuration.
645
+ */
646
+ type SeverityName = "off" | "warn" | "error";
647
+ /**
648
+ * The numeric severity level for a rule.
649
+ *
650
+ * - `0` means off.
651
+ * - `1` means warn.
652
+ * - `2` means error.
653
+ */
654
+ type SeverityLevel = 0 | 1 | 2;
655
+ /**
656
+ * The severity of a rule in a configuration.
657
+ */
658
+ type Severity = SeverityName | SeverityLevel;
659
+ /**
660
+ * Represents the metadata for an object, such as a plugin or processor.
661
+ */
662
+ interface ObjectMetaProperties {
663
+ /** @deprecated Use `meta.name` instead. */
664
+ name?: string | undefined;
665
+ /** @deprecated Use `meta.version` instead. */
666
+ version?: string | undefined;
667
+ meta?: {
668
+ name?: string | undefined;
669
+ version?: string | undefined;
670
+ };
671
+ }
672
+ /**
673
+ * Represents the configuration options for the core linter.
674
+ */
675
+ interface LinterOptionsConfig {
676
+ /**
677
+ * Indicates whether or not inline configuration is evaluated.
678
+ */
679
+ noInlineConfig?: boolean;
680
+ /**
681
+ * Indicates what to do when an unused disable directive is found.
682
+ */
683
+ reportUnusedDisableDirectives?: boolean | Severity;
684
+ /**
685
+ * A severity value indicating if and how unused inline configs should be
686
+ * tracked and reported.
687
+ */
688
+ reportUnusedInlineConfigs?: Severity;
689
+ }
690
+ /**
691
+ * The configuration for a rule.
692
+ */
693
+ type RuleConfig<RuleOptions extends unknown[] = unknown[]> = Severity | [Severity, ...Partial<RuleOptions>];
694
+ /**
695
+ * A collection of rules and their configurations.
696
+ */
697
+ interface RulesConfig {
698
+ [key: string]: RuleConfig;
699
+ }
700
+ /**
701
+ * A collection of settings.
702
+ */
703
+ interface SettingsConfig {
704
+ [key: string]: unknown;
705
+ }
706
+ /**
707
+ * The configuration for a set of files.
708
+ */
709
+ interface ConfigObject<Rules extends RulesConfig = RulesConfig> {
710
+ /**
711
+ * A string to identify the configuration object. Used in error messages and
712
+ * inspection tools.
713
+ */
714
+ name?: string;
715
+ /**
716
+ * Path to the directory where the configuration object should apply.
717
+ * `files` and `ignores` patterns in the configuration object are
718
+ * interpreted as relative to this path.
719
+ */
720
+ basePath?: string;
721
+ /**
722
+ * An array of glob patterns indicating the files that the configuration
723
+ * object should apply to. If not specified, the configuration object applies
724
+ * to all files
725
+ */
726
+ files?: (string | string[])[];
727
+ /**
728
+ * An array of glob patterns indicating the files that the configuration
729
+ * object should not apply to. If not specified, the configuration object
730
+ * applies to all files matched by files
731
+ */
732
+ ignores?: string[];
733
+ /**
734
+ * The name of the language used for linting. This is used to determine the
735
+ * parser and other language-specific settings.
736
+ * @since 9.7.0
737
+ */
738
+ language?: string;
739
+ /**
740
+ * An object containing settings related to how the language is configured for
741
+ * linting.
742
+ */
743
+ languageOptions?: LanguageOptions;
744
+ /**
745
+ * An object containing settings related to the linting process
746
+ */
747
+ linterOptions?: LinterOptionsConfig;
748
+ /**
749
+ * Either an object containing preprocess() and postprocess() methods or a
750
+ * string indicating the name of a processor inside of a plugin
751
+ * (i.e., "pluginName/processorName").
752
+ */
753
+ processor?: string | Processor;
754
+ /**
755
+ * An object containing a name-value mapping of plugin names to plugin objects.
756
+ * When files is specified, these plugins are only available to the matching files.
757
+ */
758
+ plugins?: Record<string, Plugin>;
759
+ /**
760
+ * An object containing the configured rules. When files or ignores are specified,
761
+ * these rule configurations are only available to the matching files.
762
+ */
763
+ rules?: Partial<Rules>;
764
+ /**
765
+ * An object containing name-value pairs of information that should be
766
+ * available to all rules.
767
+ */
768
+ settings?: SettingsConfig;
769
+ }
770
+ /** @deprecated Only supported in legacy eslintrc config format. */
771
+ type GlobalAccess = boolean | "off" | "readable" | "readonly" | "writable" | "writeable";
772
+ /** @deprecated Only supported in legacy eslintrc config format. */
773
+ interface GlobalsConfig {
774
+ [name: string]: GlobalAccess;
775
+ }
776
+ /**
777
+ * The ECMAScript version of the code being linted.
778
+ * @deprecated Only supported in legacy eslintrc config format.
779
+ */
780
+ type EcmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | "latest";
781
+ /**
782
+ * The type of JavaScript source code.
783
+ * @deprecated Only supported in legacy eslintrc config format.
784
+ */
785
+ type JavaScriptSourceType = "script" | "module" | "commonjs";
786
+ /**
787
+ * Parser options.
788
+ * @deprecated Only supported in legacy eslintrc config format.
789
+ * @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options#specifying-parser-options)
790
+ */
791
+ interface JavaScriptParserOptionsConfig {
792
+ /**
793
+ * Allow the use of reserved words as identifiers (if `ecmaVersion` is 3).
794
+ *
795
+ * @default false
796
+ */
797
+ allowReserved?: boolean | undefined;
798
+ /**
799
+ * Accepts any valid ECMAScript version number or `'latest'`:
800
+ *
801
+ * - A version: es3, es5, es6, es7, es8, es9, es10, es11, es12, es13, es14, ..., or
802
+ * - A year: es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, ..., or
803
+ * - `'latest'`
804
+ *
805
+ * When it's a version or a year, the value must be a number - so do not include the `es` prefix.
806
+ *
807
+ * 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
808
+ *
809
+ * @default 5
810
+ */
811
+ ecmaVersion?: EcmaVersion | undefined;
812
+ /**
813
+ * The type of JavaScript source code. Possible values are "script" for
814
+ * traditional script files, "module" for ECMAScript modules (ESM), and
815
+ * "commonjs" for CommonJS files.
816
+ *
817
+ * @default 'script'
818
+ *
819
+ * @see https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options
820
+ */
821
+ sourceType?: JavaScriptSourceType | undefined;
822
+ /**
823
+ * An object indicating which additional language features you'd like to use.
824
+ *
825
+ * @see https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options
826
+ */
827
+ ecmaFeatures?: {
828
+ globalReturn?: boolean | undefined;
829
+ impliedStrict?: boolean | undefined;
830
+ jsx?: boolean | undefined;
831
+ [key: string]: any;
832
+ } | undefined;
833
+ [key: string]: any;
834
+ }
835
+ /** @deprecated Only supported in legacy eslintrc config format. */
836
+ interface EnvironmentConfig {
837
+ /** The definition of global variables. */
838
+ globals?: GlobalsConfig | undefined;
839
+ /** The parser options that will be enabled under this environment. */
840
+ parserOptions?: JavaScriptParserOptionsConfig | undefined;
841
+ }
842
+ /**
843
+ * A configuration object that may have a `rules` block.
844
+ */
845
+ interface HasRules<Rules extends RulesConfig = RulesConfig> {
846
+ rules?: Partial<Rules> | undefined;
847
+ }
848
+ /**
849
+ * ESLint legacy configuration.
850
+ *
851
+ * @see [ESLint Legacy Configuration](https://eslint.org/docs/latest/use/configure/)
852
+ */
853
+ interface BaseConfig<Rules extends RulesConfig = RulesConfig, OverrideRules extends RulesConfig = Rules> extends HasRules<Rules> {
854
+ $schema?: string | undefined;
855
+ /**
856
+ * An environment provides predefined global variables.
857
+ *
858
+ * @see [Environments](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-environments)
859
+ */
860
+ env?: {
861
+ [name: string]: boolean;
862
+ } | undefined;
863
+ /**
864
+ * Extending configuration files.
865
+ *
866
+ * @see [Extends](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#extending-configuration-files)
867
+ */
868
+ extends?: string | string[] | undefined;
869
+ /**
870
+ * Specifying globals.
871
+ *
872
+ * @see [Globals](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-globals)
873
+ */
874
+ globals?: GlobalsConfig | undefined;
875
+ /**
876
+ * Disable processing of inline comments.
877
+ *
878
+ * @see [Disabling Inline Comments](https://eslint.org/docs/latest/use/configure/rules-deprecated#disabling-inline-comments)
879
+ */
880
+ noInlineConfig?: boolean | undefined;
881
+ /**
882
+ * Overrides can be used to use a differing configuration for matching sub-directories and files.
883
+ *
884
+ * @see [How do overrides work](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#how-do-overrides-work)
885
+ */
886
+ overrides?: ConfigOverride<OverrideRules>[] | undefined;
887
+ /**
888
+ * Parser.
889
+ *
890
+ * @see [Working with Custom Parsers](https://eslint.org/docs/latest/extend/custom-parsers)
891
+ * @see [Specifying Parser](https://eslint.org/docs/latest/use/configure/parser-deprecated)
892
+ */
893
+ parser?: string | undefined;
894
+ /**
895
+ * Parser options.
896
+ *
897
+ * @see [Working with Custom Parsers](https://eslint.org/docs/latest/extend/custom-parsers)
898
+ * @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options)
899
+ */
900
+ parserOptions?: JavaScriptParserOptionsConfig | undefined;
901
+ /**
902
+ * Which third-party plugins define additional rules, environments, configs, etc. for ESLint to use.
903
+ *
904
+ * @see [Configuring Plugins](https://eslint.org/docs/latest/use/configure/plugins-deprecated#configure-plugins)
905
+ */
906
+ plugins?: string[] | undefined;
907
+ /**
908
+ * Specifying processor.
909
+ *
910
+ * @see [processor](https://eslint.org/docs/latest/use/configure/plugins-deprecated#specify-a-processor)
911
+ */
912
+ processor?: string | undefined;
913
+ /**
914
+ * Report unused eslint-disable comments as warning.
915
+ *
916
+ * @see [Report unused eslint-disable comments](https://eslint.org/docs/latest/use/configure/rules-deprecated#report-unused-eslint-disable-comments)
917
+ */
918
+ reportUnusedDisableDirectives?: boolean | undefined;
919
+ /**
920
+ * Settings.
921
+ *
922
+ * @see [Settings](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#adding-shared-settings)
923
+ */
924
+ settings?: SettingsConfig | undefined;
925
+ }
926
+ /**
927
+ * The overwrites that apply more differing configuration to specific files or directories.
928
+ */
929
+ interface ConfigOverride<Rules extends RulesConfig = RulesConfig> extends BaseConfig<Rules> {
930
+ /**
931
+ * The glob patterns for excluded files.
932
+ */
933
+ excludedFiles?: string | string[] | undefined;
934
+ /**
935
+ * The glob patterns for target files.
936
+ */
937
+ files: string | string[];
938
+ }
939
+ /**
940
+ * ESLint legacy configuration.
941
+ *
942
+ * @see [ESLint Legacy Configuration](https://eslint.org/docs/latest/use/configure/)
943
+ */
944
+ interface LegacyConfigObject<Rules extends RulesConfig = RulesConfig, OverrideRules extends RulesConfig = Rules> extends BaseConfig<Rules, OverrideRules> {
945
+ /**
946
+ * Tell ESLint to ignore specific files and directories.
947
+ *
948
+ * @see [Ignore Patterns](https://eslint.org/docs/latest/use/configure/ignore-deprecated#ignorepatterns-in-config-files)
949
+ */
950
+ ignorePatterns?: string | string[] | undefined;
951
+ /**
952
+ * @see [Using Configuration Files](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#using-configuration-files)
953
+ */
954
+ root?: boolean | undefined;
955
+ }
956
+ /**
957
+ * File information passed to a processor.
958
+ */
959
+ interface ProcessorFile {
960
+ text: string;
961
+ filename: string;
962
+ }
963
+ /**
964
+ * A processor is an object that can preprocess and postprocess files.
965
+ */
966
+ interface Processor<T extends string | ProcessorFile = string | ProcessorFile> extends ObjectMetaProperties {
967
+ /** If `true` then it means the processor supports autofix. */
968
+ supportsAutofix?: boolean | undefined;
969
+ /** The function to extract code blocks. */
970
+ preprocess?(text: string, filename: string): T[];
971
+ /** The function to merge messages. */
972
+ postprocess?(messages: LintMessage[][], filename: string): LintMessage[];
973
+ }
974
+ interface Plugin extends ObjectMetaProperties {
975
+ meta?: ObjectMetaProperties["meta"] & {
976
+ namespace?: string | undefined;
977
+ };
978
+ configs?: Record<string, LegacyConfigObject | ConfigObject | ConfigObject[]> | undefined;
979
+ environments?: Record<string, EnvironmentConfig> | undefined;
980
+ languages?: Record<string, Language> | undefined;
981
+ processors?: Record<string, Processor> | undefined;
982
+ rules?: Record<string, RuleDefinition> | undefined;
983
+ }
984
+ /**
985
+ * Generic options for the `Language` type.
986
+ */
987
+ interface LanguageTypeOptions {
988
+ LangOptions: LanguageOptions;
989
+ Code: SourceCode;
990
+ RootNode: unknown;
991
+ Node: unknown;
992
+ }
993
+ /**
994
+ * Represents a plugin language.
995
+ */
996
+ interface Language<Options extends LanguageTypeOptions = {
997
+ LangOptions: LanguageOptions;
998
+ Code: SourceCode;
999
+ RootNode: unknown;
1000
+ Node: unknown;
1001
+ }> {
1002
+ /**
1003
+ * Indicates how ESLint should read the file.
1004
+ */
1005
+ fileType: "text";
1006
+ /**
1007
+ * First line number returned from the parser (text mode only).
1008
+ */
1009
+ lineStart: 0 | 1;
1010
+ /**
1011
+ * First column number returned from the parser (text mode only).
1012
+ */
1013
+ columnStart: 0 | 1;
1014
+ /**
1015
+ * The property to read the node type from. Used in selector querying.
1016
+ */
1017
+ nodeTypeKey: string;
1018
+ /**
1019
+ * The traversal path that tools should take when evaluating the AST
1020
+ */
1021
+ visitorKeys?: Record<string, string[]>;
1022
+ /**
1023
+ * Default language options. User-defined options are merged with this object.
1024
+ */
1025
+ defaultLanguageOptions?: LanguageOptions;
1026
+ /**
1027
+ * Validates languageOptions for this language.
1028
+ */
1029
+ validateLanguageOptions(languageOptions: Options["LangOptions"]): void;
1030
+ /**
1031
+ * Normalizes languageOptions for this language.
1032
+ */
1033
+ normalizeLanguageOptions?(languageOptions: Options["LangOptions"]): Options["LangOptions"];
1034
+ /**
1035
+ * Helper for esquery that allows languages to match nodes against
1036
+ * class. esquery currently has classes like `function` that will
1037
+ * match all the various function nodes. This method allows languages
1038
+ * to implement similar shorthands.
1039
+ */
1040
+ matchesSelectorClass?(className: string, node: Options["Node"], ancestry: Options["Node"][]): boolean;
1041
+ /**
1042
+ * Parses the given file input into its component parts. This file should not
1043
+ * throws errors for parsing errors but rather should return any parsing
1044
+ * errors as parse of the ParseResult object.
1045
+ */
1046
+ parse(file: File, context: LanguageContext<Options["LangOptions"]>): ParseResult<Options["RootNode"]>;
1047
+ /**
1048
+ * Creates SourceCode object that ESLint uses to work with a file.
1049
+ */
1050
+ createSourceCode(file: File, input: OkParseResult<Options["RootNode"]>, context: LanguageContext<Options["LangOptions"]>): Options["Code"];
1051
+ }
1052
+ /**
1053
+ * Plugin-defined options for the language.
1054
+ */
1055
+ type LanguageOptions = Record<string, unknown>;
1056
+ /**
1057
+ * The context object that is passed to the language plugin methods.
1058
+ */
1059
+ interface LanguageContext<LangOptions = LanguageOptions> {
1060
+ languageOptions: LangOptions;
1061
+ }
1062
+ /**
1063
+ * Represents a file read by ESLint.
1064
+ */
1065
+ interface File {
1066
+ /**
1067
+ * The path that ESLint uses for this file. May be a virtual path
1068
+ * if it was returned by a processor.
1069
+ */
1070
+ path: string;
1071
+ /**
1072
+ * The path to the file on disk. This always maps directly to a file
1073
+ * regardless of whether it was returned from a processor.
1074
+ */
1075
+ physicalPath: string;
1076
+ /**
1077
+ * Indicates if the original source contained a byte-order marker.
1078
+ * ESLint strips the BOM from the `body`, but this info is needed
1079
+ * to correctly apply autofixing.
1080
+ */
1081
+ bom: boolean;
1082
+ /**
1083
+ * The body of the file to parse.
1084
+ */
1085
+ body: string | Uint8Array;
1086
+ }
1087
+ /**
1088
+ * Represents the successful result of parsing a file.
1089
+ */
1090
+ interface OkParseResult<RootNode = unknown> {
1091
+ /**
1092
+ * Indicates if the parse was successful. If true, the parse was successful
1093
+ * and ESLint should continue on to create a SourceCode object and run rules;
1094
+ * if false, ESLint should just report the error(s) without doing anything
1095
+ * else.
1096
+ */
1097
+ ok: true;
1098
+ /**
1099
+ * The abstract syntax tree created by the parser. (only when ok: true)
1100
+ */
1101
+ ast: RootNode;
1102
+ /**
1103
+ * Any additional data that the parser wants to provide.
1104
+ */
1105
+ [key: string]: any;
1106
+ }
1107
+ /**
1108
+ * Represents the unsuccessful result of parsing a file.
1109
+ */
1110
+ interface NotOkParseResult {
1111
+ /**
1112
+ * Indicates if the parse was successful. If true, the parse was successful
1113
+ * and ESLint should continue on to create a SourceCode object and run rules;
1114
+ * if false, ESLint should just report the error(s) without doing anything
1115
+ * else.
1116
+ */
1117
+ ok: false;
1118
+ /**
1119
+ * Any parsing errors, whether fatal or not. (only when ok: false)
1120
+ */
1121
+ errors: FileError[];
1122
+ /**
1123
+ * Any additional data that the parser wants to provide.
1124
+ */
1125
+ [key: string]: any;
1126
+ }
1127
+ type ParseResult<RootNode = unknown> = OkParseResult<RootNode> | NotOkParseResult;
1128
+ /**
1129
+ * Represents inline configuration found in the source code.
1130
+ */
1131
+ interface InlineConfigElement {
1132
+ /**
1133
+ * The location of the inline config element.
1134
+ */
1135
+ loc: SourceLocation;
1136
+ /**
1137
+ * The interpreted configuration from the inline config element.
1138
+ */
1139
+ config: {
1140
+ rules: RulesConfig;
1141
+ };
1142
+ }
1143
+ /**
1144
+ * Generic options for the `SourceCodeBase` type.
1145
+ */
1146
+ interface SourceCodeBaseTypeOptions {
1147
+ LangOptions: LanguageOptions;
1148
+ RootNode: unknown;
1149
+ SyntaxElementWithLoc: unknown;
1150
+ ConfigNode: unknown;
1151
+ }
1152
+ /**
1153
+ * Represents the basic interface for a source code object.
1154
+ */
1155
+ interface SourceCodeBase<Options extends SourceCodeBaseTypeOptions = {
1156
+ LangOptions: LanguageOptions;
1157
+ RootNode: unknown;
1158
+ SyntaxElementWithLoc: unknown;
1159
+ ConfigNode: unknown;
1160
+ }> {
1161
+ /**
1162
+ * Root of the AST.
1163
+ */
1164
+ ast: Options["RootNode"];
1165
+ /**
1166
+ * The traversal path that tools should take when evaluating the AST.
1167
+ * When present, this overrides the `visitorKeys` on the language for
1168
+ * just this source code object.
1169
+ */
1170
+ visitorKeys?: Record<string, string[]>;
1171
+ /**
1172
+ * Retrieves the equivalent of `loc` for a given node or token.
1173
+ * @param syntaxElement The node or token to get the location for.
1174
+ * @returns The location of the node or token.
1175
+ */
1176
+ getLoc(syntaxElement: Options["SyntaxElementWithLoc"]): SourceLocation;
1177
+ /**
1178
+ * Retrieves the equivalent of `range` for a given node or token.
1179
+ * @param syntaxElement The node or token to get the range for.
1180
+ * @returns The range of the node or token.
1181
+ */
1182
+ getRange(syntaxElement: Options["SyntaxElementWithLoc"]): SourceRange;
1183
+ /**
1184
+ * Traversal of AST.
1185
+ */
1186
+ traverse(): Iterable<TraversalStep>;
1187
+ /**
1188
+ * Applies language options passed in from the ESLint core.
1189
+ */
1190
+ applyLanguageOptions?(languageOptions: Options["LangOptions"]): void;
1191
+ /**
1192
+ * Return all of the inline areas where ESLint should be disabled/enabled
1193
+ * along with any problems found in evaluating the directives.
1194
+ */
1195
+ getDisableDirectives?(): {
1196
+ directives: Directive[];
1197
+ problems: FileProblem[];
1198
+ };
1199
+ /**
1200
+ * Returns an array of all inline configuration nodes found in the
1201
+ * source code.
1202
+ */
1203
+ getInlineConfigNodes?(): Options["ConfigNode"][];
1204
+ /**
1205
+ * Applies configuration found inside of the source code. This method is only
1206
+ * called when ESLint is running with inline configuration allowed.
1207
+ */
1208
+ applyInlineConfig?(): {
1209
+ configs: InlineConfigElement[];
1210
+ problems: FileProblem[];
1211
+ };
1212
+ /**
1213
+ * Called by ESLint core to indicate that it has finished providing
1214
+ * information. We now add in all the missing variables and ensure that
1215
+ * state-changing methods cannot be called by rules.
1216
+ * @returns {void}
1217
+ */
1218
+ finalize?(): void;
1219
+ }
1220
+ /**
1221
+ * Represents the source of a text file being linted.
1222
+ */
1223
+ interface TextSourceCode<Options extends SourceCodeBaseTypeOptions = {
1224
+ LangOptions: LanguageOptions;
1225
+ RootNode: unknown;
1226
+ SyntaxElementWithLoc: unknown;
1227
+ ConfigNode: unknown;
1228
+ }> extends SourceCodeBase<Options> {
1229
+ /**
1230
+ * The body of the file that you'd like rule developers to access.
1231
+ */
1232
+ text: string;
1233
+ }
1234
+ /**
1235
+ * Represents the source of a binary file being linted.
1236
+ */
1237
+ interface BinarySourceCode<Options extends SourceCodeBaseTypeOptions = {
1238
+ LangOptions: LanguageOptions;
1239
+ RootNode: unknown;
1240
+ SyntaxElementWithLoc: unknown;
1241
+ ConfigNode: unknown;
1242
+ }> extends SourceCodeBase<Options> {
1243
+ /**
1244
+ * The body of the file that you'd like rule developers to access.
1245
+ */
1246
+ body: Uint8Array;
1247
+ }
1248
+ type SourceCode<Options extends SourceCodeBaseTypeOptions = {
1249
+ LangOptions: LanguageOptions;
1250
+ RootNode: unknown;
1251
+ SyntaxElementWithLoc: unknown;
1252
+ ConfigNode: unknown;
1253
+ }> = TextSourceCode<Options> | BinarySourceCode<Options>;
1254
+ /**
1255
+ * Represents a traversal step visiting the AST.
1256
+ */
1257
+ interface VisitTraversalStep {
1258
+ kind: 1;
1259
+ target: unknown;
1260
+ phase: 1 | 2;
1261
+ args: unknown[];
1262
+ }
1263
+ /**
1264
+ * Represents a traversal step calling a function.
1265
+ */
1266
+ interface CallTraversalStep {
1267
+ kind: 2;
1268
+ target: string;
1269
+ phase?: string;
1270
+ args: unknown[];
1271
+ }
1272
+ type TraversalStep = VisitTraversalStep | CallTraversalStep;
1273
+ /**
1274
+ * The type of disable directive. This determines how ESLint will disable rules.
1275
+ */
1276
+ type DirectiveType = "disable" | "enable" | "disable-line" | "disable-next-line";
1277
+ /**
1278
+ * Represents a disable directive.
1279
+ */
1280
+ interface Directive {
1281
+ /**
1282
+ * The type of directive.
1283
+ */
1284
+ type: DirectiveType;
1285
+ /**
1286
+ * The node of the directive. May be in the AST or a comment/token.
1287
+ */
1288
+ node: unknown;
1289
+ /**
1290
+ * The value of the directive.
1291
+ */
1292
+ value: string;
1293
+ /**
1294
+ * The justification for the directive.
1295
+ */
1296
+ justification?: string;
1297
+ }
1298
+ //#endregion
1299
+ export { Severity as A, ViolationMessage as B, RuleDefinition as C, RuleVisitor as D, RuleTextEditor as E, SuggestedEditBase as F, ViolationReportBase as H, SuggestionMessage as I, TextSourceCode as L, SeverityName as M, SourceRange as N, RulesConfig as O, SuggestedEdit as P, TraversalStep as R, RuleContext as S, RuleTextEdit as T, ViolationReport as V, ObjectMetaProperties as _, EcmaVersion as a, ProcessorFile as b, GlobalsConfig as c, LanguageOptions as d, LegacyConfigObject as f, MessagePlaceholderData as g, LinterOptionsConfig as h, DeprecatedInfo as i, SeverityLevel as j, RulesMeta as k, HasRules as l, LintSuggestion as m, ConfigObject as n, EnvironmentConfig as o, LintMessage as p, ConfigOverride as r, GlobalAccess as s, BaseConfig as t, JavaScriptSourceType as u, Plugin as v, RuleFixer as w, RuleConfig as x, Processor as y, ViolationLocation as z };