@vue-vine/eslint-parser 0.2.20 → 1.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.
package/dist/index.d.ts CHANGED
@@ -1,77 +1,81 @@
1
- import { TSESTree as TSESTree$1 } from '@typescript-eslint/types';
2
- import { ScopeManager } from 'eslint-scope';
3
- import { ParserOptions, parseForESLint as parseForESLint$1 } from '@typescript-eslint/parser';
4
- import { TSESTree } from '@typescript-eslint/typescript-estree';
5
- import { VisitorKeys } from 'eslint-visitor-keys';
1
+ import { ParserOptions, parseForESLint as parseForESLint$1 } from "@typescript-eslint/parser";
2
+ import { ScopeManager } from "eslint-scope";
3
+ import { TSESTree } from "@typescript-eslint/typescript-estree";
4
+ import { TSESTree as TSESTree$1 } from "@typescript-eslint/types";
5
+ import { VisitorKeys } from "eslint-visitor-keys";
6
6
 
7
+ //#region src/ast/errors.d.ts
8
+ /**
9
+ * HTML parse errors.
10
+ */
7
11
  /**
8
12
  * HTML parse errors.
9
13
  */
10
14
  declare class ParseError extends SyntaxError {
11
- code?: ErrorCode;
12
- index: number;
13
- lineNumber: number;
14
- column: number;
15
- /**
16
- * Create new parser error object.
17
- * @param code The error code. See also: https://html.spec.whatwg.org/multipage/parsing.html#parse-errors
18
- * @param offset The offset number of this error.
19
- * @param line The line number of this error.
20
- * @param column The column number of this error.
21
- */
22
- static fromCode(code: ErrorCode, offset: number, line: number, column: number): ParseError;
23
- /**
24
- * Normalize the error object.
25
- * @param x The error object to normalize.
26
- */
27
- static normalize(x: any): ParseError | null;
28
- /**
29
- * Initialize this ParseError instance.
30
- * @param message The error message.
31
- * @param code The error code. See also: https://html.spec.whatwg.org/multipage/parsing.html#parse-errors
32
- * @param offset The offset number of this error.
33
- * @param line The line number of this error.
34
- * @param column The column number of this error.
35
- */
36
- constructor(message: string, code: ErrorCode | undefined, offset: number, line: number, column: number);
37
- /**
38
- * Type guard for ParseError.
39
- * @param x The value to check.
40
- * @returns `true` if the value has `message`, `pos`, `loc` properties.
41
- */
42
- static isParseError(x: any): x is ParseError;
15
+ code?: ErrorCode;
16
+ index: number;
17
+ lineNumber: number;
18
+ column: number;
19
+ /**
20
+ * Create new parser error object.
21
+ * @param code The error code. See also: https://html.spec.whatwg.org/multipage/parsing.html#parse-errors
22
+ * @param offset The offset number of this error.
23
+ * @param line The line number of this error.
24
+ * @param column The column number of this error.
25
+ */
26
+ static fromCode(code: ErrorCode, offset: number, line: number, column: number): ParseError;
27
+ /**
28
+ * Normalize the error object.
29
+ * @param x The error object to normalize.
30
+ */
31
+ static normalize(x: any): ParseError | null;
32
+ /**
33
+ * Initialize this ParseError instance.
34
+ * @param message The error message.
35
+ * @param code The error code. See also: https://html.spec.whatwg.org/multipage/parsing.html#parse-errors
36
+ * @param offset The offset number of this error.
37
+ * @param line The line number of this error.
38
+ * @param column The column number of this error.
39
+ */
40
+ constructor(message: string, code: ErrorCode | undefined, offset: number, line: number, column: number);
41
+ /**
42
+ * Type guard for ParseError.
43
+ * @param x The value to check.
44
+ * @returns `true` if the value has `message`, `pos`, `loc` properties.
45
+ */
46
+ static isParseError(x: any): x is ParseError;
43
47
  }
44
48
  /**
45
49
  * The error codes of HTML syntax errors.
46
50
  * https://html.spec.whatwg.org/multipage/parsing.html#parse-errors
47
51
  */
48
- type ErrorCode = 'abrupt-closing-of-empty-comment' | 'absence-of-digits-in-numeric-character-reference' | 'cdata-in-html-content' | 'character-reference-outside-unicode-range' | 'control-character-in-input-stream' | 'control-character-reference' | 'eof-before-tag-name' | 'eof-in-cdata' | 'eof-in-comment' | 'eof-in-tag' | 'incorrectly-closed-comment' | 'incorrectly-opened-comment' | 'invalid-first-character-of-tag-name' | 'missing-attribute-value' | 'missing-end-tag-name' | 'missing-semicolon-after-character-reference' | 'missing-whitespace-between-attributes' | 'nested-comment' | 'noncharacter-character-reference' | 'noncharacter-in-input-stream' | 'null-character-reference' | 'surrogate-character-reference' | 'surrogate-in-input-stream' | 'unexpected-character-in-attribute-name' | 'unexpected-character-in-unquoted-attribute-value' | 'unexpected-equals-sign-before-attribute-name' | 'unexpected-null-character' | 'unexpected-question-mark-instead-of-tag-name' | 'unexpected-solidus-in-tag' | 'unknown-named-character-reference' | 'end-tag-with-attributes' | 'duplicate-attribute' | 'end-tag-with-trailing-solidus' | 'non-void-html-element-start-tag-with-trailing-solidus' | 'x-invalid-end-tag' | 'x-invalid-namespace' | 'x-missing-interpolation-end';
49
-
52
+ type ErrorCode = 'abrupt-closing-of-empty-comment' | 'absence-of-digits-in-numeric-character-reference' | 'cdata-in-html-content' | 'character-reference-outside-unicode-range' | 'control-character-in-input-stream' | 'control-character-reference' | 'eof-before-tag-name' | 'eof-in-cdata' | 'eof-in-comment' | 'eof-in-tag' | 'incorrectly-closed-comment' | 'incorrectly-opened-comment' | 'invalid-first-character-of-tag-name' | 'missing-attribute-value' | 'missing-end-tag-name' | 'missing-semicolon-after-character-reference' | 'missing-whitespace-between-attributes' | 'nested-comment' | 'noncharacter-character-reference' | 'noncharacter-in-input-stream' | 'null-character-reference' | 'surrogate-character-reference' | 'surrogate-in-input-stream' | 'unexpected-character-in-attribute-name' | 'unexpected-character-in-unquoted-attribute-value' | 'unexpected-equals-sign-before-attribute-name' | 'unexpected-null-character' | 'unexpected-question-mark-instead-of-tag-name' | 'unexpected-solidus-in-tag' | 'unknown-named-character-reference' | 'end-tag-with-attributes' | 'duplicate-attribute' | 'end-tag-with-trailing-solidus' | 'non-void-html-element-start-tag-with-trailing-solidus' | 'x-invalid-end-tag' | 'x-invalid-namespace' | 'x-missing-interpolation-end'; //#endregion
53
+ //#region src/ast/locations.d.ts
50
54
  /**
51
55
  * Location information in lines and columns.
52
56
  */
53
57
  interface Location {
54
- /**
55
- * The line number. This is 1-based.
56
- */
57
- line: number;
58
- /**
59
- * The column number. This is 0-based.
60
- */
61
- column: number;
58
+ /**
59
+ * The line number. This is 1-based.
60
+ */
61
+ line: number;
62
+ /**
63
+ * The column number. This is 0-based.
64
+ */
65
+ column: number;
62
66
  }
63
67
  /**
64
68
  * Range information in lines and columns.
65
69
  */
66
70
  interface LocationRange {
67
- /**
68
- * The start location.
69
- */
70
- start: Location;
71
- /**
72
- * The end location.
73
- */
74
- end: Location;
71
+ /**
72
+ * The start location.
73
+ */
74
+ start: Location;
75
+ /**
76
+ * The end location.
77
+ */
78
+ end: Location;
75
79
  }
76
80
  /**
77
81
  * Location information in offsets.
@@ -90,90 +94,99 @@ type OffsetRange = [Offset, Offset];
90
94
  * Objects which have their location.
91
95
  */
