Rename to .husky/scripts_lint.sh

This commit is contained in:
freearhey 2025-01-31 20:19:23 +03:00
parent 1affea63ca
commit a592234794

8
.husky/scripts_lint.sh Executable file
View file

@ -0,0 +1,8 @@
#!/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
echo "npx eslint $scripts_changed"
npx eslint $scripts_changed
fi