Skip to content

Commit 3be457d

Browse files
committed
chore: remove lefthook git hooks
Drop lefthook: it duplicated the CI gates (typecheck/lint/format:check/knip/ build/test) and wasn't even auto-installed (no prepare script), so it only ever ran on one machine — not a real gate. CI is the authoritative gate for everyone; formatting during development is handled by the Claude Code PostToolUse hook (.claude/hooks/format-on-edit.mjs), which is unaffected.
1 parent 395f7e8 commit 3be457d

5 files changed

Lines changed: 2 additions & 120 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ CI (`.github/workflows/ci.yml`) gates every push and PR on: **typecheck, lint, f
5656

5757
- **Commits / PRs**: [Conventional Commits](https://www.conventionalcommits.org/) (`feat:`, `fix:`, `chore:`, `refactor:`, `ci:`, …). PR titles are validated by `semantic-pr.yml`; with squash merges the PR title becomes the commit on `main`.
5858
- **Tests**: each package has a `test/` mirroring `src/` (no co-located tests). Tests that span packages live in the root `test/`.
59-
- **Formatting & lint** run automatically on staged files via a lefthook pre-commit hook; typecheck + test run on pre-push. Don't hand-format.
59+
- **Formatting & lint** are enforced by CI (`format:check`, `lint`) — there are no git hooks. Run `pnpm format` before committing, or let your editor format on save.
6060
- **Scope**: internal packages are `@figwright/*`; only `@figwright/mcp` is published to npm.
6161

6262
## Gotchas — read before changing `mcp` or `shared`

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ Read **[AGENTS.md](./AGENTS.md)** first — it's the single source of guidance f
55
Claude Code specifics:
66

77
- This repo **is** a Figma MCP server. The project-scoped `.mcp.json` launches the local build (`packages/mcp/dist/index.mjs`), so after changing `packages/mcp` or `packages/shared` you must `pnpm build` and restart the MCP connection before the `figwright` tools reflect your change.
8-
- A pre-commit hook formats and lints staged files automatically — don't hand-format.
8+
- There are no git hooks; CI is the gate. When you edit through Claude Code, the PostToolUse hook (`.claude/hooks/format-on-edit.mjs`) auto-formats and lints the file — don't hand-format.
99
- The canonical checks before pushing are `pnpm typecheck && pnpm lint && pnpm format:check && pnpm knip && pnpm build && pnpm test` (the same gates CI runs).

lefthook.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"@vitest/coverage-v8": "^4.1.8",
3636
"changelogen": "^0.6.2",
3737
"knip": "^6.16.0",
38-
"lefthook": "^2.1.9",
3938
"oxfmt": "^0.53.0",
4039
"oxlint": "^1.68.0",
4140
"typescript": "^6.0.3",

pnpm-lock.yaml

Lines changed: 0 additions & 100 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)