VSCode 之 Eslint 配置

  • 首先安装 EsLint、vetur
  • 打开setting.json
   //配置eslint
  "eslint.autoFixOnSave": true,  //  启用保存时自动修复,默认只支持.js文件
  "eslint.validate": [
     "javascript",  //  用eslint的规则检测js文件
     {
       "language": "vue",   // 检测vue文件
       "autoFix": true   //  为vue文件开启保存自动修复的功能
     },
     {
       "language": "html",
       "autoFix": true
     },
   ]
posted @ 2020-03-22 17:07  卑面派对  阅读(234)  评论(0编辑  收藏  举报