linted-git-commit
Lints commit message using commitlint, commits if message is valid.
Also can show markdowned help
message from your ~/.commitlintrc.yml
Install
# Install commitlint cli, config and linted-git-commit npm install -g @commitlint/{config-conventional,cli} linted-git-commit # configure commitlint to use config and show help message cat << EOF > ~/.commitlintrc.yml---extends: - '@commitlint/config-conventional'rules: type-enum: - 2 - always - - chore - ci - feat - fix - docs - style - refactor - perf - test - reverthelp: | **Possible types**: `chore`: Change build process, tooling or dependencies. `ci`: Changes to our CI configuration files and scripts `feat`: Adds a new feature. `fix`: Solves a bug. `docs`: Adds or alters documentation. `style`: Improves formatting, white-space. `refactor`: Rewrites code without feature, performance or bug changes. `perf`: Improves performance. `test`: Adds or modifies tests. `revert`: Changes that reverting other changesEOF # make aliases cat << EOF >> ~/.zshrcalias lc="linted-git-commit"alias lc!="linted-git-commit --amend"EOF # and use it like gaa && lc -m "feat: added linted-git-commit" # all unknown parameters goes to git lc! -m "feat: added linted-git-commit" --no-verify