I started using Prettier + eslint using pretty-quick
& husky
(option 2). It behaves as-expected, i.e., reformats code during a commit (or amend) and includes the changes in the commit.
My monorepo needed (several) more pre-commit hooks, so I ended up migrating to pre-commit.com (option 3). Now, when I commit or amend, Prettier modifies the files and returns Failed
status. This creates for a rather annoying workflow where I am forced to add the files and attempt to commit the changes again.
Is there some way to re-stage the changes as part of the commit?