Skip to content

Commit 63c1374

Browse files
authored
chore: Add check task (#26)
Added `check` task to `package.json`. It checks all source code directories by running TypeScript compiler with `noEmit` option. Similar task is also used in `network` monorepo. Configured CI to run the "check" task automatically. Also changed the order of `build` and `eslint` tasks so that build errors are checked before lint errors.
1 parent 185e430 commit 63c1374

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.github/workflows/ci.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ jobs:
2020
steps:
2121
- uses: actions/[email protected]
2222
- run: npm ci
23-
- run: npm run eslint
2423
- run: npm run build
24+
- run: npm run check
25+
- run: npm run eslint
2526
- uses: streamr-dev/[email protected]
2627
with:
2728
services-to-start: mysql dev-chain-fast deploy-network-subgraphs-fastchain

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"docker:build": "docker build --tag streamr/stream-metrics-index:latest .",
88
"docker:push": "docker buildx build --platform linux/amd64,linux/arm64 --tag streamr/stream-metrics-index:latest --push .",
99
"test": "jest --runInBand",
10-
"eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'"
10+
"eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'",
11+
"check": "tsc -p ./tsconfig.jest.json"
1112
},
1213
"author": "Streamr Network AG <[email protected]>",
1314
"dependencies": {

tsconfig.jest.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"extends": "./tsconfig.build.json",
33
"compilerOptions": {
4-
"outDir": "dist",
4+
"noEmit": true,
55
"types": ["node", "jest"]
66
},
77
"include": [
88
"src/**/*",
9+
"bin/*.ts",
910
"test/**/*"
1011
]
1112
}

0 commit comments

Comments
 (0)