- build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
- chore: Other changes that don't modify src or test files
- ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- revert: Reverts a previous commit
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- test: Adding missing tests or correcting existing tests
Example:
chore(package): upgraded x dependency
Example
fix!: upgraded x dependency
fix(package)!: upgraded x dependency
Use one of the keywords, along with the issue number.
- close
- closes
- closed
- fix
- fixes
- fixed
- resolve
- resolves
- resolved
Example
chore: closes #12
pn add --global @commitlint/cli @commitlint/config-conventional
mkdir -p ~/.config/git/hooks
touch ~/.config/git/hooks/commit-msg
#!/bin/sh
echo 'Running commitlint on commit message...'
commitlint --extends "$(pnpm root -g)/@commitlint/config-conventional/lib/index.js" --edit ${1}
- Set a global git config path
git config --global core.hooksPath ~/.config/git/hooks
This will only take effect on newly created repositories. The hook needs to be manually added to existing repos.
- build: π¦
- chore: π‘
- ci: π€
- docs: π
- examples: π
- feat: π
- fix: π©Ή
- perf: π₯
- refactor: π
- revert: βͺ
- style: π¨
- types: π
- test: β