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
    }
  ]
}

  

  

转载于:https://www.cnblogs.com/Alio/p/8433787.html

你可能感兴趣的:(vscode格式化关于符合eslint检测语法配置)