Skip to content

Commit 233ea6a

Browse files
committed
reverse decision on default arg spacing as per @jashkenas feedback
1 parent 05ad9c6 commit 233ea6a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,14 @@ Additional recommendations:
113113
- Always surround these binary operators with a **single space** on either side
114114

115115
- assignment: `=`
116+
117+
- _Note that this also applies when indicating default parameter value(s) in a function declaration_
118+
119+
```coffeescript
120+
test: (param = null) -> # Yes
121+
test: (param=null) -> # No
122+
```
123+
116124
- augmented assignment: `+=`, `-=`, etc.
117125
- comparisons: `==`, `<`, `>`, `<=`, `>=`, `unless`, etc.
118126
- arithmetic operators: `+`, `-`, `*`, `/`, etc.
@@ -131,13 +139,6 @@ Additional recommendations:
131139
fooBar = 3
132140
```
133141

134-
- Do not use spaces around the `=` sign when used to indicate a default parameter value
135-
136-
```coffeescript
137-
test: (param=null) -> # Yes
138-
test: (param = null) -> # No
139-
```
140-
141142
<a name="comments"/>
142143
## Comments
143144

0 commit comments

Comments
 (0)