# See https://pre-commit.com for hook documentation. repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-json - id: check-toml - id: check-added-large-files args: ["--maxkb=1000"] - id: check-merge-conflict - id: check-case-conflict - id: mixed-line-ending - repo: https://github.com/tombi-toml/tombi-pre-commit rev: v1.1.0 hooks: - id: tombi-format args: ["--offline"] # uv.lock is generated and owned by uv, which writes its own canonical # TOML layout. tombi reformats that layout differently, so once uv # regenerates the lock (e.g. after a dependency or version change) # tombi rewrites it and the hook fails on the modified file. Keep uv # authoritative for its lockfile; tombi still formats hand-edited TOML. exclude: ^uv\.lock$ - repo: https://github.com/asottile/pyupgrade rev: v3.21.2 hooks: - id: pyupgrade name: pyupgrade (python) files: ^python/ args: [--py313-plus] - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.15.2 hooks: - id: ruff name: ruff (python) files: ^python/ args: [--fix, --exit-non-zero-on-fix] - id: ruff-format name: ruff format (python) files: ^python/ - repo: local hooks: - id: biome-dead-code name: biome dead-code check entry: pnpm exec biome ci . --formatter-enabled=false --assist-enabled=false language: system pass_filenames: false - id: knip-dead-code name: knip dead-code (auto-fix) entry: pnpm exec knip --fix --reporter compact language: system pass_filenames: false - id: knip-dead-code-production name: knip dead-code (production mode) entry: pnpm exec knip --production --reporter compact language: system pass_filenames: false - repo: https://github.com/Yelp/detect-secrets rev: v1.5.0 hooks: - id: detect-secrets exclude: | (?x)^( .*\.lock$| .*pnpm-lock\.yaml$| .*package-lock\.json$| .*yarn\.lock$| .*\.log$| .*\.dump$| .*\.sql$| .*\.csv$| .*\.db$| .*\.sqlite$| .*\.sqlite3$| .*/node_modules/.*| .*/\.venv/.*| .*/dist/.*| .*/build/.*| .*/coverage/.*| .*/htmlcov/.*| .*\.gen\.ts$| .*\.gen\.py$| .*\.generated\.ts$ )$