Skip to content

Commit 7590018

Browse files
committed
Add pre-commit quality check requirements to CLAUDE.md
1 parent 6156a12 commit 7590018

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,21 @@ All code elements MUST be sorted:
172172
- **Edge cases**: Include tests for Unicode, empty responses, malformed data
173173
- **Cross-platform**: Ensure tests work on Windows and POSIX
174174

175+
## 🔧 GIT WORKFLOW
176+
177+
### Pre-Commit Quality Checks
178+
- **🚨 MANDATORY**: Always run these commands before committing:
179+
- `pnpm run fix` (if available) or `pnpm check:lint:fix` - Fix linting and formatting issues
180+
- `pnpm check` - Run all checks (lint, type-check, tests)
181+
- **Rationale**: Ensures code quality regardless of whether hooks run
182+
183+
### Commit Strategy with --no-verify
184+
- **--no-verify usage**: Use `--no-verify` flag for commits that don't require pre-commit hooks
185+
-**Safe to skip hooks**: Scripts (scripts/), GitHub Actions workflows (.github/workflows/), tests (test/), documentation (*.md, docs/), configuration files
186+
-**Always run hooks**: SDK source code (src/), published package code, API implementations
187+
- **Important**: Even when using `--no-verify`, you MUST still run linting/checking commands manually first
188+
- **Rationale**: Pre-commit hooks run linting and type-checking which are critical for SDK source code but less critical for non-published files
189+
175190
## 🔍 DEBUGGING
176191

177192
### Common Issues

0 commit comments

Comments
 (0)