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(js_formatter): correctly handle comments placement for jsx spread expression #2358

Merged
merged 10 commits into from
Apr 10, 2024

Conversation

ah-yu
Copy link
Contributor

@ah-yu ah-yu commented Apr 8, 2024

Summary

Correctly handle comment placement for the following two cases

<div>{.../* comment */a}</div>; => <div>{/* comment */ ...a}</div>; 
<div {.../* comment */a}></div>; => <div {/* comment */ ...a}></div>

Test Plan

Add new test cases and update corresponding snapshots

@github-actions github-actions bot added A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages labels Apr 8, 2024
Copy link

netlify bot commented Apr 8, 2024

Deploy Preview for biomejs ready!

Name Link
🔨 Latest commit 8198191
🔍 Latest deploy log https://app.netlify.com/sites/biomejs/deploys/66161d618de3610008fcbd15
😎 Deploy Preview https://deploy-preview-2358--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

codspeed-hq bot commented Apr 8, 2024

CodSpeed Performance Report

Merging #2358 will improve performances by 6.64%

Comparing ah-yu:jsx_spread_fmt (8198191) with main (17641a1)

Summary

⚡ 1 improvements
✅ 92 untouched benchmarks

Benchmarks breakdown

Benchmark main ah-yu:jsx_spread_fmt Change
router.ts[cached] 11.5 ms 10.8 ms +6.64%

@github-actions github-actions bot added A-Website Area: website A-Changelog Area: changelog labels Apr 10, 2024
@ah-yu ah-yu marked this pull request as ready for review April 10, 2024 05:03
@ah-yu ah-yu merged commit 62e5aab into biomejs:main Apr 10, 2024
17 checks passed
@ah-yu ah-yu deleted the jsx_spread_fmt branch April 10, 2024 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-Formatter Area: formatter A-Website Area: website L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

📝 Comment + spread format put the spread first
2 participants