| name | post-work-checks |
| description | Ordered quality gate checklist to run after every code change in react-native-audio-api. Covers formatting, linting, type checking, C++ tests, JS tests, and enum sync validation. Documents what lefthook pre-commit hooks run automatically vs what must be run manually. Use at the end of any implementation task before opening a PR. Trigger phrases: "post-work", "before PR", "before commit", "check quality", "run linter", "run tests", "format code", "lefthook", "pre-commit", "yarn test", "yarn lint".
|
Skill: Post-Work Checks
Run these checks after any code change and before opening a PR.
Quick Reference
yarn format
yarn lint
yarn typecheck
yarn test
yarn check-audio-enum-sync
What lefthook Runs Automatically
lefthook runs pre-commit hooks on every git commit — these run automatically:
| Hook | Command |
|---|
| Format | yarn format (JS via Prettier, C++ via clang-format, Kotlin via ktlint) |
| Lint | yarn lint (JS/TS + C++ + Kotlin) |
| Type check | yarn typecheck |
| Commit message | commitlint |
If a hook fails, the commit is aborted. Fix the issue and re-commit — do NOT use --no-verify.
What Must Be Run Manually
These are NOT run by lefthook:
C++ tests
yarn test
Runs packages/react-native-audio-api/common/cpp/test/RunTests.sh via CMake + Google Test.
When: after any change to common/cpp/audioapi/core/, dsp/, or utils/ C++ files.
AudioEvent enum sync check
yarn check-audio-enum-sync
When: only when you modify the AudioEvent enum or any file that maps event names across C++/Kotlin/TypeScript.
Per-Language Commands
When you need to target a specific language:
yarn lint:js
yarn format:js
yarn format:common
yarn lint:cpp
yarn format:android:cpp
yarn format:android:kotlin
yarn lint:kotlin
yarn format:ios
yarn lint:ios
Recommended Order
Later steps may surface issues caused by earlier ones — run in this order:
yarn format — fix formatting first (removes noise from lint)
yarn lint — catch remaining code issues
yarn typecheck — catch TypeScript errors
yarn test — catch C++ regressions (when C++ changed)
yarn check-audio-enum-sync — when AudioEvent enum was touched
Maintenance: see maintenance.md.