Lars Kappert
Lars Kappert
Typo? ``` import { numanFormat } from '../HumanFormat.ts'; ```
Ah yes, indeed dynamic import specifiers like `import("components/ui/${ui}.vue")` are not supported. They might be in the future, though. There's a few options I can think of: - Add such files...
The rule of thumb: if "Find All References" for the `Foo` export only returns itself in your IDE, Knip won't be able to find other refs either. Knip covers more...
@AndreaPontrandolfo Does "Find all references" on the exported component find usages? Knip finds this the examples of https://knip.dev/guides/handling-issues#external-libraries But not the pattern from the OP: ```ts const Component = lazyImport(()...
Interesting. Assuming you've tried `--include-libs`, this might be a bug or solvable in Knip. If you could create minimal repro I might be able to fix it.
It's not enabled by default, because what's required for this makes Knip pretty slow especially in larger projects. Not sure how to "auto opt-in", but better docs/discoverability would help for...
> I'd like to tell Knip that these are usages, ideally with my own plugin. FWIW these cases aren't non-deterministic, they are strictly and correctly typed, but defeat the tool...
Going to close this issue. Feel free to open a new one, and take the following into account: - Some dynamic patterns are too hard to find, even for TypeScript...
Thanks @weilbith! I didn't know about `.git/info/exclude`, that looks useful indeed. For now, you could consider using a dynamic `knip.ts`, read `.git/info/exclude`, and its items to knip `ignore` patterns (or...
Thanks for sharing your solution! Feel free to give this a shot. That part of the code is here: https://github.com/webpro/knip/blob/main/packages/knip/src/util/globby.ts#L59