pre-commit: use full relative path to eslint and tsc

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans 2024-12-07 18:11:03 -07:00
parent 1b0a8d6192
commit 36616ad8cc
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -2,5 +2,5 @@
cd web > /dev/null cd web > /dev/null
if [[ -f "./node_modules/.bin/eslint" ]]; then if [[ -f "./node_modules/.bin/eslint" ]]; then
ARGS=("$@") ARGS=("$@")
eslint --fix ${ARGS[@]/#web\// } ./node_modules/.bin/eslint --fix ${ARGS[@]/#web\// }
fi fi

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
cd web > /dev/null cd web > /dev/null
if [[ -f "./node_modules/.bin/tsc" ]]; then if [[ -f "./node_modules/.bin/tsc" ]]; then
tsc --build --noEmit ./node_modules/.bin/tsc --build --noEmit
fi fi