Skip to content

Commit

Permalink
feat(web): add optional scopes example
Browse files Browse the repository at this point in the history
Signed-off-by: KeisukeYamashita <[email protected]>
  • Loading branch information
KeisukeYamashita committed Oct 8, 2024
1 parent 4982dce commit 45d7d06
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion web/src/content/docs/rules/scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ title: Scope
description: Allowlist for scopes
---

* Default: `ignore`
* Default:
* Level: `ignore`
* Optional: `false`

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

Expand Down Expand Up @@ -42,6 +44,19 @@ rules:
- web
```
### Optional scopes `api` and `web`

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

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

### Disallow all scopes

```yaml
Expand Down

0 comments on commit 45d7d06

Please sign in to comment.