Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yah prettier does this (the tool the person you are replying to mentioned). It's very commonly used in JS dev, alongside things like husky which lets you do things like format code on commit. If you need more info, I can try and point you in the right direction.


I've seen Husky+Prettier used to format on the pre-commit hook. Is "format on checkout" common? That'd make 'git diff' quite noisy.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: