Coder Social home page Coder Social logo

pva's Introduction

pva

OpenAPI linter.

Usage example

Install

npm install pva

Usage

$ pva <files...>

Config

Whilst pva comes with a default configuration, you can configure it by providing options using one of these methods:

  • A pva property in your package.json
  • A .pvarc file in either JSON or YAML
  • A .pvarc.json, .pvarc.yaml, .pvarc.yml, .pvarc.js or .pvarc.cjs file
  • A pva.config.js or pva.config.cjs file

Configuring rules

Each rule can be configured with an alert level of either error, warning, info or hint. An error will cause pva to finish with an exit code of 1.

To configure any sort of Spectral rule, specify them within spectral.rules of the configuration. For example, to configure the no-eval-in-markdown, use this configuration:

{
	"spectral": {
		"rules": {
			"no-eval-in-markdown": "error"
		}
	}
}

To configure an IBM validator rule, have the top level property be the spec and then the second level property be the category. For example, to configure the unused_tag property which has a spec of shared and a category of operations, use this configuration:

{
	"shared": {
		"operations": {
			"unused_tag": "warning"
		}
	}
}

Credits

CLI aesthetics inspired by xo.

pva's People

Contributors

richienb avatar

Stargazers

Sebastián Puentes avatar  avatar Erfan Hanifezade avatar

Watchers

James Cloos avatar  avatar  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.