Answer a question

I Have a VS code workspace and Vetur is throwing error because my Vue folder is not at the root so it thinks it is a Vue 2 project. How can I disable Vetur linting?

I added this to my .vscode/settings.json

{
    "vetur.validation.template": false,
    "vetur.validation.script": false,
    "vetur.validation.style": false,
}

As described in the docs

https://vuejs.github.io/vetur/linting-error.html#error-checking

But it give the message

This setting cannot be applied in this workspace. It will be applied when you open the containing workspace folder directly.

Which kinda defeats the purpose

Answers

Turns out you can just add it to your global vscode settings

F1>Preferences:Open Settings (JSON)

paste

"vetur.validation.template": false,
"vetur.validation.script": false,
"vetur.validation.style": false,

For a better understand. enter image description here

Logo

前往低代码交流专区

更多推荐