Setup a git commit hook for Devmoji
masterTo automatically emojify and lint your commit messages, you should set up a git hook. The --edit flag allows Devmoji to read and write to .git/COMMIT_EDITMSG.
Using Husky
If you use Husky, add a prepare-commit-msg hook. If you use commit-msg instead, Devmoji will also perform linting.
Using Yorkie
Add the command to your package.json under gitHooks.
Note: If Devmoji is installed locally as a dev dependency, use npx --no-install devmoji -e in your hook configuration.
# Using Husky
$ npx husky install
$ npx husky add .husky/prepare-commit-msg "npx devmoji -e --lint"// Using Yorkie in package.json
{
"gitHooks": {
"prepare-commit-msg": "devmoji -e --lint"
}
}