Registry / testing / ng-lint-report

ng-lint-report

JSON →
library0.2.0jsnpmunverified

Generates HTML reports from Angular CLI lint JSON output (0.2.0). Supports both TSLint and ESLint outputs. No active development; last release 2021. Simpler than alternatives like angular-eslint's built-in formatter — just converts JSON to a standalone HTML file.

npm install ng-lint-report
INSTALL
IMPORT
SIG · NG-LINT-REPORT
N
ng-lint-report
testingjavascriptv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default (CLI)
npx ng-lint-report --jsonfile path/to/output.json
const report = require('ng-lint-report')
Package is a CLI tool; no programmatic API. Use via npx or npm scripts.
CLI as npm script
"report": "ng-lint-report --jsonfile jsonOutput.json"
"report": "node ng-lint-report"
Must provide --jsonfile argument. Script expects JSON from Angular lint with --format json.

Generates an HTML report from Angular lint JSON output via npm scripts.

// package.json (add to scripts): "scripts": { "lint": "ng lint --format json --silent > jsonOutput.json", "report": "ng-lint-report --jsonfile jsonOutput.json", "ng-lint": "npm run lint && npm run report" } // Then run: npm run ng-lint // Report saved to ./ng-lint-report/report.html (default)
ng-lint-report --version
Debug
Known issues
deprecatedAngular 13+ uses ESLint instead of TSLint; JSON output format may differ.
fix
Ensure lint command outputs valid JSON with message array; test with your Angular version.
affects: >=13.0
gotchaSilent flag may hide lint errors. If --silent is used, exit code is always 0 even on lint failures.
fix
Consider omitting --silent or checking exit code separately. Use '|| true' after lint command to continue.
affects: >=0.0
deprecatedTSLint is deprecated; JSON output from TSLint has different shape than ESLint.
fix
If using ESLint, ensure JSON output has 'messages' array per file. Optionally switch to an ESLint-specific reporter.
affects: >=0.2.0
gotchaReport only includes lint results from the JSON file; does not parse stdout or stderr.
fix
Pipe lint output to file as shown; ensure file is valid JSON.
affects: >=0.0
Errors
Common errors & fixes
Error: Cannot find module 'ng-lint-report'
Missing local install; using require instead of npx.
fix
Install as dev dependency: npm install --save-dev ng-lint-report; then run via npx or npm scripts.
ENOENT: no such file or directory, open '.../jsonOutput.json'
JSON file not found at specified path.
fix
Ensure --jsonfile path is relative to project root or use absolute path. Example: --jsonfile ./reports/lint-results.json
SyntaxError: Unexpected token < in JSON at position 0
Lint output contains HTML or error text instead of JSON.
fix
Use --format json flag with ng lint; ensure no other messages printed to stdout. Remove --silent temporarily to debug.
Upgrade
Version history
0.2.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
ng-lint-report — npm install ng-lint-report · libregistry