We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19332d5 commit f5f9028Copy full SHA for f5f9028
.grit/patterns/js/curly.md
@@ -10,10 +10,13 @@ engine marzano(1.0)
10
language js
11
12
or {
13
- `if($_) $body`,
+ if_statement(consequence = $body),
14
for_statement($body),
15
while_statement($body),
16
do_statement($body),
17
+ else_clause(else = $body) where {
18
+ $body <: ! if_statement()
19
+ }
20
} where {
21
$body <: not statement_block(),
22
$body => `{$body}`,
@@ -33,6 +36,23 @@ if (x > 0) {
33
36
doStuff();
34
37
}
35
38
```
39
+
40
+##else
41
+```js
42
+if (x > 0)
43
+ doStuff();
44
+else
45
+ console.log("e");
46
+```
47
+will become
48
49
+if (x > 0) {
50
51
+} else {
52
53
+}
54
55
56
## for
57
```js
58
for (var i = 0; i < 10; i++)
0 commit comments