Skip to content

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

Merged
merged 1 commit into from
Jul 16, 2017

Conversation

mysticatea
Copy link
Member

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.

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?
Copy link
Member

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:
Copy link
Member

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`)
Copy link
Member

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`.
Copy link
Member

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.
Copy link
Member

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.

@michalsnik
Copy link
Member

Good call with the FAQ part @mysticatea 👍 I added few suggestions above

@mysticatea mysticatea force-pushed the docs-for-vue-eslint-parser branch from afcff23 to ce326b5 Compare July 16, 2017 10:47
@mysticatea mysticatea force-pushed the docs-for-vue-eslint-parser branch from ce326b5 to 1e28803 Compare July 16, 2017 10:49
@mysticatea
Copy link
Member Author

Thank you!
I updated this PR as the correcting.

@michalsnik michalsnik merged commit fb05639 into master Jul 16, 2017
@michalsnik michalsnik deleted the docs-for-vue-eslint-parser branch July 16, 2017 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants