Skip to content

Scope

  • Default:
    • Level: ignore
    • Optional: false

In this example, we assumed that you have a project with the following scopes:

rules:
scope:
level: error
options:
- api
- web

❌ Bad

Terminal window
chore(cli): fix typo
=> scope cli is not allowed. Only ["api", "web"] are allowed

✅ Good

Terminal window
chore(api): fix typo

Example

Only allow scopes api and web

rules:
scope:
level: error
options:
- api
- web

Optional scopes api and web

rules:
scope:
level: error
optional: true
options:
- api

With this configuration, feat(api): xxx and feat: xxx are valid commits.

Disallow all scopes

rules:
scope:
level: error
options: [] # or [""]
scope-empty:
level: ignore