settings.json 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. {
  2. // 编辑器基础设置
  3. "editor.tabSize": 2,
  4. //配置eslint
  5. "eslint.run": "onSave",
  6. // 控制是否将打开的编辑器显示为预览。预览编辑器将会重用至其被保留(例如,通过双击或编辑),且其字体样式将为斜体。
  7. "workbench.editor.enablePreview": false,
  8. "workbench.colorCustomizations": {
  9. "activityBar.background": "#332A3A",
  10. "titleBar.activeBackground": "#473B52",
  11. "titleBar.activeForeground": "#FBFAFB"
  12. },
  13. "eslint.enable": true,
  14. "editor.codeActionsOnSave": {
  15. "source.fixAll.eslint": "always",
  16. "source.organizeImports": "always"
  17. },
  18. // 文件和搜索设置
  19. "files.eol": "\n",
  20. "files.autoSave": "onFocusChange",
  21. "search.exclude": {
  22. "**/node_modules": true,
  23. "**/dist": true
  24. },
  25. // ESLint设置
  26. "eslint.validate": ["javascript", "javascriptreact", "vue"],
  27. "eslint.workingDirectories": [{ "mode": "auto" }],
  28. // Prettier设置
  29. "prettier.configPath": ".prettierrc.json",
  30. "prettier.requireConfig": true,
  31. // Vetur设置
  32. "vetur.format.defaultFormatter.html": "prettier",
  33. "vetur.format.defaultFormatter.js": "prettier-eslint",
  34. "vetur.validation.template": false, // 让ESLint处理模板校验
  35. "vetur.grammar.customBlocks": {
  36. "docs": "md",
  37. "i18n": "json"
  38. }
  39. }