You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like this issue is closed, but I think the code can be improved for checking if left side is boolean or not. Currently, the implementation only looks if the variable is assigned to a boolean in it's current scope. So it is not working if I am using a TS-typed component prop.
I think this can be improved by actually checking TS-type of the variable on the left-side.
Here is an example demonstrating the pain-point.
I checked the codebase a bit, but could not find an easy way to get it right by checking the TS type.
I think we need to somehow get to what IDE shows as variable type when hovered.
PS: This post originated from this comment. But I am sure if it makes sense to add new comments to a closed issue. So I opened this as a new one.
The text was updated successfully, but these errors were encountered:
yusufkinatas
changed the title
'jsx-no-leaked-render' can work better if it checks the TS type of the left-side valuejsx-no-leaked-render can work better if it checks the TS type of the left-side value
May 29, 2024
Seems like this issue is closed, but I think the code can be improved for checking if left side is boolean or not. Currently, the implementation only looks if the variable is assigned to a boolean in it's current scope. So it is not working if I am using a TS-typed component prop.
I think this can be improved by actually checking TS-type of the variable on the left-side.
Here is an example demonstrating the pain-point.
I checked the codebase a bit, but could not find an easy way to get it right by checking the TS type.
I think we need to somehow get to what IDE shows as variable type when hovered.
PS: This post originated from this comment. But I am sure if it makes sense to add new comments to a closed issue. So I opened this as a new one.
Related issue: #3719
The text was updated successfully, but these errors were encountered: