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
Note that both a and b are used, but b is imported directly rather than being imported from the barrel file. This is a sign of a potential issue, that maybe b was meant to be imported from aAndB instead.
It’s not a big issue, as there isn’t any actual code that is unused (except from the export * line which will most likely disappear after bundling anyway), and supporting this use case would maybe require a whole new category of things that can be potentially unused, but I felt like I should report it anyway if you feel like it should be fixed.
The text was updated successfully, but these errors were encountered:
Oh, interesting. It's simply not supported yet, but I guess it could be. Won't be trivial at first thought though, because that * in the barrel file is not an exporteded identifier (yet).
Edit: and the * is also often not unique either (like in the example).
Prerequisites
Reproduction url
https://codesandbox.io/p/devbox/wp5lv3
Reproduction access
Description of the issue
I found a situation in which an
export * from "./b";
line is unused (removing it makes no difference), but Knip doesn’t report anything:Note that both
a
andb
are used, butb
is imported directly rather than being imported from the barrel file. This is a sign of a potential issue, that maybeb
was meant to be imported fromaAndB
instead.It’s not a big issue, as there isn’t any actual code that is unused (except from the
export *
line which will most likely disappear after bundling anyway), and supporting this use case would maybe require a whole new category of things that can be potentially unused, but I felt like I should report it anyway if you feel like it should be fixed.The text was updated successfully, but these errors were encountered: