tools: enforce linebreak after ternary operators#10213
tools: enforce linebreak after ternary operators#10213targos wants to merge 1 commit intonodejs:masterfrom
Conversation
This is to be consistent with the other operators and helps understanding the context when the code is grepped.
bnoordhuis
left a comment
There was a problem hiding this comment.
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? |
thefourtheye
left a comment
There was a problem hiding this comment.
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 <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
|
Landed in 966e5cf. |
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 <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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 <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
|
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.