Skip to content

Commit d76fe1d

Browse files
committed
docs: add commitlint and Conventional Commits section to CLAUDE.md
- Added commit message format requirements (enforced by commitlint) - Listed all valid commit types with examples - Provided good vs bad commit message examples - Added subject line rules and validation tips - Cross-reference to full documentation in docs/team/patterns/ Related: W-21315032
1 parent 64cd2e4 commit d76fe1d

1 file changed

Lines changed: 62 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,68 @@ mulesoft-git
330330
git log --show-signature -1
331331
```
332332

333+
## Commit Message Format (commitlint)
334+
335+
**This repository enforces Conventional Commits** via commitlint (`@commitlint/config-conventional`).
336+
337+
**Configuration**: `commitlint.config.js`
338+
339+
### Required Format
340+
341+
```
342+
<type>(<scope>): <subject>
343+
344+
[optional body]
345+
346+
[optional footer]
347+
```
348+
349+
### Valid Types
350+
351+
- `feat`: New feature
352+
- `fix`: Bug fix
353+
- `docs`: Documentation only
354+
- `style`: Code formatting (no logic change)
355+
- `refactor`: Code refactor
356+
- `test`: Test changes
357+
- `chore`: Maintenance (version bumps, deps)
358+
- `perf`: Performance improvement
359+
- `ci`: CI/CD changes
360+
- `build`: Build system changes
361+
- `revert`: Revert previous commit
362+
363+
### Examples
364+
365+
**Good**:
366+
```bash
367+
fix(api-navigation): resolve deep allOf property collection
368+
feat(api-request): add OAuth2 PKCE support
369+
docs: update README with AMF examples
370+
chore: bump version to 6.6.62
371+
```
372+
373+
**Bad** (will fail validation):
374+
```bash
375+
Fixed bug # Missing type, past tense
376+
Update code. # Ends with period
377+
FEAT: Add feature # Uppercase
378+
fix stuff # Too vague
379+
```
380+
381+
### Subject Line Rules
382+
383+
- ✅ Use imperative mood ("add" not "added")
384+
- ✅ Start with lowercase
385+
- ✅ No period at end
386+
- ✅ Keep under 72 characters
387+
388+
**Test locally**:
389+
```bash
390+
echo "fix(api-console): resolve issue" | npx commitlint
391+
```
392+
393+
**More details**: `docs/team/patterns/branch-naming-conventions.md#commit-message-conventions`
394+
333395
## CI/CD Pipeline
334396

335397
**GitHub Actions**: `.github/workflows/deployment.yml`

0 commit comments

Comments
 (0)