-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misc(lint): break lines after operators #6592
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I think I like 'before' better. 😀 |
which one? All of them? One issue is they don't match our style elsewhere
and all other operators have been put at the end of lines 😛 |
I like prettier, and as a majority of the changes in this PR are on my files that were formatted with prettier on save, I'm a bit bummed that dream would die 😞 Personally though, I do prefer |
we might consider eslint-config-prettier if we like the prettier approach so we don't conflict with eslint rules. |
That will never be a problem we (unanimously) have :P |
Good job adding "unanimously" I was about to bring down the 🔨 😛 |
😀 😛 |
inspired by #6579 (comment)
Surprised this wasn't on either.
eslint-config-google has the very helpful lines
:P Were we all just following this unconsciously?
I learned from reading about the
operator-linebreak
rule that some people really do prefer to have the ternary (ConditionalExpression) operators at the start of a new line, so we could maybe discuss that for these since there's some preexisting ones.However, in our code base the
?
and:
at the end of lines outnumbered them at the beginning of lines by like 5 to 1, so if we go with one of these choices, the changes in this PR seem like the better option.(
operator-linebreak
is also supported by--fix
, so should be fine for those using prettier and then fixing)