Commitizen adapter using the commitlint.config.js
This is a commitizen adapter, using this adapter, commitizen works based on commitlint.config.js.
Submit by commitizen, lint by commitlint, just need maintain one configuration file, Consistent and Scalable.
The interactive process is inspired by cz-conventional-changelog.
npm install --save-dev @commitlint/cz-commitlint commitizen
# or yarn
yarn add -D @commitlint/cz-commitlint commitizen
In package.json
{
"scripts": {
"commit": "git-cz"
},
"config": {
"commitizen": {
"path": "@commitlint/cz-commitlint"
}
}
}
# Install commitlint cli and conventional config
npm install --save-dev @commitlint/config-conventional @commitlint/cli
# or yarn
yarn add @commitlint/config-conventional @commitlint/cli -D
# Simple: config with conventional
echo "module.exports = {extends: ['@commitlint/config-conventional']};" > commitlint.config.js
git add .
npm run cz
# or yarn
yarn cz
- Commitlint Reference Prompt - How to customize prompt information by setting commitlint.config.js