element-web/scripts/generate-eslint-error-ignore-file
Aaron Raimist fe11ae73db
Run lintwithexclusions on travis builds
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2018-10-19 20:59:07 -05:00

21 lines
494 B
Bash
Executable file

#!/bin/sh
#
# generates .eslintignore.errorfiles to list the files which have errors in,
# so that they can be ignored in future automated linting.
out=.eslintignore.errorfiles
cd `dirname $0`/..
echo "generating $out"
{
cat <<EOF
# autogenerated file: run scripts/generate-eslint-error-ignore-file to update.
EOF
./node_modules/.bin/eslint --no-ignore -f json src test |
jq -r '.[] | select((.errorCount) > 0) | .filePath' |
sed -e 's/.*riot-web\///';
} > "$out"