You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Knip has the following config properties:
ignore
ignoreBinaries
ignoreDependencies
ignoreExportsUsedInFile
ignoreMembers
ignoreUnresolved
ignoreWorkspaces
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.
My User Story
I consider myself to be a veteran user of Knip. However, today, I started with the following config:
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.
Recommendation
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.
The text was updated successfully, but these errors were encountered:
While I agree it might be confusing, what ignore really does is exclude any type of issue for matching files. So not only unused files are filtered out by this setting, but also unlisted dependencies or unresolved imports.
So I guess what you might be asking for is a new ignoreFiles option to exclude matching files from the unused files category in the report specifically.
Suggest an idea for Knip
Introduction
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.
My User Story
I consider myself to be a veteran user of Knip. However, today, I started with the following config:
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.
Recommendation
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.
The text was updated successfully, but these errors were encountered: