forked from kofal.net/zmk
feat(docs): Type check the docs TSX components.
This commit is contained in:
committed by
Pete Johanson
parent
47abbe7925
commit
683991aa93
13
.github/workflows/doc-checks.yml
vendored
13
.github/workflows/doc-checks.yml
vendored
@@ -31,3 +31,16 @@ jobs:
|
|||||||
- name: Prettier check
|
- name: Prettier check
|
||||||
run: npm run prettier:check
|
run: npm run prettier:check
|
||||||
working-directory: docs
|
working-directory: docs
|
||||||
|
typecheck:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: bahmutov/npm-install@v1
|
||||||
|
with:
|
||||||
|
working-directory: docs
|
||||||
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
|
working-directory: docs
|
||||||
|
- name: TypeScript check
|
||||||
|
run: npm run typecheck
|
||||||
|
working-directory: docs
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
"clear": "docusaurus clear",
|
"clear": "docusaurus clear",
|
||||||
"lint": "eslint . --ext js,jsx,md,mdx",
|
"lint": "eslint . --ext js,jsx,md,mdx",
|
||||||
"prettier:check": "prettier --check .",
|
"prettier:check": "prettier --check .",
|
||||||
"prettier:format": "prettier --write ."
|
"prettier:format": "prettier --write .",
|
||||||
|
"typecheck": "tsc"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@docusaurus/core": "^2.0.0-beta.3",
|
"@docusaurus/core": "^2.0.0-beta.3",
|
||||||
|
|||||||
@@ -1,4 +1,14 @@
|
|||||||
{
|
{
|
||||||
"extends": "@tsconfig/docusaurus/tsconfig.json",
|
"extends": "@tsconfig/docusaurus/tsconfig.json",
|
||||||
"include": ["src/"]
|
"include": ["src/"],
|
||||||
|
"compilerOptions": {
|
||||||
|
"jsx": "react",
|
||||||
|
"moduleResolution": "Node",
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"strict": true,
|
||||||
|
"noEmit": true,
|
||||||
|
"target": "ES6",
|
||||||
|
"lib": ["ES2019.Array", "DOM", "DOM.Iterable"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user