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

false postive with names starting with a number using jsx-pascal-case #1336

Closed
mfyuce opened this issue Jul 31, 2017 · 4 comments
Closed

false postive with names starting with a number using jsx-pascal-case #1336

mfyuce opened this issue Jul 31, 2017 · 4 comments

Comments

@mfyuce
Copy link

mfyuce commented Jul 31, 2017

(Not directly about run. It is about the RegEx provided in the code.)

Using v7.1.0,

<1MyComponent/>
<2MyComponent/>
<3MyComponent/>

do not flag an error (e.g Contained JSX component MyComponent must not start with a number (react/jsx-pascal-case))

mfyuce pushed a commit to mfyuce/eslint-plugin-react that referenced this issue Jul 31, 2017
… using jsx-pascal

case jsx-eslint#1336 - false postive with names starting with a number using jsx-pascal
[Can besaid it is fixed, but inside it is not accepted anyway.  Seems just fixed the regex]
@ljharb
Copy link
Member

ljharb commented Jul 31, 2017

This seems fine to me, since those are invalid identifiers, they shouldn't work in the first place.

@mfyuce
Copy link
Author

mfyuce commented Jul 31, 2017

True, but the regex, that is checking the IDs, is not covering this case. But somehow, in some place, it gives some error when linting, but not (i think) using methods within this project.

I can close the issue, if you want.

@ljharb
Copy link
Member

ljharb commented Jul 31, 2017

The jsx parser should be throwing on it because it's invalid JS. The regex for this rule shouldn't need to check it, because it should be impossible for it to receive that in the first place.

@mfyuce
Copy link
Author

mfyuce commented Jul 31, 2017

That is reasonable. Thank you.

@mfyuce mfyuce closed this as completed Jul 31, 2017
ljharb pushed a commit to mfyuce/eslint-plugin-react that referenced this issue Dec 30, 2019
… using jsx-pascal

case jsx-eslint#1336 - false postive with names starting with a number using jsx-pascal
[Can besaid it is fixed, but inside it is not accepted anyway.  Seems just fixed the regex]
ljharb pushed a commit to mfyuce/eslint-plugin-react that referenced this issue Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants