{"id":25812,"library":"jsonlint-tree","title":"jsonlint-tree","description":"A recursive directory JSON validator using jsonlint. Version 2.0.1 requires Node >=18.17, removes extra dependencies from v1, and outputs a summary of valid/invalid files. It differs from other JSON linters by operating recursively on directories rather than single files, providing a clear CLI output with counts. Maintained by educastellano.","status":"active","version":"2.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/educastellano/jsonlint-tree","tags":["javascript","json","lint","cli","validation"],"install":[{"cmd":"npm install jsonlint-tree","lang":"bash","label":"npm"},{"cmd":"yarn add jsonlint-tree","lang":"bash","label":"yarn"},{"cmd":"pnpm add jsonlint-tree","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used for parsing and validating JSON files","package":"jsonlint","optional":false}],"imports":[{"note":"CLI tool; runs directly via npx or global install. No programmatic API.","wrong":"npm run jsonlint-tree","symbol":"jsonlint-tree","correct":"npx jsonlint-tree <directory>"},{"note":"Package is CLI-only; you cannot import it programmatically.","wrong":"const lint = require('jsonlint-tree')","symbol":"require","correct":"const jsonlint = require('jsonlint')"},{"note":"No default export; use jsonlint directly for file validation.","wrong":"import tree from 'jsonlint-tree';","symbol":"import","correct":"import jsonlint from 'jsonlint';"}],"quickstart":{"code":"npx jsonlint-tree ./examples","lang":"javascript","description":"Shows how to run jsonlint-tree on a directory, outputting valid/invalid file counts."},"warnings":[{"fix":"Upgrade Node.js to >=18.17 or use version 1.x for older Node.","message":"Node version requirement changed to >=18.17 in version 2.0.0","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Update to version 2.0.1 with npm install jsonlint-tree@latest","message":"Version 1.x is deprecated; upgrade to 2.x for reduced dependencies and modern Node support.","severity":"deprecated","affected_versions":"<2.0.0"},{"fix":"Use child_process.spawn or exec to run the CLI from within Node scripts.","message":"jsonlint-tree is a CLI tool only; it cannot be imported programmatically. Some users attempt to require('jsonlint-tree') and get undefined.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install globally or use npx; do not import it in code.","cause":"Attempting to require or import the package programmatically.","error":"Cannot find module 'jsonlint-tree'"},{"fix":"Run: npx jsonlint-tree <directory-path>","cause":"Running the command without specifying a directory.","error":"Error: jsonlint-tree requires at least one argument"},{"fix":"Provide a valid directory path.","cause":"Specified directory does not exist.","error":"ENOENT: no such file or directory, scandir './nonexistent'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}