Earlier quoted context omitted.
Take a look at Biome formatter and linter. Blink of an eye fast on very large projects that prettier feels like forever on. Just don't enable the experimental or potentially breaking format options on a large existing code base. They aren't enabled by default. Deno's in the box trolling is pretty nice as well. YMMV of course.
No HTML support… bummer. I’ve been looking to switch from Prettier but I haven’t yet found a viable alternative.
Why is Prettier rock solid?
111–120 of 163 posts
Re: Why is Prettier rock solid?
#112Interestingly, prettier just made a breaking change in a patch release and refused to undo it for a week or so, until a particularly silly pedantic argument won them over. https://github.com/prettier/prettier/issues/15942 My only bad experience with prettier, besides the incredible slowness (orders of magnitude slower than ruff)
Ruff is based on the same foundations that Biome (https://biomejs.dev/). Although Biome doesn't support all languages that Prettier supports, you should give a try, it is fast.
Re: Why is Prettier rock solid?
#113Interestingly, prettier just made a breaking change in a patch release and refused to undo it for a week or so, until a particularly silly pedantic argument won them over. https://github.com/prettier/prettier/issues/15942 My only bad experience with prettier, besides the incredible slowness (orders of magnitude slower than ruff)
How can a person that introduces breaking changes in patch release and then just says everyone to piss off when facing critics (just because mister "has needs for this": https://github.com/prettier/prettier/issues/15553#issuecomme... ) be a maintainer of such a widespread tool ?
Re: Why is Prettier rock solid?
#114Earlier quoted context omitted.
"It's not my commit that it is wrong, it's the rest of the world that needs to fix their code." This is such an insane position to take for a maintainer. Don't be idealistic and silly. If you break compatibility, it is on you. No one cares that you are right. The Linus Torvalds "we do not break the user-space, ever" mantra should be a best practice for every open source programmer, and user-space in this case is "wha…
Bad initial designs then will forever doom any project, if only the project has a few users. And there are lots of bad designs in the open source world and in the programming projects world in general. Especially so in the NPM and Python ecosystems. In many widespread tools.
Re: Why is Prettier rock solid?
#115Hmm I just had a (perhaps esoteric) issue in an Astro file. Specifying above a would cause the block at the bottom to become duplicated on save. Weird as, and I couldn’t be bothered troubleshooting, I just added the file to .prettierignore. But still.
(I maintain said plugin, so, well, it's my fault)
Re: Why is Prettier rock solid?
#116Earlier quoted context omitted.
Conversely, my strategy is "press shift+tab to close the block and not have to screw around with matching {} everywhere".
But that leaves you having to manually adjust entire blocks, when indentation levels change. With {}, prettier can readjust everything properly for you, even after mutilating changes such as copying an entire block from a different file into a new one, and at a different indentation level.
This also happens rarely enough that it's never been an issue for me.
Re: Why is Prettier rock solid?
#117I've worked with a number of developers whose output without these tools is a giant, unreadable mess. Training juniors to be reliant on this stuff does more harm (to them) than good.
I entirely disagree. Juniors have to learn so many more important things - how to logically structure code, testing, working on teams, git...
Why take time away from learning those (and similar) concepts to teach them something a tool does well and, if necessary, they can learn later?
I like it to deciding to teach teens how to drive with a manual transmission instead of an automatic one- they need to be able to drive and not hit things, and the more we can simplify that, the happier we all are. If needed, some kids can go back and learn how to use a stick shift.
Re: Why is Prettier rock solid?
#118Earlier quoted context omitted.
What’s an example of Prettier breaking code?
Another example: https://github.com/prettier/prettier/issues/187 That issue has been open for 7 years.
Re: Why is Prettier rock solid?
#119Off topic but every once and a while I'm made aware of the impact prettier has had on my typing. It's so hard to write code without a tool like prettier because formatting related keystrokes have largely been removed from my muscle memory. You basically end up writing a sort of shorthand.
This + Copilot. I code in an entirely different way now, I would of thought it impossible to change my ways (about 20 years of coding)
Re: Why is Prettier rock solid?
#120Earlier quoted context omitted.
Conversely, my strategy is "press shift+tab to close the block and not have to screw around with matching {} everywhere".
But that leaves you having to manually adjust entire blocks, when indentation levels change. With {}, prettier can readjust everything properly for you, even after mutilating changes such as copying an entire block from a different file into a new one, and at a different indentation level.
Of course this is mostly a tooling issue, since there is a shortcut for adjusting indentation but not for adjusting parenthesis. Or maybe there is and I just haven't discovered it yet.