Skip to content

Commit 204cca9

Browse files
committed
update
1 parent 520d31a commit 204cca9

File tree

14 files changed

+28
-12
lines changed

14 files changed

+28
-12
lines changed

typings/eslint-plugin-vue/util-types/ast/es-ast.d.ts renamed to typings/eslint-plugin-vue/util-types/ast/es-ast.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
/**
2+
* @see https://github.com/estree/estree
3+
*/
14
import { BaseNode, HasParentNode } from '../node'
25
import { Token } from '../node'
36
import { ParseError } from '../errors'
47
import * as V from './v-ast'
58
import * as TS from './ts-ast'
9+
import * as JSX from './jsx-ast'
610

711
export type ESNode =
812
| Identifier
@@ -264,6 +268,8 @@ export type Expression =
264268
| MetaProperty
265269
| Identifier
266270
| AwaitExpression
271+
| JSX.JSXElement
272+
| JSX.JSXFragment
267273
| TS.TSAsExpression
268274

269275
export interface Identifier extends HasParentNode {
@@ -504,7 +510,7 @@ export interface AssignmentPattern extends HasParentNode {
504510
right: Expression
505511
}
506512

507-
type _FunctionParameter =
513+
export type _FunctionParameter =
508514
| AssignmentPattern
509515
| RestElement
510516
| ArrayPattern

typings/eslint-plugin-vue/util-types/ast/jsx-ast.d.ts renamed to typings/eslint-plugin-vue/util-types/ast/jsx-ast.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* @see https://github.com/facebook/jsx/blob/master/AST.md
3+
* @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/typescript-estree/src/ts-estree/ts-estree.ts
4+
*/
15
import { HasParentNode } from '../node'
26
import * as ES from './es-ast'
37

typings/eslint-plugin-vue/util-types/ast/ts-ast.d.ts renamed to typings/eslint-plugin-vue/util-types/ast/ts-ast.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/typescript-estree/src/ts-estree/ts-estree.ts
3+
*/
14
import { HasParentNode } from '../node'
25
import * as ES from './es-ast'
36
export type TSNode = TSAsExpression

typings/eslint-plugin-vue/util-types/ast/v-ast.d.ts renamed to typings/eslint-plugin-vue/util-types/ast/v-ast.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
1+
/**
2+
* @see https://github.com/mysticatea/vue-eslint-parser/blob/master/docs/ast.md
3+
*/
14
import { HasParentNode, BaseNode } from '../node'
25
import { Token, HTMLComment, HTMLBogusComment, Comment } from '../node'
36
import { ParseError } from '../errors'
47
import * as ES from './es-ast'
58

6-
export const NS: Readonly<{
9+
export type NS = {
710
HTML: 'http://www.w3.org/1999/xhtml'
811
MathML: 'http://www.w3.org/1998/Math/MathML'
912
SVG: 'http://www.w3.org/2000/svg'
1013
XLink: 'http://www.w3.org/1999/xlink'
1114
XML: 'http://www.w3.org/XML/1998/namespace'
1215
XMLNS: 'http://www.w3.org/2000/xmlns/'
13-
}>
16+
}
1417
export type Namespace =
15-
| typeof NS.HTML
16-
| typeof NS.MathML
17-
| typeof NS.SVG
18-
| typeof NS.XLink
19-
| typeof NS.XML
20-
| typeof NS.XMLNS
18+
| NS['HTML']
19+
| NS['MathML']
20+
| NS['SVG']
21+
| NS['XLink']
22+
| NS['XML']
23+
| NS['XMLNS']
2124
export interface VVariable {
2225
id: ES.Identifier
2326
kind: 'v-for' | 'scope'
@@ -42,7 +45,7 @@ export interface VOnExpression extends HasParentNode {
4245
export interface VSlotScopeExpression extends HasParentNode {
4346
type: 'VSlotScopeExpression'
4447
parent: VExpressionContainer
45-
params: ES.Pattern[]
48+
params: ES._FunctionParameter[]
4649
}
4750
export interface VFilterSequenceExpression extends HasParentNode {
4851
type: 'VFilterSequenceExpression'

typings/eslint-plugin-vue/util-types/parser-services.d.ts renamed to typings/eslint-plugin-vue/util-types/parser-services.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export interface ParserServices {
2020
getDocumentFragment?: () => VAST.VDocumentFragment
2121
}
2222
export namespace ParserServices {
23-
interface TokenStore {
23+
export interface TokenStore {
2424
getTokenByRangeStart(
2525
offset: number,
2626
options?: { includeComments: boolean }

typings/vue-eslint-parser/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ export namespace AST {
1010
export function traverseNodes(node: VAST.ASTNode, visitor: Visitor): void
1111
export { getFallbackKeys }
1212

13-
export const NS: typeof VAST.NS
13+
export const NS: VAST.NS
1414
}

0 commit comments

Comments
 (0)