Hello π
Firstly thanks for your work on this project, it's been super useful and has helped a lot with some recent refactoring work I've done. π
One thing I noticed with the configuration is that it can be a little difficult to scan with the magic !
suffix used for denoting a production entry file. So I found myself writing a couple of helper functions:
import type { KnipConfig } from 'knip';
const config: KnipConfig = {
entry: [
production('services/**/index.ts'),
development('services/**/integration.ts'),
],
};
export default config;
function production(file: string): string {
return `${file}!`;
}
function development(file: string): string {
return file;
}
Even though these functions are not so complex I find that the "tag" applied to the string makes the configuration much more self-documenting. A new developer to the project will most likely wonder what !
means at the end of a file glob and spend some time looking for this in the documentation.
I was wondering if you would be amenable to adding these helpers to the project itself? Perhaps a not
function could work for a leading !
too, though I think !path/to/files/*.ts
is much more of a standard pattern these days. π
Thanks!
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