Files
epg/.husky/scripts_lint.sh

7 lines
301 B
Bash
Raw Permalink Normal View History

2025-01-17 18:28:59 +03:00
#!/bin/sh
scripts_changed="$(git diff --staged --name-only --diff-filter=ACMR -- 'tests/**/*.ts' 'tests/**/*.js' 'scripts/**/*.ts' 'scripts/**/*.mts' 'scripts/**/*.js' 'sites/**/*.js' 'sites/**/*.ts' | sed 's| |\\ |g')"
if [ ! -z "$scripts_changed" ]; then
npx eslint $scripts_changed
fi