#lazytwitter Can someone write an eslint rule that disallows` braceless if` when:
- newline before the expr
- >1 stmt on the same line
1/
-
-
you mean with indentation level increasing on second line?
-
that's the most likely form of the mistake, but mandatory newline is the broadest solution.
-
jet lagged a bit - mandatory newline where?
-
after the concise guard: if (invalid) return; // statement disallowed here // mandatory newline <rest of function>
-
aha, you mean *two* mandatory newlines!
-
right. A mandatory visual empty space.
End of conversation
New conversation -
-
-
brace-style with `allowSingleLine: true` and max-statements-per-line should do that. Can you turn those on for the whole codebase?
-
however they won't require a blank line after
End of conversation
New conversation -
-
-
why don't use http://eslint.org/docs/rules/curly … ? vs http://eslint.org/docs/rules/brace-style … (allowSingleLine:false) ?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.