@classcraft.edu/commitlint-config
v0.0.0
Published
Shareable commitlint config
Readme
@classcraft.edu/commitlint-config
Shareable commitlint config.
Install
You can install it with npm or Yarn.
# pnpm
pnpm i -D @classcraft.edu/commitlint-config @commitlint/cli
# npm
npm i -D @classcraft.edu/commitlint-config @commitlint/cli
# Yarn
yarn add -D @classcraft.edu/commitlint-config @commitlint/cliUsage
After installing it, apply the config to commitlint by running the following command:
echo "module.exports = { extends: ['@classcraft.edu/commitlint-config'] };" > .commitlintrc.jsBonus
To lint commits before they are created, install Husky and use the 'commit-msg' hook.
# npm
pnpm i -D husky
# npm
npm i -D husky
# yarn
yarn add -D huskyAfter 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
# pnpm
pnpx commitlint --edit $1
# npm
npx --no-install commitlint --edit $1
# yarn
yarn commitlint --edit $1License
MIT License
