Skip to content

Improve comment handling between if statement condition and the "body"#17998

Merged
fisker merged 11 commits intoprettier:mainfrom
fisker:if-comment
Oct 11, 2025
Merged

Improve comment handling between if statement condition and the "body"#17998
fisker merged 11 commits intoprettier:mainfrom
fisker:if-comment

Conversation

@fisker
Copy link
Copy Markdown
Member

@fisker fisker commented Sep 29, 2025

Description

Fixes #807

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 Sep 29, 2025

Open in StackBlitz

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

commit: fb89090

@netlify
Copy link
Copy Markdown

netlify bot commented Sep 29, 2025

Deploy Preview for prettier ready!

Name Link
🔨 Latest commit fb89090
🔍 Latest deploy log https://app.netlify.com/projects/prettier/deploys/68da51e744f1e50008e32acd
😎 Deploy Preview https://deploy-preview-17998--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 changed the title Improve comment handling between condition and the "body" Improve comment handling between if statement condition and the "body" Sep 29, 2025
@fisker fisker marked this pull request as ready for review September 29, 2025 10:21
@fisker fisker merged commit 3a3db39 into prettier:main Oct 11, 2025
33 checks passed
@fisker fisker deleted the if-comment branch October 11, 2025 08:13
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.

Keep comments that are near an if’s condition closer to that condition

1 participant