Hacker News new | past | comments | ask | show | jobs | submit login

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!



I have a PR fixing that: https://github.com/prettier/prettier/pull/15209

Just needs another maintainer's stamp.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: