-
Notifications
You must be signed in to change notification settings - Fork 145
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
Un-report react-test-renderer's findByType & findAllByType queries as async. #671
Comments
Hi @Mrblackey! This false positive is related to the Aggressive Reporting feature. Have you checked the Troubleshooting section to find more about restricting this behavior? |
Hello. |
How so?
That's not necessary, you have granular control over modules and queries that would be reported without opting-out the Aggressive Reporting. I don't have full context, but if you have a custom query, it should follow the same pattern as the built-in ones. That means that |
Assuming we have "findByIcon" query, we add
which is reported when not awaited. This works, as now react-test-renderer's |
Oh, wait. I didn't realize that I think that bit is clear. What I don't get is do you actually want to stop reporting a custom
That's definitely debatable. It could be interesting to be able to disable custom queries with a new option rather than indicating which ones to report (making sure both options can't be enabled at the same time). Happy to receive a PR for that. |
Only the react-test-renderer ones.
So you're basically saying these are two separate things, right? Reports of react-test-renderer should be avoided even without this PR, right? |
Yes. I've created #673 to stop reporting utils from |
Taking care of this one! |
Closing in favor of #673 |
What rule do you want to change?
await-async-query
Does this change cause the rule to produce more or fewer warnings?
Fewer warnings
How will the change be implemented?
Check that given node does not end with 'ByType'.
Example code
How does the current rule affect the code?
How will the new rule affect the code?
This rule will not be applied if the query ends with 'ByType'.
Anything else?
No response
Do you want to submit a pull request to change the rule?
Yes
The text was updated successfully, but these errors were encountered: