• vscode 配置(格式化代码)


    {
      //背景主题
      "workbench.iconTheme": "vscode-icons",
      //背景主题
      "workbench.colorTheme": "One Dark Pro",
      // tab 大小为2个空格
      "editor.tabSize": 2,
      // 100 列后换行
      "editor.wordWrapColumn": 100,
      // 保存时格式化
      "editor.formatOnSave": false,
      // 开启 vscode 文件路径导航
      "breadcrumbs.enabled": true,
      // prettier 设置语句末尾不加分号
      "prettier.semi": false,
      // prettier 设置强制单引号
      "prettier.singleQuote": true,
      // 选择 vue 文件中 template 的格式化工具
      "vetur.format.defaultFormatter.html": "prettyhtml",
      // 显示 markdown 中英文切换时产生的特殊字符
      "editor.renderControlCharacters": true,
      // 设置 eslint 保存时自动修复
      "eslint.autoFixOnSave": true,
      // eslint 检测文件类型
      "eslint.validate": [
        "vue",
        "html",
        "javascript",
        "typescript",
        "javascriptreact",
        "typescriptreact"
      ],
      // vetur 的自定义设置
      "vetur.format.defaultFormatterOptions": {
        "prettier": {
          "singleQuote": true,
          "semi": false
        }
      },
      // vue 扩展的文件默认使用 prettier 进行格式化
      "[vue]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
      },
      "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
      }
    }
    • ESLint
    • Prettier - Code formatter
    • Vetur
  • 相关阅读:
    冲刺2 05
    冲刺02 04
    人月神话阅读笔记01
    进度条
    团队冲刺第十天
    团队冲刺第九天
    学习进度条13
    团队冲刺第八天
    怎样买书更便宜
    冲刺第七天
  • 原文地址:https://www.cnblogs.com/wrongcode/p/13819228.html
Copyright © 2020-2023  润新知