Skip to content

chore: remove deprecated baseUrl from client tsconfig — migrate to paths-only resolution #214

@NickMonrad

Description

@NickMonrad

Background

baseUrl: "." in client/tsconfig.app.json is deprecated in TypeScript 6 and will stop working in TypeScript 7. Added "ignoreDeprecations": "6.0" as a temporary suppression in PR #212 (TS6 upgrade).

What needs to change

  1. Remove "baseUrl": "." from client/tsconfig.app.json
  2. Remove "ignoreDeprecations": "6.0" (no longer needed)
  3. Add a Vite alias in client/vite.config.ts so the @/* import path still resolves at build time:
    import path from 'path'
    // in defineConfig:
    resolve: {
      alias: { '@': path.resolve(__dirname, './src') }
    }
  4. Verify @/ imports still work in tests (client/src/test/TaskList.test.tsx, projectCustomer.test.ts) — Vitest may need a matching alias in vitest.config.ts or the Vite config is shared automatically
  5. Run tsc --noEmit -p tsconfig.app.json, vite build, and client tests to confirm

Why deferred

The paths mapping in tsconfig gives TypeScript type-resolution for @/ imports. Without baseUrl, the anchor for relative paths shifts — this needs careful testing to ensure no import breaks at runtime or in tests. Low risk but deserves its own focused PR rather than bundled into the TS6 upgrade.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogFuture enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions