Jim
2022-06-16 19dc88b4e0d559aceed9b17ebd0ddd04eac7ecd7
.vscode/settings.json
@@ -1,65 +1,12 @@
{
  "typescript.tsdk": "./node_modules/typescript/lib",
  //===========================================
  //============= Editor ======================
  //===========================================
  "explorer.openEditors.visible": 0,
  "editor.minimap.renderCharacters": false,
  "editor.minimap.maxColumn": 300,
  "editor.minimap.showSlider": "always",
  "editor.smoothScrolling": true,
  "editor.cursorBlinking": "phase",
  "editor.cursorSmoothCaretAnimation": true,
  "editor.detectIndentation": false, // vscode默认启用了根据文件类型自动设置tabsize的选项
  "diffEditor.ignoreTrimWhitespace": false,
  "editor.formatOnPaste": true, //自动格式化粘贴的内容
  "editor.formatOnSave": true, //保存自动格式化
  "editor.suggestSelection": "first",
  "editor.trimAutoWhitespace": true,
  "editor.quickSuggestions": {
    //   快速提示
    "other": true,
    "comments": true,
    "strings": true
  },
  //===========================================
  //============= Other =======================
  //===========================================
  "breadcrumbs.enabled": true, // 启用/禁用导航路径
  "open-in-browser.default": "chrome", // 默认浏览器
  //===========================================
  //============= emmet =======================
  //===========================================
  "emmet.triggerExpansionOnTab": true, // 配置emmet是否启用tab展开缩写
  "emmet.showAbbreviationSuggestions": true,
  "emmet.showExpandedAbbreviation": "always",
  "emmet.syntaxProfiles": {
    // 配置emmet对文件类型的支持,比如vue后缀文件按照html文件来进行emmet扩写
    "vue-html": "html",
    "vue": "html",
    "javascript": "javascriptreact",
    // xml类型文件默认都是单引号,开启对非单引号的emmet识别
    "xml": {
      "attr_quotes": "single"
    }
  },
  "emmet.includeLanguages": {
    // 在react的jsx中添加对emmet的支持
    "jsx-sublime-babel-tags": "javascriptreact"
  },
  //===========================================
  //============= files =======================
  //===========================================
  // "files.autoSave": "onWindowChange", // 窗口失去焦点自动保存
  // "files.autoSaveDelay": 1000, // 自动保存时间
  "files.trimTrailingWhitespace": true, // 启用后,将在保存文件时剪裁尾随空格。
  // 文件末尾插入新行
  "files.insertFinalNewline": true,
  // 删除文件末尾多余的新行
  "files.trimFinalNewlines": true,
  "volar.tsPlugin": true,
  "volar.tsPluginStatus": false,
  "npm.packageManager": "pnpm",
  "editor.tabSize": 2,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "files.eol": "\n",
  "search.exclude": {
    // 搜索排除这些区域
    "**/node_modules": true,
    "**/*.log": true,
    "**/*.log*": true,
@@ -73,14 +20,23 @@
    "**/.idea": true,
    "**/.vscode": false,
    "**/yarn.lock": true,
    "**/tmp": true
    "**/tmp": true,
    "out": true,
    "dist": true,
    "node_modules": true,
    "CHANGELOG.md": true,
    "examples": true,
    "res": true,
    "screenshots": true,
    "yarn-error.log": true,
    "**/.yarn": true
  },
  "files.exclude": {
    // 排除文件搜索区域,比如node_modules(默认设置已经屏蔽了)
    // "**/node_modules": true,
    "**/.cache": true,
    "**/.editorconfig": true,
    "**/.eslintcache": true,
    "**/bower_components": true,
    "**/.idea": true,
    "**/yarn.lock": true,
    "**/tmp": true,
    "**/.git": true,
    "**/.svn": true,
@@ -89,7 +45,6 @@
    "**/.DS_Store": true
  },
  "files.watcherExclude": {
    // 文件监视排除
    "**/.git/objects/**": true,
    "**/.git/subtree-cache/**": true,
    "**/.vscode/**": true,
@@ -99,79 +54,11 @@
    "**/dist/**": true,
    "**/yarn.lock": true
  },
  "files.associations": {
    // 配置文件关联,以便启用对应的智能提示,比如wxss使用css
    "*.vue": "vue",
    "*.wxss": "css"
  },
  "stylelint.enable": true,
  "stylelint.packageManager": "yarn",
  "css.validate": true,
  "less.validate": true,
  "scss.validate": true,
  // ↓↓↓↓↓↓↓↓↓↓↓↓↓ 以下为插件设置 ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
  // ↓↓↓↓↓↓↓↓↓↓↓↓↓ 需要安装对应的插件 ↓↓↓↓↓↓↓↓↓↓↓↓
  // ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
  // ===========================================
  // ================ Eslint ===================
  // ===========================================
  "eslint.enable": true, // 是否开启eslint
  "eslint.options": {
    // 配置
    "plugins": [
      "html",
      "vue",
      "javascript",
      "jsx",
      "typescript"
    ]
  },
  "eslint.autoFixOnSave": true, // 保存自动格式化
  // ===========================================
  // ================ Vetur ====================
  // ===========================================
  "vetur.experimental.templateInterpolationService": true,
  "vetur.format.options.tabSize": 2,
  "vetur.format.defaultFormatter.html": "js-beautify-html", // 使用js-beautify-html格式化
  "vetur.format.defaultFormatter.scss": "prettier", // 使用js-beautify-html格式化
  "vetur.format.defaultFormatter.css": "prettier", // 使用js-beautify-html格式化
  //   "vetur.format.defaultFormatter.html": "prettyhtml",
  "vetur.format.defaultFormatter.ts": "prettier-tslint",
  "vetur.format.defaultFormatter.js": "prettier",
  // "vetur.useWorkspaceDependencies": true,
  "vetur.format.defaultFormatterOptions": {
    "js-beautify-html": {
      //   "wrap_attributes": "force-aligned", // 单行
      "wrap_attributes": "force-expand-multiline" // 属性强制折行对齐 多行
    },
    "prettier": {
      "eslintIntegration": true, // 让perttier使用eslint的格式进行检查
      "arrowParens": "always", // 箭头函数参数括号 默认avoid 可选 avoid | always
      "semi": false, // 使用分号, 默认true
      "singleQuote": true // 使用单引号, 默认false(在jsx中配置无效, 默认都是双引号)
    }
  },
  // 函数注释
  //===========================================
  //============= Code Runner =================
  //===========================================
  "javascript.updateImportsOnFileMove.enabled": "never",
  "liveServer.settings.donotShowInfoMsg": true,
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "terminal.integrated.rendererType": "dom", //关闭liveserver提示
  "telemetry.enableCrashReporter": false,
  "telemetry.enableTelemetry": false,
  "workbench.settings.enableNaturalLanguageSearch": false,
  // 引用路径设置
  "stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass"],
  "path-intellisense.mappings": {
    "/@/": "${workspaceRoot}/src"
  },
  "prettier.requireConfig": true,
  "typescript.updateImportsOnFileMove.enabled": "always",
  "workbench.sideBar.location": "left",
  "[javascriptreact]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
