Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit afcff23

Browse files
Docs: add FAQ about vue-eslint-parser
1 parent d5bd07f commit afcff23

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

‎README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,30 @@ The `--fix` option on the command line automatically fixes problems reported by
113113

114114
<!--RULES_TABLE_END-->
115115

116+
## :couple: FAQ
117+
118+
### What is "Use the latest vue-eslint-parser" errors?
119+
120+
The most rules of `eslint-plugin-vue` requires `vue-eslint-parser` to check `<template>` ASTs.
121+
122+
Please add one of the following settings into your configuration:
123+
124+
- `"extends": ["plugin:vue/recommended"]`
125+
- `"extends": ["plugin:vue/base"]`
126+
- `"parser": "vue-eslint-parser"` (and do `npm install -D vue-eslint-parser`)
127+
128+
If you have `"parser": "babel-eslint"` setting or something like in your configuration, please move it into `parserOptions`.
129+
The `vue-eslint-parser` uses the parser which is set by `parserOptions.parser` to parse scripts.
130+
131+
```diff
132+
- "parser": "babel-eslint",
133+
"parserOptions": {
134+
+ "parser": "babel-eslint",
135+
"ecmaVersion": 2017,
136+
"sourceType": "module"
137+
}
138+
```
139+
116140
## :anchor: Semantic Versioning Policy
117141

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

‎lib/utils/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = {
3232
if (context.parserServices.registerTemplateBodyVisitor == null) {
3333
context.report({
3434
loc: { line: 1, column: 0 },
35-
message: 'Use the latest vue-eslint-parser.'
35+
message: 'Use the latest vue-eslint-parser. See also https://github.com/vuejs/eslint-plugin-vue#what-is-use-the-latest-vue-eslint-parser-errors'
3636
})
3737
return
3838
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /