Raz Karmi

Prettier - An opinionated code formatter

by

Prettier is an opinionated code formatter

Add a comment

Replies

Best
Zhang Buzz

As a frontend engineer, the code format is very very important to me. I used ESLint at first, and have to manually format every line of code. Later I found Prettier, it really save me lots of time. However, sometimes it will conflict with specific ESLint rules, in that case, you have to manually disable some ESLint rules in .eslintrc file in order to let Prettier handle everything.

Pros:

Save time for formatting JS code.

Cons:

Conflict with ESLint.

Pascal Andy
VS Code user on mac here. As I mainly do devops stuff in bash I’m wondering ... will Prettier format my bash scripts ?
James Brooks
If you're looking to make Prettier part of your CI, we automated it into StyleCI https://styleci.io.
Shion Wong
Good.
Taylor Crane
It just dawned on me that not everybody uses Prettier. I genuinely don't think I could ever go back to not using it. This is a must.
rexthestrange
This should be called Code Nazi - it's opinionated nature (good term for it - opinionated is not a good thing) makes it useless in my books. It should allow each user to customize EVERY aspect of their environment. That way, the debate about, for example, whether to use spaces or tabs (an age old debate) simply goes away. Each programmer gets the file out of the repository, it's formatted to their liking and when they check it back in it gets formatted to a standard specification determined BY THE ORGANIZATION, NOT Code Nazi.
rexthestrange
PS: There's nothing "pretty" about their format.
Josh
First thing I install on all my JS projects!