@dry-lint/dry-lint
v3.0.0
Published
Core singleton registry and shared utilities for Dry Lint plugins.
Readme
@dry-lint/dry-lint
The core engine and registry for dry-lint.
Provides the singleton extractor registry, structural similarity algorithms, and ts-morph project — powering all official plugins and the CLI.
Install
You usually don’t install @dry-lint/dry-lint directly.
It’s included automatically when you install the CLI or any official plugins.
Example:
# Example: TypeScript + Zod plugins + CLI
bun add -D @dry-lint/cli @dry-lint/typescript @dry-lint/zodThe CLI depends on @dry-lint/dry-lint under the hood.
How it works
@dry-lint/dry-lint exposes the core APIs:
import { registerExtractor, findDuplicates } from '@dry-lint/dry-lint';
registerExtractor((filePath, fileText) => {
// Return an array of declarations for this file
return [];
});
const groups = await findDuplicates(['src/**/*.ts'], { threshold: 0.9 });Plugins use registerExtractor to plug in domain-specific parsers.
The CLI and custom Node scripts use findDuplicates to orchestrate extraction, grouping, and output.
What replaced @dry-lint/core?
- The old
@dry-lint/coreis fully merged into this package. - One singleton registry, one
ts-morphproject, no duplicate states. - All plugins and the CLI now share the same stable core.
If you see any instructions to install @dry-lint/core, just use @dry-lint/dry-lint instead.
Resources
License
MIT — see LICENSE.
