{ // 默认格式化工具选择prettier "editor.defaultFormatter": "esbenp.prettier-vscode", // 保存的时候自动格式化 "editor.formatOnSave": true, //开启自动修复 "editor.codeActionsOnSave": { "source.fixAll": "explicit", "source.fixAll.eslint": "explicit", "source.fixAll.stylelint": "explicit" }, // 配置stylelint检查的文件类型范围 "stylelint.validate": ["css", "scss", "vue", "html"], // 与package.json的scripts对应 "stylelint.enable": true, "css.validate": false, "less.validate": false, "scss.validate": false, "[shellscript]": { "editor.defaultFormatter": "foxundermoon.shell-format" }, "[dotenv]": { "editor.defaultFormatter": "foxundermoon.shell-format" }, "[vue]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, // 配置语言的文件关联 "files.associations": { "pages.json": "jsonc", // pages.json 可以写注释 "manifest.json": "jsonc" // manifest.json 可以写注释 }, "cSpell.words": [ "climblee", "commitlint", "dcloudio", "iconfont", "qrcode", "refresherrefresh", "scrolltolower", "tabbar", "unibest", "uvui", "WechatMiniprogram" ], "typescript.tsdk": "node_modules\\typescript\\lib", // 控制相关文件嵌套展示 "explorer.fileNesting.enabled": true, "explorer.fileNesting.expand": false, "explorer.fileNesting.patterns": { "*.ts": "$(capture).test.ts, $(capture).test.tsx", "*.tsx": "$(capture).test.ts, $(capture).test.tsx", "*.env": "$(capture).env.*", "CHANGELOG.md": "CHANGELOG*", "package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,README*,.npmrc,.browserslistrc", ".eslintrc.cjs": ".eslintignore,.prettierignore,.stylelintignore,.commitlintrc.*,.prettierrc.*,.stylelintrc.*,.eslintrc-auto-import.json,.editorconfig,.commitlint.cjs", "vite.config.ts": "tsconfig.*.json,uno.config.ts,tsconfig.json,uni-pages.d.ts", "manifest.config.ts": "manifest.config.ts,pages.config.ts" }, "[json]": { "editor.defaultFormatter": "vscode.json-language-features" } }