-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
missing line break after trailing comments of empty statement #18842
Copy link
Copy link
Labels
area:commentsIssues with how Prettier prints commentsIssues with how Prettier prints commentslang:javascriptIssues affecting JSIssues affecting JS
Description
Prettier 3.8.1
Playground link
--parser babel-tsa; /* a */ // b
; /* c */
foo; // first
;// second
;// third
function x() {
} // first
; // secondOutput:
a; /* a */ // b
/* c */
foo; // first
// second
// third
function x() {} // first
// secondExpected output:
a; /* a */ // b
/* c */
foo; // first
// second
// third
function x() {} // first
// secondWhy?
Should be the same as a non-empty statement to maintain consistency
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:commentsIssues with how Prettier prints commentsIssues with how Prettier prints commentslang:javascriptIssues affecting JSIssues affecting JS