-
Notifications
You must be signed in to change notification settings - Fork 515
RFE: Braces should be opened on newline whenever possible #65
Comments
I would accept a proper pull-request on this. |
I would like the opposite to be enforced by an option. |
But only for statements. For instance, I'd like to differentiate between var o = {
key: [{
a: 0
},
// okay
{
a: 1
}]
}; and // good
if (true) {
}
// bad
if (true)
{
} By statements, I mean, Perhaps the exception could be narrowed down to whenever the curly is preceded by comma and optional whitespace. |
@timmywil you mean all This would be similar to |
@mikesherov Yes, thank you for putting it concisely. Sounds great. |
I agree with @timmywil, I'd like to have a rule to enforce the opposite also. Was |
Please add a rule that requires opening braces on new line, whenever possible. For example:
instead of:
The only case I'm aware of where this is disallowed is for returning anonymous objects:
The text was updated successfully, but these errors were encountered: