3 ms·
A good example from further down the comment section: Prettier doesn't break template literals, but it will break non-literal sections of template strings. For
by nicoburns 3y ago
A good example from further down the comment section:
Prettier doesn't break template literals, but it will break non-literal sections of template strings. For example, if we wrote this:
const foo = `aaaaaaaaaaaaaaa${bbbbbbbbbbbbb}ccccccccccccccc${ddddddddddd}`;
prettier would fix it to
const foo =
`aaaaaaaaaaaaaaa${
bbbbbbbbbbbbb
}ccccccccccccccc${
ddddddddddd
}`;
Which is not only much harder to read in it's own right, but now takes up 6 lines instead of one!
- bakkoting 3y agoI have a PR fixing that: https://github.com/prettier/prettier/pull/15209 https://github.com/prettier/prettier/pull/15209 Just needs another maintainer's stamp.