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): ensure comments before * are placed before * in generators #1537

Merged
merged 4 commits into from
Jan 12, 2024

Conversation

ah-yu
Copy link
Contributor

@ah-yu ah-yu commented Jan 12, 2024

Summary

Ensure the comments in front of the* token are placed in front of * for generators. If the following token of the comment is the * token then attach the comment to the preceding node.

class Foo {
   @decorator()
   /* comment */ *method(){}
}

// before fix
class Foo {
  @decorator()
  */* comment */ method() {}
}

// after fix
class Foo {
  @decorator()
  /* comment */
  *method() {}
}

// prettier
class Foo {
  @decorator()
  /* comment */
  *method() {}
}

Copy link

netlify bot commented Jan 12, 2024

Deploy Preview for biomejs canceled.

Name Link
🔨 Latest commit 349bee1
🔍 Latest deploy log https://app.netlify.com/sites/biomejs/deploys/65a0cd441f33b80008ae3de9

@github-actions github-actions bot added A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages labels Jan 12, 2024
@ah-yu ah-yu changed the title fix(js_formatter): ensure comments before * are placed before * for generators fix(js_formatter): ensure comments before * are placed before * in generators Jan 12, 2024
@github-actions github-actions bot added A-Website Area: website A-Changelog Area: changelog labels Jan 12, 2024
Copy link

codspeed-hq bot commented Jan 12, 2024

CodSpeed Performance Report

Merging #1537 will degrade performances by 8.16%

⚠️ No base runs were found

Falling back to comparing ah-yu:generator_method_comment (349bee1) with main (7f78594)

Summary

❌ 1 regressions
✅ 92 untouched benchmarks

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

Benchmarks breakdown

Benchmark main ah-yu:generator_method_comment Change
big5-added.json[cached] 2.3 ms 2.5 ms -8.16%

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 0a291cb into biomejs:main Jan 12, 2024
18 of 19 checks passed
@ah-yu ah-yu deleted the generator_method_comment branch January 12, 2024 08:39
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.

2 participants