Rel1cx / eslint-react

A series of composable ESLint rules for libraries and frameworks that use React as a UI runtime.
https://eslint-react.xyz
MIT License
156 stars 6 forks source link

[bug?] no-leaked-conditional-rendering: object should be considered as valid left-hand type #568

Closed latin-1 closed 1 month ago

latin-1 commented 1 month ago

Describe the bug

I don't see an obvious reason to ban this type.

Reproduction

const a = {} as {};
const b = {} as {} | null;
const b = {} as {} | undefined;
<>{a && <div />}</>
<>{b && <div />}</>
<>{c && <div />}</>

Expected behavior

No response

Platform and versions

@eslint-react: 1.5.15-beta.3

Stack trace

No response

Additional context

No response