JSPM

@stoplight/spectral-formatters

1.5.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 305954
  • Score
    100M100P100Q198962F
  • License Apache-2.0

Package Exports

  • @stoplight/spectral-formatters
  • @stoplight/spectral-formatters/utils

Readme

@stoplight/spectral-formatters

This project exposes the available formatters from the CLI for users that perform custom validation through Javascript.

Usage

import { pretty } from "@stoplight/spectral-formatters";

const spectral = new Spectral();
// ...
const result = await spectral.run(document);

// You can also filter the results here.
const output = pretty(result);

console.error(output);
// ...

Available formatters

Common (available both in the browser and Node.js)

Node.js only

  • pretty
  • github-actions
  • sarif
  • gitlab
  • code-climate