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

fix(service): allow JSX syntax for javascript language id #2376

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

Sec-ant
Copy link
Contributor

@Sec-ant Sec-ant commented Apr 9, 2024

Summary

Allow JSX syntax in files with the javascript language id.

This is an ad hoc fix, because in the React world, .js files are allowed to include JSX syntax, and these files are often associated with the javascript language identifier in most of the editors. Plus, some editor extensions will also associate .jsx files with the javascript language identifier.

And we already allow JSX syntax in .js files when running from the CLI. This will make the LSP work more consistently with the CLI.

Relative links: discussion, #2085.

Test Plan

Tested locally in the editor with the extension.

@github-actions github-actions bot added A-Parser Area: parser A-Website Area: website L-JavaScript Language: JavaScript and super languages A-Changelog Area: changelog labels Apr 9, 2024
Copy link

netlify bot commented Apr 9, 2024

Deploy Preview for biomejs ready!

Name Link
🔨 Latest commit 3e2cf8b
🔍 Latest deploy log https://app.netlify.com/sites/biomejs/deploys/661500215434c00008730f49
😎 Deploy Preview https://deploy-preview-2376--biomejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 93 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! Can we add a new test?

@Sec-ant
Copy link
Contributor Author

Sec-ant commented Apr 9, 2024

Great catch! Can we add a new test?

Done

@github-actions github-actions bot added the A-LSP Area: language server protocol label Apr 9, 2024
@Sec-ant Sec-ant merged commit 8648a93 into biomejs:main Apr 9, 2024
16 checks passed
@Sec-ant Sec-ant deleted the fix/javascript-file-source branch April 9, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-LSP Area: language server protocol A-Parser Area: parser A-Website Area: website L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants