settings.json 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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": [
  9. "javascript",
  10. "typescript",
  11. "vue"
  12. ],
  13. "[vue]": {
  14. "editor.defaultFormatter": "Vue.volar"
  15. },
  16. "[scss]": {
  17. "editor.defaultFormatter": "esbenp.prettier-vscode"
  18. },
  19. "[ts]": {
  20. "editor.defaultFormatter": "esbenp.prettier-vscode"
  21. },
  22. "[js]": {
  23. "editor.defaultFormatter": "esbenp.prettier-vscode"
  24. },
  25. // 保存时 prettier 自动格式化
  26. "editor.formatOnSave": true,
  27. // 保存时自动启用 eslint --fix 自动修复
  28. "editor.codeActionsOnSave": {
  29. "source.fixAll": "explicit",
  30. "eslint.autoFixOnSave": "explicit"
  31. },
  32. "eslint.options": {
  33. "overrideConfig": {
  34. "env": {
  35. "browser": true,
  36. "es6": true
  37. },
  38. "parserOptions": {
  39. "ecmaVersion": 2020,
  40. "sourceType": "module",
  41. "ecmaFeatures": {
  42. "jsx": false
  43. }
  44. },
  45. "rules": {
  46. "no-debugger": "off"
  47. }
  48. }
  49. },
  50. "i18n-ally.displayLanguage": "zh-cn",
  51. "i18n-ally.enabledParsers": [
  52. "json",
  53. "js"
  54. ],
  55. "i18n-ally.localesPaths": [
  56. "src/i18n/lang",
  57. "src/i18n/pages/login",
  58. "src/i18n/pages/menu",
  59. ],
  60. "i18n-ally.extract.parsers.html": {
  61. "attributes": [
  62. "text",
  63. "title",
  64. "alt",
  65. "placeholder",
  66. "label",
  67. "aria-label"
  68. ],
  69. "ignoredTags": [
  70. "script",
  71. "style"
  72. ],
  73. "vBind": true,
  74. "inlineText": true
  75. },
  76. "i18n-ally.keystyle": "nested",
  77. "vue.features.codeActions.enable": false,
  78. }