美文网首页前端聚集地
vscode vue插件的使用

vscode vue插件的使用

作者: 小黑的眼 | 来源:发表于2019-01-29 14:36 被阅读0次

一开始遇到的就是vue文件 出现很多莫名其妙的波浪线

下面是我进行的一些配置和插件

配置的话 就在用户配置里面 我直接复制出来给大家看一下

{

  // 更换终端

  "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",

  // 工作区字体大小

  "editor.fontSize": 18,

  // 格式首行缩进两个空格大小

  "editor.tabSize": 2,

  // 解决vscode cpu占用过高问题

  "search.followSymlinks": false,

  // 扩展建议通知

  "extensions.ignoreRecommendations": true,

  // 格式化配置

  "emmet.syntaxProfiles": {

    "vue-html": "html",

    "vue": "html"

  },

  //js-beautify-html格式化配置,属性强制换行

  "vetur.format.defaultFormatterOptions": {

    "js-beautify-html": {

      "wrap_attributes": "force-aligned"

    }

  },

  //根据文件后缀名定义vue文件类型

  "files.associations": {

    "*.vue": "vue",

    "*.cjson": "jsonc",

    "*.wxss": "css",

    "*.wxs": "javascript"

  },

  //配置 ESLint 检查的文件类型

  "eslint.validate": [

    "javascript",

    "javascriptreact",

    "html",

    "vue",

    "typescriptreact",

    {

      "language": "typescript",

      "autoFix": true

    },

    {

      "language": "html",

      "autoFix": true

    },

    {

      "language": "vue",

      "autoFix": true

    }

  ],

  //保存时eslint自动修复错误

  "eslint.autoFixOnSave": true,

  //保存自动格式化

  "editor.formatOnSave": true,

  //让prettier使用eslint的代码格式进行校验

  "prettier.eslintIntegration": true,

  // cssrem px->rem转换比例 100 : 1

  "cssrem.rootFontSize": 100,

  // 微信小程序格式配置

  "emmet.includeLanguages": {

    "wxml": "html"

  },

  // 自动加分号

  "prettier.semi": false,

  // 单引号包裹字符串

  "prettier.singleQuote": true,

  // 函数前加空格

  "javascript.format.insertSpaceBeforeFunctionParenthesis": true,

  // 没有下边这个 上边不生效

  "vetur.format.defaultFormatter.js": "vscode-typescript",

  //.vue文件template格式化支持,并使用js-beautify-html插件

  "vetur.format.defaultFormatter.html": "js-beautify-html",

  "sync.gist": "a273a52ae9121fdb50b8387ae6d25a93",

  "javascript.updateImportsOnFileMove.enabled": "always",

  "explorer.confirmDelete": false

}

插件

相关文章

网友评论

    本文标题:vscode vue插件的使用

    本文链接:https://www.haomeiwen.com/subject/hhsxsqtx.html