Sebastian wrote a short post on how to configure Husky to run Prettier on every commit.

I'm a happy prettier user to keep my CSS and JavaScript files consistent. However, it's hard to keep the discipline to run Prettier before every commit. This week I decided to automate the process with Husky and lint-staged.

https://sebastiandedeyne.com/keeping-your-assets-prettier-on-every-commit