Vue安装vetur、eslint、prettier配置

2019-12-10 18:01:40 浏览数 (2)

代码语言:javascript复制
{
  "editor.rulers": [
    120
  ],
  "editor.wordWrapColumn": 120,
  "editor.lineNumbers": "on", //打开行号
  "editor.quickSuggestions": {
    //开启自动显示建议
    "other": true,
    "comments": true,
    "strings": true
  },
  "vetur.format.defaultFormatter.html": "prettyhtml",
  "editor.tabSize": 2, //保存时自动格式化
  "editor.formatOnSave": true,
  "eslint.autoFixOnSave": true, //保存时自动将代码按ESLint格式进行修复
  "prettier.semi": false, //去掉代码结尾的分号
  "prettier.singleQuote": true, //使用带引号替代双引号
  "javascript.format.insertSpaceBeforeFunctionParenthesis": true, //让函数(名)和后面的括号之间加个空格
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    {
      "language": "html",
      "autoFix": true
    },
    {
      "language": "vue",
      "autoFix": true
    }
  ],
  "vetur.format.defaultFormatterOptions": {
    "prettier": {
      "singleQuote": true,
      "semi": false
    }
  },
  "vetur.format.defaultFormatter.js": "vscode-typescript",
  "[vue]": {
    "editor.defaultFormatter": "octref.vetur"
  }
}

0 人点赞