@bit-ocean/commitlint-config
v0.0.50
Published
Universal Commitlint configuration.
Downloads
220
Readme
@bit-ocean/commitlint-config
Universal Commitlint configuration.
Installation
pnpm add -D @commitlint/cli @commitlint/config-conventional cz-git commitizen @bit-ocean/commitlint-config
Configuration
Create a .commitlintrc.json
file in the root of your project and add the following:
{
"extends": ["@bit-ocean"]
}
Then add the following properties to your package.json
:
{
"scripts": {
"cz": "git-cz"
},
"config": {
"commitizen": {
"path": "node_modules/cz-git"
}
}
}
Husky Configuration
Run following command to add husky
and a commit-msg
hook:
pnpm add -D husky
pnpm i
npx husky init
echo 'npx --no -- commitlint --edit "$1"' > .husky/commit-msg
Usage
Run the following command to commit your changes:
git add .
pnpm cz
License
MIT License © 2024 Bit Ocean