Skip to content

Fix leading comment in parenthesized return expression moving to inco…#18881

Open
Bsingh2697 wants to merge 1 commit intoprettier:mainfrom
Bsingh2697:fix/18843-leading-comment-member-chain
Open

Fix leading comment in parenthesized return expression moving to inco…#18881
Bsingh2697 wants to merge 1 commit intoprettier:mainfrom
Bsingh2697:fix/18843-leading-comment-member-chain

Conversation

@Bsingh2697
Copy link

…rrect place in member chain

When a return statement had a parenthesized expression with a leading comment followed by a member chain outside the parens, the comment was incorrectly placed between the member lookup and its call arguments.

Fixes #18843

Description

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

…rrect place in member chain

When a return statement had a parenthesized expression with a leading
comment followed by a member chain outside the parens, the comment was
incorrectly placed between the member lookup and its call arguments.

Fixes prettier#18843
@netlify
Copy link

netlify bot commented Feb 18, 2026

Deploy Preview for prettier ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit da8dde0
🔍 Latest deploy log https://app.netlify.com/projects/prettier/deploys/699603d3c7bda500089c92fd
😎 Deploy Preview https://deploy-preview-18881--prettier.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Leading comment in parenthesized return expression moves to incorrect place in member chain

1 participant