@lucasbarney/commitlint-configs
v1.0.0
Published
- With `Yarn` package manager. Run this command:
Readme
Usage guide
@lucasbarney/commitlint-configs
- With
Yarnpackage manager. Run this command:
$ yarn add @commitlint/cli @commitlint/cz-commitlint -D
## Custom configs
yarn add @lucasbarney/commitlint-configs -D
## Install Husky
yarn add husky -D
yarn husky init
- Add
commitlint.config.jsto (root) path.
module.exports = {
extends: ['@lucasbarney/commitlint-configs'],
};- Add
Huskyscripts
## Trigger to linting commit messages
echo "npx --no -- commitlint --edit \$1" > .husky/commit-msg
## Trigger/hook To use "git commit" with Commitizen CLI
echo "exec < /dev/tty && node_modules/.bin/cz --hook || true" > .husky/prepare-commit-msg
- Add commitizen
configto your package.json file:
{
"scripts": {
"prepare": "husky",
},
"config": {
"commitizen": {
"path": "@commitlint/cz-commitlint",
},
},
}