We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20eb51b commit 63adb0bCopy full SHA for 63adb0b
docs/ast.md
@@ -13,20 +13,23 @@ Some types are featured from [ESTree].
13
You can use the type definition of this AST:
14
15
```ts
16
-import {AST} from "vue-eslint-parser"
+import { AST } from "vue-eslint-parser"
17
18
export function create(context) {
19
- context.parserServices.registerTemplateBodyVisitor(context, {
20
- VElement(node: AST.VElement): void {
21
- //...
+ return context.parserServices.defineTemplateBodyVisitor(
+ // Event handlers for <template>.
+ {
22
+ VElement(node: AST.VElement): void {
23
+ //...
24
+ }
25
+ },
26
+ // Event handlers for <script>. (optional)
27
28
+ Program(node: AST.ESLintProgram): void {
29
30
31
}
- })
-
- return {
- Program(node: AST.ESLintProgram): void {
- }
32
+ )
33
34
```
35
0 commit comments