settings.json 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. {
  2. "editor.fontSize": 15,
  3. "editor.insertSpaces": false,
  4. "editor.bracketPairColorization.enabled": true,
  5. "editor.formatOnPaste": true,
  6. "editor.formatOnType": true,
  7. // 配置eslint适用于vue代码
  8. "eslint.validate": ["javascript", "typescript", "vue"],
  9. "[vue]": {
  10. "editor.defaultFormatter": "esbenp.prettier-vscode"
  11. },
  12. "[scss]": {
  13. "editor.defaultFormatter": "esbenp.prettier-vscode"
  14. },
  15. "[ts]": {
  16. "editor.defaultFormatter": "esbenp.prettier-vscode"
  17. },
  18. "[js]": {
  19. "editor.defaultFormatter": "esbenp.prettier-vscode"
  20. },
  21. "[json]": {
  22. "editor.defaultFormatter": "esbenp.prettier-vscode"
  23. },
  24. // 保存时 prettier 自动格式化
  25. "editor.formatOnSave": true,
  26. // 保存时自动启用 eslint --fix 自动修复
  27. "editor.codeActionsOnSave": {
  28. "source.fixAll": "explicit",
  29. "eslint.autoFixOnSave": "explicit"
  30. },
  31. "eslint.options": {
  32. "overrideConfig": {
  33. "env": {
  34. "browser": true,
  35. "es6": true
  36. },
  37. "parserOptions": {
  38. "ecmaVersion": 2020,
  39. "sourceType": "module",
  40. "ecmaFeatures": {
  41. "jsx": false
  42. }
  43. },
  44. "rules": {
  45. "no-debugger": "off"
  46. }
  47. }
  48. },
  49. "i18n-ally.displayLanguage": "zh-cn",
  50. "i18n-ally.enabledParsers": ["json", "js"],
  51. "i18n-ally.localesPaths": ["src/i18n/lang", "src/i18n/pages/login", "src/i18n/pages/menu"],
  52. "i18n-ally.extract.parsers.html": {
  53. "attributes": ["text", "title", "alt", "placeholder", "label", "aria-label"],
  54. "ignoredTags": ["script", "style"],
  55. "vBind": true,
  56. "inlineText": true
  57. },
  58. "i18n-ally.keystyle": "nested"
  59. }