Skip to content

Throw syntax error for } and > in JSX text - #36636

Merged
Orta Therox (orta) merged 2 commits into
microsoft:masterfrom
bradzacher:36341-dangling-jsx
Feb 11, 2020
Merged

Orta Therox (orta) merged 2 commits into
microsoft:masterfrom
bradzacher:36341-dangling-jsx

Conversation

@bradzacher

Copy link
Copy Markdown
Contributor

Fixes #36341

This is my first PR for typescript, so please LMK if there's a better way to do this.

@msftclas

Microsoft Contribution License Agreements (msftclas) commented Feb 5, 2020 •

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@orta Orta Therox (orta) self-assigned this Feb 5, 2020
@orta

Copy link
Copy Markdown
Contributor

This is great, I don't have any code recommendations (given the simplicity of the implementation) and the tests look good. I went to check babels implementation details only to find my way back to the linked issue.

My only question is do you want to add a codefix for these too?

@bradzacher

Copy link
Copy Markdown
Contributor Author

only to find my way back to the linked issue

Yeah sorry, I raised issues in acorn, babel and typescript together (and PR'd it into babel) 😄

My only question is do you want to add a codefix for these too?

Sure, I'd love to!
Just triple checking my understanding of the codebase is right - is this the correct place to learn about, and add code fixes?
https://github.com/microsoft/TypeScript/tree/master/src/services/codefixes

@a-tarasyuk

Copy link
Copy Markdown
Contributor

is this the correct place to learn about, and add code fixes?

Yes, it is the right place (:

@bradzacher

Copy link
Copy Markdown
Contributor Author

Took me a minute to figure everything out, but I got there in the end.
LMK if the codefix implementation looks good.

@orta

Copy link
Copy Markdown
Contributor

This looks perfect, thanks Brad Zacher (@bradzacher) 👍

@alloy

Copy link
Copy Markdown
Member

Nice one, immediately caught an error in a DT test case 👌

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

Labels

None yet

5 participants