Skip to content

Feature request: Allow empty scope, but if scope exists must be listed in config #355

@scouten-adobe

Description

@scouten-adobe

I'd like to be able to allow an empty scope, but also restrict the scope to a specific list if a scope appears.

I've configured my .commitlintrc.yml with the following:

  scope:
    level: error
    options:
      - rp_sandbox_a
      - rp_sandbox_b
      - rp_sandbox_c

  # Scope may be empty
  scope-empty:
    level: ignore

… but a commit with no scope fails the scope rule.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions