-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Support flow jsx opening element type arguments #17028
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
Support flow jsx opening element type arguments #17028
Conversation
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/58525 |
|
|
||
| # Re-enable this test once prettier updated the snapshot | ||
| # https://github.com/babel/babel/pull/17028 | ||
| rm -r tests/format/flow/jsx/format.test.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @fisker
|
|
||
| JSX/invalid_unpaired_gt.js | ||
| JSX/invalid_unpaired_rcurly.js | ||
| JSX/jsx_type_args_types_disabled.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this test, <Component<T> /> is parsed with the flow parser option { types: false }, but we don't have a mirroring parser option.
The test is broken because we now support typeArguments in JSXOpeningElement
a7826f3 to
cbeba81
Compare
nicolo-ribaudo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would consider this to be a bugfix
This PR introduces support for the Flow type arguments in JSXOpeningElement, e.g.
<Component<string>></Component>. The implementation is mostly borrowed directly from the previous TypeScript implementation (#11912 and #14145).