2017-06-08 15:52:52 +03:00
|
|
|
#!/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
|
2020-02-21 16:18:28 +03:00
|
|
|
|
|
|
|
./node_modules/.bin/eslint -f json src test |
|
2017-06-08 15:52:52 +03:00
|
|
|
jq -r '.[] | select((.errorCount + .warningCount) > 0) | .filePath' |
|
|
|
|
sed -e 's/.*matrix-react-sdk\///';
|
|
|
|
} > "$out"
|
2020-02-21 16:18:28 +03:00
|
|
|
# also append rules from eslintignore file
|
|
|
|
cat .eslintignore >> $out
|