1.2.0 • Published 3 years ago
commitlint-config-belialuin v1.2.0
commitlint-config-belialuin
Shareable
commitlintconfig enforcing Conventional Commits thru extension of @commitlint/config-conventional. Use with @commitlint/cli.
Installation
yarn add -D @commitlint/cli commitlint-config-belialuinGetting 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 installAdd 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"
}
}