webpro-nl/knip

๐Ÿ”„ False positive: unresolved imports for junitProperties.js and junitTestCaseProperties.js

schnuri-schnuri opened this issue ยท 7 comments

Prerequisites

Reproduction url

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

Reproduction access

  • I've made sure the reproduction is publicly accessible

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.

@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

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:

  • ESLint is a file linter, and finds unused variables (that are not exported!)
  • Knip is a project linter, and finds unused exports

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 (๐Ÿ‡ช๐Ÿ‡บ).

It looks good from here, have the issue with latest version, but not with the one you published ๐Ÿ‘

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

๐Ÿš€ 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.

Let's go then. Thanks y'all!