From a8e9642fea0865faa10668ff348b8c073b582803 Mon Sep 17 00:00:00 2001 From: tfkhdyt Date: Wed, 27 Sep 2023 18:26:12 +0700 Subject: [PATCH] chore: setup lefthook --- lefthook.yml | 14 ++++++++++++++ package.json | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 lefthook.yml diff --git a/lefthook.yml b/lefthook.yml new file mode 100644 index 0000000..73db9e4 --- /dev/null +++ b/lefthook.yml @@ -0,0 +1,14 @@ +pre-push: + parallel: true + commands: + lint: + glob: '**/*.ts' + run: bun run lint + taze: + run: bunx taze --failOnOutdated + +pre-commit: + commands: + format: + glob: '**/*.ts' + run: bun run format diff --git a/package.json b/package.json index 0d415b9..9955dee 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "type": "module", "scripts": { "dev": "bun run --watch ./src/main.ts", - "format": "prettier -w ./src/", - "lint": "tsc --noEmit && eslint --fix src/", + "format": "prettier -w ./src", + "lint": "tsc --noEmit && eslint --fix ./src", "build": "tsc", "generate": "drizzle-kit generate:sqlite", "migrate": "bun run ./src/db/postgres/migrate.ts",