代码改变世界

VSCode:配置自动修复eslint

2019-05-09 19:34  huoit  阅读(2336)  评论(0)    收藏  举报

 

 

{
    //"tfvc.location": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\TF.exe",
    //"tfvc.location": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\TeamExplorer\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\TF.exe",
    //"tfvc.restrictWorkspace": true,
    "team.showWelcomeMessage": false,
    //"team.logging.level": "debug"
    "breadcrumbs.enabled": true,
    "editor.tabSize": 2,
    "editor.renderWhitespace": "boundary",
    "editor.cursorBlinking": "smooth",
    "editor.minimap.renderCharacters": false,
    "editor.fontFamily": "'Fira Code', 'Droid Sans Mono', 'Courier New', monospace, 'Droid Sans Fallback'",
    "editor.fontLigatures": true,
    "eslint.enable": true,
    "eslint.autoFixOnSave": true,
    "eslint.validate": [
        "javascript",  //  用eslint的规则检测js文件
        {
          "language": "vue",   // 检测vue文件
          "autoFix": true   //  为vue文件开启保存自动修复的功能
        },
        {
          "language": "html",
          "autoFix": true
        },"vue"
      ],
    // "search.exclude": {
    //     "**/node_modules": true,
    //     "**/dist": true
    //   },

}