|
| 1 | +{ |
| 2 | + // Editor — aligned with .editorconfig + prettier.config.mjs |
| 3 | + "editor.formatOnSave": true, |
| 4 | + "editor.defaultFormatter": "esbenp.prettier-vscode", |
| 5 | + "editor.codeActionsOnSave": { |
| 6 | + "source.fixAll.eslint": "explicit" |
| 7 | + }, |
| 8 | + "editor.tabSize": 2, |
| 9 | + "editor.insertSpaces": true, |
| 10 | + "editor.detectIndentation": false, |
| 11 | + |
| 12 | + // Files — aligned with .editorconfig |
| 13 | + "files.eol": "\n", |
| 14 | + "files.insertFinalNewline": true, |
| 15 | + "files.trimTrailingWhitespace": true, |
| 16 | + "files.encoding": "utf8", |
| 17 | + |
| 18 | + // Prettier — pin to our config, ignore .editorconfig (config is the source of truth) |
| 19 | + "prettier.requireConfig": true, |
| 20 | + "prettier.useEditorConfig": false, |
| 21 | + "prettier.configPath": "prettier.config.mjs", |
| 22 | + |
| 23 | + // Per-language formatter routing |
| 24 | + "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, |
| 25 | + "[typescriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, |
| 26 | + "[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, |
| 27 | + "[javascriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, |
| 28 | + "[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, |
| 29 | + "[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, |
| 30 | + "[yaml]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, |
| 31 | + "[markdown]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, |
| 32 | + "[css]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, |
| 33 | + "[html]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, |
| 34 | + |
| 35 | + // ESLint flat config (eslint.config.mjs) |
| 36 | + "eslint.useFlatConfig": true, |
| 37 | + "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"], |
| 38 | + |
| 39 | + // TypeScript — use workspace TS, prefer @/* path alias over relative imports |
| 40 | + "typescript.tsdk": "node_modules/typescript/lib", |
| 41 | + "typescript.enablePromptUseWorkspaceTsdk": true, |
| 42 | + "typescript.preferences.importModuleSpecifier": "non-relative", |
| 43 | + "javascript.preferences.importModuleSpecifier": "non-relative", |
| 44 | + "typescript.updateImportsOnFileMove.enabled": "always", |
| 45 | + "javascript.updateImportsOnFileMove.enabled": "always", |
| 46 | + |
| 47 | + // Tailwind v4 — treat .css as Tailwind so @theme, @source, @custom-variant don't error, |
| 48 | + // and enable IntelliSense inside cn() and class-variance-authority cva() calls. |
| 49 | + "files.associations": { |
| 50 | + "*.css": "tailwindcss" |
| 51 | + }, |
| 52 | + "tailwindCSS.experimental.classRegex": [ |
| 53 | + ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"], |
| 54 | + ["cn\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"], |
| 55 | + ["clsx\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"], |
| 56 | + ["class:list=\\{([^}]*)\\}", "[\"'`]([^\"'`]*).*?[\"'`]"] |
| 57 | + ], |
| 58 | + "css.lint.unknownAtRules": "ignore", |
| 59 | + "scss.lint.unknownAtRules": "ignore", |
| 60 | + "less.lint.unknownAtRules": "ignore", |
| 61 | + |
| 62 | + // Emmet for React |
| 63 | + "emmet.includeLanguages": { |
| 64 | + "typescript": "typescriptreact", |
| 65 | + "javascript": "javascriptreact" |
| 66 | + }, |
| 67 | + "emmet.syntaxProfiles": { |
| 68 | + "typescript": "jsx", |
| 69 | + "javascript": "jsx" |
| 70 | + }, |
| 71 | + |
| 72 | + // Search/explorer noise |
| 73 | + "search.exclude": { |
| 74 | + "**/node_modules": true, |
| 75 | + "**/build": true, |
| 76 | + "**/.react-router": true, |
| 77 | + "**/dist": true, |
| 78 | + "**/bun.lock": true, |
| 79 | + "**/.git": true |
| 80 | + }, |
| 81 | + "files.watcherExclude": { |
| 82 | + "**/node_modules/**": true, |
| 83 | + "**/build/**": true, |
| 84 | + "**/.react-router/**": true |
| 85 | + } |
| 86 | +} |
0 commit comments