JSON reporter for ESLint that outputs lint results as a JSON array. Version 2.0.0, stable, low maintenance. Key differentiator: simplifies piping ESLint output to other tools (e.g., CI, custom scripts) by using standard JSON format. No breaking changes since initial release. Commonly used in build pipelines. Lightweight with zero dependencies.
npm install eslint-jsonVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to programmatically use eslint-json to format ESLint results as JSON.
Use report.results (array) instead of report (object).
const output = JSON.parse(formatter(results, config));
Use absolute path or 'node_modules/eslint-json'.
npm install --save-dev eslint-json and use full path: eslint --format=./node_modules/eslint-json file.js
Use require('eslint-json') and call as function: formatter(results, config);Use report.results (the array) as first argument.
No dependency data recorded yet.