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: Don't report async/generator callbacks in array-callback-return
#7172
Fix: Don't report async/generator callbacks in array-callback-return
#7172
Conversation
@not-an-aardvark, thanks for your PR! By analyzing the annotation information on this pull request, we identified @vitorbal, @mysticatea and @kaicataldo to be potential reviewers |
LGTM |
Thank you! I was hovering between a bug and an enhancement. @not-an-aardvark in addition, could you add the check for generators as same? |
777d50e
to
6a08068
Compare
LGTM |
array-callback-return
array-callback-return
Added a check for generator functions. |
I'm going to rebase all my PRs onto master so that the tests pass (sorry about the spammy "LGTM" messages). |
6a08068
to
80c107c
Compare
LGTM |
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, thank you!
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, thanks!
What is the purpose of this pull request? (put an "X" next to item)
[ ] Documentation update
[x] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
Please check each item to ensure your pull request is ready:
What changes did you make? (Give an overview)
See #7101 for context. This is one of the rule fixes that prevents incorrect behavior now that we can support async functions.
This fix updates
array-callback-return
to not report async callback functions, since async functions implicitly return a Promise value.Is there anything you'd like reviewers to focus on?
Nothing in particular.