Skip to content

fix: throw expect jsx plugin error when an idStart or > is seen#11774

Merged
JLHwung merged 3 commits intobabel:mainfrom
JLHwung:fix-11769
Jul 1, 2020
Merged

fix: throw expect jsx plugin error when an idStart or > is seen#11774
JLHwung merged 3 commits intobabel:mainfrom
JLHwung:fix-11769

Conversation

@JLHwung
Copy link
Copy Markdown
Contributor

@JLHwung JLHwung commented Jul 1, 2020

Q                       A
Fixed Issues? Fixes #11769
Patch: Bug Fix? Yes
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

As a follow-up to #11722 , we throw expecting JSX errors when an IdentifierStart or > is seen after <. This should cover type parameters, JSX element name and JSX fragment shorthand.

This PR also moves html-comment test to basic, since it is not an error test.

@JLHwung JLHwung added PR: Bug Fix 🐛 A type of pull request used for our changelog categories i: regression pkg: parser labels Jul 1, 2020
@babel-bot
Copy link
Copy Markdown
Collaborator

babel-bot commented Jul 1, 2020

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/25008/

@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci Bot commented Jul 1, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c666018:

Sandbox Source
musing-feather-45mdt Configuration
thirsty-fog-6ps3f Configuration

@fisker
Copy link
Copy Markdown
Contributor

fisker commented Jul 1, 2020

What <!--a--> will be? And if all "jsx", "flow", "typescript" not enabled, will it throw?

@existentialism
Copy link
Copy Markdown
Member

And if all "jsx", "flow", "typescript" not enabled, will it throw?

Yeah, it'll fall through: https://github.com/babel/babel/pull/11774/files#diff-56fea09eea2de51b8291db400d2f69beR1193

@JLHwung
Copy link
Copy Markdown
Contributor Author

JLHwung commented Jul 1, 2020

@fisker
Copy link
Copy Markdown
Contributor

fisker commented Jul 1, 2020

Thank you!

@JLHwung JLHwung merged commit d67629b into babel:main Jul 1, 2020
@JLHwung JLHwung deleted the fix-11769 branch July 1, 2020 19:17
@github-actions github-actions Bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 1, 2020
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser PR: Bug Fix 🐛 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parser throws undefined when parsing HTML-Like comment

5 participants