Skip to content

Keep comments in mapped type inline#18731

Merged
fisker merged 9 commits intoprettier:mainfrom
fisker:mapped-dangling-comment
Jan 24, 2026
Merged

Keep comments in mapped type inline#18731
fisker merged 9 commits intoprettier:mainfrom
fisker:mapped-dangling-comment

Conversation

@fisker
Copy link
Copy Markdown
Member

@fisker fisker commented Jan 23, 2026

Description

Fixes #18730

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 23, 2026

Open in StackBlitz

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

commit: 1df2b4f

@fisker fisker force-pushed the mapped-dangling-comment branch from 9593ed7 to c2dafd8 Compare January 23, 2026 12:03
@netlify
Copy link
Copy Markdown

netlify bot commented Jan 23, 2026

Deploy Preview for prettier ready!

Name Link
🔨 Latest commit 9593ed7
🔍 Latest deploy log https://app.netlify.com/projects/prettier/deploys/6973636a56597a0008150dd6
😎 Deploy Preview https://deploy-preview-18731--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.

@netlify
Copy link
Copy Markdown

netlify bot commented Jan 23, 2026

Deploy Preview for prettier ready!

Name Link
🔨 Latest commit 1df2b4f
🔍 Latest deploy log https://app.netlify.com/projects/prettier/deploys/69737293fdd1c000082768a0
😎 Deploy Preview https://deploy-preview-18731--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 23, 2026 12:48
Comment on lines +60 to +67
type M4 = {
/* a long long long long long long long long long long long long long long comment */ [b in B]: string
}

type M5 = {
/* Multi
line */ [b in B]: string
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Dunqing I think these two should on own line, oxfmt currently not.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I will follow it up in the Oxfmt.

@fisker fisker merged commit 183c115 into prettier:main Jan 24, 2026
38 checks passed
@fisker fisker deleted the mapped-dangling-comment branch January 24, 2026 02:17
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.

Inline block comment in mapped type incorrectly moved to separate line

2 participants