settings.json 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. {
  2. // 默认格式化工具选择prettier
  3. "editor.defaultFormatter": "esbenp.prettier-vscode",
  4. // 配置stylelint检查的文件类型范围
  5. "stylelint.validate": ["css", "scss", "vue", "html"], // 与package.json的scripts对应
  6. "stylelint.enable": true,
  7. "css.validate": false,
  8. "less.validate": false,
  9. "scss.validate": false,
  10. "[shellscript]": {
  11. "editor.defaultFormatter": "foxundermoon.shell-format"
  12. },
  13. "[dotenv]": {
  14. "editor.defaultFormatter": "foxundermoon.shell-format"
  15. },
  16. "[vue]": {
  17. "editor.defaultFormatter": "esbenp.prettier-vscode"
  18. },
  19. "[typescript]": {
  20. "editor.defaultFormatter": "esbenp.prettier-vscode"
  21. },
  22. "[jsonc]": {
  23. "editor.defaultFormatter": "esbenp.prettier-vscode"
  24. },
  25. // 配置语言的文件关联
  26. "files.associations": {
  27. "pages.json": "jsonc", // pages.json 可以写注释
  28. "manifest.json": "jsonc" // manifest.json 可以写注释
  29. },
  30. "cSpell.words": [
  31. "aliyun",
  32. "Aplipay",
  33. "climblee",
  34. "commitlint",
  35. "dcloudio",
  36. "iconfont",
  37. "oxlint",
  38. "qrcode",
  39. "refresherrefresh",
  40. "scrolltolower",
  41. "tabbar",
  42. "Toutiao",
  43. "unibest",
  44. "uview",
  45. "uvui",
  46. "vitepress",
  47. "Wechat",
  48. "WechatMiniprogram",
  49. "Weixin"
  50. ],
  51. "typescript.tsdk": "node_modules\\typescript\\lib",
  52. "explorer.fileNesting.enabled": true,
  53. "explorer.fileNesting.expand": false,
  54. "explorer.fileNesting.patterns": {
  55. "README.md": "index.html,favicon.ico,robots.txt,CHANGELOG.md",
  56. "pages.config.ts": "manifest.config.ts,openapi-ts-request.config.ts",
  57. "package.json": "tsconfig.json,pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,.npmrc,.browserslistrc",
  58. "eslint.config.mjs": ".commitlintrc.*,.prettier*,.editorconfig,.commitlint.cjs,.eslint*"
  59. },
  60. // // 保存的时候自动格式化
  61. // "prettier.enable": true,
  62. // "editor.formatOnSave": true,
  63. // // 开启自动修复
  64. // "editor.codeActionsOnSave": {
  65. // "source.fixAll": "explicit",
  66. // "source.fixAll.eslint": "explicit",
  67. // "source.fixAll.stylelint": "explicit"
  68. // },
  69. // Disable the default formatter, use eslint instead
  70. "prettier.enable": false,
  71. "editor.formatOnSave": false,
  72. // Auto fix
  73. "editor.codeActionsOnSave": {
  74. "source.fixAll.eslint": "explicit",
  75. "source.organizeImports": "never"
  76. },
  77. // Silent the stylistic rules in you IDE, but still auto fix them
  78. "eslint.rules.customizations": [
  79. { "rule": "style/*", "severity": "off", "fixable": true },
  80. { "rule": "format/*", "severity": "off", "fixable": true },
  81. { "rule": "*-indent", "severity": "off", "fixable": true },
  82. { "rule": "*-spacing", "severity": "off", "fixable": true },
  83. { "rule": "*-spaces", "severity": "off", "fixable": true },
  84. { "rule": "*-order", "severity": "off", "fixable": true },
  85. { "rule": "*-dangle", "severity": "off", "fixable": true },
  86. { "rule": "*-newline", "severity": "off", "fixable": true },
  87. { "rule": "*quotes", "severity": "off", "fixable": true },
  88. { "rule": "*semi", "severity": "off", "fixable": true }
  89. ],
  90. // Enable eslint for all supported languages
  91. "eslint.validate": [
  92. "javascript",
  93. "javascriptreact",
  94. "typescript",
  95. "typescriptreact",
  96. "vue",
  97. "html",
  98. "markdown",
  99. "json",
  100. "json5",
  101. "jsonc",
  102. "yaml",
  103. "toml",
  104. "xml",
  105. "gql",
  106. "graphql",
  107. "astro",
  108. "svelte",
  109. "css",
  110. "less",
  111. "scss",
  112. "pcss",
  113. "postcss"
  114. ]
  115. }