Skip to content

jeremywitte/commitlint-pre-commit-hook

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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']
    
  • Install the commit-msg hook in your project repo:
    pre-commit install --hook-type commit-msg

About

A pre-commit hook for commitlint

Resources

Stars

Watchers

Forks

Packages

No packages published