157
rated 0 times
[
158]
[
1]
/ answers: 1 / hits: 25453
/ 13 Years ago, wed, august 31, 2011, 12:00:00
I really like aligning the ? and the : of my ternary operator when they don't fit on a line, like this:
var myVar = (condition
? ifTrue
: ifFalse
);
However, JSHint complains with:
Bad line breaking before '?'
Why would JSHint have this warning? Is there any nastyness (like semicolon insertion, etc) it is protecting me against or can I safely change my JSHINT configuration to ignore it?
More From » jshint