92
96
  interface HasLocation {
93
- range: OffsetRange;
94
- loc: LocationRange;
95
- start?: number;
96
- end?: number;
97
+ range: OffsetRange;
98
+ loc: LocationRange;
99
+ start?: number;
100
+ end?: number;
97
101
  }
98
102
 
103
+ //#endregion
104
+ //#region src/common/parser-object.d.ts
99
105
  /**
100
106
  * The type of basic ESLint custom parser.
101
107
  * e.g. espree
102
108
  */
103
109
  interface BasicParserObject<R = ESLintProgram> {
104
- parse: (code: string, options: any) => R;
105
- parseForESLint: undefined;
110
+ parse: (code: string, options: any) => R;
111
+ parseForESLint: undefined;
106
112
  }
107
113
  /**
108
114
  * The type of ESLint custom parser enhanced for ESLint.
109
115
  * e.g. @babel/eslint-parser, @typescript-eslint/parser
110
116
  */
111
117
  interface EnhancedParserObject<R = ESLintExtendedProgram> {
112
- parseForESLint: (code: string, options: any) => R;
113
- parse: undefined;
118
+ parseForESLint: (code: string, options: any) => R;
119
+ parse: undefined;
114
120
  }
115
121
  /**
116
122
  * The type of ESLint (custom) parsers.
117
123
  */
118
124
  type ParserObject<R1 = ESLintExtendedProgram, R2 = ESLintProgram> = EnhancedParserObject<R1> | BasicParserObject<R2>;
119
125
 
126
+ //#endregion
127
+ //#region src/template/utils/process-vine-template-node.d.ts
120
128
  declare function prepareTemplate(templateNode: TSESTree.TaggedTemplateExpression): {
121
- templatePositionInfo: {
122
- templateStartLine: number;
123
- templateStartColumn: number;
124
- templateStartOffset: number;
125
- templateEndOffset: number;
126
- templateEndLine: number;
127
- templateEndColumn: number;
128
- };
129
- templateRawContent: string;
129
+ templatePositionInfo: {
130
+ templateStartLine: number;
131
+ templateStartColumn: number;
132
+ templateStartOffset: number;
133
+ templateEndOffset: number;
134
+ templateEndLine: number;
135
+ templateEndColumn: number;
136
+ };
137
+ templateRawContent: string;
130
138
  };
131
139
 
132
- type PrettierType<T> = {
133
- [K in keyof T]: T[K];
134
- } & {};
140
+ //#endregion
141
+ //#region src/types.d.ts
142
+ type PrettierType<T> = { [K in keyof T]: T[K] } & {};
135
143
  type TsESLintParseForESLint = ReturnType<typeof parseForESLint$1>;
136
144
  interface ParseForESLintResult {
137
- ast: ESLintProgram;
138
- services: TsESLintParseForESLint['services'];
139
- scopeManager: TsESLintParseForESLint['scopeManager'];
140
- visitorKeys: TsESLintParseForESLint['visitorKeys'];
145
+ ast: ESLintProgram;
146
+ services: TsESLintParseForESLint['services'];
147
+ scopeManager: TsESLintParseForESLint['scopeManager'];
148
+ visitorKeys: TsESLintParseForESLint['visitorKeys'];
141
149
  }
142
150
  type VineESLintParserOptions = ParserOptions & {
143
- parser?: boolean | string | ParserObject | Record<string, string | ParserObject | undefined>;
144
- ecmaFeatures?: ParserOptions['ecmaFeatures'] & {
145
- [key: string]: any;
146
- };
151
+ parser?: boolean | string | ParserObject | Record<string, string | ParserObject | undefined>;
152
+ ecmaFeatures?: ParserOptions['ecmaFeatures'] & {
153
+ [key: string]: any;
154
+ };
155
+ sourceType?: 'module' | 'script';
147
156
  };
148
157
  interface VineTemplateMeta {
149
- tokens: Token[];
150
- comments: Token[];
151
- errors: ParseError[];
158
+ tokens: Token[];
159
+ comments: Token[];
160
+ errors: ParseError[];
152
161
  }
153
162
  type FinalProcessTemplateInfo = ReturnType<typeof prepareTemplate> & {
154
- templateRootAST: VTemplateRoot;
155
- templateMeta: VineTemplateMeta;
163
+ templateRootAST: VTemplateRoot;
164
+ templateMeta: VineTemplateMeta;
156
165
  };
157
166
 
167
+ //#endregion
168
+ //#region src/ast/tokens.d.ts
158
169
  /**
159
170
  * Tokens.
160
171
  */
161
172
  interface Token extends HasLocation {
162
- /**
163
- * Token types.
164
- */
165
- type: string;
166
- /**
167
- * Processed values.
168
- */
169
- value: string;
173
+ /**
174
+ * Token types.
175
+ */
176
+ type: string;
177
+ /**
178
+ * Processed values.
179
+ */
180
+ value: string;
170
181
  }
171
182
 
183
+ //#endregion
184
+ //#region src/ast/nodes.d.ts
172
185
  /**
173
186
  * Objects which have their parent.
174
187
  */
175
188
  interface HasParent {
176
- parent?: Node | null;
189
+ parent?: Node | null;
177
190
  }
178
191
  /**
179
192
  * The union type for all nodes.
@@ -191,462 +204,462 @@ type ESLintNode = ESLintIdentifier | ESLintLiteral | ESLintProgram | ESLintSwitc
191
204
  * The parsing result of ESLint custom parsers.
192
205
  */
193
206
  interface ESLintExtendedProgram {
194
- ast: ESLintProgram;
195
- services?: Record<string, unknown>;
196
- visitorKeys?: {
197
- [type: string]: string[];
198
- };
199
- scopeManager?: ScopeManager;
207
+ ast: ESLintProgram;
208
+ services?: Record<string, unknown>;
209
+ visitorKeys?: {
210
+ [type: string]: string[];
211
+ };
212
+ scopeManager?: ScopeManager;
200
213
  }
201
214
  interface ESLintProgram extends HasLocation, HasParent {
202
- type: 'Program';
203
- sourceType: 'script' | 'module';
204
- body: (ESLintStatement | ESLintModuleDeclaration)[];
205
- templateBody?: VElement & HasConcreteInfo;
206
- tokens?: Token[];
207
- comments?: Token[];
208
- errors?: ParseError[];
215
+ type: 'Program';
216
+ sourceType: 'script' | 'module';
217
+ body: (ESLintStatement | ESLintModuleDeclaration)[];
218
+ templateBody?: VElement & HasConcreteInfo;
219
+ tokens?: Token[];
220
+ comments?: Token[];
221
+ errors?: ParseError[];
209
222
  }
210
223
  type ESLintStatement = ESLintExpressionStatement | ESLintDirective | ESLintBlockStatement | ESLintEmptyStatement | ESLintDebuggerStatement | ESLintWithStatement | ESLintReturnStatement | ESLintLabeledStatement | ESLintBreakStatement | ESLintContinueStatement | ESLintIfStatement | ESLintSwitchStatement | ESLintThrowStatement | ESLintTryStatement | ESLintWhileStatement | ESLintDoWhileStatement | ESLintForStatement | ESLintForInStatement | ESLintForOfStatement | ESLintDeclaration;
211
224
  interface ESLintEmptyStatement extends HasLocation, HasParent {
212
- type: 'EmptyStatement';
225
+ type: 'EmptyStatement';
213
226
  }
214
227
  interface ESLintBlockStatement extends HasLocation, HasParent {
215
- type: 'BlockStatement';
216
- body: ESLintStatement[];
228
+ type: 'BlockStatement';
229
+ body: ESLintStatement[];
217
230
  }
218
231
  interface ESLintExpressionStatement extends HasLocation, HasParent {
219
- type: 'ExpressionStatement';
220
- expression: ESLintExpression;
232
+ type: 'ExpressionStatement';
233
+ expression: ESLintExpression;
221
234
  }
222
235
  interface ESLintDirective extends HasLocation, HasParent {
223
- type: 'ExpressionStatement';
224
- expression: ESLintLiteral;
225
- directive: string;
236
+ type: 'ExpressionStatement';
237
+ expression: ESLintLiteral;
238
+ directive: string;
226
239
  }
