This repo uses Lefthook to run lint and format checks before every commit. Hooks run automatically — no manual setup needed beyond pnpm install.
pnpm installThat's it. The prepare script installs Lefthook's git hooks automatically.
When you git commit, Lefthook runs these checks in parallel on staged files only:
| Check | Files | What it does |
|---|---|---|
| ESLint | *.{js,ts,jsx,tsx,mjs,cjs} |
Lints JavaScript/TypeScript |
| Prettier | *.{js,ts,jsx,tsx,mjs,cjs,json,css,scss,html,md,yaml,yml} |
Checks formatting |
| ruff check | *.py |
Lints Python |
| ruff format | *.py |
Checks Python formatting |
All checks run in check mode only — they report errors but do not auto-fix. Fix issues manually before committing.
If a commit is rejected:
# See what failed
git commit # read the error output
# Fix TypeScript/JavaScript
npx eslint --fix <file>
npx prettier --write <file>
# Fix Python
ruff check --fix <file>
ruff format <file>
# Re-stage and commit
git add <file>
git commitgit commit --no-verifyUse sparingly — CI will still catch these issues on the PR.
Create a lefthook-local.yml (gitignored) to add or override hooks for your machine:
pre-commit:
commands:
eslint:
skip: true # disable eslint locallySee Lefthook docs for all options.
PRs targeting develop, main, or release/** are automatically reviewed by CodeRabbit. It runs:
- ESLint, Ruff, cppcheck, markdownlint, shellcheck, gitleaks
- Path-specific review instructions for TypeScript, Python, and C++ code
- Skips
dist/,build/,node_modules/,pnpm-lock.yaml,vcpkg/
Bot PRs (Renovate, Dependabot) are excluded. Configuration is in .coderabbit.yaml.