Closed geek closed 5 years ago
1st
@Marsup added a couple more possibilities
Mix of 1 and 3 ? (ie. 3 with more padding)
And I hate those parenthesis so 3 or 4 makes no diff to me as long as they're there.
I like 4, but with the ?
and :
on the previous lines.
@Marsup and @cjihrig thanks for the help, I'll PR an update to the style guide and to hapi.
const count = typeof credentials.scope === 'string' ?
(scope[type].indexOf(credentials.scope) !== -1 ? 1 : 0) :
Hoek.intersect(scope[type], credentials.scope).length;
I'm into it 👍
Looks like those indents are going to be a problem. I don't agree with most of those errors on joi tests.
I'm think I'm late here, but my vote would have been for 3 or 4 😄. I prefer operator at the start of the line. Will happily use whatever's agreed on though 👍
I prefer 3 :P
3
3 or 2. I like 1 best but recent changes in VS force it to 3 so...
With ESLint v4.0 we now have stricter indentation enforcement... which of the following snippets do you prefer.
Style 1
Style 2
Style 3
Style 4
Style 5