

CODE PRETTIER CODE
However, on the other hand, it also means you are losing the ability to have fine-grained tweaks to how your code should look like. That makes it very easy to use (it’s excellent!) and the code consistent across projects. Prettier makes a lot of hard-coded decisions to provide a minimal configuration interface. Opinionated essentially means it’s not for everyone. Prettier describes itself to be "an opinionated code formatter". In this post, I would try to explain the reason why I made this decision: It’s Opinionated # If you have ever come across my open source projects, you might find that I rarely use Prettier to format the source code. I could make the generated code pretty with less than 5 mins of integrating Prettier.

I love it for the out-of-box support of a lot of languages. I use Prettier a lot for interactive documentation and playgrounds, like VueUse and UnoCSS. I have to confess that the title is a bit clickbait.

I appreciated the efforts of the maintainers and contributors to make it possible and formed a great foundation of how the clean code would look for the community. Prettier is a great tool, and it saved me a lot of time. But this time, I think I should try harder to explain that for future reference.įirst of all, I am not against Prettier. I wasn’t able to figure out a proper way to express my position about Prettier. I have started writing this post multiple times but never ended up posting it.
