3 ms·
I prefer having my editor run prettier on save, so I get the benefits of prettier formatting my ugly code immediately. Also, lint-staged doesn't handle partial
by tlrobinson 9y ago
I prefer having my editor run prettier on save, so I get the benefits of prettier formatting my ugly code immediately.
Also, lint-staged doesn't handle partially staged files properly: https://github.com/okonet/lint-staged/issues/62 https://github.com/okonet/lint-staged/issues/62
- xab9 9y agoI tried running it on save, but I can't "make" others configure their editors in a way I want (our fe team is around 10 ppl, be is much bigger). Lint-staged can't handle partials, but precise-commits can, though we are using ls for now and will see how much this hurts in terms of partials.
- tlrobinson 9y ago> I can't "make" others configure their editors in a way I want We run `prettier -l` in CI, so it's up to each person to decide how they want to make sure their code is prettier-ed before being pushed. I'll check out precise-commits, thanks.
- matthew349hall 9y agoWhy not use gulp-watch or equivalent build tool in your stack somewhere so everytime a file is saved it gets ran through prettier?