Skip to content

The "type-empty" rule does not work properly. #3036

Open
@FelixLgr

Description

@FelixLgr

When using the type-empty rule the separator : is still required.

Expected Behavior

If the type is empty and the scope, there is no need to specify the : separator.

echo 'Toto' | commitlint #true
echo ': Toto' | commitlint #false

Current Behavior

module.exports = {
    extends: ['@commitlint/config-conventional'],
    rules: {
        'type-empty': [2, 'always'],
    },
}
echo 'Toto' | commitlint #false
echo ': Toto' | commitlint #true

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

A solution would be either to add a new rule (separator-empty) or to make the type-empty rule remove the : separator.

Your Environment

Executable Version
commitlint --version @commitlint/[email protected]
git --version git version 2.32.0
node --version v17.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions