Files
deck/run-eslint.sh
Julius Härtl 47b51c512d Add eslintrc
Signed-off-by: Julius Härtl <jus@bitgrid.net>

Make run-eslint.sh executable

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-11-13 09:40:28 +01:00

16 lines
357 B
Bash
Executable File

#!/bin/sh
set -e
ESLINT=$(which eslint || true)
if [ -z "$ESLINT" ]; then
echo "Can't find command \"eslint\" in $PATH"
exit 1
fi
echo Checking scripts with $ESLINT ...
find -name "*.js" -not -path '*js/node_modules*' \
-not -path '*l10n/*' \
-not -path '*js/vendor*' \
-not -path '*js/tests*' \
-print0 | xargs -0 $ESLINT --quiet