Massive/watch.sh
Brandon Presley 677302dcb6 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.
2022-09-20 12:50:31 +12:00

10 lines
154 B
Bash
Executable File

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