|
9 | 9 |
|
10 | 10 | ## :book: Documentation |
11 | 11 |
|
12 | | -See https://eslint.vuejs.org |
| 12 | +See [the official website](https://eslint.vuejs.org). |
13 | 13 |
|
14 | 14 | ## :anchor: Versioning Policy |
15 | 15 |
|
16 | 16 | This plugin is following [Semantic Versioning](https://semver.org/) and [ESLint's Semantic Versioning Policy](https://github.com/eslint/eslint#semantic-versioning-policy). |
17 | 17 |
|
18 | 18 | ## :newspaper: Changelog |
19 | 19 |
|
20 | | -We're using [GitHub Releases](https://github.com/vuejs/eslint-plugin-vue/releases). |
| 20 | +This project uses [GitHub Releases](https://github.com/vuejs/eslint-plugin-vue/releases). |
21 | 21 |
|
22 | | -## :beers: Contribution guide |
| 22 | +## :beers: Contribution Guide |
23 | 23 |
|
24 | | -Contributing is welcome! |
| 24 | +Contribution is welcome! |
25 | 25 |
|
26 | | -See https://eslint.vuejs.org/developer-guide/ |
| 26 | +See [The ESLint Vue Plugin Developer Guide](https://eslint.vuejs.org/developer-guide/). |
27 | 27 |
|
28 | | -### Working with rules |
| 28 | +### Working with Rules |
29 | 29 |
|
30 | | -Before you start writing new rule, please read the [official ESLint guide](https://eslint.org/docs/developer-guide/working-with-rules). |
| 30 | +Before you start writing a new rule, please read [the official ESLint guide](https://eslint.org/docs/developer-guide/working-with-rules). |
31 | 31 |
|
32 | | -Next in order to get an idea how does the AST of the code that you want to check looks like, you can use one of the following applications: |
33 | | -- [astexplorer.net](https://astexplorer.net/) - best tool to inspect ASTs, but it doesn't support Vue templates yet |
34 | | -- [ast.js.org](https://ast.js.org/) - not fully featured, but supports Vue templates syntax |
| 32 | +Next, in order to get an idea how does the AST of the code that you want to check looks like, use one of the following applications: |
| 33 | +- [astexplorer.net](https://astexplorer.net/) - the best tool to inspect ASTs, but it doesn't support Vue template yet |
| 34 | +- [ast.js.org](https://ast.js.org/) - not fully featured, but supports Vue template syntax |
35 | 35 |
|
36 | | -Since single file components in Vue are not plain JavaScript, we can't use the default parser, and we had to introduce additional one: `vue-eslint-parser`, that generates enhanced AST with nodes that represent specific parts of the template syntax, as well as what's inside the `<script>` tag. |
| 36 | +Since single file components in Vue are not plain JavaScript, the default parser couldn't be used, so a new one was introduced. `vue-eslint-parser` generates enhanced AST with nodes that represent specific parts of the template syntax, as well as what's inside the `<script>` tag. |
37 | 37 |
|
38 | 38 | To know more about certain nodes in produced ASTs, go here: |
39 | 39 | - [ESTree docs](https://github.com/estree/estree) |
40 | 40 | - [vue-eslint-parser AST docs](https://github.com/mysticatea/vue-eslint-parser/blob/master/docs/ast.md) |
41 | 41 |
|
42 | | -The `vue-eslint-parser` provides few useful parser services, to help traverse the produced AST and access tokens of the template: |
| 42 | +The `vue-eslint-parser` provides a few useful parser services that help traverse the produced AST and access tokens of the template: |
43 | 43 | - `context.parserServices.defineTemplateBodyVisitor(visitor, scriptVisitor)` |
44 | 44 | - `context.parserServices.getTemplateBodyTokenStore()` |
45 | 45 |
|
46 | | -Check out an [example rule](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/mustache-interpolation-spacing.js) to get a better understanding of how these work. |
| 46 | +Check out [an example rule](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/mustache-interpolation-spacing.js) to get a better understanding of how these work. |
47 | 47 |
|
48 | | -Please be aware that regarding what kind of code examples you'll write in tests, you'll have to accordingly setup the parser in `RuleTester` (you can do it on per test case basis though). [See an example here](https://github.com/vuejs/eslint-plugin-vue/blob/master/tests/lib/rules/attribute-hyphenation.js#L19) |
| 48 | +Please be aware that regarding what kind of code examples you'll write in tests, you'll have to accordingly set up the parser in `RuleTester` (you can do it on a per test case basis). See an example [here](https://github.com/vuejs/eslint-plugin-vue/blob/master/tests/lib/rules/attribute-hyphenation.js#L19). |
49 | 49 |
|
50 | | -If you'll stuck, remember there are plenty of rules you can learn from already, and if you can't find the right solution - don't hesitate to reach out in issues. We're happy to help! |
| 50 | +If you'll stuck, remember there are plenty of rules you can learn from already. If you can't find the right solution, don't hesitate to reach out in [issues](https://github.com/vuejs/eslint-plugin-vue/issues) – we're happy to help! |
51 | 51 |
|
52 | 52 | ## :lock: License |
53 | 53 |
|
|
0 commit comments