serverless/scripts/eslint.sh
Philipp Muens b55c644622 Update ratchet of eslint.sh file
Update the ratchet so that linting errors won't break CI tools (such as travis-ci).
2016-05-11 19:02:41 +02:00

21 lines
376 B
Bash
Executable File

#!/bin/bash
set -e
mkdir -p tmp
npm run lint | tee tmp/lint-output
problems=`cat tmp/lint-output | grep -oE '[0-9]* problems' | grep -o "[0-9]*"`
ratchet="15000"
echo "Problems found in current linting: $problems"
if [ "$problems" -gt "$ratchet" ]
then
echo "Linting issues above ratchet of $ratchet"
exit 1
else
echo "Linting issues below ratchet of $ratchet"
fi