-
-
Notifications
You must be signed in to change notification settings - Fork 680
Docs: add FAQ about vue-eslint-parser #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
README.md
Outdated
@@ -113,6 +113,30 @@ The `--fix` option on the command line automatically fixes problems reported by | |||
|
|||
<!--RULES_TABLE_END--> | |||
|
|||
## :couple: FAQ | |||
|
|||
### What is "Use the latest vue-eslint-parser" errors? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be:
What is the `Use the latest vue-eslint-parser` error?
README.md
Outdated
|
||
The most rules of `eslint-plugin-vue` requires `vue-eslint-parser` to check `<template>` ASTs. | ||
|
||
Please add one of the following settings into your configuration: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about: Make sure you have one of the following settings in your **.eslintrc.js**:
?
README.md
Outdated
|
||
- `"extends": ["plugin:vue/recommended"]` | ||
- `"extends": ["plugin:vue/base"]` | ||
- `"parser": "vue-eslint-parser"` (and do `npm install -D vue-eslint-parser`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove the third option and force using base or recommended configuration. The less options the better, people will not get confused :)
README.md
Outdated
- `"extends": ["plugin:vue/base"]` | ||
- `"parser": "vue-eslint-parser"` (and do `npm install -D vue-eslint-parser`) | ||
|
||
If you have `"parser": "babel-eslint"` setting or something like in your configuration, please move it into `parserOptions`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you already use other parser (e.g. "parser": "babel-eslint"
), please move it into parserOptions
, so it doesn't collide with the vue-eslint-parser
used by this plugin's configuration:
README.md
Outdated
- `"parser": "vue-eslint-parser"` (and do `npm install -D vue-eslint-parser`) | ||
|
||
If you have `"parser": "babel-eslint"` setting or something like in your configuration, please move it into `parserOptions`. | ||
The `vue-eslint-parser` uses the parser which is set by `parserOptions.parser` to parse scripts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this line after the diff.
Good call with the FAQ part @mysticatea 👍 I added few suggestions above |
afcff23
to
ce326b5
Compare
ce326b5
to
1e28803
Compare
Thank you! |
This PR adds FAQ about "Use the latest vue-eslint-parser" errors.
Also, the error message points that.
Please check this description is enough or not.