eslint-plugin-react: react/jsx-curly-brace-presence autofix doesn't escape string children
This is a small issue, but it can lead to lint errors from other rules (react/no-unescaped-entities):
<code>{`let x = "hello"`}</code>
becomes
<code>let x = "hello"</code>
which should be this instead:
<code>let x = "hello"</code>
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 22 (10 by maintainers)
I created https://github.com/yannickcr/eslint-plugin-react/issues/3214 for the issue I encountered
This seems pretty answered. Please file a new issue with repro code if there’s something that still needs fixing.
But in this case, the curly braces are necessary, because they are using to escape those entities.