Skip to content

Latest commit

 

History

History
62 lines (42 loc) · 1.8 KB

README.md

File metadata and controls

62 lines (42 loc) · 1.8 KB

Commitizen

https://github.com/commitizen/cz-cli

Simple configuration

Under the default configuration, Commitizen will pull its configuration from commitlint config files, as there is a high likelihood both tools will be used together. The below sample configuration will apply the @commitlint/config-conventional standard for both Commitizen and commitlint.

  1. Create a .czrc Commitizen config file with the following contents:

    {"path": "@commitlint/cz-commitlint"}
  2. If you don't already have a commitlint config, create one of the following:

    • JS config (commitlint.config.js)

      {extends: ['@commitlint/config-conventional']}
    • YAML config: (.commitlintrc.yaml)

      extends: "@commitlint/config-conventional"
  3. If you wish to install a git hook that will run Commitizen upon git commit:

    trunk actions enable commitizen
  4. If you wish to have the commitizen and cz CLIs available for your project:

    trunk tools enable commitizen
  5. If you wish to enable commitlint to lint your commit contents:

    trunk actions enable commitlint

Overriding configuration

In order to use a different Commitizen adapter than the default @commitlint/cz-commitlint, change the contents of the path value in .czrc. After changing this, Commitizen will no longer use commitlint config files.

You'll need to consult the documentation for your new adapter in order to configure further settings.

If you still want to use commitlint configs with Commitizen, but not @commitlint/config-conventional, simply change the value of extends in your commitlint config file.