Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 1.05 KB

README.md

File metadata and controls

30 lines (23 loc) · 1.05 KB

pre-commit hook for commitlint

A pre-commit hook for commitlint.

It is agnostic about rulesets, in the sense that it doesn't start out with @commitlint/config-conventional as a base per se. What you need to do besides adding this to your .pre-commit-config.yaml like so:

  - repo: https://github.com/solarmonkey/commitlint-pre-commit-hook
    rev: main
    hooks:
        - id: commitlint
          stages: [commit-msg]

is adding a commitlint.config.js file to the root of your repo. See the reference configuration for how that could look.

NOTE: if you reference any packages in that config, eg. for extends, parserPreset or formatter, you will have to add it as additional dependency to you .pre-commit-config.yaml:

    additional_dependencies: ['@commitlint/config-conventional']