Skip to content

Commit 79305e6

Browse files
committed
Add pre-commit quality check requirements to CLAUDE.md
1 parent fd33f9b commit 79305e6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

CLAUDE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,21 @@ Socket CLI integrates with:
197197
- **cdxgen**: CycloneDX BOM generator
198198
- **synp**: Convert between yarn.lock and package-lock.json
199199

200+
## 🔧 GIT WORKFLOW
201+
202+
### Pre-Commit Quality Checks
203+
- **🚨 MANDATORY**: Always run these commands before committing:
204+
- `pnpm run fix` - Fix linting and formatting issues
205+
- `pnpm run check` - Run all checks (lint, type-check, tests)
206+
- **Rationale**: Ensures code quality regardless of whether hooks run
207+
208+
### Commit Strategy with --no-verify
209+
- **--no-verify usage**: Use `--no-verify` flag for commits that don't require pre-commit hooks
210+
-**Safe to skip hooks**: Scripts (scripts/), GitHub Actions workflows (.github/workflows/), tests (test/), documentation (*.md), configuration files
211+
-**Always run hooks**: Source code (src/), published package code, CLI command implementations
212+
- **Important**: Even when using `--no-verify`, you MUST still run `pnpm run fix` and `pnpm run check` manually first
213+
- **Rationale**: Pre-commit hooks run linting and type-checking which are critical for CLI source code but less critical for non-published files
214+
200215
## 🔍 DEBUGGING
201216

202217
### CI vs Local

0 commit comments

Comments
 (0)