-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 positives on react/jsx-props-no-multi-spaces with generic component #2181
Comments
It's very surprising that TS allows that; |
That's how you do generic JSX components in TypeScript. |
I'm still surprised they chose to deviate from the jsx spec for that. |
But is it actually deviating from the spec, since it's never actually in the jsx when it gets compiled? Like, I think its fuzzy on both sides - I can't think of a cleaner way they could have done it 😕 |
Yes, it is. I'd say That ship has obviously sailed, though. |
I've not got the jsx spec in front of me, but why is it deviating from the spec to have a generic type straight after the component name, but not a colon? |
I suppose it’s more than in typescript itself, generics syntax only appears in type space, and in this case, it’s appearing in value space - so it seems inconsistent with typescript too. |
Fair enough. What are the chances of getting a fix? Even if it has to be behind a |
I don't think it has to be behind an option; this change would be removing a false error only for typescript users. I think a PR would be fine. |
Setup:
eslint
5.14.1 with@typescript-eslint/eslint-plugin
1.4.0Minimal case:
Error:
Expected only one space between "Foo" and "bar"
The text was updated successfully, but these errors were encountered: