Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
name: pre-commit event: pre-commit type: gate
Pre-commit gate for OpenScreen
Runs on every git commit in this repo. Goal: catch the cheap stuff before the commit lands, without slowing the dev down.
What it does
- Biome check (lint + format) on staged
*.{ts,tsx,js,jsx,mts,cts,json}files. Uses the same scope aslint-stagedinpackage.json. - TypeScript —
npx tsc --noEmitfor the whole project. Cheap on this codebase, catches type errors that Biome misses. - Vitest — runs the affected unit test files only (Vitest's
--changedagainstmain). Skipped automatically if no tests are affected.
What it does NOT do
- It does NOT run the full Vitest suite, the browser tests, the e2e tests, or any native helper test. Those are too slow for a pre-commit gate and belong to CI.
- It does NOT modify files. If Biome wants to reformat, the dev runs
npm run lint:fixthemselves.
Pass criteria
All three steps exit 0. The commit proceeds.
Fail behavior
The commit is blocked. The hook prints the failing step's output. The dev fixes and re-stages.
Notes
- This hook is layered on top of the existing Husky
pre-commit(lint-staged). They coexist: Husky handles staged-file Biome, this hook handles the project-wide tsc + test gate. - Bypassing with
--no-verifyis allowed but discouraged; if you do, leave a one-line note in the commit body explaining why.