Registry / testing / deplint

deplint

JSON →
library1.1.3jsnpmunverified

DepLint (v1.1.3) is a lightweight CLI tool that checks that all require/import statements in your JavaScript/TypeScript code are listed as dependencies in package.json. It scans declared file patterns and verifies that every module referenced exists in the project's dependency tree. Unlike similar tools (e.g., dependency-check, eslint-plugin-import), it is unopinionated about module resolution and focuses solely on dependency declaration completeness. It requires a custom 'deplint' key in package.json to configure file patterns and top-level module directories. Release cadence is low; last release was 2019. No known alternatives with identical configuration style.

npm install deplint
INSTALL
IMPORT
SIG · DEPLINT
D
deplint
testingjavascriptv1.1.3
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.

deplint (CLI)
npx deplint
npm run deplint
deplint is a CLI tool, not a library. Use npx or global install.
deplint module
const deplint = require('deplint')
import deplint from 'deplint'
The package does not export a default ES module; use CommonJS require.
deplint types
import { DeplintOptions } from 'deplint' // if types exist
const { DeplintOptions } = require('deplint')
TypeScript types may not be bundled; check @types/deplint or declare manually.

Shows how to configure deplint in package.json with scanned files and modules, then run it to catch missing dependencies.

// package.json { "name": "my-project", "scripts": { "lint:deplint": "deplint" }, "deplint": { "files": ["src/**/*.js"], "modules": ["src/"] }, "dependencies": { "lodash": "^4.17.21" } } // src/index.js const _ = require('lodash'); // OK const foo = require('nonexistent'); // flagged by deplint
deplint --version
Debug
Known issues
gotchaThe 'modules' field is required and must be an array of directories that are top-level sub-components.
fix
Set 'modules' to an array containing the root of your source (e.g., ["src"]), even if you have no sub-components.
affects: >=1.0.0
gotchadepLint only checks that imported modules exist as dependencies; it does not validate semver ranges or unused dependencies.
fix
Use complementary tools like 'npm-check' or 'depcheck' for unused or mismatched versions.
affects: >=1.0.0
gotchaGlob patterns in 'files' are not recursive by default; '**' must be used for deep scans.
fix
Use 'src/**/*.js' instead of 'src/*.js' to scan nested folders.
affects: >=1.0.0
deprecatedNo new releases since 2019; the tool is considered feature-stable.
fix
Evaluate if you need a more actively maintained alternative.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Module 'xxx' is not listed in package.json dependencies
An import or require references a module not present in package.json dependencies (or devDependencies, if configured).
fix
Add the module to package.json dependencies or devDependencies.
TypeError: Cannot read property 'files' of undefined
The 'deplint' key in package.json is missing or has no 'files' property.
fix
Add a 'deplint' key to package.json with a 'files' array.
Upgrade
Version history
1.1.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
6
Resources
deplint — npm install deplint · libregistry