endo
endo copied to clipboard
linting is too slow
The output of the lint job for my latest PR:
Run yarn lint
yarn lint
shell: /usr/bin/bash -e {0}
Checking formatting...
All matched files use Prettier code style!
Done in 8m 11s
This is far too slow. My suggested solution(s):
- For packages using
typescript-eslint, do not runtsc; tseslint invokestscanyway and it is redundant. - Do not run
eslintindividually for each package. Run it once, in the workspace root. - One of:
a. Run the
prettiercheck once in the workspace root b. (Controversial) Omit theprettiercheck entirely. Use lint-staged and husky as a pre-commit hook to runprettier --writeon the staged files (alsoeslint --fix). c. Do a., but also add the pre-commit hook. - Ensure we're on the latest versions of tseslint and ESLint and follow its best practices for performant linting.
- If we must lint in workspaces individually (why?), then parallelize them. This might not help CI as much as it would in a dev environment.