-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Labels
area:commentsIssues with how Prettier prints commentsIssues with how Prettier prints commentslang:javascriptIssues affecting JSIssues affecting JS
Description
When adding explanatory comments after Istanbul
comments, prettier
moves them around into a basically unformatted state.
Prettier 1.7.4
Playground link
Input:
const x = 0;
/* istanbul ignore if */ // debug case currently not triggered
if (true) {
x;
}
Output:
const x = 0; // debug case currently not triggered
/* istanbul ignore if */ if (true) {
x;
}
Expected behavior:
I would expect the following output to remain unchanged with regards to the comments:
const x = 0;
/* istanbul ignore if */ // debug case currently not triggered
if (true) {
x;
}
I would expect the comments to stick to the if
, where they must be for Istanbul
to pick them up
Metadata
Metadata
Assignees
Labels
area:commentsIssues with how Prettier prints commentsIssues with how Prettier prints commentslang:javascriptIssues affecting JSIssues affecting JS