Skip to content

Commit 07f6432

Browse files
committed
Docs: update README.md
1 parent 22c12d5 commit 07f6432

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ The ESLint custom parser for `.vue` files.
1010

1111
## ⤴️ Motivation
1212

13-
- **This parser allows us to lint the `<template>` of `.vue` files.**
13+
- **This parser allows us to lint the `<template>` of `.vue` files.**
1414
We can make mistakes easily on `<template>` if we use complex directives and expressions in the template. This parser and the rules of [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) would catch some of the mistakes.
15-
- **This parser allows us to fix our mistakes automatically.**
15+
- **This parser allows us to fix our mistakes automatically.**
1616
ESLint supports autofix on custom parsers but does not support autofix on plugins which have processors ([eslint/eslint#7510](https://github.com/eslint/eslint/issues/7510)). This parser supports autofix on `.vue` files.
1717

1818
## 💿 Installation
@@ -43,7 +43,7 @@ $ eslint src --ext .vue
4343

4444
## 🔧 Options
4545

46-
`parserOptions` has the same properties as what [espree](https://github.com/eslint/espree#usage), the default parser of ESLint, is supporting.
46+
`parserOptions` has the same properties as what [espree](https://github.com/eslint/espree#usage), the default parser of ESLint, is supporting.
4747
For example:
4848

4949
```json
@@ -63,7 +63,7 @@ For example:
6363
```
6464

6565
Also, you can use `parser` property to specify a custom parser to parse `<script>` tags.
66-
Other properties than parser would be given to the specified parser.
66+
Other properties than parser would be given to the specified parser.
6767
For example:
6868

6969
```json
@@ -91,11 +91,11 @@ For example:
9191

9292
## 🎇 Usage for custom rules / plugins
9393

94-
This parser provides `parserServices` to traverse `<template>`.
95-
96-
The spec of `<template>` AST is [here](./docs/ast.md).
97-
98-
TODO: write examples.
94+
- This parser provides `parserServices` to traverse `<template>`.
95+
- `defineTemplateBodyVisitor(templateVisitor, scriptVisitor)` ... returns ESLint visitor to traverse `<template>`.
96+
- `getTemplateBodyTokenStore()` ... returns ESLint `TokenStore` to get the tokens of `<template>`.
97+
- [ast.md](./docs/ast.md) is `<template>` AST specification.
98+
- [mustache-interpolation-spacing.js](https://github.com/vuejs/eslint-plugin-vue/blob/b434ff99d37f35570fa351681e43ba2cf5746db3/lib/rules/mustache-interpolation-spacing.js) is an example.
9999

100100
## ⚠️ Known Limitations
101101

0 commit comments

Comments
 (0)