Add watch.sh

Run yarn lint on file changes and notify-send errors.
This means I don't have to keep running yarn lint before every
commit with Husky.
This commit is contained in:
Brandon Presley 2022-09-20 12:50:31 +12:00
parent d040a2574d
commit 677302dcb6
1 changed files with 9 additions and 0 deletions

9
watch.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
ls *.ts* | entr yarn lint | tee >(
while read ln; do
if echo "${ln}" | grep -q "error"; then
notify-send "${ln}"
fi
done
)