@ivangabriele/commitlint-config
v2.0.3
Published
My most commonly used CommitLint configuration.
Downloads
152
Readme
My CommitLint Configuration
My most commonly used CommitLint configuration.
Usage
Run:
npm i -DE @commitlint/cli @ivangabriele/commitlint-config husky lint-staged
or:
yarn add -DE @commitlint/cli @ivangabriele/commitlint-config husky lint-staged
Create /.husky/commit-msg
:
[ -n "$CI" ] && exit 0
yarn commitlint --edit "$1"
Create /.husky/pre-commit
:
[ -n "$CI" ] && exit 0
yarn lint-staged
Give them execution rights:
chmod +x .husky/commit-msg .husky/pre-commit
Create /.commitlintrc
:
{
"$schema": "https://json.schemastore.org/commitlintrc",
"extends": ["@ivangabriele/commitlint-config"]
}
Update /package.json
:
{
// ...
"scripts": {
// ...
"prepare": "husky"
// ...
}
// ...
}
Contribute
Please refer to the contribution guidelines for information on how to contribute to this project.