Skip to content
reaatechREAATECH

@reaatech/agents-markdown-reporter

npm v1.0.0

Output reporters for lint and validation results that produce console, JSON, HTML, and GitHub-flavored Markdown reports. Exports a set of functions (`reportLintResult`, `reportJsonLintResult`, `writeHtmlReport`, `reportMarkdownLint

@reaatech/agents-markdown-reporter

npm version License: MIT CI

Status: Pre-1.0 — APIs may change in minor versions. Pin to a specific version in production.

Multi-format output reporters for lint and validation results. Supports console (ANSI-colorized), JSON (machine-readable), HTML (interactive dashboard), and Markdown (GitHub-flavored) formats.

Installation

terminal
npm install @reaatech/agents-markdown-reporter
# or
pnpm add @reaatech/agents-markdown-reporter

Feature Overview

  • Console output — ANSI-colorized terminal output with severity icons, line references, and suggestions
  • JSON output — Machine-readable LintJsonOutput / ValidationJsonOutput with schema version and timestamps
  • HTML reports — Self-contained interactive dashboard with inline CSS, suitable for CI artifacts
  • Markdown reports — GitHub-flavored tables and bullet lists for PR comments
  • Disambiguated exports — Each format has uniquely named functions to avoid collisions

Quick Start

typescript
import {
  reportLintResult,
  reportHtmlLintResult,
  reportJsonLintResult,
  reportMarkdownLintResult,
  generateHtmlReport,
  writeHtmlReport,
} from "@reaatech/agents-markdown-reporter";
import {
  reportValidationResult,
  reportJsonValidationResult,
  reportMarkdownValidationResult,
} from "@reaatech/agents-markdown-reporter";
 
// Console output (colorized, for CLI users)
console.log(reportLintResult(lintResult));
 
// JSON output (for CI/CD pipelines)
process.stdout.write(reportJsonLintResult(lintResults));
 
// HTML report to file (for build artifacts)
await writeHtmlReport(results, "./lint-report.html", { title: "Lint Results" });
 
// Markdown report (for GitHub PR comments)
const md = reportMarkdownLintResult(lintResult);

API Reference

Console Reporter

FunctionDescription
reportLintResult(result, options?)Colorized lint output with severity counts
reportValidationResult(result)Colorized validation output
reportScaffoldResult(created, skipped, errors)Scaffold operation summary

JSON Reporter

typescript
interface LintJsonOutput {
  schemaVersion: string;
  path: string;
  valid: boolean;
  errorCount: number;
  warningCount: number;
  infoCount: number;
  fixableCount: number;
  findings: Finding[];
  timestamp: string;
}
 
interface ValidationJsonOutput {
  schemaVersion: string;
  path: string;
  type: "agents" | "skill";
  valid: boolean;
  errorCount: number;
  warningCount: number;
  suggestionCount: number;
  errors: Finding[];
  warnings: Finding[];
  suggestions: Finding[];
  timestamp: string;
}
FunctionDescription
reportJsonLintResult(results)Serialize lint results to JSON string
reportJsonValidationResult(results)Serialize validation results to JSON string
lintToJson(result)Convert to LintJsonOutput object
validationToJson(result)Convert to ValidationJsonOutput object

HTML Reporter

FunctionDescription
reportHtmlLintResult(results)Generate full HTML document
generateHtmlReport(results, options?)Generate HTML with optional title
writeHtmlReport(results, outputPath, options?)Write HTML to file

Markdown Reporter

FunctionDescription
reportMarkdownLintResult(results)Generate markdown for one or more lint results
reportMarkdownValidationResult(results)Generate markdown for one or more validation results
reportLintAsMarkdown(result)Single-result markdown table + bullet list
reportValidationAsMarkdown(result)Single-result markdown table + bullet list

Format Reference

FormatPrimary ExportUse Case
ConsolereportLintResultCLI output
JSONreportJsonLintResultCI/CD pipelines, programmatic consumers
HTMLreportHtmlLintResult / writeHtmlReportBuild artifacts, interactive review
MarkdownreportMarkdownLintResultGitHub PR comments, changelog entries

License

MIT