settings.json 3.3 KB

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