A shared commitlint configuration based on the conventional commits standard.
Install commitlint and the @simbo/commitlint-config
from the npm registry:
npm i -D @commitlint/cli @simbo/commitlint-config
Create a commitlint configuration file in the root of your project.
For example, .commitlintrc.yml
:
extends:
- '@simbo/commitlint-config'
Install husky:
npm i -D husky
Add husky
command to your package.json
scripts:
"prepare": "husky",
Create .husky/pre-commit
:
./node_modules/.bin/commitlint --edit $1