Skip to content

Ship shared vitest/tsconfig presets — start's examples carry ~262 lines of identical config copies #2

Description

@btravers

Found while auditing btravstack/start (2026-08-13).

Measured across start's 11 example workspaces: ~262 lines of config files are byte-identical copies —

  • src/vitest.d.ts (import type {} from "@unthrown/vitest";): 11 identical copies
  • vitest.config.ts (the 9-line node/include/setupFiles/coverage block): 9 identical copies
  • tsconfig.test-d.json (6 lines): 9 identical copies
  • tsconfig.json: one 9-line "library" variant × 6, one 13-line "app" variant × 4
  • the same 3-script block (test / test:types / typecheck) in 9 of 11 package.json files

This repo already ships @btravstack/tsconfig; the same move covers the rest. Every btravstack monorepo with more than a couple of workspaces pays this copy tax, and drift between copies is silent (start's two divergent vitest.config.ts are legitimate, but nothing distinguishes a deliberate divergence from a stale copy).

Acceptance

  • A shared vitest preset (defineConfig-mergeable or an extendable base) covering environment, include, setupFiles: ["@unthrown/vitest"] and the coverage defaults, so a workspace's vitest.config.ts states only its deltas.
  • A published tsconfig.test-d.json base, and the library/app tsconfig variants if they are not already expressible from @btravstack/tsconfig.
  • start's examples adopt them and delete the copies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions