settings.json 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. {
  2. //为了符合eslint的两个空格间隔原则
  3. "editor.tabSize": 2,
  4. //配置eslint
  5. "files.autoSave": "off",
  6. "eslint.run": "onSave",
  7. // 控制是否将打开的编辑器显示为预览。预览编辑器将会重用至其被保留(例如,通过双击或编辑),且其字体样式将为斜体。
  8. "workbench.editor.enablePreview": false,
  9. "search.exclude": {
  10. "**/dist": true,
  11. "**/static": true
  12. },
  13. "workbench.colorCustomizations": {
  14. "activityBar.background": "#332A3A",
  15. "titleBar.activeBackground": "#473B52",
  16. "titleBar.activeForeground": "#FBFAFB"
  17. },
  18. "eslint.enable": true,
  19. "editor.codeActionsOnSave": {
  20. "source.fixAll": true,
  21. "source.fixAll.eslint": true
  22. },
  23. "editor.formatOnSave": false,
  24. // "rvest.vs-code-prettier-eslint"
  25. "vetur.format.options.tabSize": 2,
  26. "vetur.format.options.useTabs": false,
  27. "vetur.format.defaultFormatterOptions": {
  28. "prettier": {
  29. "singleQuote": true,
  30. "semi": false,
  31. "trailingComma": "none",
  32. "arrowParens": "avoid",
  33. "printWidth": 100,
  34. "bracketSpacing": true,
  35. "htmlWhitespaceSensitivity": "ignore",
  36. // 关键配置:函数名后添加空格
  37. "spaceBeforeFunctionParen": true // 设置为 true 添加空格
  38. },
  39. "stylus-supremacy": {
  40. "insertColons": false,
  41. "insertSemicolons": false
  42. }
  43. },
  44. // "vetur.format.defaultFormatter.js": "prettier-eslint",
  45. "[javascript]": {
  46. "editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
  47. }
  48. }