design-sparx / design-sparx/pattern-base
fix(mantine): replace conditional && with ternary to fix jsx-no-leaked-render (~200 instances)
@kelvink96 is already working on this.
Since Sep 19, 2026.
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- Avg merge
- 23h 44m
- Merged PRs (30d)
- 5
Description
Problem
Mantine package has ~200+ react/jsx-no-leaked-render warnings across nearly every component file. The pattern {condition && <Component />} leaks a value when condition is truthy but not boolean (e.g. an empty string or 0).
Affected files
Every component under packages/mantine/src/components/ — avatar, caveat, controls, stream-of-thought, memory, modes, suggestions, and many more.
Fix
Replace {condition && <JSX />} with either:
{condition ? <JSX /> : null}{condition ?? <JSX />}(when appropriate)
Count
~200+ instances — consider using eslint --fix or a codemod for the bulk, then manual review.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.