A formatter for webhint that outputs linting results as a JSON array. Version 1.6.0 is the latest stable release; the package sees infrequent updates. It is part of the webhint ecosystem, specifically designed to produce machine-readable output for integration with other tools. Unlike default formatters (e.g., stylish), this one returns raw JSON suitable for CI pipelines or custom processing. It depends on the hint package (peer dependency ^7.0.0) and ships TypeScript definitions.
npm install webhint-formatter-json-objectNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configuration and programmatic usage of the JSON object formatter with webhint.
Replace 'webhint-formatter-json-object' with 'json' (built-in) in .hintrc.
Wrap output in an object if needed: {"results": <array>}Ensure webhint peer dependency is ^7.0.0.
Do not attempt to pass arguments to the constructor.
Run 'npm install webhint-formatter-json-object --save-dev'
Use 'const JsonObjectFormatter = require('webhint-formatter-json-object').default;'Ensure the package is installed and the .hintrc formatters array contains the string exactly.