@stoplight/spectral

v6.0.0-alpha2
A flexible object linter with out of the box support for OpenAPI v2 and v3.
json linter linter json validator validator OpenAPI Swagger schema API

cli

node -r ts-node/register -r tsconfig-paths/register src/cli/index.ts

lint

yarn lint.prettier && yarn lint.eslint && yarn lint.changelog

test

jest --silent

build

tsc -p ./tsconfig.build.json

prelint

tsc --noEmit

prepare

husky install

pretest

yarn generate-assets

lint.fix

yarn lint.prettier --write && yarn lint.eslint --fix

prebuild

yarn build.clean && copyfiles -u 1 "src/rulesets/{oas,asyncapi}/**/*.json" dist && copyfiles -u 1 "src/rulesets/{oas,asyncapi}/**/*.json" ./ && yarn copy.html-templates

cli:debug

node -r ts-node/register -r tsconfig-paths/register --inspect-brk src/cli/index.ts

postbuild

yarn build.functions && yarn generate-assets

test.prod

yarn build && yarn lint && yarn test.karma && yarn test --coverage --maxWorkers=2

test.karma

karma start

test.watch

yarn test --watch

build.clean

rimraf ./coverage && rimraf ./dist && rimraf ./rulesets && rimraf ./__karma__/__fixtures__

lint.eslint

eslint --cache --cache-location .cache/ --ext=.js,.ts src test-harness scripts

test.update

yarn test --updateSnapshot

build.binary

pkg . --output ./binaries/spectral

test.harness

jest -c ./test-harness/jest.config.js

lint.prettier

prettier --ignore-path .eslintignore --check {src,test-harness}/**/*.{json,yaml} docs/**/*.md README.md

pretest.karma

node ./scripts/generate-karma-fixtures.js && yarn pretest

inline-version

node ./scripts/inline-version.js

lint.changelog

kacl lint

build.functions

rollup -c

generate-assets

ts-node --compiler-options {\"module\":\"CommonJS\"} ./scripts/generate-assets.ts

prebuild.binary

yarn build

copy.html-templates

copyfiles -u 1 "./src/cli/formatters/html/*.html" "./dist/"

postbuild.functions

copyfiles -u 1 "dist/rulesets/{oas,asyncapi}/functions/*.js" ./
npm i @stoplight/[email protected]

Metadata

Downloads