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
New: Add no-promise-executor-return rule (fixes #12640) #12648
Conversation
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.
Overall looks good. Just one question about the error message. Sorry we missed this.
@kaicataldo can you take a look when you get a chance?
schema: [], | ||
|
||
messages: { | ||
returnsValue: "Promise executor functions cannot return values." |
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.
Is this accurate? I think they can return values but the values are never exposed anywhere. Maybe, "Return values from promise executor functions cannot be read."?
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.
Agreed, this message might be seen as technically incorrect. It's changed now, thanks!
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!
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 @mdjermanovic! I particularly appreciate how thorough the tests are.
What is the purpose of this pull request? (put an "X" next to item)
[X] New rule
fixes #12640
Examples of incorrect code for this rule:
What changes did you make? (Give an overview)
no-promise-executor-return
rule.Is there anything you'd like reviewers to focus on?