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
In docs we have example with empty string that breaks react native:
import React from "react";
function Example() {
return <>{"" && <div />}</>;
// ^^
// - Possible unexpected value will be rendered (React Dom: renders nothing, React Native, with React below 18: crashes 💥).
}
So shouldn't no-leaked-conditional-rendering rule displays warning in this situations?
Potential leaked value someString that might cause unintentionally rendered values or rendering crashes.(@eslint-react/ no-leaked-conditional-rendering)
Platform and versions
Node 20.14.0
@eslint-react/eslint-plugin: 1.16.1
Stack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Thanks for supporting "" but...
I think when we have a variable from props of type string, we cannot be sure if it is not "".
So we should warning user and propose !!anyStringVar solution - the same as we do with anyNumberVar
Thanks for supporting "" but... I think when we have a variable from props of type string, we cannot be sure if it is not "". So we should warning user and propose !!anyStringVar solution - the same as we do with anyNumberVar
Thanks for pointing this out, the new PR will fix this, along with proper version detection!
Describe the bug
In docs we have example with empty string that breaks react native:
So shouldn't
no-leaked-conditional-rendering
rule displays warning in this situations?Reproduction
No response
Expected behavior
I would expected warning
Platform and versions
Stack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: