Skip to content

Commit 8de4e23

Browse files
[doc] Clarify optional vs. required fields in the pattern object. (#690)
1 parent f6f9481 commit 8de4e23

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

website/guide/rule-config/atomic-rule.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ For example, to select class field in JavaScript, writing `$FIELD = $INIT` will
2828

2929
We can also use an _object_ to specify a sub-syntax node to match within a larger context. It consists of an object with three properties: `context`, `selector` and `strictness`.
3030

31-
* `context`: defines the surrounding code that helps to resolve any ambiguity in the syntax.
32-
* `selector`: defines the sub-syntax node kind that is the actual matcher of the pattern.
33-
* `strictness`: optional. defines how strictly pattern will match against nodes.
31+
* `context` (required): defines the surrounding code that helps to resolve any ambiguity in the syntax.
32+
* `selector` (optional): defines the sub-syntax node kind that is the actual matcher of the pattern.
33+
* `strictness` (optional): defines how strictly pattern will match against nodes.
3434

3535
Let's see how pattern object can solve the ambiguity in the class field example above.
3636

0 commit comments

Comments
 (0)