A pre-commit hook for commitlint
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.pre-commit-hooks.yaml
README.md
package.json
yarn.lock

README.md

Commitlink hook for pre-commit

Configuration

  • Create your commitlint config file in the repo's root, as explained in Commitlint docs.
  • Add the following to your .pre-commit-config.yaml:
    - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
      sha: v1.0.0
      hooks:
          - id: commitlint
            stages: [commit-msg]
    
  • If you are using one of Commitlint's shared configurations, add it to the additional_dependencies parameter of the hooks, i.e:
    - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
      sha: v1.0.0
      hooks:
          - id: commitlint
            stages: [commit-msg]
            additional_dependencies: ['@commitlint/config-angular']