Skip to content

Has the default configuration of scope-case changed? #3157

Closed
@lxow456

Description

@lxow456

 When the contents of the commitlint.config.js are as follows:

module.exports = {
    extends: ['@commitlint/config-conventional']
}

 I ran this command

git commit -m "fix(SCOPE): fix"

Expected Behavior

 According to the content here: https://commitlint.js.org/#/reference-rules, the scope-case default value is lowerCase. This commit should be aborted.

Current Behavior

 But in fact, this message passed the verification. And here are my commit logs:
image

Possible Solution

 I added the configuration of the rules, as follows:

module.exports = {
    extends: ['@commitlint/config-conventional'],
    rules: {
        'scope-case': [2, 'always', ['lower-case']]
    }
} 

 Then I commit with a same message, this time it's aborted.
image

Your Environment

Executable Version
@commitlint/config-conventional --version 16.2.4
@commitlint/cli --version 16.2.4
git --version 2.28.0.windows.1
node --version 14.7.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions