Replies: 1 comment
-
The value of Knip isn't really done justice in the initial post. When actually running Knip and digging a bit into the reports the value is much better shown than through some static screenshots. This branch in my fork can be used to run |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there! I'm Lars, the creator of Knip that finds unused files, dependencies and exports. You can think of it as a project linter that goes beyond what ESLint does.
I've opened this discussion because I have used the Remix repository as a great test case for Knip, mainly because it's a mid-sized repository containing workspaces. In return, Knip's output might help your project become and stay cleaner, either during maintenance and/or refactorings, or automated in CI.
Here's some screenshots of Knip's output when ran from the
main
branch.The first is an analysis of the whole project to find dependencies that are unused or missing:
Note that many unused dependencies from the root
package.json
are duplicated in the workspace'spackage.json
where the dependency is actually used.The second shows an analysis of a single workspace to find unused exports and types:
Note that there might be false positives, I didn't manually verify each of them. This is just an impression, I think Knip can provide a lot of value to keep Remix clean and tidy. Obviously I'm also happy to share the configuration necessary to make this happen. In any case, this repository was helpful in the development of Knip, so thanks for that!
Please find the documentation of Knip at https://github.com/webpro/knip, but I'm here to answer any questions you might have. Have a great day!
Beta Was this translation helpful? Give feedback.
All reactions