Skip to content

Commit

Permalink
chore: add json validator step to action
Browse files Browse the repository at this point in the history
Validates all JSON and YML files by default

fix: wrong flag

fix: error is correct - comments are not allowed in JSON

chore: validator will check all files

chore: by default it checks JSON and YML files
  • Loading branch information
pfeerick committed Mar 6, 2024
1 parent a0a67aa commit 8da5a24
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 30 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/build-n-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ on:
- '**.md'

jobs:
json-validate:
name: Validate JSON/YML files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: json-yaml-validate
uses: GrantBirki/json-yaml-validate@v2
with:
mode: fail

test-backend:
name: Test backend
runs-on: ubuntu-22.04
Expand Down
72 changes: 42 additions & 30 deletions ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,44 @@
{
"compilerOptions": {
"target": "ESNext",
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"module": "ESNext",
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",

/* Linting */
"strict": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,

/* path alias */
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@hooks/*": ["./src/hooks/*"],
"@pages/*": ["./src/pages/*"],
"@comps/*": ["./src/components/*"]
}
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
"compilerOptions": {
"target": "ESNext",
"lib": [
"DOM",
"DOM.Iterable",
"ESNext"
],
"module": "ESNext",
"skipLibCheck": true,
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"strict": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"baseUrl": ".",
"paths": {
"@/*": [
"./src/*"
],
"@hooks/*": [
"./src/hooks/*"
],
"@pages/*": [
"./src/pages/*"
],
"@comps/*": [
"./src/components/*"
]
}
},
"include": [
"src"
],
"references": [
{
"path": "./tsconfig.node.json"
}
]
}

0 comments on commit 8da5a24

Please sign in to comment.