Skip to content
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(await-async-query): get correct Identifier related to CallExpression #374

Merged
merged 1 commit into from
May 9, 2021

Conversation

Belco90
Copy link
Member

@Belco90 Belco90 commented May 9, 2021

Closes #359

@Belco90 Belco90 added the bug Something isn't working label May 9, 2021
@Belco90 Belco90 self-assigned this May 9, 2021
@@ -46,10 +48,16 @@ export default createTestingLibraryRule<Options, MessageIds>({
}

return {
'CallExpression Identifier'(node: TSESTree.Identifier) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem was here. This is getting an Identifier n levels within a CallExpression, which can lead to an Identifier not related at all to the CallExpression. Fixed just using getDeepestIdentifierNode so we get the Identifier of the CallExpression we are interested in.

@Belco90 Belco90 merged commit 816df6e into main May 9, 2021
@Belco90 Belco90 deleted the 359_await-async-query-false-positive branch May 9, 2021 14:01
@github-actions
Copy link

github-actions bot commented May 9, 2021

🎉 This PR is included in version 4.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positive for testing-library/await-async-query?
3 participants