Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

commitlint, husky, commitzen

# https://dev.to/vitordevsp/padronizacao-de-commit-com-commitlint-husky-e-commitizen-3g1n

# add commitlint
yarn add @commitlint/config-conventional @commitlint/cli -D

echo "module.exports = { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js


# add husky
yarn add husky -D

yarn husky install

# add below to package.json
# "scripts": {
#   "prepare": "husky install"
# }

yarn husky add .husky/commit-msg 'yarn commitlint --edit $1'


# add commitzen
yarn add commitizen -D

yarn commitizen init cz-conventional-changelog --yarn --dev --exact

# add below to package.json
# use `yarn commit` instead of `git commit`
# "scripts": {
#   "commit": "git-cz"
# }
 
PREVIOUS NEXT
Tagged: #commitzen
ADD COMMENT
Topic
Name
3+1 =