Skip to content

Slash in subject results in undesired results #572

Closed
@esagawe

Description

@esagawe

I use this config:

{
  "extends": ["@commitlint/config-conventional"],
  "rules": {
    "scope-case": [0],
    "subject-case": [2, "always", "sentence-case"]
  }
}

If I write something like this, then the cli throws an error: chore: Update @angular/core.

⧗   input: chore: Update @angular/core
✖   subject must be sentence-case [subject-case]
✖   found 1 problems, 0 warnings

Expected Behavior

The subject should be valid.

Current Behavior

The toCase function in case.js will be called two times:

  • Update @angular
  • core

So there is somewhere a split by the slash, which results in a validation error because core starts with an lower case.

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

I think there should be no split in the subject. Maybe there is a connection to #291

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