227
240
  interface ESLintIfStatement extends HasLocation, HasParent {
228
- type: 'IfStatement';
229
- test: ESLintExpression;
230
- consequent: ESLintStatement;
231
- alternate: ESLintStatement | null;
241
+ type: 'IfStatement';
242
+ test: ESLintExpression;
243
+ consequent: ESLintStatement;
244
+ alternate: ESLintStatement | null;
232
245
  }
233
246
  interface ESLintSwitchStatement extends HasLocation, HasParent {
234
- type: 'SwitchStatement';
235
- discriminant: ESLintExpression;
236
- cases: ESLintSwitchCase[];
247
+ type: 'SwitchStatement';
248
+ discriminant: ESLintExpression;
249
+ cases: ESLintSwitchCase[];
237
250
  }
238
251
  interface ESLintSwitchCase extends HasLocation, HasParent {
239
- type: 'SwitchCase';
240
- test: ESLintExpression | null;
241
- consequent: ESLintStatement[];
252
+ type: 'SwitchCase';
253
+ test: ESLintExpression | null;
254
+ consequent: ESLintStatement[];
242
255
  }
243
256
  interface ESLintWhileStatement extends HasLocation, HasParent {
244
- type: 'WhileStatement';
245
- test: ESLintExpression;
246
- body: ESLintStatement;
257
+ type: 'WhileStatement';
258
+ test: ESLintExpression;
259
+ body: ESLintStatement;
247
260
  }
248
261
  interface ESLintDoWhileStatement extends HasLocation, HasParent {
249
- type: 'DoWhileStatement';
250
- body: ESLintStatement;
251
- test: ESLintExpression;
262
+ type: 'DoWhileStatement';
263
+ body: ESLintStatement;
264
+ test: ESLintExpression;
252
265
  }
253
266
  interface ESLintForStatement extends HasLocation, HasParent {
254
- type: 'ForStatement';
255
- init: ESLintVariableDeclaration | ESLintExpression | null;
256
- test: ESLintExpression | null;
257
- update: ESLintExpression | null;
258
- body: ESLintStatement;
267
+ type: 'ForStatement';
268
+ init: ESLintVariableDeclaration | ESLintExpression | null;
269
+ test: ESLintExpression | null;
270
+ update: ESLintExpression | null;
271
+ body: ESLintStatement;
259
272
  }
260
273
  interface ESLintForInStatement extends HasLocation, HasParent {
261
- type: 'ForInStatement';
262
- left: ESLintVariableDeclaration | ESLintPattern;
263
- right: ESLintExpression;
264
- body: ESLintStatement;
274
+ type: 'ForInStatement';
275
+ left: ESLintVariableDeclaration | ESLintPattern;
276
+ right: ESLintExpression;
277
+ body: ESLintStatement;
265
278
  }
266
279
  interface ESLintForOfStatement extends HasLocation, HasParent {
267
- type: 'ForOfStatement';
268
- left: ESLintVariableDeclaration | ESLintPattern;
269
- right: ESLintExpression;
270
- body: ESLintStatement;
271
- await: boolean;
280
+ type: 'ForOfStatement';
281
+ left: ESLintVariableDeclaration | ESLintPattern;
282
+ right: ESLintExpression;
283
+ body: ESLintStatement;
284
+ await: boolean;
272
285
  }
273
286
  interface ESLintLabeledStatement extends HasLocation, HasParent {
274
- type: 'LabeledStatement';
275
- label: ESLintIdentifier;
276
- body: ESLintStatement;
287
+ type: 'LabeledStatement';
288
+ label: ESLintIdentifier;
289
+ body: ESLintStatement;
277
290
  }
278
291
  interface ESLintBreakStatement extends HasLocation, HasParent {
279
- type: 'BreakStatement';
280
- label: ESLintIdentifier | null;
292
+ type: 'BreakStatement';
293
+ label: ESLintIdentifier | null;
281
294
  }
282
295
  interface ESLintContinueStatement extends HasLocation, HasParent {
283
- type: 'ContinueStatement';
284
- label: ESLintIdentifier | null;
296
+ type: 'ContinueStatement';
297
+ label: ESLintIdentifier | null;
285
298
  }
286
299
  interface ESLintReturnStatement extends HasLocation, HasParent {
287
- type: 'ReturnStatement';
288
- argument: ESLintExpression | null;
300
+ type: 'ReturnStatement';
301
+ argument: ESLintExpression | null;
289
302
  }
290
303
  interface ESLintThrowStatement extends HasLocation, HasParent {
291
- type: 'ThrowStatement';
292
- argument: ESLintExpression;
304
+ type: 'ThrowStatement';
305
+ argument: ESLintExpression;
293
306
  }
294
307
  interface ESLintTryStatement extends HasLocation, HasParent {
295
- type: 'TryStatement';
296
- block: ESLintBlockStatement;
297
- handler: ESLintCatchClause | null;
298
- finalizer: ESLintBlockStatement | null;
308
+ type: 'TryStatement';
309
+ block: ESLintBlockStatement;
310
+ handler: ESLintCatchClause | null;
311
+ finalizer: ESLintBlockStatement | null;
299
312
  }
300
313
  interface ESLintCatchClause extends HasLocation, HasParent {
301
- type: 'CatchClause';
302
- param: ESLintPattern | null;
303
- body: ESLintBlockStatement;
314
+ type: 'CatchClause';
315
+ param: ESLintPattern | null;
316
+ body: ESLintBlockStatement;
304
317
  }
305
318
  interface ESLintWithStatement extends HasLocation, HasParent {
306
- type: 'WithStatement';
307
- object: ESLintExpression;
308
- body: ESLintStatement;
319
+ type: 'WithStatement';
320
+ object: ESLintExpression;
321
+ body: ESLintStatement;
309
322
  }
310
323
  interface ESLintDebuggerStatement extends HasLocation, HasParent {
311
- type: 'DebuggerStatement';
324
+ type: 'DebuggerStatement';
312
325
  }
313
326
  type ESLintDeclaration = ESLintFunctionDeclaration | ESLintVariableDeclaration | ESLintClassDeclaration;
314
327
  interface ESLintFunctionDeclaration extends HasLocation, HasParent {
315
- type: 'FunctionDeclaration';
316
- async: boolean;
317
- generator: boolean;
318
- id: ESLintIdentifier | null;
319
- params: ESLintPattern[];
320
- body: ESLintBlockStatement;
328
+ type: 'FunctionDeclaration';
329
+ async: boolean;
330
+ generator: boolean;
331
+ id: ESLintIdentifier | null;
332
+ params: ESLintPattern[];
333
+ body: ESLintBlockStatement;
321
334
  }
322
335
  interface ESLintVariableDeclaration extends HasLocation, HasParent {
323
- type: 'VariableDeclaration';
324
- kind: 'var' | 'let' | 'const';
325
- declarations: ESLintVariableDeclarator[];
336
+ type: 'VariableDeclaration';
337
+ kind: 'var' | 'let' | 'const';
338
+ declarations: ESLintVariableDeclarator[];
326
339
  }
327
340
  interface ESLintVariableDeclarator extends HasLocation, HasParent {
328
- type: 'VariableDeclarator';
329
- id: ESLintPattern;
330
- init: ESLintExpression | null;
341
+ type: 'VariableDeclarator';
342
+ id: ESLintPattern;
343
+ init: ESLintExpression | null;
331
344
  }
332
345
  interface ESLintClassDeclaration extends HasLocation, HasParent {
333
- type: 'ClassDeclaration';
334
- id: ESLintIdentifier | null;
335
- superClass: ESLintExpression | null;
336
- body: ESLintClassBody;
346
+ type: 'ClassDeclaration';
347
+ id: ESLintIdentifier | null;
348
+ superClass: ESLintExpression | null;
349
+ body: ESLintClassBody;
337
350
  }
338
351
  interface ESLintClassBody extends HasLocation, HasParent {
339
- type: 'ClassBody';
340
- body: (ESLintMethodDefinition | ESLintPropertyDefinition | ESLintStaticBlock)[];
352
+ type: 'ClassBody';
353
+ body: (ESLintMethodDefinition | ESLintPropertyDefinition | ESLintStaticBlock)[];
341
354
  }
