Skip to content

Remove unused shouldBreak check in printTernaryOld#18354

Merged
fisker merged 1 commit intoprettier:mainfrom
leaysgur:main
Nov 28, 2025
Merged

Remove unused shouldBreak check in printTernaryOld#18354
fisker merged 1 commit intoprettier:mainfrom
leaysgur:main

Conversation

@leaysgur
Copy link
Copy Markdown
Contributor

Description

While debugging oxc_formatter, I noticed this condition seems unnecessary.
(Since it's certain to break when comments are printed?)

If you have any concerns, feel free to close it.
(And if you do, I'd appreciate it if you could let us know why.)

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 Nov 28, 2025

Open in StackBlitz

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

commit: b6ac636

@netlify
Copy link
Copy Markdown

netlify bot commented Nov 28, 2025

Deploy Preview for prettier ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit b6ac636
🔍 Latest deploy log https://app.netlify.com/projects/prettier/deploys/692947c2eb12cb0008f2c85a
😎 Deploy Preview https://deploy-preview-18354--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
Copy link
Copy Markdown
Member

fisker commented Nov 28, 2025

Thanks, I checked history, it seems starts with some case for JSX e17bb5e but later check comments instead.

Should be safe to remove.

@fisker fisker merged commit 7049317 into prettier:main Nov 28, 2025
35 checks passed
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.

2 participants