You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/guide/rule-config/atomic-rule.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -177,7 +177,7 @@ The [following rule](/playground.html#eyJtb2RlIjoiQ29uZmlnIiwibGFuZyI6ImphdmFzY3
177
177
```yaml
178
178
rule:
179
179
kind: number
180
-
nthChild: 1
180
+
nthChild: 2
181
181
```
182
182
183
183
It will match the following code:
@@ -224,4 +224,4 @@ const foo = () => {
224
224
The first step to compose a rule is to find the target. In this case, we can first use kind: `arrow_function`to find function node. Then we can use other rules to filter candidate nodes that does have return type.
225
225
226
226
Another trick to write cleaner rule is to use sub-rules as fields.
227
-
Please refer to [composite rule](/guide/rule-config/composite-rule.html#combine-different-rules-as-fields) for more details.
227
+
Please refer to [composite rule](/guide/rule-config/composite-rule.html#combine-different-rules-as-fields) for more details.
0 commit comments