PapaParse
PapaParse copied to clipboard
Code formatter
@pokoli Hi. What do you think about moving from ESLint to Prettier? Prettier can format 100% of code (eslint can't). It will be easier to control codestyle. Or we can use Prettier alongside ESLint.
Your thoughts?
I've read some comparision between both tools and I think we can not replace ESLint because it have more checks that Prettier.
IIUC the Prettier library is just for rewriting the code, so everyone have the same code style. Am I right? I have some fear about all the code been rewriting and producing a big diff with no benefit. In case we provide a new major version, this will make the backport of changes to supported version harder. This is something we should consider.
A part from that, which are the otther benefits of Prettier?
Prettier library is just for rewriting the code, so everyone have the same code style. Am I right?
Yes
all the code been rewriting and producing a big diff
It will be a one-time situation. Farther commits will produce regular diff.
no benefit
The benefit is that all next contributions from different contributors will have one codestyle.
How do you feel about eslint configs? Instead of self-written config, we can use for example eslint-config-airbnb, which is supported by the community. With it will be easier to upgrade ESLint to the latest version.