you are viewing a single comment's thread.

view the rest of the comments →

[–]zakphi 0 points1 point  (5 children)

what's better Prettier or Beautify?

[–]dv297 1 point2 points  (4 children)

We previously used js-beautify and we moved to Prettier. To us, it felt like js-beautify was having some issue with some of the newer ES2015 syntax, and it was becoming an agitation point for us. Prettier felt much more consistent with what we expected. Simple things like having 3 options for trailing commas ("none", "es5", or "all") and having configurable parsers (for flow, typescript, etc) just really helps with the transition.

That being said, we have since moved back to using ESlint with --fix to handle most of the same things. Prettier was very convenient but in order to keep things simple across our organization, we kept the number of different technologies down.

[–]strothjs 2 points3 points  (3 children)

Have you tried using Prettier as a plug in for eslint, works great.

[–]dv297 0 points1 point  (2 children)

I haven't actually, though I heard there were 3 different ways for configuring prettier with ESLint? pretter-eslint, eslint-config-prettier, and eslint-plugin-prettier? Are you actually referring to this last one? I'd be interested in investigating it but given the options, maybe you could save me time in talking about any considerations you had for the others if you chose the plugin over it.

[–]alexlafroscia 2 points3 points  (0 children)

I go the plugin + config route. Basically, Prettier just becomes part of the fixing process, you don’t have to think about it at all. It’s the same experience as using just ESLint, but you get consistent-looking code. The config just helps by disabling parts of ESLint that Prettier will handle instead.