Closed kachkaev closed 3 weeks ago
Kinda surprised we didn't do this yet :) Starting out with a simple sort tho:
a.js
b/d.ts
c.js
:rocket: This issue has been resolved in v5.34.3. See Release 5.34.3 for release notes.
Using Knip in a commercial project? Please consider becoming a sponsor.
Prerequisites
Reproduction url
https://codesandbox.io/p/devbox/mrk95r?migrateFrom=7cy572
Reproduction access
Description of the issue
π @webpro, glad to see the project rolling! I just configured knip in a new monorepo and noticed that the list of unused files was not sorted by path. As you can see from the reproduction,
gets printed by
pnpm knip
as:Itβd be great if the list was sorted in some consistent way. In the project I am trying to lint I get output like this:
Unsorted workspace names and intermixed modules/components are not the end of the world. But it would help if sibling files were shown next to each other so that it was a bit easier to review them.
Hope that it wonβt be too hard to fix this problem because unused files are printed synchronously at the end of the analysis rather than on the fly.
Thanks for knip, itβs very useful!