fix(format/js): fix comments in JavaScript member chains causing unnecessary line breaks#8916
Conversation
…cessary line breaks
🦋 Changeset detectedLatest commit: 03f56e6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThis pull request addresses issue Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
CodSpeed Performance ReportMerging this PR will not alter performanceComparing Summary
Footnotes
|
Summary
closes #4013
MemberChainGroup::has_commentswas incorrectly detecting comments on members that shouldn't trigger line breaks, causing member chains to break unnecessarily. This PR usesMemberChain::has_commentsinstead which correctly skips the root member and only triggers breaks for comments inside the chain, aligning the formatting with Prettier.Test Plan
Snapshot tests added
Docs
n/a
AI Usage Disclosure
All code changes are done by me. Used Claude Code to do a quick review on the changes and generate a better changeset message