Skip to content

Type-check the tests and tighten TypeScript: tsconfig.test.json, noUncheckedIndexedAccess, type-aware lint (no-floating-promises) #220

Closed

Description

@TMHSDigital

Why it matters

This is a server that manages child processes and has many promise chains (see the unhandled-rejection crash in the registry-write issue). Type-aware lint rules like no-floating-promises catch that class of bug. The tests are currently never type-checked, so type errors in them go unnoticed.

Evidence

  • tsconfig.json excludes src/**/__tests__, and vitest does not type-check. Compiling with the tests included reports 2 errors (src/__tests__/integration/ffmpeg.test.ts:416 and :418).
  • --noUncheckedIndexedAccess reports 84 errors, mostly in windows.ts, zoom.ts and pipeline.ts.
  • ESLint (eslint.config.js) is not type-aware.
  • npm outdated: TypeScript 7 has shipped, so the dependabot comment that "6.x is transitional" (.github/dependabot.yml) is stale.

Suggested approach

  1. Add tsconfig.test.json and run tsc -p tsconfig.test.json --noEmit in npm run typecheck. Fix the 2 errors.
  2. Enable typescript-eslint recommendedTypeChecked with at least no-floating-promises and no-misused-promises.
  3. Turn on noUncheckedIndexedAccess file by file.
  4. Decide on the TypeScript 7 migration and update the dependabot note.

Done when

  • CI type-checks the tests.
  • The floating-promise rule is enforced.

Activity

  1. added
    priority: low
    testing
    effort: medium
    impact: medium
    dx
    on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cidxeffort: mediumimpact: mediumpriority: lowtesting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions