@stoplight/spectral-formatters
TypeScript icon, indicating that this package has built-in type declarations

1.4.2 • Public • Published

@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

Readme

Keywords

none

Package Sidebar

Install

npm i @stoplight/spectral-formatters

Weekly Downloads

257,471

Version

1.4.2

License

Apache-2.0

Unpacked Size

78.4 kB

Total Files

78

Last publish

Collaborators

  • stoplight-spectral-bot