settings.json 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. {
  2. "eslint.nodePath": "config/eslint-config/node_modules/eslint",
  3. "prettier.prettierPath": "config/eslint-config/node_modules/prettier",
  4. "editor.tabSize": 2,
  5. "editor.insertSpaces": true,
  6. "editor.formatOnSave": true,
  7. "editor.formatOnType": false,
  8. "editor.formatOnPaste": false,
  9. "editor.defaultFormatter": "esbenp.prettier-vscode",
  10. "editor.codeActionsOnSave": {
  11. "source.fixAll": "explicit",
  12. "source.fixAll.eslint": "explicit",
  13. "source.organizeImports": "never"
  14. // "source.sortImports": "always"
  15. },
  16. "workbench.editorAssociations": {
  17. "*.mdc": "default"
  18. },
  19. "editor.formatOnSaveMode": "modificationsIfAvailable",
  20. "search.followSymlinks": false,
  21. "search.exclude": {
  22. "**/node_modules": true,
  23. "**/.nyc_output": true,
  24. "**/.rush": true,
  25. "**/pnpm-lock.yaml": true,
  26. "**/CHANGELOG.json": true,
  27. "**/CHANGELOG.md": true,
  28. "common/changes": true,
  29. "**/output": true,
  30. "**/lib": true,
  31. "**/dist": true,
  32. "**/coverage": true,
  33. "common/temp": true
  34. },
  35. "eslint.workingDirectories": [
  36. {
  37. "mode": "auto"
  38. }
  39. ],
  40. "files.defaultLanguage": "plaintext",
  41. "files.associations": {
  42. ".code-workspace": "jsonc",
  43. ".babelrc": "json",
  44. ".eslintrc": "jsonc",
  45. ".eslintrc*.json": "jsonc",
  46. ".stylelintrc": "javascript",
  47. "stylelintrc": "jsonc",
  48. "*.json": "jsonc",
  49. "package.json": "json",
  50. "*.mdc": "markdown",
  51. ".htmlhintrc": "jsonc",
  52. "htmlhintrc": "jsonc",
  53. "Procfile*": "shellscript",
  54. "README": "markdown",
  55. "**/coverage/**/*.*": "plaintext",
  56. "OWNERS": "yaml",
  57. // 需要将 pnpm-lock file 设置为 plaintext,不做解析,否则打开文件时 vscode 容易卡死
  58. "**/pnpm-lock.yaml": "plaintext",
  59. "**/dist/**": "plaintext",
  60. "**/dist_*/**": "plaintext",
  61. "*.map": "plaintext",
  62. "*.log": "plaintext"
  63. },
  64. "files.exclude": {
  65. "**/.git": true,
  66. "**/.svn": true,
  67. "**/.hg": true,
  68. "**/CVS": true,
  69. "**/.DS_Store": true,
  70. "**/Thumbs.db": true,
  71. "**/.rush": true,
  72. "**/.swc": true,
  73. "**/rush-logs": true
  74. },
  75. "files.watcherExclude": {
  76. "**/.git/objects/**": true,
  77. "**/.git/subtree-cache/**": true,
  78. "**/node_modules/*/**": true
  79. },
  80. "search.useIgnoreFiles": true,
  81. //
  82. "editor.rulers": [80, 120],
  83. "files.eol": "\n",
  84. "files.trimTrailingWhitespace": true,
  85. "files.insertFinalNewline": true,
  86. "cSpell.diagnosticLevel": "Warning",
  87. "eslint.probe": [
  88. "javascript",
  89. "javascriptreact",
  90. "typescript",
  91. "typescriptreact"
  92. ],
  93. "editor.semanticHighlighting.enabled": false,
  94. "eslint.format.enable": false,
  95. "eslint.enable": true,
  96. "eslint.useFlatConfig": true,
  97. "eslint.codeActionsOnSave.mode": "problems",
  98. "eslint.lintTask.enable": false,
  99. "javascript.validate.enable": false,
  100. "typescript.tsdk": "config/ts-config/node_modules/typescript/lib",
  101. "typescript.enablePromptUseWorkspaceTsdk": true,
  102. "typescript.disableAutomaticTypeAcquisition": true,
  103. "typescript.format.enable": false,
  104. "typescript.referencesCodeLens.enabled": false,
  105. "typescript.preferGoToSourceDefinition": true,
  106. "typescript.updateImportsOnFileMove.enabled": "never",
  107. // tsserver log 不会自动删除,日积月累,导致磁盘空间不足,因此默认关闭
  108. "typescript.tsserver.log": "off",
  109. "typescript.tsserver.experimental.enableProjectDiagnostics": false,
  110. "typescript.workspaceSymbols.excludeLibrarySymbols": true,
  111. "editor.minimap.enabled": true,
  112. "typescript.preferences.includePackageJsonAutoImports": "off",
  113. "typescript.suggest.autoImports": true,
  114. "typescript.tsserver.maxTsServerMemory": 10240,
  115. "typescript.tsserver.enableRegionDiagnostics": false,
  116. "typescript.tsserver.watchOptions": {
  117. "fallbackPolling": "dynamicPriorityPolling",
  118. "synchronousWatchDirectory": true,
  119. "watchDirectory": "useFsEvents",
  120. "watchFile": "useFsEventsOnParentDirectory",
  121. "excludeDirectories": ["/**/node_modules"],
  122. "excludeLibrarySymbols": true,
  123. "excludeFiles": ["/**/node_modules/**"]
  124. },
  125. "css.validate": false,
  126. "scss.validate": false,
  127. "less.validate": false,
  128. "stylelint.enable": true,
  129. "stylelint.validate": ["css", "scss", "less"],
  130. // "stylelint.stylelintPath": "config/stylelint-config/node_modules/stylelint",
  131. "emmet.triggerExpansionOnTab": true,
  132. "[typescript]": {
  133. "editor.defaultFormatter": "esbenp.prettier-vscode"
  134. },
  135. "[yaml]": {
  136. "editor.defaultFormatter": "esbenp.prettier-vscode"
  137. },
  138. "[css]": {
  139. "editor.defaultFormatter": "esbenp.prettier-vscode"
  140. },
  141. "[html]": {
  142. "editor.defaultFormatter": "esbenp.prettier-vscode"
  143. },
  144. "[javascript]": {
  145. "editor.defaultFormatter": "esbenp.prettier-vscode"
  146. },
  147. "[javascriptreact]": {
  148. "editor.defaultFormatter": "esbenp.prettier-vscode"
  149. },
  150. "[json]": {
  151. "editor.defaultFormatter": "esbenp.prettier-vscode"
  152. },
  153. "[jsonc]": {
  154. "editor.defaultFormatter": "esbenp.prettier-vscode"
  155. },
  156. "[less]": {
  157. "editor.defaultFormatter": "stylelint.vscode-stylelint"
  158. },
  159. "[scss]": {
  160. "editor.defaultFormatter": "esbenp.prettier-vscode"
  161. },
  162. "[typescriptreact]": {
  163. "editor.defaultFormatter": "esbenp.prettier-vscode"
  164. },
  165. "[ignore]": {
  166. "editor.defaultFormatter": "foxundermoon.shell-format"
  167. },
  168. "[shellscript]": {
  169. "editor.defaultFormatter": "foxundermoon.shell-format"
  170. },
  171. "[dotenv]": {
  172. "editor.defaultFormatter": "foxundermoon.shell-format"
  173. },
  174. "[svg]": {
  175. "editor.defaultFormatter": "jock.svg"
  176. },
  177. "svg.preview.background": "white",
  178. "[xml]": {
  179. "editor.defaultFormatter": "mblode.pretty-formatter"
  180. },
  181. "[sql]": {
  182. "editor.defaultFormatter": "adpyke.vscode-sql-formatter"
  183. },
  184. "git.openRepositoryInParentFolders": "always",
  185. "references.preferredLocation": "view"
  186. }