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

react/jsx-pascal-case incorrectly flags $ as not being in pascal case #2394

Closed
Haegin opened this issue Aug 28, 2019 · 3 comments · Fixed by #2395
Closed

react/jsx-pascal-case incorrectly flags $ as not being in pascal case #2394

Haegin opened this issue Aug 28, 2019 · 3 comments · Fixed by #2395

Comments

@Haegin
Copy link
Contributor

Haegin commented Aug 28, 2019

I have a component named $ and the react/jsx-pascal-case rule is saying that it's not in pascal case. As $ is a symbol and not upper or lowercase letter, this shouldn't be an error.

@ljharb
Copy link
Member

ljharb commented Aug 28, 2019

What's the component's full name?

@Haegin
Copy link
Contributor Author

Haegin commented Aug 29, 2019

@ljharb it's just $. We use it for formatting currency values.

<$>{price}</$>

@ljharb
Copy link
Member

ljharb commented Aug 29, 2019

Fascinating. I certainly think a standalone character of any kind should be permitted by the rule; so maybe just "bail out if the component name has 1 code point"?

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

Successfully merging a pull request may close this issue.

2 participants