修改VisualStudioCode配置(修改前请保存后源文件)

 

{

    // "window.zoomLevel": 1,

// } // {

  // "editor.tabSize": 2,

  "prettier.eslintIntegration": true ,

  //prettier配置

   "editor.detectIndentation": false,

   //关闭自动更新拓展

   "extensions.autoUpdate": false,  

   "prettier.singleQuote": true,

   "prettier.semi": false,

 

   //vetur配置

 

   //vetur--->//vetur--->https://vuejs.github.io/vetur/FAQ.html#vue-file-cannot-be-imported-in-ts-file

   //为了符合eslint的两个空格间隔原则

   "editor.tabSize": 2,

   "vetur.validation.template": false,

   // Whether to have initial indent for <script> region

   "vetur.format.scriptInitialIndent": true,

   // Whether to have initial indent for <style> region

   "vetur.format.styleInitialIndent": true,

   // Use tabs for indentation. Inherited by all formatters.

   "vetur.format.options.useTabs": true,

   // Validate js/ts in <script>

   "vetur.validation.script": true,

   // Validate css/scss/less/postcss in <style>

   "vetur.validation.style": true,

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

   // 格式化插件的配置

   "vetur.format.defaultFormatterOptions": {

      "js-beautify-html": {

        "end_with_newline": false, // End output with newline

        "indent_char": " ", // Indentation character

         "indent_handlebars": false, // e.g. {{#foo}}, {{/foo}}

         "indent_inner_html": false, // Indent <head> and <body> sections

         "indent_scripts": "keep", // [keep|separate|normal]

         "indent_size": 2, // Indentation size

         "indent_with_tabs": true,

         "max_preserve_newlines": 1, // Maximum number of line breaks to be preserved in one chunk (0 disables)

         "preserve_newlines": true, // Whether existing line breaks before elements should be preserved

         "unformatted": [], // Tags that shouldn't be formatted. Causes mis-alignment

         "wrap_line_length": 0, // Lines should wrap at next opportunity after this number of characters (0 disables)

        //  "wrap_attributes": "force"

         // Wrap attributes to new lines [auto|force|force-aligned|force-expand-multiline] ["auto"]

      }

   },

   //函数前加空格

   "javascript.format.insertSpaceBeforeFunctionParenthesis": true,

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

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

   //配置eslint

 

   "eslint.run": "onSave",

   "eslint.autoFixOnSave": true,

   "eslint.validate": [

      "javascript",

      "javascriptreact",

      "html",

      "vue",

      {

         "language": "html",

         "autoFix": true

      },

      {

         "language": "vue",

         "autoFix": true

      }

   ],

   "eslint.options": {

      "plugins": ["html"]

  },

  "window.zoomLevel": 1

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值