Skip to content

chore(web): adopt @vue/tsconfig preset instead of manual tsconfig #386

@Aureliolo

Description

@Aureliolo

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

  1. Refactor web/tsconfig.json to extend @vue/tsconfig/tsconfig.dom.json
  2. Keep our overrides on top: baseUrl, paths (@/* alias), types: ["vitest/globals"], importHelpers, isolatedModules
  3. Remove redundant settings that the preset already provides
  4. Run npm run type-check and fix any new errors from stricter settings
  5. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:choreMaintenance, cleanup, dependency updates

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions