You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(linter): speed up inferred plugin node processing (#31281)
This PR improves the **createNodes** function of eslint's inferred
plugin by making two pragmatic choices:
- reusing the ESLint between config file's runs instead of recreating
the new one every time
- skipping ignored files checks for projects that already have eslint
config file
## Results of benchmarks on customer's repo:
### Without ESLint plugin
- create-project-graph-async - avg. 11739.1326225 -> 11 seconds
### With current ESLint plugin
- create-project-graph-async - avg. 98005.0965135 -> 98 seconds
### With modified ESLint plugin
- create-project-graph-async - avg. 13225.073817 -> 13 seconds
- (@nx/eslint/plugin:createNodes - 2206.96497, 16.69%)
## Current Behavior
<!-- This is the behavior we have today -->
## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->
Fixes #
it('should not create nodes for nested projects without a root level eslint config when all files are ignored (ignorePatterns in .eslintrc.json)',async()=>{
// This is intentionally disabled, since we should always create a node for project that contains eslint config
543
+
// it('should not create nodes for nested projects without a root level eslint config when all files are ignored (ignorePatterns in .eslintrc.json)', async () => {
0 commit comments