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 format nested union type #2628

Merged
merged 3 commits into from
Apr 28, 2024

Conversation

ah-yu
Copy link
Contributor

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

Summary

Fix the following case

// Input
type Foo = | ( /* 1 */ | A
    // B
    | B )

// Before
type Foo = /* 1 */
  | A
  // B
  | B;
// The output will be reformatted to 
type Foo =
  /* 1 */
  | A
  // B
  | B;

// After
type Foo =
  /* 1 */
  | A
  // B
  | B;

Test Plan

Add a new test and enable the prettier test that was disabled before due to the reformatting issue.

@github-actions github-actions bot added A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages labels Apr 28, 2024
@github-actions github-actions bot added the A-Changelog Area: changelog label Apr 28, 2024
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.

Nice!

Copy link

codspeed-hq bot commented Apr 28, 2024

CodSpeed Performance Report

Merging #2628 will not alter performance

Comparing ah-yu:single_type (96bb65e) with main (ce4979d)

Summary

✅ 90 untouched benchmarks

@ah-yu ah-yu merged commit b0c052a into biomejs:main Apr 28, 2024
12 checks passed
@ah-yu ah-yu deleted the single_type branch April 28, 2024 09:52
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 L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants