Git Product home page Git Product logo

vscode-spectral's Introduction

Spectral Linter for VS Code

The Spectral VS Code Extension brings the power of Spectral to your favorite editor.

Spectral is a flexible object linter with out of the box support for OpenAPI v2 and v3, JSON Schema, and AsyncAPI.

Features

  • Lint-on-save
  • Lint-on-type
  • Custom ruleset support (.spectral.json, .spectral.yaml, .spectral.yml or .spectral.js)
  • Intellisense for custom ruleset editing
  • Support for JSON and YAML input

screenshot

Requirements

  • Node.js ^12.21 or >=14.13
  • Visual Studio Code version 1.48 or higher.

Installation

Extension Settings

This extension contributes the following settings:

  • spectral.enable: Controls whether or not Spectral is enabled.
  • spectral.rulesetFile: Location of the ruleset file to use when validating. If omitted, the default is a .spectral.(json|yaml|yml) in the same folder as the document being validated. Paths are relative to the workspace. This can also be a remote HTTP url.
  • spectral.run: Run the linter on save (onSave) or as you type (onType).
  • spectral.validateFiles: An array of file globs (e.g., **/*.yaml) which should be validated by Spectral. If language identifiers are also specified, the file must match both in order to be validated. You can also use negative file globs (e.g., !**/package.json) here to exclude files.
  • spectral.validateLanguages: An array of language IDs (e.g., yaml, json) which should be validated by Spectral. If file globs are also specified, the file must match both in order to be validated.

Thanks

License

Apache-2.0

vscode-spectral's People

Contributors

mikeralphson avatar nulltoken avatar dependabot[bot] avatar tillig avatar p0lip avatar mnaumanali94 avatar nickheap2 avatar savage-alex avatar mkistler avatar philsturgeon avatar emiliosp avatar raleigh04 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.