From c0ed7399e873cd431aa58d9996e7fd5665ca17af Mon Sep 17 00:00:00 2001 From: david Date: Fri, 2 Aug 2024 13:41:46 -0400 Subject: [PATCH] remove mutation from precommit to prevent unstaged file commits Signed-off-by: david --- .husky/pre-commit | 2 +- apps/node/src/app.ts | 2 +- packages/template/package.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 5e94b88c..5d5f6cd3 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1 @@ -pnpm turbo run fix build test +pnpm turbo run check test diff --git a/apps/node/src/app.ts b/apps/node/src/app.ts index 2cfbf90c..2ee66896 100644 --- a/apps/node/src/app.ts +++ b/apps/node/src/app.ts @@ -10,7 +10,7 @@ async function run() { assert(APP, 'Specify the application to start with "APP=appname pnpm start"'); switch (APP) { case "template": - void await Template.Main(process.env); + void (await Template.Main(process.env)); return "Example template app running"; default: throw new Error(`Unable to start, unknown app: ${APP}`); diff --git a/packages/template/package.json b/packages/template/package.json index 34f41d71..39150dcb 100644 --- a/packages/template/package.json +++ b/packages/template/package.json @@ -5,14 +5,14 @@ "main": "index.js", "scripts": { "build": "tsc -b", - "build:check": "tsc -b --noEmit", + "build:check": "tsc --noEmit", "watch": "tsc -b --watch", "fix": "pnpm format && pnpm lint", "format": "prettier --write src", "format:check": "prettier src --check", "lint": "eslint --fix", "lint:check": "eslint", - "check": "pnpm format:check && pnpm lint:check && build:check", + "check": "pnpm format:check && pnpm lint:check && pnpm build:check", "test": "jest", "test:watch": "jest --watch" },