diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d4dafbe..fd01ada 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,20 @@ 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 + always_run: true + stages: [pre-push] + - 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..0c19202 --- /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 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 470cb70..d3f996f 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 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 npm run dev # Vite dev server