diff options
author | Peter Johanson <peter@peterjohanson.com> | 2021-03-29 01:22:05 +0000 |
---|---|---|
committer | Pete Johanson <peter@peterjohanson.com> | 2021-09-11 00:50:36 -0400 |
commit | 683991aa9346a29c265299020a59c0b4c1805926 (patch) | |
tree | 5a8b876db59138758ebcd90e6ef3b0bff68c2ff6 | |
parent | 47abbe7925dece8a50b1001b0b9f32c64268f61b (diff) |
feat(docs): Type check the docs TSX components.
-rw-r--r-- | .github/workflows/doc-checks.yml | 13 | ||||
-rw-r--r-- | docs/package.json | 3 | ||||
-rw-r--r-- | docs/tsconfig.json | 12 |
3 files changed, 26 insertions, 2 deletions
diff --git a/.github/workflows/doc-checks.yml b/.github/workflows/doc-checks.yml index b5b278e..a9b2d5a 100644 --- a/.github/workflows/doc-checks.yml +++ b/.github/workflows/doc-checks.yml @@ -31,3 +31,16 @@ jobs: - name: Prettier check run: npm run prettier:check 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 diff --git a/docs/package.json b/docs/package.json index 14fab7b..b58100b 100644 --- a/docs/package.json +++ b/docs/package.json @@ -11,7 +11,8 @@ "clear": "docusaurus clear", "lint": "eslint . --ext js,jsx,md,mdx", "prettier:check": "prettier --check .", - "prettier:format": "prettier --write ." + "prettier:format": "prettier --write .", + "typecheck": "tsc" }, "dependencies": { "@docusaurus/core": "^2.0.0-beta.3", diff --git a/docs/tsconfig.json b/docs/tsconfig.json index 4360f0d..811eb18 100644 --- a/docs/tsconfig.json +++ b/docs/tsconfig.json @@ -1,4 +1,14 @@ { "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"] + } } |