14 lines
555 B
Plaintext
14 lines
555 B
Plaintext
=== on 4 Feb 2016, 09:01:13 Elena Vilchik wrote:
|
|
\[~ann.campbell.2] For body we should forbid not parentheses but *curly braces*.
|
|
|
|
----
|
|
var foo = (p1, p2) => { return bar(p1, p2) } // NOK
|
|
var foo = (p1, p2) => bar(p1, p2) // OK
|
|
----
|
|
|
|
And we do that only for function body with one return statement (we should put it in rule description or at least to parameter description).
|
|
|
|
|
|
Also I think it's worth mentioning (in rule or parameter description) that we forbid parentheses around parameters only when there is exactly one parameter.
|
|
|