commitizen / cz-cli

The commitizen command line utility. #BlackLivesMatter
http://commitizen.github.io/cz-cli/
MIT License
16.7k stars 547 forks source link

Scope text needs to be lowercase? #798

Open dbofmmbt opened 3 years ago

dbofmmbt commented 3 years ago

Hello! I tried to pass a scope on a commit message in CamelCase, to indicate the change of a component. However, I noticed that cz lowercases the text of scope. Is it intentional? I haven't found any detail about it in the conventional commits website.

In principle, I think that keeping the text casing as it is should be the expected behavior.

SandroMiguel commented 3 years ago

Hey @eduardocanellas, in my case, I made the following changes:

package.json

    "config": {
        "commitizen": {
            ...
            "disableScopeLowerCase": true
        }
    },

More info -> https://github.com/commitizen/cz-conventional-changelog

commitlint.config.js

module.exports = {
  ...
  rules: {
    'scope-case': [0],
  },
}

More info -> https://github.com/conventional-changelog/commitlint/blob/master/docs/reference-rules.md

arthurdenner commented 2 years ago

To disable the behaviour globally, set the DISABLE_SCOPE_LOWERCASE env variable to a truthy value, e.g. DISABLE_SCOPE_LOWERCASE=1 (source).