You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Type-check the tests and tighten TypeScript: tsconfig.test.json, noUncheckedIndexedAccess, type-aware lint (no-floating-promises) #220
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
Add tsconfig.test.json and run tsc -p tsconfig.test.json --noEmit in npm run typecheck. Fix the 2 errors.
Enable typescript-eslintrecommendedTypeChecked with at least no-floating-promises and no-misused-promises.
Turn on noUncheckedIndexedAccess file by file.
Decide on the TypeScript 7 migration and update the dependabot note.
Activity