{ // 保存时:先 TS organizeImports(合并/清理未用),再 ESLint fix(import/order + type 拆分等) "editor.codeActionsOnSave": { "source.organizeImports": "explicit", "source.fixAll.eslint": "explicit" }, // 启用 ESLint flat config,并对常见 JS/TS 文件启用 "eslint.useFlatConfig": true, "eslint.validate": [ "javascript", "javascriptreact", "typescript", "typescriptreact" ], "eslint.run": "onType", // 自动补全 import 时优先生成 `import type` "typescript.preferences.preferTypeOnlyAutoImports": true, "typescript.tsdk": "node_modules/typescript/lib", "typescript.enablePromptUseWorkspaceTsdk": true, // 自动完成触发 "editor.quickSuggestions": { "other": "on", "comments": "off", "strings": "on" }, "editor.suggestOnTriggerCharacters": true, "editor.suggest.snippetsPreventQuickSuggestions": false, "editor.formatOnSave": false, "tailwindCSS.experimental.classRegex": [ [ "clsx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)" ] ] }