mirror of
https://github.com/element-hq/element-web
synced 2024-11-25 02:35:48 +03:00
23 lines
575 B
Bash
Executable file
23 lines
575 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 -f json src test |
|
|
jq -r '.[] | select((.errorCount + .warningCount) > 0) | .filePath' |
|
|
sed -e 's/.*matrix-react-sdk\///';
|
|
} > "$out"
|
|
# also append rules from eslintignore file
|
|
cat .eslintignore >> $out
|