Skip to content

Commit 69a7e4c

Browse files
committed
Docs: update README.md
1 parent df2f9f5 commit 69a7e4c

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

README.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,24 @@
88

99
The ESLint custom parser for `.vue` files.
1010

11-
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)). The motivation of this custom parser is that it supports autofix on `.vue` files.
11+
## ⤴️ Motivation
1212

13-
## :cd: Installation
13+
- **This parser allows us to lint the `<template>` of `.vue` files.**
14+
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.**
16+
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.
17+
18+
## 💿 Installation
1419

1520
```bash
1621
$ npm install --save-dev eslint vue-eslint-parser
1722
```
1823

1924
- `vue-eslint-parser` requires ESLint 3.9.0 or later.
2025

21-
## :book: Usage
26+
## 📖 Usage
2227

23-
1. Write `parser` option in your `.eslintrc.*` file.
28+
1. Write `parser` option into your `.eslintrc.*` file.
2429
2. Use glob patterns or `--ext .vue` CLI option.
2530

2631
```json
@@ -30,13 +35,13 @@ $ npm install --save-dev eslint vue-eslint-parser
3035
}
3136
```
3237

33-
```bash
38+
```console
3439
$ eslint "src/**/*.{js,vue}"
3540
# or
3641
$ eslint src --ext .vue
3742
```
3843

39-
## :wrench: Options
44+
## 🔧 Options
4045

4146
`parserOptions` has the same properties as what [espree](https://github.com/eslint/espree#usage), the default parser of ESLint, is supporting.
4247
For example:
@@ -81,15 +86,15 @@ For example:
8186
}
8287
```
8388

84-
## :book: Usage for custom rules / plugins
89+
## 🎇 Usage for custom rules / plugins
8590

86-
`vue-eslint-parser` provides `parserServices` to traverse `<template>`.
91+
This parser provides `parserServices` to traverse `<template>`.
8792

8893
The spec of `<template>` AST is [here](./docs/ast.md).
8994

9095
TODO: write examples.
9196

92-
## :warning: Known Limitations
97+
## ⚠️ Known Limitations
9398

9499
Some rules make warnings due to the outside of `<script>` tags.
95100
Please disable those rules for `.vue` files as necessary.
@@ -102,11 +107,11 @@ Please disable those rules for `.vue` files as necessary.
102107
- [unicode-bom](http://eslint.org/docs/rules/unicode-bom)
103108
- Other rules which are using the source code text instead of AST might be confused as well.
104109

105-
## :newspaper: Changelog
110+
## 📰 Changelog
106111

107112
- [GitHub Releases](https://github.com/mysticatea/vue-eslint-parser/releases)
108113

109-
## :muscle: Contributing
114+
## 🍻 Contributing
110115

111116
Welcome contributing!
112117

@@ -119,5 +124,5 @@ Please use GitHub's Issues/PRs.
119124
- `npm run clean` removes the coverage result of `npm test` command.
120125
- `npm run lint` runs ESLint.
121126
- `npm run setup` setups submodules to develop.
122-
- `npm run update-fixtures` updates files in `test/fixtures/template-ast` directory based on `*.source.vue` files.
127+
- `npm run update-fixtures` updates files in `test/fixtures/ast` directory based on `~/*/source.vue` files.
123128
- `npm run watch` runs tests with `--watch` option.

0 commit comments

Comments
 (0)