This repository follows the Conventional Commits 1.0.0 specification to keep commit history clean, readable, consistent, and machine-readable. It works seamlessly with Semantic Versioning (SemVer) and supports automated changelogs and releases.
type(scope): short description
[optional body]
[optional footer(s)]
Example: feat(ui): add accordion component
Rules:
- type is required
- scope is optional but recommended
- description must be short, imperative, and lowercase
- do not end the description with a period
Adds new functionality.
feat(auth): add login form with validation
feat(ui): implement dark mode toggle
feat(router): add protected routes
Fixes incorrect behavior.
fix(nav): mobile menu not closing on route change
fix(button): prevent double submit on click
fix(vite): resolve production build error
Improves structure or readability only.
refactor(header): simplify navigation logic
refactor(utils): extract cn helper
Improves speed or efficiency.
perf(images): lazy load hero images
perf(state): memoize expensive selectors
Whitespace, formatting, linting.
style: format code with prettier
style(css): reorder tailwind classes
README, guides, comments.
docs: update setup instructions
docs(contributing): add commit guidelines
Adding or updating tests.
test(auth): add login form tests
test: configure vitest
Vite, dependencies, build tools.
build(vite): optimize production config
build: enable code splitting
No app logic changes.
chore: update dependencies
chore(vite): configure path aliases
chore(eslint): add react-hooks rules
Continuous integration and deployment.
ci: add GitHub Actions workflow
ci: cache node_modules
Reverting previous changes. revert: remove experimental checkout flow
Refs: a215868, 676104e
ui, components, pages, hooks, auth, router, api, vite, config
Examples:
feat(components): add reusable modal
fix(hooks): correct dependency array
Breaking changes can be introduced in any commit type.
Option 1 — ! in header (recommended): feat(api)!: change auth response format
Option 2 — Footer: feat(api): change auth response format
BREAKING CHANGE: authentication response schema has changed
Option 3 — Both (allowed): chore!: drop Node 16 support
BREAKING CHANGE: Node 18 is now required
- starts one blank line after description
- explains why, not what
- may contain multiple paragraphs
Example: fix: prevent request race condition
Introduce request IDs to track latest request.
Ignore outdated responses.
- start one blank line after body
- format: Token: value
- tokens use hyphens instead of spaces
- BREAKING CHANGE must be uppercase
Examples:
BREAKING CHANGE: config format updated
Refs: #123
Reviewed-by: Jane Doe
fix → PATCH
feat → MINOR
BREAKING CHANGE → MAJOR
- one commit = one logical change
- use feat and fix correctly
- use ! or BREAKING CHANGE for breaking changes
- prefer meaningful scopes
- keep commits small and clear
Creative Commons — CC BY 3.0