Improve your dev experience while using dev automation around Git commits.
Here is an example with husky, triggering a pre-commit hook that runs lint-staged.
lint-staged is configured to run prettier that reformats code, then lint-staged automatically add reformatted code to Git therefore your commit is clean and you don’t have anything else to do or to think about.