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): break long destructuring binding pattern #2185

Merged
merged 4 commits into from
Mar 25, 2024

Conversation

ah-yu
Copy link
Contributor

@ah-yu ah-yu commented Mar 25, 2024

Summary

Closes #2172

Align the IR of JsObjectBindingPatternProperty with Prettier.

group([
  group("fairlyLongObjectKeyLongEnoughToBreakCharacterLimit"),
  ":",
  group(indent(line), { id: Symbol.for("assignment") }),
  lineSuffixBoundary,
  indentIfBreak(
    "_fairlyLongValueNameLongEnoughToBreakCharacterLimit",
    { groupId: Symbol.for("assignment") },
  ),
]),

Test Plan

Add a new test case and update the corresponding snapshot

@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 Mar 25, 2024
Copy link

netlify bot commented Mar 25, 2024

Deploy Preview for biomejs ready!

Name Link
🔨 Latest commit ff0844b
🔍 Latest deploy log https://app.netlify.com/sites/biomejs/deploys/66013e86fcad27000875730c
😎 Deploy Preview https://deploy-preview-2185--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 (🟢 up 1 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 Mar 25, 2024

CodSpeed Performance Report

Merging #2185 will degrade performances by 6.71%

⚠️ No base runs were found

Falling back to comparing ah-yu:destructing_fmt (ff0844b) with main (70bce5a)

Summary

❌ 1 regressions
✅ 92 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main ah-yu:destructing_fmt Change
db.json[cached] 67.2 ms 72.1 ms -6.71%

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.

Thank you!

@ematipico ematipico merged commit 35ba975 into biomejs:main Mar 25, 2024
17 checks passed
@ah-yu ah-yu deleted the destructing_fmt branch March 25, 2024 09:28
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.

📝 Long destructuring not line breaking
2 participants