From 8857f0113e5ae63acf69c55afc37ad48c4f78a40 Mon Sep 17 00:00:00 2001 From: Jo D Date: Tue, 24 Mar 2026 07:20:05 -0400 Subject: [PATCH] chore: add pre-commit hooks for fmt, lint, and typecheck --- .pre-commit-config.yaml | 19 +++++++++++++++++++ justfile | 4 ++++ 2 files changed, 23 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..81dca93 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,19 @@ +# See https://pre-commit.com for more information +repos: + - repo: local + hooks: + - id: just-fmt + name: just fmt + description: Format and lint code + entry: just fmt + language: system + types_or: [rust, ts] + pass_filenames: false + + - id: just-typecheck + name: just typecheck + description: TypeScript type checking across all workspaces + entry: just typecheck + language: system + types_or: [ts] + pass_filenames: false diff --git a/justfile b/justfile index 399f06b..b81856d 100644 --- a/justfile +++ b/justfile @@ -37,6 +37,10 @@ check: pnpm lint pnpm run typecheck +# TypeScript type checking across all workspaces +typecheck: + pnpm -r run typecheck + # Run unit tests unit-test: cargo test -p escrow-program