Skip to content

Commit 88fd156

Browse files
committed
Add pre-commit quality check requirements to CLAUDE.md
1 parent d20589b commit 88fd156

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
@@ -143,6 +143,21 @@ Parsing and constructing package URLs, compiled to CommonJS for deployment.
143143
- `ComponentNormalizer = (_value: string) => string | undefined`
144144
- `QualifiersValue = string | number | boolean | null | undefined`
145145

146+
## 🔧 GIT WORKFLOW
147+
148+
### Pre-Commit Quality Checks
149+
- **🚨 MANDATORY**: Always run these commands before committing:
150+
- `pnpm fix` - Fix linting and formatting issues
151+
- `pnpm check` - Run all checks (lint, type-check, tests)
152+
- **Rationale**: Ensures code quality regardless of whether hooks run
153+
154+
### Commit Strategy with --no-verify
155+
- **--no-verify usage**: Use `--no-verify` flag for commits that don't require pre-commit hooks
156+
-**Safe to skip hooks**: GitHub Actions workflows (.github/workflows/), tests (test/), documentation (*.md), configuration files
157+
-**Always run hooks**: Package source code (src/), published library code, parser implementations
158+
- **Important**: Even when using `--no-verify`, you MUST still run `pnpm fix` and `pnpm check` manually first
159+
- **Rationale**: Pre-commit hooks run linting and type-checking which are critical for library code but less critical for non-published files
160+
146161
## 🔍 DEBUGGING
147162

148163
### Performance Testing

0 commit comments

Comments
 (0)