An easy way to enforce conventional commits.
clean-commit is an npm package, but you can use it on any type of project.
If you already have a package.json
:
npm i clean-commit -D
Otherwise:
npm init -y
npm i clean-commit -D
clean-commit will automatically detect when you make a commit, and then make sure it follows the conventional commits standard. If you are unfamiliar with conventional commits, use:
npm run commit
- that will produce a menu to help you build a good message.
-
Run:
./node_modules/clean-commit/scripts/remove-config.js
to remove the aliases and config that was added to your
package.json
during installation. -
Then:
npm uninstall clean-commit
to remove the package.
clean-commit is a more generic version of @batch/git-tools. If you're using Gitlab, you may want to check it out instead.