Files
reverse-engineering-anything/.husky/pre-commit
T
morluto 9c960b4b67 ci(hooks): skip the staged-file autofix on merge commits (#11530)
A merge commit stages every file brought in from the other branch, so
lint-staged's oxlint --fix rewrote incoming code that main had not
autofixed (duplicate imports and similar fixable warnings), putting
unrelated changes into PR merges and causing new conflicts with main.
Conflict resolutions are still checked by the pre-push hook and CI.
2026-11-15 16:47:06 -05:00

8 lines
332 B
Plaintext
Executable File

# A merge commit stages every file it brings in from the other branch; an
# autofix here would rewrite that incoming code and put unrelated changes into
# the merge. Conflict resolutions are still checked by the pre-push hook and CI.
if git rev-parse -q --verify MERGE_HEAD >/dev/null; then
exit 0
fi
npx --no-install lint-staged