{"id":17022,"library":"jsonlint-cli","title":"JSONLint CLI","description":"jsonlint-cli is a command-line interface wrapper for the underlying jsonlint library, designed to enhance JSON validation workflows beyond the basic functionality offered by jsonlint itself. While it leverages jsonlint for core JSON validity checking and local schema validation, this CLI tool significantly expands capabilities. Key differentiators include support for glob expansion to lint multiple files (e.g., `**/*.json`), remote JSON schema validation, and adherence to JSON Schema Draft-04. It also introduces an eslint-style configuration system through `.jsonlintrc` and `.jsonlintignore` files for project-specific settings and file exclusions. The package's current stable version is 1.0.1, released in March 2016. Its release cadence is effectively dormant, indicating it is no longer actively maintained or developed.","status":"abandoned","version":"1.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/marionebl/jsonlint-cli","tags":["javascript","jsonlint","cli","jsonschema"],"install":[{"cmd":"npm install jsonlint-cli","lang":"bash","label":"npm"},{"cmd":"yarn add jsonlint-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add jsonlint-cli","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core JSON parsing and validation engine.","package":"jsonlint","optional":false},{"reason":"Used for glob pattern matching.","package":"minimatch","optional":false}],"imports":[{"note":"jsonlint-cli is a command-line interface tool and is not intended for direct JavaScript or TypeScript import/require statements. It is executed directly in the shell after global installation.","symbol":"jsonlint-cli (command)","correct":"npm install -g jsonlint-cli\n# Then use the command"}],"quickstart":{"code":"npm install -g jsonlint-cli\n\n# Validate a single JSON file\njsonlint-cli path/to/your-config.json\n\n# Validate multiple JSON files using glob patterns and a remote schema\njsonlint-cli --validate http://json.schemastore.org/package --ignore 'node_modules/**/*.json' '**/package.json'\n\n# Lint JSON from stdin and pretty-print it\ncat package.json | jsonlint-cli --pretty --indent 4\n\n# Example with a .jsonlintrc config file\n# content of .jsonlintrc:\n# {\n#   \"validate\": \"http://json.schemastore.org/package\",\n#   \"ignore\": [\"dist/**/*.json\"],\n#   \"indent\": 2,\n#   \"pretty\": true\n# }\njsonlint-cli '**/*.json'","lang":"bash","description":"Demonstrates global installation, basic file validation, globbing with remote schema validation, and piping from stdin."},"warnings":[{"fix":"There is no direct replacement for the `--quiet` flag. Users must pipe `jsonlint-cli` output to `grep`, `awk`, or similar utilities if they need to suppress error messages.","message":"The `--quiet` flag was removed in version 1.0.0. Errors are now always printed to stderr regardless of other options.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Consider migrating to actively maintained alternatives for JSON linting and schema validation, such as `ajv-cli` for schema validation or `prettier --parser json` for formatting.","message":"This package has been abandoned since March 2016, with no further releases or active development. It may contain unpatched security vulnerabilities or compatibility issues with newer Node.js versions or JSON Schema drafts.","severity":"gotcha","affected_versions":">=1.0.1"},{"fix":"Explicitly test your `.jsonlintrc` and `.jsonlintignore` files with `jsonlint-cli` on various target files to confirm the expected behavior. Use `--ignore` flag directly if configuration files are problematic.","message":"Configuration precedence for `.jsonlintrc` and `.jsonlintignore` files might be less intuitive in complex directory structures, potentially leading to ignored files being linted or valid files being excluded. While a fix for precedence was implemented in v1.0.1, it's still a point to verify.","severity":"gotcha","affected_versions":"<=1.0.1"}],"env_vars":null,"last_verified":"2026-04-22T00:00:00.000Z","next_check":"2026-07-21T00:00:00.000Z","problems":[{"fix":"Run `npm install -g jsonlint-cli` to install the package globally, or ensure the npm global bin directory is included in your shell's PATH environment variable.","cause":"The jsonlint-cli package was not installed globally or is not in your system's PATH.","error":"command not found: jsonlint-cli"},{"fix":"Provide a file path or glob pattern (e.g., `jsonlint-cli mydata.json` or `jsonlint-cli '**/*.json'`) or pipe content (e.g., `echo '{\"key\":\"value\"}' | jsonlint-cli`).","cause":"jsonlint-cli requires either file paths/globs as arguments or JSON content piped to stdin to perform validation.","error":"No files specified and no input from stdin."},{"fix":"Review the JSON file or input string for syntax errors such as missing commas, unclosed brackets, or incorrect string escaping. Tools like VS Code's built-in JSON validator can help identify issues.","cause":"The input JSON is syntactically invalid, causing the underlying jsonlint parser to fail.","error":"JSON parsing error: Unexpected token ..."}],"ecosystem":"npm","meta_description":null}