#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# run hook only if frontend src changed
if git diff --name-only --cached | grep --quiet 'frontend/src/';
  then
    cd frontend
    npx lint-staged
  else
    echo "(no frontend/src changes - skipping pre-commit hook)"
fi
