Closed
Description
Description
The linter runs for a very long time if the "import/no-cycle" rule is enabled on a large project with typescript. I think the problem is that eslint does not cache all modules. For example, these files will always be parsed again:
- https://github.com/aws/aws-sdk-js/blob/master/clients/all.d.ts
- https://unpkg.com/browse/[email protected]/typings.d.ts
Minimal repository for reproduce: https://github.com/stenin-nikita/eslint-plugin-import-bug
Possible solution
This line
eslint-plugin-import/src/ExportMap.js
Line 349 in 68cea3e
replace with:
if (exportMap == null) {
exportCache.set(cacheKey, null);
return null;
}
Locally, this change reduced the check time from 20 to 4 minutes for me
Metadata
Metadata
Assignees
Labels
No labels