10,613
社区成员
发帖
与我相关
我的任务
分享
运行xxx.vue的保存参与者 快速修复。
{
"explorer.confirmDelete": false,
"eslint.validate": ["javascript","javascriptreact","html","vue"],
"explorer.confirmDragAndDrop": false,
"editor.detectIndentation": false,
"editor.tabSize": 2,
"vetur.format.defaultFormatter.js": "none",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"files.autoSave": "onFocusChange"
}

这里看看eslint有没有报错,可能是确实少依赖,比如我的就提示缺少eslint-plugin-html,根据提示安装好依赖后重启vscodenpm i -g eslint-plugin-vue
2、配置vscode的settings.json:
"eslint.validate": [
"javascript",
"vue",
"html"
],
3、重启搞定