-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
jsx-curly-brace-presence fails with typeError #2423
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
Comments
This was introduced in #2409 by @vedadeepta. Thanks for the great test case. @vedadeepta, can you take a look at this today? |
I went ahead and pushed a quick fix to this; we'll want to follow up with a proper fix that actually reports on jsx elements inside props. |
|
@vedadeepta see the test case i added in feba507, but without my workaround/fix. |
I think curly braces for jsx elements inside prop should always be required.
so maybe the test should detect and skip curly braces check if the element inside it is a jsx-element. Let me know if you think otherwise or if any special cases. |
@vedadeepta yes, they are syntactically always required for any non-string value - so i think the better fix is to bail out entirely when the contents of the curly braces aren't a string literal. |
…e passed as props Per jsx-eslint#2423
…e passed as props Per jsx-eslint#2423
In the newest version (7.15.0) we get unexpected TypeError. Does not happen with previous version. Our .eslintrc.json config.
Either disabling
react/jsx-curly-brace-presence
rule on pinning down7.14.3
version is quick workaround if anyone else sees this.The text was updated successfully, but these errors were encountered: