Skip to content

Commit c033ac6

Browse files
authored
grammar fixes, rule guide reconstruction, rename changelog to releases (#1706)
1 parent 6c4058d commit c033ac6

File tree

1 file changed

+14
-22
lines changed

1 file changed

+14
-22
lines changed

README.md

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,49 +9,41 @@
99
1010
## :book: Documentation
1111

12-
See [the official website](https://eslint.vuejs.org).
12+
Please refer to [official website](https://eslint.vuejs.org).
1313

1414
## :anchor: Versioning Policy
1515

16-
This plugin is following [Semantic Versioning](https://semver.org/) and [ESLint's Semantic Versioning Policy](https://github.com/eslint/eslint#semantic-versioning-policy).
16+
This plugin follows [Semantic Versioning](https://semver.org) and [ESLint's Semantic Versioning Policy](https://github.com/eslint/eslint#semantic-versioning-policy).
1717

18-
## :newspaper: Changelog
18+
## :newspaper: Releases
1919

2020
This project uses [GitHub Releases](https://github.com/vuejs/eslint-plugin-vue/releases).
2121

2222
## :beers: Contribution Guide
2323

24-
Contribution is welcome!
24+
Contributing is welcome! See the [ESLint Vue Plugin Developer Guide](https://eslint.vuejs.org/developer-guide).
2525

26-
See [The ESLint Vue Plugin Developer Guide](https://eslint.vuejs.org/developer-guide/).
26+
### Working With Rules
2727

28-
### Working with Rules
28+
Be sure to read the [official ESLint guide](https://eslint.org/docs/developer-guide/working-with-rules) before you start writing a new rule.
2929

30-
Before you start writing a new rule, please read [the official ESLint guide](https://eslint.org/docs/developer-guide/working-with-rules).
30+
To see what an abtract syntax tree (AST) of your code looks like, you may use [AST Explorer](https://astexplorer.net). After opening [AST Explorer](https://astexplorer.net), select `Vue` as the syntax and `vue-eslint-parser` as the parser.
3131

32-
Next, in order to get an idea how does the AST of the code that you want to check looks like, use the [astexplorer.net].
33-
The [astexplorer.net] is a great tool to inspect ASTs, also Vue templates are supported.
32+
The default parser must be replaced since Vue's single file components are not plain JavaScript. `vue-eslint-parser` is a replacement parser that generates an enhanced AST with nodes that represent specific parts of the template syntax, as well as the contents of the `<script>` tag.
3433

35-
After opening [astexplorer.net], select `Vue` as the syntax and `vue-eslint-parser` as the parser.
34+
To learn more about certain nodes in the produced ASTs, see the [ESTree project page](https://github.com/estree/estree) and the [vue-eslint-parser AST documentation](https://github.com/vuejs/vue-eslint-parser/blob/master/docs/ast.md).
3635

37-
[astexplorer.net]: https://astexplorer.net/
36+
The `vue-eslint-parser` provides a few useful parser services to help traverse the produced AST and access template tokens:
3837

39-
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.
40-
41-
To know more about certain nodes in produced ASTs, go here:
42-
- [ESTree docs](https://github.com/estree/estree)
43-
- [vue-eslint-parser AST docs](https://github.com/vuejs/vue-eslint-parser/blob/master/docs/ast.md)
44-
45-
The `vue-eslint-parser` provides a few useful parser services that help traverse the produced AST and access tokens of the template:
4638
- `context.parserServices.defineTemplateBodyVisitor(visitor, scriptVisitor)`
4739
- `context.parserServices.getTemplateBodyTokenStore()`
4840

49-
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.
41+
Check out an [example rule](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/mustache-interpolation-spacing.js) to see usage of these services.
5042

51-
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).
43+
Be aware that depending on the code samples you write in tests, the `RuleTester` parser property must be set accordingly (this can be done on a test by test basis). See an [example here](https://github.com/vuejs/eslint-plugin-vue/blob/master/tests/lib/rules/attribute-hyphenation.js#L19).
5244

53-
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!
45+
If you're stuck, remember there are many rules available for reference. 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!
5446

5547
## :lock: License
5648

57-
See the [LICENSE](LICENSE) file for license rights and limitations (MIT).
49+
See the [LICENSE](LICENSE) file for license rights and limitations (MIT).

0 commit comments

Comments
 (0)