1.2.0 • Published 2 years ago
commitlint-config-belialuin v1.2.0
commitlint-config-belialuin
Shareable
commitlint
config enforcing Conventional Commits thru extension of @commitlint/config-conventional. Use with @commitlint/cli.
Installation
yarn add -D @commitlint/cli commitlint-config-belialuin
Getting started
Config in package.json
:
In the package.json
of your project
{
"commitlint": {
"extends": ["belialuin"]
}
}
With a dedicated commitlint
config
Create a commitlint.config.js
file on the root directory and extend with this
package:
module.exports = {
extends: ['belialuin'],
};
Usage
Best used with husky as a commit-msg
hook.
To lint commits before they are created you can use Husky's commit-msg
hook:
- Install husky
yarn add -D husky
- Enable Git hooks
yarn husky install
Add hook
npx husky add .husky/commit-msg "yarn commitlint --edit"
To automatically have Git hooks enabled after install, edit package.json
{
"scripts": {
"prepare": "husky install"
}
}