I like seeing exactly what I commit, so I never let a pre-commit script make any changes. It's just a single command to format any changed files in the repo.
But some developers in my team do like that convenience of just being able to commit, so that's an option that can be configured in our internal tooling.
Pre-commit doesn’t commit if it makes any changes, it just leaves the changed files for you to either add to the index or re-commit skipping the checks.
But some developers in my team do like that convenience of just being able to commit, so that's an option that can be configured in our internal tooling.