Registry / testing / typescript-dependency-lint

typescript-dependency-lint

JSON →
library1.2.1jsnpmunverified

A dependency graph linter for TypeScript projects that validates architectural boundaries via static analysis. Current stable version is 1.2.1, released with infrequent updates. It provides CLI-based analysis of import dependencies against configurable rules, supporting glob patterns and tsconfig integration. Differentiators: lightweight, focused solely on TypeScript dependency graph validation without additional build tooling.

npm install typescript-dependency-lint
INSTALL
IMPORT
SIG · TYPESCRIPT-DEPENDE
T
typescript-dependency-lint
testingjavascriptv1.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CLI
npx typescript-dependency-lint analyze "src/**/*.ts"
CLI is the primary interface; no programmatic API is exported.

Shows how to run the CLI with a config file to analyze TypeScript dependency graph, ignoring test files.

// No programmatic API. Use CLI. // Analyze dependencies in src/ npx typescript-dependency-lint \ --config '{"tsconfigPath": "./tsconfig.json", "ignore": ["**/*.spec.ts"]}' \ analyze "src/**/*.@(ts|vue)"
Debug
Known issues
gotchaConfig must be provided as escaped JSON string via --config flag; no config file support.
fix
Use --config with escaped JSON, e.g., --config '{"tsconfigPath": "./tsconfig.json"}'
affects: >=1.0.0
gotchaOnly 'analyze' command is implemented; 'lint' command is planned but not available.
fix
Use 'analyze' command; watch for future updates.
affects: >=1.0.0 <2.0.0
Errors
Common errors & fixes
Error: Cannot find module 'typescript'
TypeScript is not installed as a peer dependency, but runtime requires it.
fix
Run: npm install --save-dev typescript
SyntaxError: Unexpected token '...' in JSON at position 0
Config JSON string is not properly escaped when passed via CLI.
fix
Wrap config in single quotes and escape inner double quotes, e.g., --config '{"tsconfigPath": "./tsconfig.json"}'
Upgrade
Version history
1.2.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
typescript-dependency-lint — npm install typescript-dependency-lint · libregistry