-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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: enable no-else-return lint rule #32667
Conversation
69890a3
to
73b15aa
Compare
I won't block this, but I personally prefer the way the current code is written. |
I think many of these cases are clearer when written including the else block. |
Before closing I'll will rework the PR with the |
dd909ba
to
e404e2c
Compare
@lpinca No strong opinions here. I like |
same as @addaleax here |
The only reason for me is to prevent PRs with only cosmetic changes (unless we want them). In my opinion it's better for contributors to have a linter error than a PR rejected with a reason like "Cosmetic only changes". Also cc @Trott who commented saying that he preferred to close this but then removed the comment. |
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. It reduces the number of code lines and the indentation which often improves the readability of the code.
I have no opinion on this. I'm fine with it landing, and fine with closing it. |
e404e2c
to
9b40e55
Compare
e590a4f
to
17c648a
Compare
17c648a
to
3c3c4e5
Compare
3c3c4e5
to
af70a1c
Compare
Landed in b533fb3. |
@lpinca would you mind backporting this to v12.x? there are a solid handful of conflicts. |
yes, I will do it later today. |
Refs: nodejs#32644 Refs: nodejs#32662 PR-URL: nodejs#32667 Backport-PR-URL: nodejs#34275 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Refs: #32644
Refs: #32662
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes