在扩展(Extensions)里搜索ESLint
安装
点击Extension Settings
"eslint.codeAction.showDocumentation": {
"enable": true
},
"eslint.enable": true,
"eslint.autoFixOnSave": true,
"eslint.run": "onType",
"eslint.options":
{"extensions": [".js",".vue"] },
"eslint.validate": [
"javascript",
{ "language": "vue", "autoFix": true },
"html",
"vue"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
粘进去,保存