Skip to content

Expose formatters from either a separate package or the CLI package #2467

@sennyeya

Description

@sennyeya

User story.
As a developer who wants to use Spectral in JS/TS, I can do create custom formatting, so that I can format my text output from an internal command without subshelling out to spectral-cli.

Is your feature request related to a problem?
I'm looking to use the existing formatters in sepctral-cli in Javascript but cannot as they are not exported from the cli package.

Describe the solution you'd like
Expose the formatters from their own package @stoplight/spectral-formatters. Alternatively, they could be exposed from the CLI, but would prefer their own package.

Additional context
I'm happy to submit a PR, this should be pretty straightforward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions