VS Code 配置
创建于:2025-07-26 15:06:11
|
更新于:2025-11-12 15:59:45

资源嵌套

将所有不常用的文件收纳到一个目录「非真实目录」嵌套下面。

// .vscode/setting.json
{
  "explorer.fileNesting.enabled": true,
  "explorer.fileNesting.patterns": {
    "vite.config.ts": ".*rc, .cursor*,*.ini, *.sh, *.json, *.config.js, index.html, README.md, .git*"
  }
}

优化import

移除未使用的import,以及自动排序import。

prettier 需要安装相关依赖:

yarn add @trivago/prettier-plugin-sort-imports -D
yarn add prettier-plugin-tailwindcss -D
.vscode/setting.json
.prettierrc
{
  "editor.codeActionsOnSave": {
    "source.organizeImports": "explicit",
    "source.fixAll.prettier": "explicit"
  }
}
我也是有底线的 🫠