dprint-plugin-typescript
dprint-plugin-typescript copied to clipboard
Preserve JSX comments
Describe the bug
When you format a document with a JSX comment (i.e. {/* ... /}), it puts the curly braces on lines separate from the / and */. This results in the VS Code shortcut for adding/removing a comment (Ctrl + / by default) no longer working, and requiring the two lines on the top and two lines on the bottom to be deleted manually. Also, these comments end up taking up too much space too. It would be nicer if the comment got formatted normally. Originally opened this issue in the Deno repo; will close it if this is indeed more in dprint scope.
Deno version: 2.3.3
Input Code
{/* ... */}
Expected Output
{/*
...
*/}
Actual Output
{
/*
...
*/
}