Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Initial prettier formatting
d3e7a4379f6a3e5a94fc1e75cf3024c53acbb4ac
21 changes: 11 additions & 10 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ jobs:
run:
working-directory: doc
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: pnpm/action-setup@v4
with:
run_install: true
package_json_file: doc/package.json
- run: pnpm spectral
- run: pnpm lint
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: pnpm/action-setup@v4
with:
run_install: true
package_json_file: doc/package.json
- run: pnpm spectral
- run: pnpm lint
- run: pnpm check-format
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ Make modifications to `doc/specs/lichess-api.yaml`, and reload the page to see y
pnpm spectral
pnpm lint
```

### Format the yaml files

```shell
pnpm format
```
1 change: 1 addition & 0 deletions doc/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml
3 changes: 3 additions & 0 deletions doc/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"printWidth": 120
}
7 changes: 5 additions & 2 deletions doc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
"devDependencies": {
"@redocly/cli": "^1.27.2",
"@stoplight/spectral-cli": "^6.14.2",
"@stoplight/spectral-rulesets": "1.18.1"
"@stoplight/spectral-rulesets": "1.18.1",
"prettier": "3.5.2"
},
"scripts": {
"spectral": "spectral lint --fail-severity=warn specs/*.yaml",
"lint": "redocly lint specs/lichess-api.yaml",
"bundle": "redocly bundle specs/lichess-api.yaml --output public/openapi.yaml",
"build": "redocly build-docs specs/lichess-api.yaml --output public/index.html",
"serve": "redocly preview-docs specs/lichess-api.yaml --port 8089"
"serve": "redocly preview-docs specs/lichess-api.yaml --port 8089",
"format": "prettier . --write",
"check-format": "prettier . --check"
}
}
11 changes: 11 additions & 0 deletions doc/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions doc/specs/examples/tvFeedFen.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
value:
{
't': 'fen',
'd': { 'fen': '5rk1/6p1/p4q2/4p3/2p5/2P2bNQ/PP3P1P/1K1RR3 w - - 4 32', 'lm': 'h8g8', 'wc': 14, 'bc': 30 },
"t": "fen",
"d": { "fen": "5rk1/6p1/p4q2/4p3/2p5/2P2bNQ/PP3P1P/1K1RR3 w - - 4 32", "lm": "h8g8", "wc": 14, "bc": 30 },
}
28 changes: 14 additions & 14 deletions doc/specs/examples/tvFeedFirst.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
value:
{
't': 'featured',
'd':
"t": "featured",
"d":
{
'id': 'qVSOPtMc',
'orientation': 'black',
'players':
"id": "qVSOPtMc",
"orientation": "black",
"players":
[
{
'color': 'white',
'user': { 'name': 'lizen9', 'id': 'lizen9', 'title': 'GM' },
'rating': 2531,
'seconds': 60,
"color": "white",
"user": { "name": "lizen9", "id": "lizen9", "title": "GM" },
"rating": 2531,
"seconds": 60,
},
{
'color': 'black',
'user': { 'name': 'lizen29', 'title': 'WGM', 'id': 'lizen29' },
'rating': 2594,
'seconds': 60,
"color": "black",
"user": { "name": "lizen29", "title": "WGM", "id": "lizen29" },
"rating": 2594,
"seconds": 60,
},
],
'fen': 'rnbqk1r1/ppp1ppbp/8/N2p2p1/8/1PQPP3/P1P2PPn/R1B1K1NR',
"fen": "rnbqk1r1/ppp1ppbp/8/N2p2p1/8/1PQPP3/P1P2PPn/R1B1K1NR",
},
}
Loading