Skip to content

Fix printing comment for the last operand of union types#18798

Merged
fisker merged 5 commits intoprettier:mainfrom
fisker:union-last-comment
Jan 29, 2026
Merged

Fix printing comment for the last operand of union types#18798
fisker merged 5 commits intoprettier:mainfrom
fisker:union-last-comment

Conversation

@fisker
Copy link
Copy Markdown
Member

@fisker fisker commented Jan 29, 2026

Description

Based on #15409

Fixes #18778

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.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Jan 29, 2026

Open in StackBlitz

yarn add https://pkg.pr.new/@prettier/plugin-hermes@18798.tgz
yarn add https://pkg.pr.new/@prettier/plugin-oxc@18798.tgz
yarn add https://pkg.pr.new/prettier@18798.tgz

commit: f4d35bc

@netlify
Copy link
Copy Markdown

netlify bot commented Jan 29, 2026

Deploy Preview for prettier ready!

Name Link
🔨 Latest commit f4d35bc
🔍 Latest deploy log https://app.netlify.com/projects/prettier/deploys/697b96f4ed178c00084911f3
😎 Deploy Preview https://deploy-preview-18798--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.

@fisker fisker marked this pull request as ready for review January 29, 2026 17:14
@fisker fisker merged commit 96546f3 into prettier:main Jan 29, 2026
36 checks passed
@fisker fisker deleted the union-last-comment branch January 29, 2026 17:27
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.

Inconsistent comment placement in nested unions vs unions in intersections

1 participant