@cleeviox/knip
v0.1.5
Published
Knip configuration used on CleevioX projects
Downloads
2,406
Maintainers
Readme
KNIP
Knip configuration used on CleevioX projects
Installation
bun add --dev @cleeviox/knip knipUsage
All configurations are created with defineConfig(base, overrides?). It performs a shallow merge of the base and overrides, while appending the ignore, ignoreDependencies, and project arrays rather than overwriting them.
Monorepo Root
import { defineConfig, baseMonorepoRootConfig } from '@cleeviox/knip';
export default defineConfig(baseMonorepoRootConfig);Next.js Projects
import { defineConfig, baseNextjsConfig } from '@cleeviox/knip';
export default defineConfig(baseNextjsConfig);To extend a base config, pass overrides as the second argument:
import { defineConfig, baseNextjsConfig } from '@cleeviox/knip';
export default defineConfig(baseNextjsConfig, {
ignoreDependencies: ['my-extra-dep'],
ignore: ['src/generated/**'],
});You can also compose a fully custom config without a base:
import { defineConfig } from '@cleeviox/knip';
export default defineConfig({
project: ['src/**/*.ts'],
ignoreDependencies: ['some-dep'],
});Available Exports
| Export | Description |
|--------|-------------|
| defineConfig | Factory function — merges a base config with optional overrides, appending array fields |
| baseNextjsConfig | Base config for Next.js projects |
| baseMonorepoRootConfig | Base config for monorepo roots with workspace support |
| KnipConfigObject | TypeScript type for a knip configuration object |
