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

feat(parser): better control on JSX parsing #4718

Merged
merged 3 commits into from
Dec 12, 2024
Merged

Conversation

ematipico
Copy link
Member

@ematipico ematipico commented Dec 10, 2024

Summary

Closes #4716
Closes #4385

Adds a new option called jsxEverywhere - name not set on stone, feel free to bikeshed, this is the name adopted by rome years ago - inside javascript.parser. When set to true, JSX syntax is expected in .js/.mjs files. When set to false, it will result in a parsing error.

The option is true by default, so it's not a breaking change for our existing users.

Test Plan

I added a new test case in the JS parser.

@github-actions github-actions bot added A-Project Area: project A-Parser Area: parser L-JavaScript Language: JavaScript and super languages labels Dec 10, 2024
@github-actions github-actions bot added the A-Linter Area: linter label Dec 11, 2024
@ematipico ematipico requested review from a team December 11, 2024 16:30
Copy link

codspeed-hq bot commented Dec 11, 2024

CodSpeed Performance Report

Merging #4718 will not alter performance

Comparing feat/jsx-everywhere (9c05474) with next (3914be8)

Summary

✅ 97 untouched benchmarks

@github-actions github-actions bot added the A-Formatter Area: formatter label Dec 11, 2024
@ematipico ematipico merged commit 21ef4aa into next Dec 12, 2024
12 checks passed
@ematipico ematipico deleted the feat/jsx-everywhere branch December 12, 2024 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Formatter Area: formatter A-Linter Area: linter A-Parser Area: parser A-Project Area: project L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants