Skip to content

Commit 13c4678

Browse files
authored
👷 Add pre-commit hook to catch typos (#2317)
1 parent cd83fc1 commit 13c4678

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ repos:
1717
)$
1818
- id: trailing-whitespace
1919
exclude: ^frontend/src/client/.*
20+
- repo: https://github.com/crate-ci/typos
21+
rev: bbaefadf97b0ec5fdc942684b647f1a6ab250274 # v1.46.0
22+
hooks:
23+
- id: typos
24+
args: [--force-exclude]
2025
- repo: local
2126
hooks:
2227
- id: local-biome-check

pyproject.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,25 @@ dev = [
99
github-actions = [
1010
"smokeshow >=0.5.0",
1111
]
12+
13+
[tool.typos.files]
14+
extend-exclude = [
15+
"img/",
16+
"uv.lock",
17+
"bun.lock",
18+
"backend/coverage/",
19+
"backend/htmlcov/",
20+
"frontend/dist/",
21+
"frontend/public/assets/images/",
22+
]
23+
24+
[tool.typos.default]
25+
extend-ignore-re = [
26+
# GitHub usernames in @mentions
27+
"@[a-zA-Z0-9](?:-?[a-zA-Z0-9])*",
28+
# Name of the package in the PR title
29+
"Bump certifi ",
30+
]
31+
32+
[tool.typos.default.extend-identifiers]
33+
alls = "alls"

0 commit comments

Comments
 (0)