-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
lib: prefer logical assignment #55044
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #55044 +/- ##
=======================================
Coverage 88.41% 88.42%
=======================================
Files 652 652
Lines 186612 186531 -81
Branches 36062 35981 -81
=======================================
- Hits 165001 164932 -69
+ Misses 14885 14873 -12
Partials 6726 6726
|
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.
This is a cosmetic change, and needs to include an eslint rule in order to land, or someone can easily change it in the future. cc @lpinca
WIP until I develop a lint rule. |
c7f59bd
to
bdbc843
Compare
@anonrig I enforced the |
bdbc843
to
00fd177
Compare
a46a373
to
e795fd7
Compare
74 files is almost impossible to review for me. |
@jasnell @trivikr @atlowChemi please rereview since the changes you approved are no longer the same. |
@RedYetiDev what is the motivation for this change, please add it to your description for reviewers |
e795fd7
to
19d00f5
Compare
@anonrig sorry for the little mistakes in this PR, i hope it's all good now. Thank you so much for your patience (everyone really) |
Okay. This should be A-OK now, could everyone have another look? |
227c03c
to
c46eb6d
Compare
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.
For future PRs of this size, I'd recommend to commit fixups separately (i.e. even if rebase is required, it's better to push fixup first and then force-push it rebased on main
, so it's easier to review).
Could someone restart the github CIs that failed to start? @anonrig it's been a week, are you still blocking? |
c46eb6d
to
c9b98f4
Compare
Can someone approve + CI so this can land after the most recent rebase? |
Landed in 7178588 |
PR-URL: nodejs#55044 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]>
Enforces https://eslint.org/docs/latest/rules/logical-assignment-operators
IMO logical assignment operators are more concise and readable than if/then and || statements. This way, we can do more in less code, while keeping the files readable.