knip
knip copied to clipboard
📘 Example of knip.config.ts?
Link
https://knip.dev/overview/configuration
Description of the issue
I read at https://knip.dev/overview/configuration:
By default, Knip will look for a configuration file with the following names: ...
knip.config.ts
But the page doesn't give any example of what that file should look like, or where to find the types of things that it should export. Is there an example somewhere?
I'm now wondering whether the docs are correct; when running the tool I see:
pnpm knip --help
-c, --config [file] Configuration file path (default: [.]knip.json[c], knip.js, knip.ts or package.json#knip)
pnpm knip --version
5.43.3
No mention of knip.config.ts
You're right, the path is currently very cumbersome: https://knip.dev/overview/configuration#configuration-options → https://knip.dev/reference/configuration#typescript → https://knip.dev/reference/dynamic-configuration
I'll fix that up soon (or feel free to open a PR!)
:rocket: This issue has been resolved in v5.46.1. See Release 5.46.1 for release notes.
Using Knip in a commercial project? Please consider becoming a sponsor.