settings.json 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. {
  2. // 默认格式化工具选择prettier
  3. "editor.defaultFormatter": "esbenp.prettier-vscode",
  4. // 保存的时候自动格式化
  5. "editor.formatOnSave": true,
  6. //开启自动修复
  7. "editor.codeActionsOnSave": {
  8. "source.fixAll": "explicit",
  9. "source.fixAll.eslint": "explicit",
  10. "source.fixAll.stylelint": "explicit"
  11. },
  12. // 配置stylelint检查的文件类型范围
  13. "stylelint.validate": ["css", "scss", "vue", "html"], // 与package.json的scripts对应
  14. "stylelint.enable": true,
  15. "css.validate": false,
  16. "less.validate": false,
  17. "scss.validate": false,
  18. "[shellscript]": {
  19. "editor.defaultFormatter": "foxundermoon.shell-format"
  20. },
  21. "[dotenv]": {
  22. "editor.defaultFormatter": "foxundermoon.shell-format"
  23. },
  24. "[vue]": {
  25. "editor.defaultFormatter": "esbenp.prettier-vscode"
  26. },
  27. "[typescript]": {
  28. "editor.defaultFormatter": "esbenp.prettier-vscode"
  29. },
  30. "[jsonc]": {
  31. "editor.defaultFormatter": "esbenp.prettier-vscode"
  32. },
  33. // 配置语言的文件关联
  34. "files.associations": {
  35. "pages.json": "jsonc", // pages.json 可以写注释
  36. "manifest.json": "jsonc" // manifest.json 可以写注释
  37. },
  38. "cSpell.words": [
  39. "climblee",
  40. "commitlint",
  41. "dcloudio",
  42. "iconfont",
  43. "qrcode",
  44. "refresherrefresh",
  45. "scrolltolower",
  46. "tabbar",
  47. "unibest",
  48. "uvui",
  49. "WechatMiniprogram"
  50. ],
  51. "typescript.tsdk": "node_modules\\typescript\\lib",
  52. // 控制相关文件嵌套展示
  53. "explorer.fileNesting.enabled": true,
  54. "explorer.fileNesting.expand": false,
  55. "explorer.fileNesting.patterns": {
  56. "*.ts": "$(capture).test.ts, $(capture).test.tsx",
  57. "*.tsx": "$(capture).test.ts, $(capture).test.tsx",
  58. "*.env": "$(capture).env.*",
  59. "CHANGELOG.md": "CHANGELOG*",
  60. "package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,README*,.npmrc,.browserslistrc",
  61. ".eslintrc.cjs": ".eslintignore,.prettierignore,.stylelintignore,.commitlintrc.*,.prettierrc.*,.stylelintrc.*,.eslintrc-auto-import.json,.editorconfig,.commitlint.cjs",
  62. "vite.config.ts": "tsconfig.*.json,uno.config.ts,tsconfig.json,uni-pages.d.ts",
  63. "manifest.config.ts": "manifest.config.ts,pages.config.ts"
  64. }
  65. }