From 1b75b5b7dfc1f3e0afa5125836d899e6f8552368 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Mon, 26 May 2025 23:19:24 -0400 Subject: Consolidate code style checks into tool scripts. The new `tools/check-format` script checks _all_ project formatting - JS (through `prettier`), and Rust (through `rustfmt`). It also checks `prettier` against the whole project, not just against what's in the `ui` subdir, which means it now catches formatting issues in various JS config files (like `.prettierrc` itself). This commit does not include style _fixes_, which means that it does not pass its own `tools/check-format` script. This is intentional, and is intended to make the Git history a bit easier to reason about; a future commit will include format fixes. --- git-hooks/pre-commit | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'git-hooks') diff --git a/git-hooks/pre-commit b/git-hooks/pre-commit index 587e349..3d0ae17 100755 --- a/git-hooks/pre-commit +++ b/git-hooks/pre-commit @@ -1,8 +1,9 @@ #!/bin/bash -e # Don't put anything here that routinely takes longer than a second or so to -# run. It gets old fast. That's why this uses `cargo check` and not `cargo -# test`, for example. +# run. It gets old fast. That's why this doesn't run tests, for example. + +tools/check-format # Make sure package-lock.json is up to date with package.json npm ci --dry-run -- cgit v1.2.3