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
When adding explanatory comments after
Istanbulcomments,prettiermoves them around into a basically unformatted state.Prettier 1.7.4
Playground link
Input:
Output:
Expected behavior:
I would expect the following output to remain unchanged with regards to the comments:
I would expect the comments to stick to the
if, where they must be forIstanbulto pick them up