We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
See description
. ├── package.json ├── package-lock.json └── server.js
package.json
{ "name": "foo", "version": "1.0.0", "main": "index.js", "type": "module", "scripts": { "test": "knip" }, "dependencies": { "knip": "5.41.1" } }
[user@pc foo]$ npm test > [email protected] test > knip Unused files (1) server.js
The text was updated successfully, but these errors were encountered:
See https://docs.npmjs.com/cli/v10/configuring-npm/package-json#default-values
I'm guessing there's the same issue with index.js, although I have not tested (yet)
index.js
Sorry, something went wrong.
Interesting. But this is a default only to npm? Not sure how widely recognized this is.
You can add entry: ["server.js"] to your Knip config.
entry: ["server.js"]
The default entry file patterns are here: https://knip.dev/explanations/entry-files#default-entry-file-patterns - so index.js is picked up automatically.
I'd say pretty much any package manager that interfaces with package.json such as yarn, pnpm etc..
No branches or pull requests
Prerequisites
Reproduction url
See description
Reproduction access
Description of the issue
Foo
package.json
The text was updated successfully, but these errors were encountered: