Skip to main content
We use Lefthook to manage Git hooks across the monorepo. Lefthook helps us run specific tasks before commits, pushes, and merges to ensure code quality and consistency. Some of the Git hooks include:
  1. Linting: We use Biome to automatically lint code before commits to catch issues early. The linting hook runs on staged files to ensure that the code adheres to our style and quality standards.
  2. Formatting: Biome is also used for automatic code formatting ensuring that code formatting stays consistent across the repo.
  3. Type Checking: Lefthook will run TypeScript type checking on the affected moon projects before committing ensuring that type errors are caught early.
  4. Conventional Commits: We enforce commit message conventions using Commitlint by ensuring that all commit messages follow the Conventional Commits specification.
  5. Database Branch Management: Automatically creates and manages database branches when switching or creating Git branches, ensuring that database changes are isolated to specific branches, keeping our development environments clean and consistent.
How It Works
  • Lefthook automatically runs the configured hooks before committing, ensuring that the code passes linting and formatting checks.
  • Commitlint will reject commits that do not follow the conventional commit message format, helping maintain a clean and consistent history for the project.