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): placement of comments inside default switch clause #1505

Merged
merged 3 commits into from
Jan 10, 2024

Conversation

kalleep
Copy link
Contributor

@kalleep kalleep commented Jan 10, 2024

Summary

This pr fixed the non-idempotent formatting and prettier diff describe in the issue.

In addition to that it also fixes other diffs with prettier i found.

Closes: #1170

Test Plan

Added new tests and uncommented prettier diff

Now all line comments that is not after default keyword will use
`Default` placement if they have a preceding node.
Copy link

netlify bot commented Jan 10, 2024

Deploy Preview for biomejs ready!

Name Link
🔨 Latest commit 14c13fb
🔍 Latest deploy log https://app.netlify.com/sites/biomejs/deploys/659e6cabb78cda00083999bf
😎 Deploy Preview https://deploy-preview-1505--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.

@github-actions github-actions bot added A-Formatter Area: formatter A-Website Area: website L-JavaScript Language: JavaScript and super languages A-Changelog Area: changelog labels Jan 10, 2024
Copy link

codspeed-hq bot commented Jan 10, 2024

CodSpeed Performance Report

Merging #1505 will not alter performance

Comparing kalleep:fix-comment-default-switch (14c13fb) with main (c4259ed)

Summary

✅ 93 untouched benchmarks

Copy link
Member

@Conaclos Conaclos left a comment

Choose a reason for hiding this comment

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

A good and effective fix! Thanks!

@Conaclos Conaclos merged commit 3ac4170 into biomejs:main Jan 10, 2024
19 checks passed
@kalleep kalleep deleted the fix-comment-default-switch branch January 10, 2024 12:47
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.

📝 Comments are sometimes not correctly indented in a default switch clause
2 participants