@@ -180,12 +67,6 @@
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[jsonc]": {
    "editor.defaultFormatter": "vscode.json-language-features"
  },
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
@@ -202,8 +83,57 @@
  "[markdown]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  }
  },
  "[vue]": {
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": true,
      "source.fixAll.stylelint": true
    }
  },
  "i18n-ally.localesPaths": ["src/locales/lang"],
  "i18n-ally.keystyle": "nested",
  "i18n-ally.sortKeys": true,
  "i18n-ally.namespace": true,
  "i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}",
  "i18n-ally.enabledParsers": ["ts"],
  "i18n-ally.sourceLanguage": "en",
  "i18n-ally.displayLanguage": "zh-CN",
  "i18n-ally.enabledFrameworks": ["vue", "react"],
  "cSpell.words": [
    "vben",
    "windi",
    "browserslist",
    "tailwindcss",
    "esnext",
    "antv",
    "tinymce",
    "qrcode",
    "sider",
    "pinia",
    "sider",
    "nprogress",
    "INTLIFY",
    "stylelint",
    "esno",
    "vitejs",
    "sortablejs",
    "mockjs",
    "codemirror",
    "iconify",
    "commitlint",
    "vditor",
    "echarts",
    "cropperjs",
    "logicflow",
    "vueuse",
    "zxcvbn",
    "lintstagedrc",
    "brotli",
    "tailwindcss",
    "sider",
    "pnpm",
    "antd"
  ]
}