knip
knip copied to clipboard
Support for external plugins
I'd like to write my own plugin for a package which pretty much only I use. Adding such a plugin to knip itself seems impractical to me and would make it harder for me to make incremental updates to it.
Ideally I'd want to do something like this:
import type { KnipConfig } from 'knip';
import { MyKnipPlugin } from 'my-library';
const config: KnipConfig = {
entry: ['src/index.ts'],
project: ['src/**/*.ts'],
customPlugins: [
MyKnipPlugin(/* my plugin options */),
],
};
export default config;
Sorry, currently not having the bandwidth to increase the API surface area of Knip. Same for programmatical usage of Knip itself. It would mean I'd have to support more things, that can break. If I could work more on Knip I'd love to support this as well, but currently it's not manageable.