Closed karlhorky closed 4 months ago
Thanks for sharing @karlhorky! Prettier has a number of issues with MDX 3 comments. I'm not sure the language server can smooth those over, it probably needs to be reolved upstream, but @remcohaszing may know best.
Duplicate of #415
Hi! This was closed. Team: If this was fixed, please add phase/solved
. Otherwise, please add one of the no/*
labels.
Hi team! Could you describe why this has been marked as external?
Thanks, — bb
Hi team! Could you describe why this has been marked as external?
Thanks, — bb
Ignore any JSDoc comments until MDX v2+ comments w. JSDoc support or MDX v3 support added:
{/* prettier-ignore-start */}
{/**
* @typedef Props
* @property {string} name
* Who to greet.
*/}
{/* prettier-ignore-end */}
# Hello {props.name}
Also added an PR to document this in the readme here:
Initial checklist
Affected packages and versions
prettier@3.3.2, @mdx-js/react@3.0.1, next@14.2.4, react@^18
Link to runnable example
No response
Steps to reproduce
Prettier Input/Output:
Input:
Output:
https://github.com/mdx-js/mdx-analyzer/assets/1935696/8967a357-a093-4137-93ae-0144874834e9
Companion issue in
prettier/prettier
I've also reported this as an issue in
prettier/prettier
:If it's desired to only track it in
prettier/prettier
, then this issue can be closed.Expected behavior
No problems with Prettier formatting using MDX comments with JSDoc
Actual behavior
Problems with Prettier formatting using MDX comments with JSDoc
Runtime
Node v20
Package manager
No response
OS
macOS
Build and bundle tools
No response