342
355
  interface ESLintMethodDefinition extends HasLocation, HasParent {
343
- type: 'MethodDefinition';
344
- kind: 'constructor' | 'method' | 'get' | 'set';
345
- computed: boolean;
346
- static: boolean;
347
- key: ESLintExpression | ESLintPrivateIdentifier;
348
- value: ESLintFunctionExpression;
356
+ type: 'MethodDefinition';
357
+ kind: 'constructor' | 'method' | 'get' | 'set';
358
+ computed: boolean;
359
+ static: boolean;
360
+ key: ESLintExpression | ESLintPrivateIdentifier;
361
+ value: ESLintFunctionExpression;
349
362
  }
350
363
  interface ESLintPropertyDefinition extends HasLocation, HasParent {
351
- type: 'PropertyDefinition';
352
- computed: boolean;
353
- static: boolean;
354
- key: ESLintExpression | ESLintPrivateIdentifier;
355
- value: ESLintExpression | null;
364
+ type: 'PropertyDefinition';
365
+ computed: boolean;
366
+ static: boolean;
367
+ key: ESLintExpression | ESLintPrivateIdentifier;
368
+ value: ESLintExpression | null;
356
369
  }
357
370
  interface ESLintStaticBlock extends HasLocation, HasParent, Omit<ESLintBlockStatement, 'type'> {
358
- type: 'StaticBlock';
359
- body: ESLintStatement[];
371
+ type: 'StaticBlock';
372
+ body: ESLintStatement[];
360
373
  }
361
374
  interface ESLintPrivateIdentifier extends HasLocation, HasParent {
362
- type: 'PrivateIdentifier';
363
- name: string;
375
+ type: 'PrivateIdentifier';
376
+ name: string;
364
377
  }
365
378
  type ESLintModuleDeclaration = ESLintImportDeclaration | ESLintExportNamedDeclaration | ESLintExportDefaultDeclaration | ESLintExportAllDeclaration;
366
379
  type ESLintModuleSpecifier = ESLintImportSpecifier | ESLintImportDefaultSpecifier | ESLintImportNamespaceSpecifier | ESLintExportSpecifier;
367
380
  interface ESLintImportDeclaration extends HasLocation, HasParent {
368
- type: 'ImportDeclaration';
369
- specifiers: (ESLintImportSpecifier | ESLintImportDefaultSpecifier | ESLintImportNamespaceSpecifier)[];
370
- source: ESLintLiteral;
381
+ type: 'ImportDeclaration';
382
+ specifiers: (ESLintImportSpecifier | ESLintImportDefaultSpecifier | ESLintImportNamespaceSpecifier)[];
383
+ source: ESLintLiteral;
371
384
  }
372
385
  interface ESLintImportSpecifier extends HasLocation, HasParent {
373
- type: 'ImportSpecifier';
374
- imported: ESLintIdentifier | ESLintStringLiteral;
375
- local: ESLintIdentifier;
386
+ type: 'ImportSpecifier';
387
+ imported: ESLintIdentifier | ESLintStringLiteral;
388
+ local: ESLintIdentifier;
376
389
  }
377
390
  interface ESLintImportDefaultSpecifier extends HasLocation, HasParent {
378
- type: 'ImportDefaultSpecifier';
379
- local: ESLintIdentifier;
391
+ type: 'ImportDefaultSpecifier';
392
+ local: ESLintIdentifier;
380
393
  }
381
394
  interface ESLintImportNamespaceSpecifier extends HasLocation, HasParent {
382
- type: 'ImportNamespaceSpecifier';
383
- local: ESLintIdentifier;
395
+ type: 'ImportNamespaceSpecifier';
396
+ local: ESLintIdentifier;
384
397
  }
385
398
  interface ESLintImportExpression extends HasLocation, HasParent {
386
- type: 'ImportExpression';
387
- source: ESLintExpression;
399
+ type: 'ImportExpression';
400
+ source: ESLintExpression;
388
401
  }
389
402
  interface ESLintExportNamedDeclaration extends HasLocation, HasParent {
390
- type: 'ExportNamedDeclaration';
391
- declaration?: ESLintDeclaration | null;
392
- specifiers: ESLintExportSpecifier[];
393
- source?: ESLintLiteral | null;
403
+ type: 'ExportNamedDeclaration';
404
+ declaration?: ESLintDeclaration | null;
405
+ specifiers: ESLintExportSpecifier[];
406
+ source?: ESLintLiteral | null;
394
407
  }
395
408
  interface ESLintExportSpecifier extends HasLocation, HasParent {
396
- type: 'ExportSpecifier';
397
- local: ESLintIdentifier | ESLintStringLiteral;
398
- exported: ESLintIdentifier | ESLintStringLiteral;
409
+ type: 'ExportSpecifier';
410
+ local: ESLintIdentifier | ESLintStringLiteral;
411
+ exported: ESLintIdentifier | ESLintStringLiteral;
399
412
  }
400
413
  interface ESLintExportDefaultDeclaration extends HasLocation, HasParent {
401
- type: 'ExportDefaultDeclaration';
402
- declaration: ESLintDeclaration | ESLintExpression;
414
+ type: 'ExportDefaultDeclaration';
415
+ declaration: ESLintDeclaration | ESLintExpression;
403
416
  }
404
417
  interface ESLintExportAllDeclaration extends HasLocation, HasParent {
405
- type: 'ExportAllDeclaration';
406
- exported: ESLintIdentifier | ESLintStringLiteral | null;
407
- source: ESLintLiteral;
418
+ type: 'ExportAllDeclaration';
419
+ exported: ESLintIdentifier | ESLintStringLiteral | null;
420
+ source: ESLintLiteral;
408
421
  }
409
422
  type ESLintExpression = ESLintThisExpression | ESLintArrayExpression | ESLintObjectExpression | ESLintFunctionExpression | ESLintArrowFunctionExpression | ESLintYieldExpression | ESLintLiteral | ESLintUnaryExpression | ESLintUpdateExpression | ESLintBinaryExpression | ESLintAssignmentExpression | ESLintLogicalExpression | ESLintMemberExpression | ESLintConditionalExpression | ESLintCallExpression | ESLintNewExpression | ESLintSequenceExpression | ESLintTemplateLiteral | ESLintTaggedTemplateExpression | ESLintClassExpression | ESLintMetaProperty | ESLintIdentifier | ESLintAwaitExpression | ESLintChainExpression;
410
423
  interface ESLintIdentifier extends HasLocation, HasParent {
411
- type: 'Identifier';
412
- name: string;
424
+ type: 'Identifier';
425
+ name: string;
413
426
  }
414
427
  interface ESLintLiteralBase extends HasLocation, HasParent {
415
- type: 'Literal';
416
- value: string | boolean | null | number | RegExp | bigint;
417
- raw: string;
418
- regex?: {
419
- pattern: string;
420
- flags: string;
421
- };
422
- bigint?: string;
428
+ type: 'Literal';
429
+ value: string | boolean | null | number | RegExp | bigint;
430
+ raw: string;
431
+ regex?: {
432
+ pattern: string;
433
+ flags: string;
434
+ };
435
+ bigint?: string;
423
436
  }
424
437
  interface ESLintStringLiteral extends ESLintLiteralBase {
425
- value: string;
426
- regex?: undefined;
427
- bigint?: undefined;
438
+ value: string;
439
+ regex?: undefined;
440
+ bigint?: undefined;
428
441
  }
429
442
  interface ESLintBooleanLiteral extends ESLintLiteralBase {
430
- value: boolean;
431
- regex?: undefined;
432
- bigint?: undefined;
443
+ value: boolean;
444
+ regex?: undefined;
445
+ bigint?: undefined;
433
446
  }
434
447
  interface ESLintNullLiteral extends ESLintLiteralBase {
435
- value: null;
436
- regex?: undefined;
437
- bigint?: undefined;
448
+ value: null;
449
+ regex?: undefined;
450
+ bigint?: undefined;
438
451
  }
439
452
  interface ESLintNumberLiteral extends ESLintLiteralBase {
440
- value: number;
441
- regex?: undefined;
442
- bigint?: undefined;
453
+ value: number;
454
+ regex?: undefined;
455
+ bigint?: undefined;
443
456
  }
444
457
  interface ESLintRegExpLiteral extends ESLintLiteralBase {
445
- value: null | RegExp;
446
- regex: {
447
- pattern: string;
448
- flags: string;
449
- };
450
- bigint?: undefined;
458
+ value: null | RegExp;
459
+ regex: {
460
+ pattern: string;
461
+ flags: string;
462
+ };
463
+ bigint?: undefined;
451
464
  }
452
465
  interface ESLintBigIntLiteral extends ESLintLiteralBase {
453
- value: null | bigint;
454
- regex?: undefined;
455
- bigint: string;
466
+ value: null | bigint;
467
+ regex?: undefined;
468
+ bigint: string;
456
469
  }
457
470
  type ESLintLiteral = ESLintStringLiteral | ESLintBooleanLiteral | ESLintNullLiteral | ESLintNumberLiteral | ESLintRegExpLiteral | ESLintBigIntLiteral;
458
471
  interface ESLintThisExpression extends HasLocation, HasParent {
459
- type: 'ThisExpression';
472
+ type: 'ThisExpression';
460
473
  }
461
474
  interface ESLintArrayExpression extends HasLocation, HasParent {
462
- type: 'ArrayExpression';
463
- elements: (ESLintExpression | ESLintSpreadElement)[];
475
+ type: 'ArrayExpression';
476
+ elements: (ESLintExpression | ESLintSpreadElement)[];
464
477
  }
465
478
  interface ESLintObjectExpression extends HasLocation, HasParent {
466
- type: 'ObjectExpression';
467
- properties: (ESLintProperty | ESLintSpreadElement | ESLintLegacySpreadProperty)[];
479
+ type: 'ObjectExpression';
480
+ properties: (ESLintProperty | ESLintSpreadElement | ESLintLegacySpreadProperty)[];
468
481
  }
469
482
  interface ESLintProperty extends HasLocation, HasParent {
470
- type: 'Property';
471
- kind: 'init' | 'get' | 'set';
472
- method: boolean;
473
- shorthand: boolean;
474
- computed: boolean;
475
- key: ESLintExpression;
476
- value: ESLintExpression | ESLintPattern;
483
+ type: 'Property';
484
+ kind: 'init' | 'get' | 'set';
485
+ method: boolean;
486
+ shorthand: boolean;
487
+ computed: boolean;
488
+ key: ESLintExpression;
489
+ value: ESLintExpression | ESLintPattern;
477
490
  }
478
491
  interface ESLintFunctionExpression extends HasLocation, HasParent {
479
- type: 'FunctionExpression';
480
- async: boolean;
481
- generator: boolean;
482
- id: ESLintIdentifier | null;
483
- params: ESLintPattern[];
484
- body: ESLintBlockStatement;
492
+ type: 'FunctionExpression';
493
+ async: boolean;
494
+ generator: boolean;
495
+ id: ESLintIdentifier | null;
496
+ params: ESLintPattern[];
497
+ body: ESLintBlockStatement;
485
498
  }
486
499
  interface ESLintArrowFunctionExpression extends HasLocation, HasParent {
487
- type: 'ArrowFunctionExpression';
488
- async: boolean;
489
- generator: boolean;
490
- id: ESLintIdentifier | null;
491
- params: ESLintPattern[];
492
- body: ESLintBlockStatement;
500
+ type: 'ArrowFunctionExpression';
501
+ async: boolean;
502
+ generator: boolean;
503
+ id: ESLintIdentifier | null;
504
+ params: ESLintPattern[];
505
+ body: ESLintBlockStatement;
493
506
  }
494
507
  interface ESLintSequenceExpression extends HasLocation, HasParent {
495
- type: 'SequenceExpression';
496
- expressions: ESLintExpression[];
508
+ type: 'SequenceExpression';
509
+ expressions: ESLintExpression[];
497
510
  }
498
511
  interface ESLintUnaryExpression extends HasLocation, HasParent {
499
- type: 'UnaryExpression';
500
- operator: '-' | '+' | '!' | '~' | 'typeof' | 'void' | 'delete';
501
- prefix: boolean;
502
- argument: ESLintExpression;
512
+ type: 'UnaryExpression';
513
+ operator: '-' | '+' | '!' | '~' | 'typeof' | 'void' | 'delete';
514
+ prefix: boolean;
515
+ argument: ESLintExpression;
503
516
  }
504
517
  interface ESLintBinaryExpression extends HasLocation, HasParent {
505
- type: 'BinaryExpression';
506
- operator: '==' | '!=' | '===' | '!==' | '<' | '<=' | '>' | '>=' | '<<' | '>>' | '>>>' | '+' | '-' | '*' | '/' | '%' | '**' | '|' | '^' | '&' | 'in' | 'instanceof';
507
- left: ESLintExpression | ESLintPrivateIdentifier;
508
- right: ESLintExpression;
518
+ type: 'BinaryExpression';
519
+ operator: '==' | '!=' | '===' | '!==' | '<' | '<=' | '>' | '>=' | '<<' | '>>' | '>>>' | '+' | '-' | '*' | '/' | '%' | '**' | '|' | '^' | '&' | 'in' | 'instanceof';
520
+ left: ESLintExpression | ESLintPrivateIdentifier;
521
+ right: ESLintExpression;
509
522
  }
510
523
  interface ESLintAssignmentExpression extends HasLocation, HasParent {
511
- type: 'AssignmentExpression';
512
- operator: '=' | '+=' | '-=' | '*=' | '/=' | '%=' | '**=' | '<<=' | '>>=' | '>>>=' | '|=' | '^=' | '&=' | '||=' | '&&=' | '??=';
513
- left: ESLintPattern;
514
- right: ESLintExpression;
524
+ type: 'AssignmentExpression';
525
+ operator: '=' | '+=' | '-=' | '*=' | '/=' | '%=' | '**=' | '<<=' | '>>=' | '>>>=' | '|=' | '^=' | '&=' | '||=' | '&&=' | '??=';
526
+ left: ESLintPattern;
527
+ right: ESLintExpression;
515
528
  }
516
529
  interface ESLintUpdateExpression extends HasLocation, HasParent {
517
- type: 'UpdateExpression';
518
- operator: '++' | '--';
519
- argument: ESLintExpression;
520
- prefix: boolean;
530
+ type: 'UpdateExpression';
531
+ operator: '++' | '--';
532
+ argument: ESLintExpression;
533
+ prefix: boolean;
521
534
  }
522
535
  interface ESLintLogicalExpression extends HasLocation, HasParent {
523
- type: 'LogicalExpression';
524
- operator: '||' | '&&' | '??';
525
- left: ESLintExpression;
526
- right: ESLintExpression;
536
+ type: 'LogicalExpression';
537
+ operator: '||' | '&&' | '??';
538
+ left: ESLintExpression;
539
+ right: ESLintExpression;
527
540
  }
528
541
  interface ESLintConditionalExpression extends HasLocation, HasParent {
529
- type: 'ConditionalExpression';
530
- test: ESLintExpression;
531
- alternate: ESLintExpression;
532
- consequent: ESLintExpression;
542
+ type: 'ConditionalExpression';
543
+ test: ESLintExpression;
544
+ alternate: ESLintExpression;
545
+ consequent: ESLintExpression;
533
546
  }
534
547
  interface ESLintCallExpression extends HasLocation, HasParent {
535
- type: 'CallExpression';
536
- optional: boolean;
537
- callee: ESLintExpression | ESLintSuper;
538
- arguments: (ESLintExpression | ESLintSpreadElement)[];
548
+ type: 'CallExpression';
549
+ optional: boolean;
550
+ callee: ESLintExpression | ESLintSuper;
551
+ arguments: (ESLintExpression | ESLintSpreadElement)[];
539
552
  }
540
553
  interface ESLintSuper extends HasLocation, HasParent {
541
- type: 'Super';
554
+ type: 'Super';
542
555
  }
543
556
  interface ESLintNewExpression extends HasLocation, HasParent {
544
- type: 'NewExpression';
545
- callee: ESLintExpression;
546
- arguments: (ESLintExpression | ESLintSpreadElement)[];
557
+ type: 'NewExpression';
558
+ callee: ESLintExpression;
559
+ arguments: (ESLintExpression | ESLintSpreadElement)[];
547
560
  }
