{"id":25166,"library":"deplint","title":"deplint","description":"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.","status":"maintenance","version":"1.1.3","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/jviotti/deplint","tags":["javascript"],"install":[{"cmd":"npm install deplint","lang":"bash","label":"npm"},{"cmd":"yarn add deplint","lang":"bash","label":"yarn"},{"cmd":"pnpm add deplint","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"deplint is a CLI tool, not a library. Use npx or global install.","wrong":"npm run deplint","symbol":"deplint (CLI)","correct":"npx deplint"},{"note":"The package does not export a default ES module; use CommonJS require.","wrong":"import deplint from 'deplint'","symbol":"deplint module","correct":"const deplint = require('deplint')"},{"note":"TypeScript types may not be bundled; check @types/deplint or declare manually.","wrong":"const { DeplintOptions } = require('deplint')","symbol":"deplint types","correct":"import { DeplintOptions } from 'deplint' // if types exist"}],"quickstart":{"code":"// package.json\n{\n  \"name\": \"my-project\",\n  \"scripts\": {\n    \"lint:deplint\": \"deplint\"\n  },\n  \"deplint\": {\n    \"files\": [\"src/**/*.js\"],\n    \"modules\": [\"src/\"]\n  },\n  \"dependencies\": {\n    \"lodash\": \"^4.17.21\"\n  }\n}\n\n// src/index.js\nconst _ = require('lodash'); // OK\nconst foo = require('nonexistent'); // flagged by deplint","lang":"javascript","description":"Shows how to configure deplint in package.json with scanned files and modules, then run it to catch missing dependencies."},"warnings":[{"fix":"Set 'modules' to an array containing the root of your source (e.g., [\"src\"]), even if you have no sub-components.","message":"The 'modules' field is required and must be an array of directories that are top-level sub-components.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use complementary tools like 'npm-check' or 'depcheck' for unused or mismatched versions.","message":"depLint only checks that imported modules exist as dependencies; it does not validate semver ranges or unused dependencies.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use 'src/**/*.js' instead of 'src/*.js' to scan nested folders.","message":"Glob patterns in 'files' are not recursive by default; '**' must be used for deep scans.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Evaluate if you need a more actively maintained alternative.","message":"No new releases since 2019; the tool is considered feature-stable.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'2019':92 'altern':95 'cadenc':86 'check':10,49 'cli':7 'code':18 'complet':66 'configur':76,98 'custom':70 'declar':27,65 'depend':22,41,48,64 'dependency-check':47 'deplint':1,2,71 'directori':84 'e.g':46 'eslint':51 'eslint-plugin-import':50 'everi':33 'exist':36 'file':28,77 'focus':61 'ident':97 'import':53 'javascript':100 'javascript/typescript':17 'key':72 'known':94 'last':89 'level':82 'lightweight':6 'list':20 'low':88 'modul':34,58,83 'package.json':24,74 'pattern':29,78 'plugin':52 'project':39 'referenc':35 'releas':85,90 'requir':68 'require/import':13 'resolut':59 'scan':26 'similar':44 'sole':62 'statement':14 'style':99 'tool':8,45 'top':81 'top-level':80 'tree':42 'unlik':43 'unopinion':56 'v1.1.3':3 'verifi':31","created_at":"2026-05-01T13:43:20.866664+00:00","updated_at":"2026-05-01T13:43:20.866664+00:00","problems":[{"fix":"Add the module to package.json dependencies or devDependencies.","cause":"An import or require references a module not present in package.json dependencies (or devDependencies, if configured).","error":"Error: Module 'xxx' is not listed in package.json dependencies"},{"fix":"Add a 'deplint' key to package.json with a 'files' array.","cause":"The 'deplint' key in package.json is missing or has no 'files' property.","error":"TypeError: Cannot read property 'files' of undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"deplint","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/jviotti/deplint","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/deplint","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}