Summary
@vue/tsconfig is installed as a devDependency in web/package.json but neither tsconfig.json nor tsconfig.node.json extends from it. We wrote a manual config that overlaps ~80% with what the official preset provides, but misses several Vue-recommended settings.
What we're missing by not using the preset
| Setting |
What it does |
Impact |
resolveJsonModule: true |
Allows importing .json files with type safety |
Minor — enables a useful pattern |
moduleDetection: "force" |
Treats all files as modules |
Prevents cryptic "Cannot redeclare block-scoped variable" errors |
jsxImportSource: "vue" |
Vue-specific JSX handling |
Needed for proper Vue JSX support |
verbatimModuleSyntax: true |
Type-only imports handled correctly |
Important for <script setup> — the official recommendation |
Proposed approach
- Refactor
web/tsconfig.json to extend @vue/tsconfig/tsconfig.dom.json
- Keep our overrides on top:
baseUrl, paths (@/* alias), types: ["vitest/globals"], importHelpers, isolatedModules
- Remove redundant settings that the preset already provides
- Run
npm run type-check and fix any new errors from stricter settings
- Verify all dashboard tests and build still pass
Context
Discovered during dependency PR review (#371). The package was installed but never wired up — likely from initial project scaffolding. Adopting the preset keeps us aligned with Vue ecosystem evolution (settings get updated with each @vue/tsconfig release).
Summary
@vue/tsconfigis installed as a devDependency inweb/package.jsonbut neithertsconfig.jsonnortsconfig.node.jsonextends from it. We wrote a manual config that overlaps ~80% with what the official preset provides, but misses several Vue-recommended settings.What we're missing by not using the preset
resolveJsonModule: true.jsonfiles with type safetymoduleDetection: "force"jsxImportSource: "vue"verbatimModuleSyntax: true<script setup>— the official recommendationProposed approach
web/tsconfig.jsonto extend@vue/tsconfig/tsconfig.dom.jsonbaseUrl,paths(@/*alias),types: ["vitest/globals"],importHelpers,isolatedModulesnpm run type-checkand fix any new errors from stricter settingsContext
Discovered during dependency PR review (#371). The package was installed but never wired up — likely from initial project scaffolding. Adopting the preset keeps us aligned with Vue ecosystem evolution (settings get updated with each
@vue/tsconfigrelease).