Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v7
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v5
python-version: "3.14"
- name: Install npm packages
run: npm install
- name: Run pre-commit
run: |-
uvx --with pre-commit-uv pre-commit run --all-files
- name: Run prek
run: uvx prek -a
- name: Print changed files
if: failure()
run: |-
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
default_install_hook_types: [pre-commit]
default_stages: [pre-commit, pre-merge-commit]
minimum_pre_commit_version: 3.2.0
default_language_version:
python: python3.12
python: python3.14
repos:
- repo: https://github.com/gitleaks/gitleaks.git
rev: v8.24.0
rev: v8.30.0
hooks:
- id: gitleaks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-added-large-files
args: [--maxkb=2048]
Expand All @@ -35,8 +34,9 @@ repos:
name: Sort i18n YAML files
entry: npx yaml-sort -i
language: system
types: [file]
files: ^i18n/.*\.ya?ml$
files:
glob:
- "i18n/*.yaml"
- repo: local
hooks:
- id: prettier
Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Use these exact translations for headlines on the pages:
- `hugo --gc --minify`: Build for production
- `npx prettier --write .`: Format code
- `npx pagefind --site public`: Generate search index
- `pre-commit run --all-files`: Run all pre-commit checks
- `prek run -a`: Run all prek checks

### Code Style & Conventions

Expand All @@ -86,7 +86,7 @@ Use these exact translations for headlines on the pages:

## Quality Standards

- All commits MUST pass the pre-commit hooks defined in `.pre-commit-config.yaml`
- All commits MUST pass the prek hooks defined in `.prek-config.yaml`
- HTML templates must be valid Go template syntax
- Do NOT add any comments to the code
- NEVER create markdown files outside the content directory
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,22 @@ To initialize the search index, run the following command in a separate terminal
npx -y pagefind --site public
```

### Run pre-commit hooks
### Run prek hooks

We use the [pre-commit framework](https://pre-commit.com/) to run some checks to ensure a consistent code quality.
We use the [prek framework](https://prek.dev/) to run some checks to ensure a consistent code quality.

First of all, install the package manager uv: [Installing uv](https://docs.astral.sh/uv/getting-started/installation/).

Then, install the `pre-commit` tool:
Then, install the `prek` tool:

```zsh
uv tool install pre-commit --with pre-commit-uv --force-reinstall
uv tool install prek --force-reinstall
```

Now, enable `pre-commit` to run the check every time you want to commit changes:
Now, enable `prek` to run the check every time you want to commit changes:

```zsh
pre-commit install
prek install
```

## Content Contributions
Expand Down
Loading