Skip to content

Commit 7b775a1

Browse files
committed
Add validation for document translation script changes
1 parent fae9017 commit 7b775a1

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
run: pnpm build
3535
- name: Run linter
3636
run: pnpm lint
37+
- name: Type-check docs scripts
38+
run: pnpm docs:scripts:check
3739
- name: Compile examples
3840
run: pnpm -r build-check
3941
- name: Run tests

docs/tsconfig.scripts.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"target": "ES2021",
5+
"lib": ["ES2021"],
6+
"noEmit": true,
7+
"moduleResolution": "node",
8+
"types": ["node"],
9+
"resolveJsonModule": true,
10+
"esModuleInterop": true,
11+
"allowSyntheticDefaultImports": true
12+
},
13+
"include": ["src/scripts/**/*.ts"]
14+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"docs:dev": "pnpm -F docs dev",
1212
"docs:translate": "pnpm -F docs translate",
1313
"docs:build": "pnpm -F docs build",
14+
"docs:scripts:check": "pnpm exec tsc --pretty false --project docs/tsconfig.scripts.json",
1415
"test": "CI=1 NODE_ENV=test vitest",
1516
"test:coverage": "NODE_ENV=test vitest run --coverage",
1617
"test:examples": "pnpm -r build-check",

0 commit comments

Comments
 (0)