support running multiple lint tasks within the same process #26931
dmitry-stepanenko
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The problem that I faced is related to linting with
"parserOptions": { "project": ["tsconfig.*?.json"] }
defined in eslintrc.json. When this is done, the time it takes to run a particular task may increase in up to 10 times. It's totally not acceptable in workspaces with 1000+ libs as we have, because linting can take 3-4 hours of billable time per run.As a workaround, I have defined a separate eslint config alongside with base
eslintrc.json
in the workspace root and extracted there all rules that require type checking.This allows me to run expensive linting only for changed files both on the CI and as a pre-commit check.
node scripts/ci-format-check.mjs --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}
, which determines the diff between revisions and lints themOverall this is a functional solution and I'm totally fine with it, however it is definitely not something that each team should go through when face similar problems.
Unfortunately I don't have a good vision on how this can be integrated into nx story while maintaining it's philosophy. Do you think it's reasonable? Or it might be enough to provide the recipe to do something similar to what I have described above?
Beta Was this translation helpful? Give feedback.
All reactions