vscode格式化关于符合eslint检测语法配置

 .js文件
插件:JavaScript Standard Style
配置:解决ES6语法格式化

{
  "files.associations": {
    "*.js": "javascriptreact"
  }
}

  

.vue文件

配置:

{
  "vetur.format.defaultFormatter.js": "vscode-typescript",
  "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
  "editor.quickSuggestions": {
    "strings": true
  },
  "editor.tabSize": 2,
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "html",
    "vue",
    {
      "language": "html",
      "autoFix": true
    }
  ],
  "tslint.autoFixOnSave": true,
}

  

.html文件

配置:

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

  

  

posted @ 2018-02-08 23:28  Alioth  阅读(1077)  评论(0编辑  收藏  举报