Add JSON linting (#36192)

Uses https://github.com/eslint/json to lint all JSON and JSONC files in the repo.
This commit is contained in:
silverwind
2025-12-19 07:27:21 +01:00
committed by GitHub
parent 36aa39fffe
commit b915e6908c
6 changed files with 80 additions and 0 deletions

View File

@@ -19,6 +19,8 @@ on:
value: ${{ jobs.detect.outputs.swagger }}
yaml:
value: ${{ jobs.detect.outputs.yaml }}
json:
value: ${{ jobs.detect.outputs.json }}
jobs:
detect:
@@ -35,6 +37,7 @@ jobs:
docker: ${{ steps.changes.outputs.docker }}
swagger: ${{ steps.changes.outputs.swagger }}
yaml: ${{ steps.changes.outputs.yaml }}
json: ${{ steps.changes.outputs.json }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v3
@@ -100,3 +103,6 @@ jobs:
- "**/*.yaml"
- ".yamllint.yaml"
- "pyproject.toml"
json:
- "**/*.json"

View File

@@ -63,6 +63,21 @@ jobs:
- run: make deps-py
- run: make lint-yaml
lint-json:
if: needs.files-changed.outputs.json == 'true'
needs: files-changed
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v5
with:
node-version: 24
- run: make deps-frontend
- run: make lint-json
lint-swagger:
if: needs.files-changed.outputs.swagger == 'true'
needs: files-changed