-
-
Notifications
You must be signed in to change notification settings - Fork 782
fix(linter): fix auto-fix issue for eslint/no-else-return #10494
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
fix(linter): fix auto-fix issue for eslint/no-else-return #10494
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
CodSpeed Instrumentation Performance ReportMerging #10494 will not alter performanceComparing Summary
|
Dunqing
left a 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.
This does not look efficient. Can you try to use the span of BlockStatement?
do you mean modified like this? - ctx.comments().iter().find()
+ ctx.comments_range(block.span.start..block.span.end).find() |
Sorry that I did not explain clearly. I mean that you don't even need to access |
|
Hi @Dunqing |
Dunqing
left a 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.
Great! Now the code looks clearer and simpler. One thing I guess we can make it better, can you take a look?
Dunqing
left a 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.
Looks good to me, we can polish the fixer code later if needed
Part of fix issue: #10439
The auto-fix feature removed the comments in this case.