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 = &quot;hello&quot;</code>

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 22 (10 by maintainers)

Most upvoted comments

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.