bodgery / bodgery-member-api

1 stars 1 forks source link

Format Code with Prettier #47

Open kevinastone opened 3 years ago

kevinastone commented 3 years ago

Prettier automatically formats your code so you can focus on coding rather than style and format.

frezik commented 3 years ago

I'm going to strongly disagree with this one. I have specific reasons for some of the stylistic choices, and prettifiers tend not to follow those guidelines.

frezik commented 3 years ago

Actually, looking over it more closely, it's mostly good changes, but I have quibbles that I hope can be addressed by config changes to the prettier. I'll add comments to the commit directly.

kevinastone commented 3 years ago

I'm less concerned about adopting any given style myself, but I do think it's a significant obstacle for newcomers and others looking to learn or contribute. So, if you're looking to grow contributors, I'd consider adopting prettier. For a beginner, being able to run npm format and their code should be format will be acceptable is an accelerator. (For more veterans, it's also easier since you can also just run the formatter on-save like I do and stop thinking about nits around spacing).

https://prettier.io/docs/en/why-prettier.html covers the general philosophy and the general adoption and trend of opinionated automatic code formatters across the industry.