Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linting is too slow #2621

Open
boneskull opened this issue Oct 31, 2024 · 0 comments
Open

linting is too slow #2621

boneskull opened this issue Oct 31, 2024 · 0 comments
Labels

Comments

@boneskull
Copy link
Contributor

boneskull commented Oct 31, 2024

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):

  1. For packages using typescript-eslint, do not run tsc; tseslint invokes tsc anyway and it is redundant.
  2. Do not run eslint individually for each package. Run it once, in the workspace root.
  3. One of:
    a. Run the prettier check once in the workspace root
    b. (Controversial) Omit the prettier check entirely. Use lint-staged and husky as a pre-commit hook to run prettier --write on the staged files (also eslint --fix).
    c. Do a., but also add the pre-commit hook.
  4. Ensure we're on the latest versions of tseslint and ESLint and follow its best practices for performant linting.
  5. 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant