Proposal: No LineTerminator should be allowed between {CallExpression, MemberExpression} TemplateLiteral
Good observation. I agree.
Date: Fri, 13 Feb 2015 15:39:29 -0800 Subject: Proposal: No LineTerminator should be allowed between {CallExpression, MemberExpression} TemplateLiteral From: ikarienator at gmail.com To: es-discuss at mozilla.org
The connection between a CallExpression/MemberExpression and a TemplateLiteral does not requires delimiters. They are both common and allowed independently. CallExpression / MemberExpressions are allowed to end a statement and TemplateLiterals are allowed to start a statement. When adopting "semicolon free" style, it will become a problem because the connection between the two is not visually clear if there's a new line between them. I propose we add a [No LineTerminator here] between CallExpression/MemberExpression and TemplateLiteral. Thanks,Bei
I propose we add a [No LineTerminator here] between CallExpression/MemberExpression and TemplateLiteral.
This would be inconsistent, since there are no such restrictions between member expression or call expression components otherwise. For example, in:
foo
(bar)
and
foo
[bar]
there is no semicolon insertion.
The difference is the uncommon delimiter of the argument lists. If the template literal must be surrounded by a pair of parentheses it will become more visually significant. Since it's not, I think not allowing the line terminator is reasonable.
The connection between a CallExpression/MemberExpression and a TemplateLiteral does not requires delimiters. They are both common and allowed independently. CallExpression / MemberExpressions are allowed to end a statement and TemplateLiterals are allowed to start a statement. When adopting "semicolon free" style, it will become a problem because the connection between the two is not visually clear if there's a new line between them.
I propose we add a [No LineTerminator here] between CallExpression/MemberExpression and TemplateLiteral.
Thanks, Bei