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
For the time being I have disabled import/namespace for my lambdas that import @vercel/node. In the rest of my project this is a non-issue, it's just in combination with that package that eslint is stuck doing... something.
The text was updated successfully, but these errors were encountered:
The slow part is the ExportMap.get call, which has to build up a dependency graph of everything - including @vercel/node, which must take awhile to traverse.
If you enable multiple import rules that use the ExportMap, whichever is first will be "blamed" for being slow, and the rest will be fast. In other words, this doesn't have anything to do with namespace specifically, but something with the ExportMap combined with @vercel/node.
Almost certainly yes on both counts - #2531 may help, if @vercel/node imports an inordinate number of type definitions from d.ts files, but beyond that, someone would have to do some pretty thorough debugging to figure out what was making it slow.
Repo for reproduction is here: https://github.com/ChristianIvicevic/import-namespace-issue-repro
I noticed that eslint takes ages linting the single file in this repo and profiling timings yields the following:
After trial-and-error I noticed that the offending line is this:
https://github.com/ChristianIvicevic/import-namespace-issue-repro/blob/9ec4d56d22280ad3d94671fb282262107dd47304/.eslintrc.js#L38-L40
Removing all JS extensions fixes the abysmal speed of
import/namespace
:For the time being I have disabled
import/namespace
for my lambdas that import@vercel/node
. In the rest of my project this is a non-issue, it's just in combination with that package that eslint is stuck doing... something.The text was updated successfully, but these errors were encountered: