To ensure consistent and readable commit messages across the project, hexaFn enforces the use of a standardized commit format and a predefined set of commit types.
Each commit message must follow this format:
<type>(optional-scope): <short summary>
feat: add dark mode support
feat(auth): implement token refresh logic
feat(ui): create responsive navbar component
fix: resolve crash on empty input
fix(api): correct 500 error on login
fix(auth): fix token expiration handling
docs: update README with setup instructions
docs(contributing): add issue template section
docs(api): fix typo in endpoint descriptions
style: reformat code with Prettier
style(auth): fix indentation
style: remove unnecessary semicolons
refactor: simplify state management logic
refactor(db): reorganize model definitions
refactor: extract common utility functions
perf(api): cache frequently accessed data
perf: reduce image load time by optimizing assets
perf(ui): memoize expensive component renders
test: add unit tests for user service
test(auth): improve test coverage for login flow
test: mock API for integration tests
chore: update project dependencies
chore(lint): add eslint config
chore: clean up temporary files
ci: add GitHub Actions workflow
ci: fix broken CI script
ci: integrate code coverage reporting
build: switch to Vite from Webpack
build: update TypeScript compiler settings
build: configure output directory for deployment
release: bump version to 1.2.0
release: update changelog for new release
release: prepare hotfix 1.2.1
hotfix: fix production crash on launch
hotfix(auth): patch login issue in prod
hotfix(api): temporary rollback for breaking endpoint
- Do not use generic commit messages like "update" or "fix bug".
- Do not push without proper commit type and summary.
- Do not include long descriptions in the title.
This strategy is supported by tools such as:
- commitlint for linting commit messages.
- Husky to enforce commit rules pre-commit.
- Semantic Release (optional) for automated versioning based on commit messages.
- Use imperative mood: "add" not "added" or "adds".
- Keep summary under 72 characters.
- Reference issues when necessary (e.g.,
fix: resolve #42).