settings.json 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {
  2. //为了符合eslint的两个空格间隔原则
  3. "editor.tabSize": 2,
  4. //配置eslint
  5. "files.autoSave":"off",
  6. "editor.codeActionsOnSave": {
  7. "source.fixAll": "explicit",
  8. "source.fixAll.eslint": "explicit"
  9. },
  10. "eslint.run": "onSave",
  11. // 控制是否将打开的编辑器显示为预览。预览编辑器将会重用至其被保留(例如,通过双击或编辑),且其字体样式将为斜体。
  12. "workbench.editor.enablePreview": false,
  13. "search.exclude": {
  14. "**/dist": true,
  15. "**/static": true
  16. },
  17. "workbench.colorCustomizations": {
  18. "activityBar.background": "#332A3A",
  19. "titleBar.activeBackground": "#473B52",
  20. "titleBar.activeForeground": "#FBFAFB"
  21. },
  22. "eslint.enable": true,
  23. "editor.codeActionsOnSave": {
  24. "source.fixAll": true,
  25. "source.fixAll.eslint": true
  26. },
  27. "editor.formatOnSave": true,
  28. // "rvest.vs-code-prettier-eslint"
  29. "editor.defaultFormatter":{
  30. "editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
  31. "editor.formatOnType": false, // required
  32. "editor.formatOnPaste": true, // optional
  33. "editor.formatOnSave": false, // optional
  34. "editor.formatOnSaveMode": "file", // required to format on save
  35. "files.autoSave": "onFocusChange", // optional but recommended
  36. "vs-code-prettier-eslint.prettierLast": false // set as "true" to run 'prettier' last not first
  37. },
  38. "vetur.format.defaultFormatter.js": "prettier-eslint",
  39. "[javascript]": {
  40. "editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
  41. }
  42. }