From 39fefcab444aba0d29c0c3ee08e6b1127df73895 Mon Sep 17 00:00:00 2001 From: Lukas Weiss Date: Tue, 28 Jun 2022 15:08:21 +0200 Subject: [PATCH] add typecheck as npm cmd, pre-commit hook and ci check --- .githooks/pre-commit | 1 + .github/workflows/test.yml | 1 + package.json | 1 + 3 files changed, 3 insertions(+) diff --git a/.githooks/pre-commit b/.githooks/pre-commit index cba2354..001b0a4 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -4,3 +4,4 @@ set -e set -o pipefail npm run lint +npm run typecheck diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1c17b15..db94f16 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,4 +11,5 @@ jobs: registry-url: 'https://registry.npmjs.org' - run: npm install - run: npm run lint + - run: npm run typecheck - run: npm run test diff --git a/package.json b/package.json index dec039e..44a38d3 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "build:esm": "tsc --project tsconfig.esnext.json", "lint": "eslint --ext js,ts,tsx src", "lint:fix": "npm run lint -- --fix", + "typecheck": "tsc --noEmit", "test": "jest --verbose --passWithNoTests", "prepare": "npm run build", "prepublishOnly": "npm run test && npm run lint",