Socket
Book a DemoInstallSign in
Socket

@stoplight/spectral-formatters

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stoplight/spectral-formatters

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

latest
Source
npmnpm
Version
1.5.0
Version published
Weekly downloads
248K
-5.21%
Maintainers
1
Weekly downloads
 
Created
Source

@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)

  • json
  • stylish
  • junit
  • html
  • text
  • teamcity
  • markdown (example: markdown_example.md)

Node.js only

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

FAQs

Package last updated on 22 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts