Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: jsx-curly-brace-presence doesn't trigger on strings containing a quote character #3795

Closed
2 tasks done
tylerlaprade opened this issue Aug 6, 2024 · 0 comments · Fixed by #3798
Closed
2 tasks done

Comments

@tylerlaprade
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues and my issue is unique
  • My issue appears in the command-line and not only in the text editor

Description Overview

The curly braces are unnecessary here and should be reported by the rule. If the single quote is replaced with any other character, the rule does trigger.

<Foo
  bar={"'"}
/>

Expected Behavior

Report an error with a suggested fix to

<Foo
  bar="'"
/>

eslint-plugin-react version

4.3.1

eslint version

8.57.0

node version

20.14.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants