From 5397763a10a44e022ed5780e9f456d23c05d6faa Mon Sep 17 00:00:00 2001 From: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Tue, 1 Dec 2026 08:53:27 -0600 Subject: [PATCH 1/2] ci: run the CI checks at pre-commit and pre-push Install the pre-push hook type with pre-commit, add the CI checks that were missing locally, and document the setup in README.md and CONTRIBUTING.md. Co-Authored-By: Claude Sonnet 5.5 --- .pre-commit-config.yaml | 17 +++++++++++++++++ CONTRIBUTING.md | 9 +++++++++ README.md | 2 ++ 3 files changed, 28 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d4dafbe..55adb42 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,4 @@ +default_install_hook_types: [pre-commit, pre-push] repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 @@ -40,3 +41,19 @@ repos: hooks: - id: yamllint args: [--config-file, .yamllint.yml] + + - repo: local + hooks: + - id: tsc + name: tsc --noEmit + language: system + entry: npx tsc --noEmit + pass_filenames: false + types_or: [ts, tsx] + - id: vitest + name: vitest + language: system + entry: npx vitest run --coverage --passWithNoTests + pass_filenames: false + always_run: true + stages: [pre-push] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..7338b10 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,9 @@ +# Contributing + +## Development + +Run `pre-commit install` once per clone to install the commit and push hooks. + +- Commit hooks run lint, format, and type checks (run `npm ci` first), matching CI. +- Push hooks run the tests, matching CI. +- Run everything with `pre-commit run --all-files --hook-stage pre-push`. diff --git a/README.md b/README.md index 470cb70..8be6647 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,8 @@ Accepts raw `docker-compose.yml` content, `docker compose config` output, and [` ## Development +Run `pre-commit install` once per clone to install the commit and push hooks. Commit hooks run lint, format, and type checks (run `npm ci` first), matching CI. Push hooks run the tests, matching CI. Run everything with `pre-commit run --all-files --hook-stage pre-push`. + ```bash npm install npm run dev # Vite dev server From 411e8182b3b1782707252eb6077dc8b96df40474 Mon Sep 17 00:00:00 2001 From: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Tue, 1 Dec 2026 08:58:34 -0600 Subject: [PATCH 2/2] ci: run tsc at pre-push, since the CI pre-commit job installs no node modules Co-Authored-By: Claude Sonnet 5.5 --- .pre-commit-config.yaml | 3 ++- CONTRIBUTING.md | 4 ++-- README.md | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 55adb42..fd01ada 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,7 +49,8 @@ repos: language: system entry: npx tsc --noEmit pass_filenames: false - types_or: [ts, tsx] + always_run: true + stages: [pre-push] - id: vitest name: vitest language: system diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7338b10..0c19202 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,6 +4,6 @@ Run `pre-commit install` once per clone to install the commit and push hooks. -- Commit hooks run lint, format, and type checks (run `npm ci` first), matching CI. -- Push hooks run the tests, matching CI. +- Commit hooks run lint and format checks, matching CI. +- Push hooks run the type check and tests, matching CI (run `npm ci` first). - Run everything with `pre-commit run --all-files --hook-stage pre-push`. diff --git a/README.md b/README.md index 8be6647..d3f996f 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ Accepts raw `docker-compose.yml` content, `docker compose config` output, and [` ## Development -Run `pre-commit install` once per clone to install the commit and push hooks. Commit hooks run lint, format, and type checks (run `npm ci` first), matching CI. Push hooks run the tests, matching CI. Run everything with `pre-commit run --all-files --hook-stage pre-push`. +Run `pre-commit install` once per clone to install the commit and push hooks. Commit hooks run lint and format checks, matching CI. Push hooks run the type check and tests (run `npm ci` first), matching CI. Run everything with `pre-commit run --all-files --hook-stage pre-push`. ```bash npm install