Skip to content

apps/console/tsconfig.node.json includes vitest.setup.ts, which does not exist #3385

Description

@yinlianghui

Found while working #3305. Deliberately not fixed there — that PR kept to the three type errors plus the gate wiring, and deleting an unrelated dead path would have been scope creep. Filing per PD #10, unassigned.

What

apps/console/tsconfig.node.json has always listed vitest.setup.ts in its include:

"include": ["vite.config.ts", "vitest.setup.ts", "../../scripts/vite-*.ts"]

There is no apps/console/vitest.setup.ts:

$ ls apps/console/vitest.setup.ts
ls: cannot access 'apps/console/vitest.setup.ts': No such file or directory

The console's setup file is referenced from apps/console/vitest.config.ts as ../../vitest.setup.dom.tsx, one directory up and under a different name.

Why it matters

Very little today, which is why this is a finding and not a defect: an include entry matching nothing is silently ignored as long as some other pattern matches (vite.config.ts does), so nothing errors and nothing is mis-checked.

The reason to record it rather than drop it: it reads as though the console's vitest setup file is type-checked by this project, and it is not — there is no such file, and the real one (vitest.setup.dom.tsx) is not covered by this project at all. That is the same "looks checked, isn't" shape #3305 was about, one notch smaller. If the intent was ever to cover the setup file, the entry is pointing at the wrong path; if not, it is dead and should go.

Note the empty-include hazard for whoever fixes it: TypeScript errors with TS18003 when include resolves to zero files, so this entry cannot simply be deleted from a project whose only other entries might also stop matching. In this project vite.config.ts and ../../scripts/vite-*.ts both match real files, so deleting the dead entry is safe as-is.

Suggested direction (not decided)

Either drop vitest.setup.ts from the include, or — if the console's setup file genuinely should be type-checked — point it at ../../vitest.setup.dom.tsx and confirm the project stays green under pnpm --filter @object-ui/console type-check (which since #3305 runs this project).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions