本文共 660 字,大约阅读时间需要 2 分钟。
.vscode/settings.json
{ // 修改编辑器默认格式化方案,也就是右键format Document width里面的默认 "editor.defaultFormatter": "hu2ren.vetur-wepy", "vetur.validation.script": false, "vetur.validation.interpolation": false, "vetur.validation.template": false, "vetur.format.defaultFormatter.js": "none", "vetur.format.defaultFormatter.html": "js-beautify-html", "editor.formatOnSave": true, "eslint.run": "onSave", "eslint.validate": [ "vue" ], // #每次保存的时候将代码按eslint格式进行修复,要在保存时运行的代码操作类型。保存时按照哪个规则进行格式化 "editor.codeActionsOnSave": { "source.fixAll": true, "source.fixAll.stylelint": true }}
这样你保存 html、css、js都可以自动的校验啦
转载地址:http://rmpo.baihongyu.com/