在setting.json中加入如下内容

{
  "eslint.autoFixOnSave": true,
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    {
      "language": "html",
      "autoFix": true
    },
    {
      "language": "vue",
      "autoFix": true
    }
  ]
}

参考:http://www.ptbird.cn/vscode-autosave-eslint-support-vue.html

posted on 2018-09-26 21:14  爬虫一只  阅读(4640)  评论(0编辑  收藏  举报