Run lintwithexclusions on travis builds

Signed-off-by: Aaron Raimist <aaron@raim.ist>
This commit is contained in:
Aaron Raimist 2018-10-12 19:34:05 -05:00
parent 70fe4f67ee
commit fe11ae73db
No known key found for this signature in database
GPG key ID: 37419210002890EF
5 changed files with 34 additions and 2 deletions

View file

@ -0,0 +1,21 @@
#!/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"