Scope
- Default:
- Level:
ignore
- Optional:
false
- Level:
In this example, we assumed that you have a project with the following scopes:
rules: scope: level: error options: - api - web
❌ Bad
chore(cli): fix typo=> scope cli is not allowed. Only ["api", "web"] are allowed
✅ Good
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