Skip to content

Commit be6d9b0

Browse files
chore: fix minor typos in patterns (#191)
1 parent f053442 commit be6d9b0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.grit/patterns/js/curly.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if (x > 0) {
3737
}
3838
```
3939

40-
##else
40+
## else
4141
```js
4242
if (x > 0)
4343
doStuff();

.grit/patterns/js/replaceAll_to_replace.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Rewrite `replaceAll` ⇒ `replace` when have regex pattern
33
tags: [fix]
44
---
55

6-
Replaces `replaceAll` with `replace`, when have regex pattern.
6+
Replaces `replaceAll` with `replace`, when it uses a regex pattern.
77

88
The `replaceAll` string method may not be supported in all JavaScript versions and older browsers. It is advisable to use the `replace()` method with a regular expression as the first argument. For example, use `mystring.replace(/bad/g, "good") `instead of `mystring.replaceAll("bad", "good")`
99

.grit/patterns/js/useless_ternary_operator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Find useless ternary operator
33
tags: [fix]
44
---
55

6-
If $condition ? `$answer`:`$answer` then this expression returns $answer. This is probably a human error
6+
If $condition ? `$answer`:`$answer` then this expression returns $answer. This is probably a human error.
77

88

99
```grit

0 commit comments

Comments
 (0)