webpro-nl / knip

✂️ Find unused files, dependencies and exports in your JavaScript and TypeScript projects. Knip it before you ship it!
https://knip.dev
ISC License
7.03k stars 174 forks source link

🔄 False positive: unresolved imports for junitProperties.js and junitTestCaseProperties.js #841

Closed schnuri-schnuri closed 1 day ago

schnuri-schnuri commented 3 days ago

Prerequisites

Reproduction url

https://stackblitz.com/edit/github-hnquqz

Reproduction access

Good version

5.36.7

Bad version

5.37.0

Description of the regression

Knip complains about "unresolved imports" errors regarding junitProperties.js and junitTestCaseProperties.js. Until know, jest-junit worked fine without these files.

See also my comment to the PR

PS: Thank you for this awesome tool. I convinced my colleagues to ditch ESlint for this and it's a breeze to use.

webpro commented 1 day ago

@schnuri-schnuri @tryggvigy Should be fixed now, could you please confirm by trying it in your project(s)? Would be great before I release-it. With a package manager like so:

npm i -D https://pkg.pr.new/knip@4657618
webpro commented 1 day ago

PS: Thank you for this awesome tool. I convinced my colleagues to ditch ESlint for this and it's a breeze to use.

Well thanks, but please understand Knip does not have any overlap in functionality with ESLint:

schnuri-schnuri commented 1 day ago

Yes, sorry, I got it mixed up! We are also migrating away from ESLint at the same time, but to a different tool.

Well, we found a lot of issues in the code base thanks to Knip, which is very nice! A it replaced depcheck, at least.

Thanks for the quick fix. I will have a look at it tomorrow morning (🇪🇺).

eMerzh commented 1 day ago

It looks good from here, have the issue with latest version, but not with the one you published 👍

schnuri-schnuri commented 1 day ago

Yes, works for me as well. Thank you :)

webpro commented 1 day ago

:rocket: This issue has been resolved in v5.37.2. See Release 5.37.2 for release notes.

Using Knip in a commercial project? Please consider becoming a sponsor.

webpro commented 1 day ago

Let's go then. Thanks y'all!