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

Prettier real usefulness is in team projects.

At $PREVIOUS_WORKPLACE, it totally removed the burden of formatting issues in PRs.

It’s far from perfect but at least everyone in the team was producing the same style and we could focus on logic errors rather than formatting (which is the first thing you spot and can’t ignore when doing a code review).




Formatting errors are at best an incidental detail that nobody should be wasting time on regardless of where it pops up; if prettier helps, great, but in its absence, I don't believe a trivial formatting inconsistency should illicit more than a tiny note among other problems you'd ask to be fixed. If the formatting errors are so frequent and so glaring as to warrant a negative review on that basis alone, such that you feel a mediator is required, then I'd wager Prettier may be obscuring other communication deficiencies.

That said, I do believe in the value of consistent formatting tools, I just think Prettier is a somewhat lazy choice that attempts to skirt responsibility for deciding on things or cultivating agreement. It's a disfunctional team who's members care too much about their opinions on such trite topics, and/or who aren't capable of coming to agreement on a common set of them.

For PRs, I've always just asked someone to run their formatter if it's clear they forgot, and usually there's a common config used by some formatting tool, it's not worth much beyond a a one-liner to make these decisions, and you should be able to do this periodically as things change.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: