Skip to content

Commit

Permalink
Add separate target to check types
Browse files Browse the repository at this point in the history
  • Loading branch information
swsnr committed Nov 3, 2023
1 parent 7a3a679 commit d0e7b27
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
sudo apt-get update -qq
sudo apt-get install --no-install-recommends -qq -y gnome-shell strip-nondeterminism
- run: npm ci
- run: make check-types
- run: make dist-repro
- run: b2sum *.zip > B2SUMS.txt
working-directory: dist
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,12 @@ format:
lint:
npm run lint

.PHONY: check-types
check-types:
npm run check:types

.PHONY: check
check: lint
check: lint check-types
npm run format -- --check

.PHONY: fix
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"scripts": {
"generate:gir-types": "ts-for-gir generate",
"compile": "tsc --build tsconfig.json",
"check:types": "tsc --build tsconfig.types.json",
"lint": "eslint .",
"format": "prettier ."
},
Expand Down
8 changes: 8 additions & 0 deletions tsconfig.types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
// A separate configuration to check type declarations
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": true,
"skipLibCheck": false
}
}

0 comments on commit d0e7b27

Please sign in to comment.