Skip to content

Commit c8e2514

Browse files
authored
Docs: Add "Trouble with Visual Studio Code" section to FAQ (#1270)
* Add ` Trouble with Visual Studio Code` section to FAQ * update
1 parent 9239393 commit c8e2514

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

docs/user-guide/README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ If you want to disallow `eslint-disable` functionality in `<template>`, disable
131131

132132
## :computer: Editor integrations
133133

134-
#### Visual Studio Code
134+
### Visual Studio Code
135135

136136
Use the [dbaeumer.vscode-eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) extension that Microsoft provides officially.
137137

@@ -151,7 +151,7 @@ Example **.vscode/settings.json**:
151151

152152
If you use the `Vetur` plugin, set `"vetur.validation.template": false` to avoid default Vetur template validation. Check out [vetur documentation](https://vuejs.github.io/vetur/linting-error.html) for more info.
153153

154-
#### Sublime Text
154+
### Sublime Text
155155

156156
Use Package Control to install **SublimeLinter** and its ESLint extension **[SublimeLinter-eslint](https://github.com/SublimeLinter/SublimeLinter-eslint)**.
157157

@@ -167,11 +167,11 @@ In the menu go to `Preferences > Package Settings > SublimeLinter > Settings` an
167167
}
168168
```
169169

170-
#### Atom editor
170+
### Atom editor
171171

172172
Go into `Settings -> Packages -> linter-eslint`, under the option "List of scopes to run eslint on", add `text.html.vue`. You may need to restart Atom.
173173

174-
#### IntelliJ IDEA / JetBrains WebStorm
174+
### IntelliJ IDEA / JetBrains WebStorm
175175

176176
In the **Settings/Preferences** dialog (`Cmd+,`/`Ctrl+Alt+S`), choose JavaScript under **Languages and Frameworks** and then choose **ESLint** under **Code Quality Tools**.
177177
On the **ESLint page** that opens, select the *Enable* checkbox.
@@ -284,3 +284,14 @@ See also [ESLint - Specifying Parser Options](https://eslint.org/docs/user-guide
284284
The same configuration is required when using JSX with TypeScript (TSX) in the `.vue` file.
285285
See also [here](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/README.md#parseroptionsecmafeaturesjsx).
286286
Note that you cannot use angle-bracket type assertion style (`var x = <foo>bar;`) when using `jsx: true`.
287+
288+
### Trouble with Visual Studio Code
289+
290+
- Turning off the rule in the ESLint configuration file does not ignore the warning.
291+
- Using the `<!-- eslint-disable -->` comment does not suppress warnings.
292+
- Duplicate warnings are displayed.
293+
- Used `babel-eslint`, but the template still show `vue/no-parsing-error` warnings.
294+
295+
You need to turn off Vetur's template validation by adding `vetur.validation.template: false` to your `.vscode/settings.json`.
296+
297+
See also: "[Visual Studio Code](#editor-integrations)" section and [Vetur - Linting / Error Checking > Linting](https://vuejs.github.io/vetur/linting-error.html#linting).

0 commit comments

Comments
 (0)