From f7d7aa7ae73ad807c9e4c7b0deb00ed7a4b00cf7 Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Tue, 7 Jul 2026 09:11:24 +0200 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20=F0=9F=9A=9A=20move=20`typos.to?= =?UTF-8?q?ml`=20into=20`.config/`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/typos.toml | 8 ++++++++ .github/workflows/checks.yml | 2 ++ .pre-commit-config.yaml | 1 + .vscode/settings.json | 1 + justfile | 2 +- .typos.toml => template/.config/typos.toml | 8 ++------ template/.github/workflows/checks.yml | 2 ++ template/.typos.toml | 14 -------------- template/.vscode/settings.json | 3 ++- template/justfile.jinja | 2 +- 10 files changed, 20 insertions(+), 23 deletions(-) create mode 100644 .config/typos.toml rename .typos.toml => template/.config/typos.toml (62%) delete mode 100644 template/.typos.toml diff --git a/.config/typos.toml b/.config/typos.toml new file mode 100644 index 0000000..8dd4e99 --- /dev/null +++ b/.config/typos.toml @@ -0,0 +1,8 @@ +[files] +extend-exclude = [ + "*.html", + "*.css", + ".quarto/*", + "_site/*", + "*.svg" +] diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 8447cbb..c5f15ca 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -50,6 +50,8 @@ jobs: - name: Spell check repo uses: crate-ci/typos@bee27e3a4fd1ea2111cf90ab89cd076c870fce14 # v1.48.0 + with: + config: .config/typos.toml check-website-build: runs-on: ubuntu-latest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1ebbd33..561aa81 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,6 +27,7 @@ repos: rev: v1.47.2 hooks: - id: typos + args: [--config, .config/typos.toml, --force-exclude] - repo: https://github.com/rvben/rumdl-pre-commit rev: v0.2.26 diff --git a/.vscode/settings.json b/.vscode/settings.json index 744ecbb..ffd3128 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -26,6 +26,7 @@ "*.qmd.jinja": "jinja-md" }, "files.insertFinalNewline": true, + "typos.config": ".config/typos.toml", "conventionalCommits.emojiFormat": "emoji", "conventionalCommits.promptScopes": false } diff --git a/justfile b/justfile index 09aebb7..5e3a6fa 100644 --- a/justfile +++ b/justfile @@ -35,7 +35,7 @@ sync-template-files: # Check for spelling errors in files check-spelling: - uvx typos + uvx typos --config .config/typos.toml # Check that URLs work check-urls: diff --git a/.typos.toml b/template/.config/typos.toml similarity index 62% rename from .typos.toml rename to template/.config/typos.toml index b169af3..64b3db8 100644 --- a/.typos.toml +++ b/template/.config/typos.toml @@ -1,14 +1,10 @@ [files] extend-exclude = [ "*.html", - "*.json", "*.css", ".quarto/*", "_site/*", - "_extensions/*", - ".coverage-report/*", - "site_libs/", "*.svg", - # Since it has hashes - "CHANGELOG.md", + "*.json", + ".coverage-report/*", ] diff --git a/template/.github/workflows/checks.yml b/template/.github/workflows/checks.yml index 7bd8009..ef9c0f6 100644 --- a/template/.github/workflows/checks.yml +++ b/template/.github/workflows/checks.yml @@ -82,6 +82,8 @@ jobs: - name: Spell check repo uses: crate-ci/typos@cf5f1c29a8ac336af8568821ec41919923b05a83 # v1.45.1 + with: + config: .config/typos.toml check-website-build: runs-on: ubuntu-latest diff --git a/template/.typos.toml b/template/.typos.toml deleted file mode 100644 index b169af3..0000000 --- a/template/.typos.toml +++ /dev/null @@ -1,14 +0,0 @@ -[files] -extend-exclude = [ - "*.html", - "*.json", - "*.css", - ".quarto/*", - "_site/*", - "_extensions/*", - ".coverage-report/*", - "site_libs/", - "*.svg", - # Since it has hashes - "CHANGELOG.md", -] diff --git a/template/.vscode/settings.json b/template/.vscode/settings.json index 50f0dc0..7b59d6d 100644 --- a/template/.vscode/settings.json +++ b/template/.vscode/settings.json @@ -37,5 +37,6 @@ "mypy.runUsingActiveInterpreter": true, "mypy.configFile": ".config/mypy.ini", "conventionalCommits.emojiFormat": "emoji", - "conventionalCommits.promptScopes": false + "conventionalCommits.promptScopes": false, + "typos.config": ".config/typos.toml", } diff --git a/template/justfile.jinja b/template/justfile.jinja index 2ab64a0..f9dc351 100644 --- a/template/justfile.jinja +++ b/template/justfile.jinja @@ -100,7 +100,7 @@ check-security: # Check for spelling errors in files check-spelling: - uvx typos + uvx typos --config .config/typos.toml # Install lychee from https://lychee.cli.rs/guides/getting-started/ # Check that URLs work From 7afb1cbff652c03d0d6e177d2cbfed0586155e62 Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Tue, 7 Jul 2026 09:23:13 +0200 Subject: [PATCH 2/2] fix: don't check CHANGELOG for typos --- .config/typos.toml | 4 +++- template/.config/typos.toml | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/typos.toml b/.config/typos.toml index 8dd4e99..9bfa88f 100644 --- a/.config/typos.toml +++ b/.config/typos.toml @@ -4,5 +4,7 @@ extend-exclude = [ "*.css", ".quarto/*", "_site/*", - "*.svg" + "*.svg", + # Has commit hashes that trigger false positives + "CHANGELOG.md", ] diff --git a/template/.config/typos.toml b/template/.config/typos.toml index 64b3db8..3c746c2 100644 --- a/template/.config/typos.toml +++ b/template/.config/typos.toml @@ -7,4 +7,6 @@ extend-exclude = [ "*.svg", "*.json", ".coverage-report/*", + # Has commit hashes that trigger false positives + "CHANGELOG.md", ]