VSCode VUE常用配置

{
  // vscode默认启用了根据文件类型自动设置tabsize的选项
  "editor.detectIndentation"false,
  // 重新设定tabsize
  "editor.tabSize"2,
  // #每次保存的时候自动格式化
  "editor.formatOnSave"true,
  // #每次保存的时候将代码按eslint格式进行修复
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint"true
  },
  "emmet.syntaxProfiles": {
    "vue-html""html",
    "vue""html"
  },
  // 添加 vue 支持
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "vue",
    "html",
    "wxml",
    "typescript",
    "typescriptreact"
  ],
  "eslint.options": {
    "plugins": ["html"]
  },
  //  #去掉代码结尾的分号
  "prettier.semi"false,
  //  #使用单引号替代双引号
  "prettier.singleQuote"true,
  "prettier.eslintIntegration"true// 让prettier使用eslint的代码格式进行校验
  //  #让函数(名)和后面的括号之间加个空格
  "javascript.format.insertSpaceBeforeFunctionParenthesis"true,
  // #这个按用户自身习惯选择
  "vetur.format.defaultFormatter.html""js-beautify-html",
  "vetur.format.defaultFormatter.js""prettier-eslint",
  "vetur.format.defaultFormatter.css""prettier",
  "vetur.format.defaultFormatter.postcss""prettier",
  "vetur.format.defaultFormatter.scss""prettier",
  "vetur.format.defaultFormatter.less""prettier",
  "vetur.format.defaultFormatter.stylus""stylus-supremacy",
  "vetur.format.defaultFormatter.ts""prettier",
  "vetur.format.defaultFormatterOptions": {
    // "prettier": {
    //   "semi": false
    // },
    "js-beautify-html": {
      // html元素行内不换行
      "wrap_line_length"0,
      "wrap_attributes""auto",
      "end_with_newline"false
      // #vue组件中html代码格式化样式
    }
  },
  "files.associations": {
    "*.cjson""jsonc",
    "*.wxss""css",
    "*.wxs""javascript",
    ".gitmodules""gitconfig",
    "*.vue""vue",
    "*.ts""typescript"
  },
  "emmet.includeLanguages": {
    "wxml""html"
  },
  "editor.suggestSelection""first",
  "explorer.confirmDelete"false,
  "javascript.updateImportsOnFileMove.enabled""always",
  "git.autofetch"true,
  "liveServer.settings.donotShowInfoMsg"true,
  "files.exclude": {
    "**/.classpath"true,
    "**/.project"true,
    "**/.settings"true,
    "**/.factorypath"true
  },
  "editor.wordWrap""on",
}
posted @ 2019-12-23 10:03  玉折兰摧  阅读(1341)  评论(0编辑  收藏  举报