-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
tools: enforce linebreak after ternary operators #10213
Conversation
This is to be consistent with the other operators and helps understanding the context when the code is grepped.
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. eslint doesn't enforce four space indent after a linebreak?
I'm not sure. The indent rule has a lot options, some of them being off by default. Maybe @not-an-aardvark can answer? |
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 if CI is happy.
Correct, this is currently ignored by the |
I find this a lot less readable but it's only my personal preference, not a problem. |
I actually find this significantly harder to read... 😕 👎 |
I guess it's consistent with how we do |
This is to be consistent with the other operators and helps understanding the context when the code is grepped. PR-URL: #10213 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: James M Snell <[email protected]>
Landed in 966e5cf. |
test-whatwg-url-parsing file violates the linter rule changes in #10213. This patch makes the linter happy. PR-URL: #10421 Reviewed-By: Anna Henningsen <[email protected]>
This is to be consistent with the other operators and helps understanding the context when the code is grepped. PR-URL: #10213 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: James M Snell <[email protected]>
test-whatwg-url-parsing file violates the linter rule changes in #10213. This patch makes the linter happy. PR-URL: #10421 Reviewed-By: Anna Henningsen <[email protected]>
This is to be consistent with the other operators and helps understanding the context when the code is grepped. PR-URL: #10213 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: James M Snell <[email protected]>
test-whatwg-url-parsing file violates the linter rule changes in #10213. This patch makes the linter happy. PR-URL: #10421 Reviewed-By: Anna Henningsen <[email protected]>
This does not land cleanly in LTS. Added dont-land label. Please feel free to manually backport edit: if it does land it may need to come with #10421 on v6.x |
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesDescription of change
This is to be consistent with the other operators and helps
understanding the context when the code is grepped.