[CI] Parallelize eslint to speed it up (#136972)

This commit is contained in:
Brian Seeders 2022-07-22 16:23:17 -04:00 committed by GitHub
parent 5cc74443e6
commit 20dec08bf1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 6 deletions

View file

@ -16,9 +16,9 @@ echo '--- Lint: eslint'
# after possibly commiting fixed files to the repo
set +e;
if is_pr && ! is_auto_commit_disabled; then
node scripts/eslint --no-cache --fix
git ls-files | grep -E '\.(js|mjs|ts|tsx)$' | xargs -n 250 -P 6 node scripts/eslint --no-cache --fix
else
node scripts/eslint --no-cache
git ls-files | grep -E '\.(js|mjs|ts|tsx)$' | xargs -n 250 -P 6 node scripts/eslint --no-cache
fi
eslint_exit=$?