Hi Product Hunt!
I started writing Prettier when I was working on another product (that I hope to launch on PH soon :)). I got so tired of formatting code and felt like it was slowing me down so much. Christopher (vjeux) joined early on and helped see it all the way through. I'm super excited with how far it's come and that it solved the problem so well! I honestly think it has helped my build my product faster.
Let me know if you have any questions about the history of prettier or how it works. I won't be able to respond for a few days, I happen to be leaving for a vacation where I won't have any internet right now. But I'll respond (or vjeux will) when I get back!
We have been using Prettier at Hasura for the past two months for a few fairly large react codebases and it really solved our formatting issues. Combined with a pre-commit hook as well to ensure consistency across collaborators.
One gripe initially was that few of our devs didn't like the opinionated formatting but there wasn't anything to automate styling either! You will get used to it eventually.
Hope everybody embraces some form of code styling guide to improve productivity.
I'm not a Javascript developer so I love that Prettier makes generally good formatting decisions for me, freeing need up to think about the code. It's easy to apply Prettier to any project I'm working on, even if other proper in the project aren't using it.
Pros:
No configuration, easy to set up, defaults everyone can agree on
> Cons: Harder to tell that a project is using Prettier
Most editors have a setting that enables format on save only if the project is using prettier (either by looking for a config file or the dependency in package.json). I find that very useful when working on multiple project that may or may not be using it.
Code formatting made effortless! Prettier ensures our code is always clean and readable, allowing us to focus on building the best experience for our users 🎨✨
Prettier is an opinionated code formatter that enforces consistent style by parsing your code and re-printing it with its own rules. It supports many languages (JS, HTML, CSS, etc.) and integrates well with editors like VS Code. Prettier reduces debates over code style and helps maintain clean, readable code across teams.
I've generally had a positive experience with Prettier so far! It's used by default in Zed which is my preferred editor. I would love to see more languages supported 🤩
Stripe
Hasura
I'm not a Javascript developer so I love that Prettier makes generally good formatting decisions for me, freeing need up to think about the code. It's easy to apply Prettier to any project I'm working on, even if other proper in the project aren't using it.
Pros:No configuration, easy to set up, defaults everyone can agree on
Cons:Harder to tell that a project is using Prettier
ContentKing