548
561
  interface ESLintMemberExpression extends HasLocation, HasParent {
549
- type: 'MemberExpression';
550
- optional: boolean;
551
- computed: boolean;
552
- object: ESLintExpression | ESLintSuper;
553
- property: ESLintExpression | ESLintPrivateIdentifier;
562
+ type: 'MemberExpression';
563
+ optional: boolean;
564
+ computed: boolean;
565
+ object: ESLintExpression | ESLintSuper;
566
+ property: ESLintExpression | ESLintPrivateIdentifier;
554
567
  }
555
568
  interface ESLintYieldExpression extends HasLocation, HasParent {
556
- type: 'YieldExpression';
557
- delegate: boolean;
558
- argument: ESLintExpression | null;
569
+ type: 'YieldExpression';
570
+ delegate: boolean;
571
+ argument: ESLintExpression | null;
559
572
  }
560
573
  interface ESLintAwaitExpression extends HasLocation, HasParent {
561
- type: 'AwaitExpression';
562
- argument: ESLintExpression;
574
+ type: 'AwaitExpression';
575
+ argument: ESLintExpression;
563
576
  }
564
577
  interface ESLintTemplateLiteral extends HasLocation, HasParent {
565
- type: 'TemplateLiteral';
566
- quasis: ESLintTemplateElement[];
567
- expressions: ESLintExpression[];
578
+ type: 'TemplateLiteral';
579
+ quasis: ESLintTemplateElement[];
580
+ expressions: ESLintExpression[];
568
581
  }
569
582
  interface ESLintTaggedTemplateExpression extends HasLocation, HasParent {
570
- type: 'TaggedTemplateExpression';
571
- tag: ESLintExpression;
572
- quasi: ESLintTemplateLiteral;
583
+ type: 'TaggedTemplateExpression';
584
+ tag: ESLintExpression;
585
+ quasi: ESLintTemplateLiteral;
573
586
  }
574
587
  interface ESLintTemplateElement extends HasLocation, HasParent {
575
- type: 'TemplateElement';
576
- tail: boolean;
577
- value: {
578
- cooked: string | null;
579
- raw: string;
580
- };
588
+ type: 'TemplateElement';
589
+ tail: boolean;
590
+ value: {
591
+ cooked: string | null;
592
+ raw: string;
593
+ };
581
594
  }
582
595
  interface ESLintClassExpression extends HasLocation, HasParent {
583
- type: 'ClassExpression';
584
- id: ESLintIdentifier | null;
585
- superClass: ESLintExpression | null;
586
- body: ESLintClassBody;
596
+ type: 'ClassExpression';
597
+ id: ESLintIdentifier | null;
598
+ superClass: ESLintExpression | null;
599
+ body: ESLintClassBody;
587
600
  }
588
601
  interface ESLintMetaProperty extends HasLocation, HasParent {
589
- type: 'MetaProperty';
590
- meta: ESLintIdentifier;
591
- property: ESLintIdentifier;
602
+ type: 'MetaProperty';
603
+ meta: ESLintIdentifier;
604
+ property: ESLintIdentifier;
592
605
  }
593
606
  type ESLintPattern = ESLintIdentifier | ESLintObjectPattern | ESLintArrayPattern | ESLintRestElement | ESLintAssignmentPattern | ESLintMemberExpression | ESLintLegacyRestProperty;
594
607
  interface ESLintObjectPattern extends HasLocation, HasParent {
595
- type: 'ObjectPattern';
596
- properties: (ESLintAssignmentProperty | ESLintRestElement | ESLintLegacyRestProperty)[];
608
+ type: 'ObjectPattern';
609
+ properties: (ESLintAssignmentProperty | ESLintRestElement | ESLintLegacyRestProperty)[];
597
610
  }
598
611
  interface ESLintAssignmentProperty extends ESLintProperty {
599
- value: ESLintPattern;
600
- kind: 'init';
601
- method: false;
612
+ value: ESLintPattern;
613
+ kind: 'init';
614
+ method: false;
602
615
  }
603
616
  interface ESLintArrayPattern extends HasLocation, HasParent {
604
- type: 'ArrayPattern';
605
- elements: ESLintPattern[];
617
+ type: 'ArrayPattern';
618
+ elements: ESLintPattern[];
606
619
  }
607
620
  interface ESLintRestElement extends HasLocation, HasParent {
608
- type: 'RestElement';
609
- argument: ESLintPattern;
621
+ type: 'RestElement';
622
+ argument: ESLintPattern;
610
623
  }
611
624
  interface ESLintSpreadElement extends HasLocation, HasParent {
612
- type: 'SpreadElement';
613
- argument: ESLintExpression;
625
+ type: 'SpreadElement';
626
+ argument: ESLintExpression;
614
627
  }
615
628
  interface ESLintAssignmentPattern extends HasLocation, HasParent {
616
- type: 'AssignmentPattern';
617
- left: ESLintPattern;
618
- right: ESLintExpression;
629
+ type: 'AssignmentPattern';
630
+ left: ESLintPattern;
631
+ right: ESLintExpression;
619
632
  }
620
633
  type ESLintChainElement = ESLintCallExpression | ESLintMemberExpression;
621
634
  interface ESLintChainExpression extends HasLocation, HasParent {
622
- type: 'ChainExpression';
623
- expression: ESLintChainElement;
635
+ type: 'ChainExpression';
636
+ expression: ESLintChainElement;
624
637
  }
625
638
  /**
626
639
  * Legacy for babel-eslint and espree.
627
640
  */
628
641
  interface ESLintLegacyRestProperty extends HasLocation, HasParent {
629
- type: 'RestProperty' | 'ExperimentalRestProperty';
630
- argument: ESLintPattern;
642
+ type: 'RestProperty' | 'ExperimentalRestProperty';
643
+ argument: ESLintPattern;
631
644
  }
632
645
  /**
633
646
  * Legacy for babel-eslint and espree.
634
647
  */
635
648
  interface ESLintLegacySpreadProperty extends HasLocation, HasParent {
636
- type: 'SpreadProperty' | 'ExperimentalSpreadProperty';
637
- argument: ESLintExpression;
649
+ type: 'SpreadProperty' | 'ExperimentalSpreadProperty';
650
+ argument: ESLintExpression;
638
651
  }
639
652
  /**
640
653
  * Constants of namespaces.
641
654
  * @see https://infra.spec.whatwg.org/#namespaces
642
655
  */
643
656
  declare const NS: Readonly<{
644
- HTML: "http://www.w3.org/1999/xhtml";
645
- MathML: "http://www.w3.org/1998/Math/MathML";
646
- SVG: "http://www.w3.org/2000/svg";
647
- XLink: "http://www.w3.org/1999/xlink";
648
- XML: "http://www.w3.org/XML/1998/namespace";
649
- XMLNS: "http://www.w3.org/2000/xmlns/";
657
+ HTML: "http://www.w3.org/1999/xhtml";
658
+ MathML: "http://www.w3.org/1998/Math/MathML";
659
+ SVG: "http://www.w3.org/2000/svg";
660
+ XLink: "http://www.w3.org/1999/xlink";
661
+ XML: "http://www.w3.org/XML/1998/namespace";
662
+ XMLNS: "http://www.w3.org/2000/xmlns/";
650
663
  }>;
651
664
  /**
652
665
  * Type of namespaces.
@@ -656,62 +669,62 @@ type Namespace = typeof NS.HTML | typeof NS.MathML | typeof NS.SVG | typeof NS.X
656
669
  * Type of variable definitions.
657
670
  */
658
671
  interface Variable {
659
- id: ESLintIdentifier;
660
- kind: 'v-for' | 'scope';
661
- references: Reference[];
672
+ id: ESLintIdentifier;
673
+ kind: 'v-for' | 'scope';
674
+ references: Reference[];
662
675
  }
663
676
  /**
664
677
  * Type of variable references.
665
678
  */
666
679
  interface Reference {
667
- id: ESLintIdentifier;
668
- mode: 'rw' | 'r' | 'w';
669
- variable: Variable | null;
670
- isValueReference?: boolean;
671
- isTypeReference?: boolean;
680
+ id: ESLintIdentifier;
681
+ mode: 'rw' | 'r' | 'w';
682
+ variable: Variable | null;
683
+ isValueReference?: boolean;
684
+ isTypeReference?: boolean;
672
685
  }
673
686
  /**
674
687
  * The node of `v-for` directives.
675
688
  */
