#!/usr/bin/env sh

# Exit on error
set -e

# Change to the UI directory
cd nagiosxi/basedir/html/ui || exit 1

# Check if node_modules exists
if [ ! -d "node_modules" ]; then
    echo "Error: node_modules not found. Run 'npm install' first."
    exit 1
fi

# Run pre-commit checks
npm run pre-commit
