Standalone package of ESLint's official `json-with-metadata` formatter. v9.0.1 is current stable. It outputs lint results as JSON including metadata (fix count). Released on the same cadence as ESLint. Useful for programmatic consumption or CI pipelines. No external dependencies. Ships TypeScript definitions. The only difference is it can be imported independently from the main `eslint` package.
npm install eslint-formatter-json-with-metadataNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use the formatter programmatically with ESLint. The second argument is the data object with metadata.
Switch to ES modules (type: module in package.json) or use dynamic import: const formatter = await import('eslint-formatter-json-with-metadata');Call formatter(results) instead of formatter(results, metadata). Use the same object for metadata if needed.
Always pass an array: formatter([result]) or formatter(results) where results is an array.
Run 'npm install eslint-formatter-json-with-metadata' and ensure import path is correct.
Use default import: import formatter from 'eslint-formatter-json-with-metadata';
Ensure results is an array of ESLint result objects with 'messages' property.
No dependency data recorded yet.