Created
November 13, 2024 14:15
-
-
Save ThePlenkov/72a21cc72627b791e76ad9a1c62bed33 to your computer and use it in GitHub Desktop.
NX autoformatting on commit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .husky/pre-commit | |
nx format:write --uncommitted | |
git update-index --again |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It works like a charm for me. It only formats what was touched (uncommited), but doesn't add new files into the index. So you commit only what was staged