Skip stat call / throwing an exception when source files don't exist in v3 (Backport of #225) #264
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I saw that in #260 @jonaskello is amenable to backporting features to the v3 branch, as the majority of users are still on v3, (mostly thanks to the strong backwards compatibility promises made by
eslint-plugin-import
).This PR backports the performance improving #225 to v3.15 - no editing needed, it's just a cherry-pick.
Details in #225 suggests that this offers a solid speed improvement. import-js/eslint-plugin-import#2654 proposed updating
tsconfig-paths
from v3 to v4 in eslint-plugin-import as this change resulted in a 10-20% speed improvement in large repositories - I suspect in large part due to this one performance change. That PR was ultimately rejected due toeslint-plugin-import
supporting a long tail of node versions, and thus wanting to stay on tsconfig-paths v3.eslint-plugin-import
's author suggested backporting the performance fix to v3 so they could take advantage of it, so here I am.#225 was released as a patch version, so I assume this would be too.