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

if git diff --cached --name-only | grep -v '\.gen\.ts$' | grep --quiet '^tracker/tracker/'
then
  echo "tracker"
  pwd
  cd tracker/tracker

  bun run lint-front

  cd ../../
fi

if git diff --cached --name-only | grep -v '\.gen\.ts$' | grep --quiet '^tracker/tracker-assist/'
then
  echo "tracker-assist"
  cd tracker/tracker-assist

  bun run lint-front

  cd ../../
fi

exit 0
