@jeffersonwilliammachado/commitlint-config
v0.0.0
Published
Shareable commitlint config
Downloads
2
Maintainers
Readme
@jeffersonwilliammachado/commitlint-config
Shareable commitlint
config.
Install
You can install it with npm or Yarn.
# npm
npm i -D @jeffersonwilliammachado/commitlint-config @commitlint/cli
# Yarn
yarn add -D @jeffersonwilliammachado/commitlint-config @commitlint/cli
Usage
After installing it, apply the config to commitlint
by running the following command:
echo "module.exports = { extends: ['@jeffersonwilliammachado/commitlint-config'] };" > .commitlintrc.js
Bonus
To lint commits before they are created, install Husky and use the 'commit-msg' hook.
# Npm
npm i -D husky
# Yarn
yarn add -D husky
After that, you can create a .huskyrc
file or add to your package.json
the following code for
Husky v4:
{
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
}
}
Husky v5:
# .husky/commit-msg
# ...
npx --no-install commitlint --edit $1
# or
yarn commitlint --edit $1
Version Support
- Node.js LTS
>= 10.21.0
- git
>= 2.13.2
License
MIT License