0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-22 08:40:03 +01:00
posthog/.husky/pre-commit
Michael Matloka 7e71c3ce7c
chore(deps): Upgrade TypeScript from 4.8 to 4.9 in the frontend (#14609)
* chore(deps): Upgrade TypeScript to 4.9

* Fix minor typing issues

* Fix linting/testing issues

* Update Kea to 3.1.5
2023-03-16 13:35:28 +01:00

17 lines
511 B
Bash
Executable File

#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
# Check if staged files contain any added or modified PNGs - skip when merging
if \
! git rev-parse -q --verify MERGE_HEAD \
&& git diff --cached --name-status | grep '^[AM]' | grep -q '.png$'
then
# Error if OptiPNG is not installed
if ! command -v optipng >/dev/null; then
echo "PNG files must be optimized before being committed, but OptiPNG is not installed! Fix this with \`brew/apt install optipng\`."
exit 1
fi
fi
pnpm lint-staged