安装eslint插件 然后在settings.json加入下面配置 "eslint.validate": [ "javascript", "javascriptreact", "html", "vue" ], "editor.codeActionsOnSave": { "source.fixAll.eslint": true }, 来源:https://www.cnblogs.com/fazero/p/12167982.html 标签 eslint