Currently, Knip has the following config properties:
Here, "ignore" really means "ignoreFiles", but that is not really clear from the name alone. Even though this seems like a minor quibble with the tool, it is a cognitive hurdle to use the tool properly.
I consider myself to be a veteran user of Knip. However, today, I started with the following config:
export default {
ignoreBinaries: [ "tsx" ],
ignoreDependencies: [ "complete-lint" ],
};
I needed to change this config to ignore a new file. So, I naturally tried adding a "ignoreFiles" option, forgetting that it actually supposed to be called "ignore", and then Knip failed to work properly, and let to some frustrating time wasted. If I am being frustrated as a veteran user, then surely other people who are not already familiar with Knip will also encounter difficulties with this.
Since this would be a breaking change, we could start by allowing both "ignore" and "ignoreFiles" interchangeably. And then we could provide a "hint" for people to rename it. And then you could finally remove "ignore" in some future major version.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too