676
689
  interface VForExpression extends HasLocation, HasParent {
677
- type: 'VForExpression';
678
- parent: VExpressionContainer;
679
- left: ESLintPattern[];
680
- right: ESLintExpression;
690
+ type: 'VForExpression';
691
+ parent: VExpressionContainer;
692
+ left: ESLintPattern[];
693
+ right: ESLintExpression;
681
694
  }
682
695
  /**
683
696
  * The node of `v-on` directives.
684
697
  */
685
698
  interface VOnExpression extends HasLocation, HasParent {
686
- type: 'VOnExpression';
687
- parent: VExpressionContainer;
688
- body: ESLintStatement[];
699
+ type: 'VOnExpression';
700
+ parent: VExpressionContainer;
701
+ body: ESLintStatement[];
689
702
  }
690
703
  /**
691
704
  * The node of `slot-scope` directives.
692
705
  */
693
706
  interface VSlotScopeExpression extends HasLocation, HasParent {
694
- type: 'VSlotScopeExpression';
695
- parent: VExpressionContainer;
696
- params: ESLintPattern[];
707
+ type: 'VSlotScopeExpression';
708
+ parent: VExpressionContainer;
709
+ params: ESLintPattern[];
697
710
  }
698
711
  /**
699
712
  * The node of a filter sequence which is separated by `|`.
700
713
  */
701
714
  interface VFilterSequenceExpression extends HasLocation, HasParent {
702
- type: 'VFilterSequenceExpression';
703
- parent: VExpressionContainer;
704
- expression: ESLintExpression;
705
- filters: VFilter[];
715
+ type: 'VFilterSequenceExpression';
716
+ parent: VExpressionContainer;
717
+ expression: ESLintExpression;
718
+ filters: VFilter[];
706
719
  }
707
720
  /**
708
721
  * The node of a filter sequence which is separated by `|`.
709
722
  */
710
723
  interface VFilter extends HasLocation, HasParent {
711
- type: 'VFilter';
712
- parent: VFilterSequenceExpression;
713
- callee: ESLintIdentifier;
714
- arguments: (ESLintExpression | ESLintSpreadElement)[];
724
+ type: 'VFilter';
725
+ parent: VFilterSequenceExpression;
726
+ callee: ESLintIdentifier;
727
+ arguments: (ESLintExpression | ESLintSpreadElement)[];
715
728
  }
716
729
  /**
717
730
  * The union type of any nodes.
@@ -722,128 +735,130 @@ type VExpression = ESLintExpression | VFilterSequenceExpression | VForExpression
722
735
  * Text nodes.
723
736
  */
724
737
  interface VText extends HasLocation, HasParent {
725
- type: 'VText';
726
- parent: VTemplateRoot | VElement;
727
- value: string;
738
+ type: 'VText';
739
+ parent: VTemplateRoot | VElement;
740
+ value: string;
728
741
  }
729
742
  /**
730
743
  * The node of JavaScript expression in text.
731
744
  * e.g. `{{ name }}`
732
745
  */
733
746
  interface VExpressionContainer extends HasLocation, HasParent {
734
- type: 'VExpressionContainer';
735
- parent: VTemplateRoot | VElement | VDirective | VDirectiveKey;
736
- expression: VExpression | null;
737
- references: Reference[];
747
+ type: 'VExpressionContainer';
748
+ parent: VTemplateRoot | VElement | VDirective | VDirectiveKey;
749
+ expression: VExpression | null;
750
+ references: Reference[];
738
751
  }
739
752
  /**
740
753
  * Attribute name nodes.
741
754
  */
742
755
  interface VIdentifier extends HasLocation, HasParent {
743
- type: 'VIdentifier';
744
- parent: VAttribute | VDirectiveKey;
745
- name: string;
746
- rawName: string;
756
+ type: 'VIdentifier';
757
+ parent: VAttribute | VDirectiveKey;
758
+ name: string;
759
+ rawName: string;
747
760
  }
748
761
  /**
749
762
  * Attribute name nodes.
750
763
  */
751
764
  interface VDirectiveKey extends HasLocation, HasParent {
752
- type: 'VDirectiveKey';
753
- parent: VDirective;
754
- name: VIdentifier;
755
- argument: VExpressionContainer | VIdentifier | null;
756
- modifiers: VIdentifier[];
765
+ type: 'VDirectiveKey';
766
+ parent: VDirective;
767
+ name: VIdentifier;
768
+ argument: VExpressionContainer | VIdentifier | null;
769
+ modifiers: VIdentifier[];
757
770
  }
758
771
  /**
759
772
  * Attribute value nodes.
760
773
  */
761
774
  interface VLiteral extends HasLocation, HasParent {
762
- type: 'VLiteral';
763
- parent: VAttribute;
764
- value: string;
775
+ type: 'VLiteral';
776
+ parent: VAttribute;
777
+ value: string;
765
778
  }
766
779
  /**
767
780
  * Static attribute nodes.
768
781
  */
769
782
  interface VAttribute extends HasLocation, HasParent {
770
- type: 'VAttribute';
771
- parent: VStartTag;
772
- directive: false;
773
- key: VIdentifier;
774
- value: VLiteral | null;
783
+ type: 'VAttribute';
784
+ parent: VStartTag;
785
+ directive: false;
786
+ key: VIdentifier;
787
+ value: VLiteral | null;
775
788
  }
776
789
  /**
777
790
  * Directive nodes.
778
791
  */
779
792
  interface VDirective extends HasLocation, HasParent {
780
- type: 'VAttribute';
781
- parent: VStartTag;
782
- directive: true;
783
- key: VDirectiveKey;
784
- value: VExpressionContainer | null;
793
+ type: 'VAttribute';
794
+ parent: VStartTag;
795
+ directive: true;
796
+ key: VDirectiveKey;
797
+ value: VExpressionContainer | null;
785
798
  }
786
799
  /**
787
800
  * Start tag nodes.
788
801
  */
789
802
  interface VStartTag extends HasLocation, HasParent {
790
- type: 'VStartTag';
791
- parent: VElement;
792
- selfClosing: boolean;
793
- attributes: (VAttribute | VDirective)[];
803
+ type: 'VStartTag';
804
+ parent: VElement;
805
+ selfClosing: boolean;
806
+ attributes: (VAttribute | VDirective)[];
794
807
  }
795
808
  /**
796
809
  * End tag nodes.
797
810
  */
798
811
  interface VEndTag extends HasLocation, HasParent {
799
- type: 'VEndTag';
800
- parent: VElement;
812
+ type: 'VEndTag';
813
+ parent: VElement;
801
814
  }
802
815
  /**
803
816
  * The property which has concrete information.
804
817
  */
805
818
  interface HasConcreteInfo {
806
- tokens: Token[];
807
- comments: Token[];
808
- errors: ParseError[];
819
+ tokens: Token[];
820
+ comments: Token[];
821
+ errors: ParseError[];
809
822
  }
810
823
  /**
811
824
  * Element nodes.
812
825
  */
813
826
  interface VElement extends HasLocation, HasParent {
814
- type: 'VElement';
815
- parent: VTemplateRoot | VElement;
816
- namespace: Namespace;
817
- name: string;
818
- rawName: string;
819
- startTag: VStartTag;
820
- children: (VElement | VText | VExpressionContainer)[];
821
- endTag: VEndTag | null;
822
- variables: Variable[];
827
+ type: 'VElement';
828
+ parent: VTemplateRoot | VElement;
829
+ namespace: Namespace;
830
+ name: string;
831
+ rawName: string;
832
+ startTag: VStartTag;
833
+ children: (VElement | VText | VExpressionContainer)[];
834
+ endTag: VEndTag | null;
835
+ variables: Variable[];
823
836
  }
824
837
  /**
825
838
  * Root nodes.
826
839
  */
827
840
  interface VTemplateRoot extends HasLocation {
828
- type: 'VTemplateRoot';
829
- parent: TSESTree$1.Node;
830
- children: (VElement | VText | VExpressionContainer)[];
831
- templateInfo?: PrettierType<Omit<FinalProcessTemplateInfo, 'templateMeta' | 'templateRootAST'>>;
841
+ type: 'VTemplateRoot';
842
+ parent: TSESTree$1.Node;
843
+ children: (VElement | VText | VExpressionContainer)[];
844
+ templateInfo?: PrettierType<Omit<FinalProcessTemplateInfo, 'templateMeta' | 'templateRootAST'>>;
832
845
  }
833
846
 
847
+ //#endregion
848
+ //#region src/ast/traverse.d.ts
834
849
  declare const KEYS: {
835
- readonly [type: string]: readonly string[];
850
+ readonly [type: string]: readonly string[];
836
851
  };
837
852
  /**
838
853
  * Get the keys of the given node to traverse it.
839
854
  * @param node The node to get.
840
855
  * @returns The keys to traverse.
841
856
  */
842
- declare function getFallbackKeys(node: Node): string[];
857
+ declare function getFallbackKeys(node: any): string[];
843
858
  interface Visitor {
844
- visitorKeys?: VisitorKeys;
845
- enterNode: (node: Node, parent: Node | null) => void;
846
- leaveNode: (node: Node, parent: Node | null) => void;
859
+ visitorKeys?: VisitorKeys;
860
+ enterNode: (node: Node, parent: Node | null) => void;
861
+ leaveNode: (node: Node, parent: Node | null) => void;
847
862
  }
848
863
  /**
849
864
  * Traverse the given AST tree.
@@ -852,7 +867,10 @@ interface Visitor {
852
867
  */
853
868
  declare function traverseNodes(node: Node, visitor: Visitor): void;
854
869
 
870
+ //#endregion
871
+ //#region src/index.d.ts
855
872
  declare function parse(code: string, parserOptions: VineESLintParserOptions): ESLintProgram;
856
873
  declare function parseForESLint(code: string, parserOptions: VineESLintParserOptions): ParseForESLintResult;
857
874
 
858
- export { type ESLintArrayExpression, type ESLintArrayPattern, type ESLintArrowFunctionExpression, type ESLintAssignmentExpression, type ESLintAssignmentPattern, type ESLintAssignmentProperty, type ESLintAwaitExpression, type ESLintBigIntLiteral, type ESLintBinaryExpression, type ESLintBlockStatement, type ESLintBooleanLiteral, type ESLintBreakStatement, type ESLintCallExpression, type ESLintCatchClause, type ESLintChainElement, type ESLintChainExpression, type ESLintClassBody, type ESLintClassDeclaration, type ESLintClassExpression, type ESLintConditionalExpression, type ESLintContinueStatement, type ESLintDebuggerStatement, type ESLintDeclaration, type ESLintDirective, type ESLintDoWhileStatement, type ESLintEmptyStatement, type ESLintExportAllDeclaration, type ESLintExportDefaultDeclaration, type ESLintExportNamedDeclaration, type ESLintExportSpecifier, type ESLintExpression, type ESLintExpressionStatement, type ESLintExtendedProgram, type ESLintForInStatement, type ESLintForOfStatement, type ESLintForStatement, type ESLintFunctionDeclaration, type ESLintFunctionExpression, type ESLintIdentifier, type ESLintIfStatement, type ESLintImportDeclaration, type ESLintImportDefaultSpecifier, type ESLintImportExpression, type ESLintImportNamespaceSpecifier, type ESLintImportSpecifier, type ESLintLabeledStatement, type ESLintLegacyRestProperty, type ESLintLegacySpreadProperty, type ESLintLiteral, type ESLintLogicalExpression, type ESLintMemberExpression, type ESLintMetaProperty, type ESLintMethodDefinition, type ESLintModuleDeclaration, type ESLintModuleSpecifier, type ESLintNewExpression, type ESLintNode, type ESLintNullLiteral, type ESLintNumberLiteral, type ESLintObjectExpression, type ESLintObjectPattern, type ESLintPattern, type ESLintPrivateIdentifier, type ESLintProgram, type ESLintProperty, type ESLintPropertyDefinition, type ESLintRegExpLiteral, type ESLintRestElement, type ESLintReturnStatement, type ESLintSequenceExpression, type ESLintSpreadElement, type ESLintStatement, type ESLintStaticBlock, type ESLintStringLiteral, type ESLintSuper, type ESLintSwitchCase, type ESLintSwitchStatement, type ESLintTaggedTemplateExpression, type ESLintTemplateElement, type ESLintTemplateLiteral, type ESLintThisExpression, type ESLintThrowStatement, type ESLintTryStatement, type ESLintUnaryExpression, type ESLintUpdateExpression, type ESLintVariableDeclaration, type ESLintVariableDeclarator, type ESLintWhileStatement, type ESLintWithStatement, type ESLintYieldExpression, type ErrorCode, type HasConcreteInfo, type HasLocation, type HasParent, KEYS, type Location, type LocationRange, NS, type Namespace, type Node, type Offset, type OffsetRange, ParseError, type Reference, type Token, type VAttribute, type VDirective, type VDirectiveKey, type VElement, type VEndTag, type VExpression, type VExpressionContainer, type VFilter, type VFilterSequenceExpression, type VForExpression, type VIdentifier, type VLiteral, type VNode, type VOnExpression, type VSlotScopeExpression, type VStartTag, type VTemplateNode, type VTemplateRoot, type VText, type Variable, type Visitor, getFallbackKeys, parse, parseForESLint, traverseNodes };
875
+ //#endregion
876
+ export { ESLintArrayExpression, ESLintArrayPattern, ESLintArrowFunctionExpression, ESLintAssignmentExpression, ESLintAssignmentPattern, ESLintAssignmentProperty, ESLintAwaitExpression, ESLintBigIntLiteral, ESLintBinaryExpression, ESLintBlockStatement, ESLintBooleanLiteral, ESLintBreakStatement, ESLintCallExpression, ESLintCatchClause, ESLintChainElement, ESLintChainExpression, ESLintClassBody, ESLintClassDeclaration, ESLintClassExpression, ESLintConditionalExpression, ESLintContinueStatement, ESLintDebuggerStatement, ESLintDeclaration, ESLintDirective, ESLintDoWhileStatement, ESLintEmptyStatement, ESLintExportAllDeclaration, ESLintExportDefaultDeclaration, ESLintExportNamedDeclaration, ESLintExportSpecifier, ESLintExpression, ESLintExpressionStatement, ESLintExtendedProgram, ESLintForInStatement, ESLintForOfStatement, ESLintForStatement, ESLintFunctionDeclaration, ESLintFunctionExpression, ESLintIdentifier, ESLintIfStatement, ESLintImportDeclaration, ESLintImportDefaultSpecifier, ESLintImportExpression, ESLintImportNamespaceSpecifier, ESLintImportSpecifier, ESLintLabeledStatement, ESLintLegacyRestProperty, ESLintLegacySpreadProperty, ESLintLiteral, ESLintLogicalExpression, ESLintMemberExpression, ESLintMetaProperty, ESLintMethodDefinition, ESLintModuleDeclaration, ESLintModuleSpecifier, ESLintNewExpression, ESLintNode, ESLintNullLiteral, ESLintNumberLiteral, ESLintObjectExpression, ESLintObjectPattern, ESLintPattern, ESLintPrivateIdentifier, ESLintProgram, ESLintProperty, ESLintPropertyDefinition, ESLintRegExpLiteral, ESLintRestElement, ESLintReturnStatement, ESLintSequenceExpression, ESLintSpreadElement, ESLintStatement, ESLintStaticBlock, ESLintStringLiteral, ESLintSuper, ESLintSwitchCase, ESLintSwitchStatement, ESLintTaggedTemplateExpression, ESLintTemplateElement, ESLintTemplateLiteral, ESLintThisExpression, ESLintThrowStatement, ESLintTryStatement, ESLintUnaryExpression, ESLintUpdateExpression, ESLintVariableDeclaration, ESLintVariableDeclarator, ESLintWhileStatement, ESLintWithStatement, ESLintYieldExpression, ErrorCode, HasConcreteInfo, HasLocation, HasParent, KEYS, Location, LocationRange, NS, Namespace, Node, Offset, OffsetRange, ParseError, Reference, Token, VAttribute, VDirective, VDirectiveKey, VElement, VEndTag, VExpression, VExpressionContainer, VFilter, VFilterSequenceExpression, VForExpression, VIdentifier, VLiteral, VNode, VOnExpression, VSlotScopeExpression, VStartTag, VTemplateNode, VTemplateRoot, VText, Variable, Visitor, getFallbackKeys, parse, parseForESLint, traverseNodes };