settings.json 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. {
  2. // 全局缩进设置
  3. "editor.tabSize": 4,
  4. "editor.detectIndentation": false,
  5. "editor.insertSpaces": true,
  6. // 配置语言的文件关联
  7. "files.associations": {
  8. "pages.json": "jsonc", // pages.json 可以写注释
  9. "manifest.json": "jsonc" // manifest.json 可以写注释
  10. },
  11. "stylelint.enable": false, // 禁用 stylelint
  12. "css.validate": false, // 禁用 CSS 内置验证
  13. "scss.validate": false, // 禁用 SCSS 内置验证
  14. "less.validate": false, // 禁用 LESS 内置验证
  15. "typescript.tsdk": "node_modules\\typescript\\lib",
  16. "explorer.fileNesting.enabled": true,
  17. "explorer.fileNesting.expand": false,
  18. "explorer.fileNesting.patterns": {
  19. "README.md": "index.html,favicon.ico,robots.txt,CHANGELOG.md",
  20. "docker.md": "Dockerfile,docker*.md,nginx*,.dockerignore",
  21. "pages.config.ts": "manifest.config.ts,openapi-ts-request.config.ts",
  22. "package.json": "tsconfig.json,pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,.npmrc,.browserslistrc",
  23. "eslint.config.mjs": ".commitlintrc.*,.prettier*,.editorconfig,.commitlint.cjs,.eslint*"
  24. },
  25. // 编辑器格式化设置
  26. "prettier.enable": false,
  27. "editor.formatOnSave": true,
  28. "editor.formatOnType": true,
  29. // Auto fix
  30. "editor.codeActionsOnSave": {
  31. "source.fixAll.eslint": "explicit",
  32. "source.organizeImports": "never"
  33. },
  34. // Silent the stylistic rules in you IDE, but still auto fix them
  35. "eslint.rules.customizations": [
  36. { "rule": "style/*", "severity": "off", "fixable": true },
  37. { "rule": "format/*", "severity": "off", "fixable": true },
  38. { "rule": "*-indent", "severity": "off", "fixable": true },
  39. { "rule": "*-spacing", "severity": "off", "fixable": true },
  40. { "rule": "*-spaces", "severity": "off", "fixable": true },
  41. { "rule": "*-order", "severity": "off", "fixable": true },
  42. { "rule": "*-dangle", "severity": "off", "fixable": true },
  43. { "rule": "*-newline", "severity": "off", "fixable": true },
  44. { "rule": "*quotes", "severity": "off", "fixable": true },
  45. { "rule": "*semi", "severity": "off", "fixable": true }
  46. ],
  47. // 语言特定的缩进设置
  48. "[vue]": {
  49. "editor.tabSize": 4,
  50. "editor.insertSpaces": true,
  51. "editor.formatOnSave": true
  52. },
  53. "[html]": {
  54. "editor.tabSize": 4,
  55. "editor.insertSpaces": true,
  56. "editor.formatOnSave": true
  57. },
  58. "[scss]": {
  59. "editor.tabSize": 4,
  60. "editor.insertSpaces": true,
  61. "editor.formatOnSave": true
  62. },
  63. "[css]": {
  64. "editor.tabSize": 4,
  65. "editor.insertSpaces": true,
  66. "editor.formatOnSave": true
  67. },
  68. "[javascript]": {
  69. "editor.tabSize": 4,
  70. "editor.insertSpaces": true,
  71. "editor.formatOnSave": true
  72. },
  73. "[typescript]": {
  74. "editor.tabSize": 4,
  75. "editor.insertSpaces": true,
  76. "editor.formatOnSave": true
  77. },
  78. // Enable eslint for all supported languages
  79. "eslint.validate": [
  80. "javascript",
  81. "javascriptreact",
  82. "typescript",
  83. "typescriptreact",
  84. "vue",
  85. "html",
  86. "markdown",
  87. "json",
  88. "jsonc",
  89. "yaml",
  90. "toml",
  91. "xml",
  92. "gql",
  93. "graphql",
  94. "astro",
  95. "svelte",
  96. "css",
  97. "less",
  98. "scss",
  99. "pcss",
  100. "postcss"
  101. ],
  102. "cSpell.words": [
  103. "alova",
  104. "Aplipay",
  105. "attributify",
  106. "chooseavatar",
  107. "climblee",
  108. "commitlint",
  109. "dcloudio",
  110. "iconfont",
  111. "oxlint",
  112. "qrcode",
  113. "refresherrefresh",
  114. "scrolltolower",
  115. "tabbar",
  116. "Toutiao",
  117. "uniapp",
  118. "unibest",
  119. "unocss",
  120. "uview",
  121. "uvui",
  122. "Wechat",
  123. "WechatMiniprogram",
  124. "Weixin"
  125. ],
  126. "cSpell.ignoreWords": [
  127. "autoscan",
  128. "easycom",
  129. "iconify",
  130. "oklch",
  131. "wxss"
  132. ]
  133. }