Skip to content

Commit

Permalink
convert examples in README.md to json to remove extraneous commas
Browse files Browse the repository at this point in the history
  • Loading branch information
carlansley committed Apr 3, 2024
1 parent e3802ca commit 0e649d4
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,30 @@ Spectral Config should be installed as a dev dependency:

Once installed, add a file named `.spectral.json` to the root of your project. This file should extend Spectral Config:

```jsonc
```json
{
"extends": ["@checkdigit/spectral-config"],
"extends": ["@checkdigit/spectral-config"]
}
```

Also add the following to your `package.json` to run Spectral:

```jsonc
"scripts": {
// ...
"lint:openapi": "spectral lint src/**/swagger.yml",
```json
{
"scripts": {
"lint:openapi": "spectral lint src/**/swagger.yml"
}
}
```

To include Spectral in your project's CI/CD pipeline, add the following to your `package.json`:

```jsonc
"scripts": {
// ...
"ci:lint": "... && npm run lint:openapi",
```json
{
"scripts": {
"ci:lint": "... && npm run lint:openapi"
}
}
```

### Plugins
Expand Down

0 comments on commit 0e649d4

Please sign in to comment.