The library · The stack

Lefthook and Biome

Check staged code at commit time and types before a push, including work written by your agents.

5 files · 5 KB

Why I keep it

I use Biome with Lefthook in the starter, so the same formatting and type checks apply whoever writes the code. Biome checks staged files before a commit; Lefthook runs the workspace type check before a push. The rules sit in the repo with the work.

I’ve included a version that stops on formatting problems and the autofix version from Claude Notch, which stages its fixes. There are Vite and Next.js Biome configs too, so you can choose how strict the hook should be without rebuilding the setup.

Take the files

5 files · 5 KB

  • README.md3 KB
  • biome.json678 B
  • biome.nextjs.json1 KB
  • lefthook.autofix.yml556 B
  • lefthook.yml163 B

Keep building your setup: The stack

Back to the shelves →
  • 015 files · 151 KB

    The SaaS starter

    Start with accounts, organisations, email and analytics wired into a React app and Hono API.

  • 025 files · 6 KB

    Turborepo

    Run builds, tests and type checks across your apps in dependency order, with cached results.

  • 0316 files · 18 KB

    Hono

    Give your API typed routes, generated docs and a consistent error response before adding features.

  • 048 files · 8 KB

    Drizzle

    Keep your database schema typed and your SQL migrations checked in beside the code that needs them.

  • 052 files · 5 KB

    Better Auth with passkeys

    Keep accounts, organisations and passkey sign-in in your own Hono API and Postgres database.

  • 069 files · 10 KB

    TanStack

    Keep React routes, session checks and cached server data working from the same types.