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 ce326b5

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

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 the "Use the latest vue-eslint-parser" error?
119+
120+
The most rules of `eslint-plugin-vue` require `vue-eslint-parser` to check `<template>` ASTs.
121+
122+
Make sure you have one of the following settings in your **.eslintrc**:
123+
124+
- `"extends": ["plugin:vue/recommended"]`
125+
- `"extends": ["plugin:vue/base"]`
126+
127+
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:
128+
129+
```diff
130+
- "parser": "babel-eslint",
131+
"parserOptions": {
132+
+ "parser": "babel-eslint",
133+
"ecmaVersion": 2017,
134+
"sourceType": "module"
135+
}
136+
```
137+
138+
The `vue-eslint-parser` uses the parser which is set by `parserOptions.parser` to parse scripts.
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 によって変換されたページ (->オリジナル) /