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
[Bug]: jsx-no-leaked-render
report &&
in prop
#3719
Comments
i agree, this should be valid (altho |
One more thing is frustrating to me.
Why the plugin requires ternary all the time even when no potential unexpected result? Could we use the TypeScrypt parser to only report the potential errors? |
@A7med3bdulBaset specifically because a |
I understand well I know |
I agree that neither of those should be prevented when the type is known. |
Is there an existing issue for this?
Description Overview
Imagine you have a prop (e.g.
isOpen
), you want to set the value asfirstCondition === true && anotherCondition === true
. Currently the plugin report wrongly this kind of code which should be valid.Expected Behavior
I expect to not throw
eslint-plugin-react version
7.34.1
eslint version
8.57.0
node version
18
The text was updated successfully, but these errors were encountered: