zoukankan      html  css  js  c++  java
  • VUE保存自动格式化

    "editor.formatOnSave": true,

     https://www.cnblogs.com/vs1435/p/11798670.html

    ctrl + shift + p > Configure Language Specific Settings > Vue > 编辑文件.

    {
      // 主题
      "workbench.colorTheme": "Monokai",
      // vscode默认启用了根据文件类型自动设置tabsize的选项
      "editor.detectIndentation": false,
      // 重新设定tabsize
      "editor.tabSize": 2,
      // #每次保存的时候自动格式化
      "editor.formatOnSave": true,
      // #每次保存的时候将代码按eslint格式进行修复
      "eslint.autoFixOnSave": true,
      // 添加 vue 支持
      "eslint.validate": [
        "javascript",
        "javascriptreact",
        {
          "language": "vue",
          "autoFix": true
        }
      ],
      // #让函数(名)和后面的括号之间加个空格
      "javascript.format.insertSpaceBeforeFunctionParenthesis": false,
      // #让vue中的js按编辑器自带的ts格式进行格式化
      "vetur.format.defaultFormatter.js": "vscode-typescript",
      // #这个按用户自身习惯选择
      "vetur.format.defaultFormatter.html": "js-beautify-html",
      "vetur.format.defaultFormatterOptions": {
        "js-beautify-html": {
          // #vue组件中html代码格式化样式
          "wrap_attributes": "force-expand-multiline"
          // "wrap_attributes": "force"
          // "wrap_attributes": "force-aligned",
          // "wrap_attributes": "auto"
        }
      },
      "explorer.confirmDelete": false,
      "window.zoomLevel": 0,
      "git.enableSmartCommit": true,
      "diffEditor.ignoreTrimWhitespace": false,
      "[vue]": {},
      "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
      },
    }
  • 相关阅读:
    eslint 规则
    我的.eslintrc.js
    shell命令
    .sync 修饰符的理解
    【HNOI 2018】寻宝游戏
    【BZOJ 2820】YY的GCD
    【Luogu P2664】树上游戏
    【HAOI 2012】高速公路
    句摘
    【SCOI 2008】奖励关
  • 原文地址:https://www.cnblogs.com/dianzan/p/13613288.html
Copyright © 2011-2022 走看看