Skip to content

Commit

Permalink
rerun git add when auto-linting/formating json/yaml/markdown files in…
Browse files Browse the repository at this point in the history
… precommit hook
  • Loading branch information
patinthehat committed Nov 12, 2024
1 parent c129459 commit b3a06fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .custom-hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ fi

if [ "$MARKDOWN_STAGED_FILES" != "" ] && [ "$NPX_BIN" != "" ]; then
runCommand "$NPX_BIN" markdownlint-cli --fix $MARKDOWN_STAGED_FILES
git add $MARKDOWN_STAGED_FILES
fi

if [ "$PRETTIER_STAGED_FILES" != "" ] && [ "$NPX_BIN" != "" ]; then
runCommand "$NPX_BIN" prettier --write $PRETTIER_STAGED_FILES
git add $PRETTIER_STAGED_FILES
fi

0 comments on commit b3a06fb

Please sign in to comment.