-
Notifications
You must be signed in to change notification settings - Fork 148
Pr/fix async checks when calling queries member expressions #114
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
Pr/fix async checks when calling queries member expressions #114
Conversation
While running Program:exit(), nodes were tested again unnecessarily for isAwaited and isPromiseResolved
I seem to be missing one path in the test cases. I'll take a look and update it later. |
First, abstract a isQueryUsage function to check if a node should be checked for this rule. Then, add new selector for queries being called as part of MemberExpression and check their parent against the rule. Finally, use the queryName prop to make sure the right error message is printed
First, abstract reportError function. Then, create selector for MemberExpression queries.
2759d40
to
a7fca52
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.
Wow pretty amazing PR. Code pretty clear with nice helpers additions, description of the PR itself really helpful. Thanks for this one!
🎉 This PR is included in version 3.0.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@all-contributors please add @victorandcode for code, test and bug |
I've put up a pull request to add @victorandcode! 🎉 |
What
This PR fixes 113. It updates 2 rules:
await-async-query
andno-await-sync-query
How
Demo
await-async-query
Before:

After

no-await-sync-query
Before:

After:
