-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
74 lines (66 loc) · 2.72 KB
/
.pre-commit-config.yaml
File metadata and controls
74 lines (66 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- id: check-added-large-files
exclude: 'tests/spec-ci/schemas\.json$'
- id: check-merge-conflict
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.0
hooks:
- id: ruff
args: [--fix]
- repo: local
hooks:
- id: eslint
name: ESLint (frontend)
entry: bash -c 'args=(); for f in "$@"; do args+=("${f#frontend/}"); done; cd frontend && npx eslint --no-warn-ignored "${args[@]}"' --
language: system
files: ^frontend/.*\.(js|jsx|ts|tsx)$
types_or: [javascript, jsx, ts, tsx]
- id: tsc-typecheck
name: TypeScript type check (frontend)
entry: bash -c 'cd frontend && npx tsc --noEmit'
language: system
pass_filenames: false
files: ^frontend/.*\.(ts|tsx)$
- id: mypy
name: Python type check (mypy)
# Wrapper provisions the poetry env once in fresh worktrees, then runs
# mypy strictly in-env — never the silent system-PATH fallback that
# produced bogus stale-qontinui_schemas errors (see run_mypy.sh).
entry: .pre-commit-hooks/run_mypy.sh
language: script
pass_filenames: false
files: ^backend/.*\.py$
- id: alembic-schema-arg-gate
name: Alembic ops require schema= (consolidation gate)
entry: python .pre-commit-hooks/check_alembic_schema_args.py
language: system
files: ^backend/alembic/(_staged_consolidation|versions)/.*\.py$
# Two checks: (1) op.<gated_func>(..., schema=...) kwarg
# presence, (2) raw SQL inside op.execute("...") names a
# schema for every CREATE/ALTER/DROP/REFERENCES/INDEX-ON.
# Pre-commit invokes with the changed-file list so the audit
# only runs on migrations actually being touched — already-
# applied legacy revisions aren't re-audited.
- id: web-boundary-lint
name: web/backend ↔ qontinui boundary lint
entry: .pre-commit-hooks/check_web_boundary.sh
language: script
files: ^backend/app/.*\.py$
# Mirrors .github/workflows/web-boundary-lint.yml — catches the
# boundary violation before push. `qontinui-schemas` is exempt
# (shared Pydantic types). `backend/app/api/embeddings.py` is
# allowlisted defensively pending Phase 8 (embeddings runner-bridge).
- repo: local
hooks:
- id: block-claude-attribution
name: Block Claude Attribution
entry: .pre-commit-hooks/block-claude-attribution.sh
language: script
stages: [commit-msg]
ci:
autofix_prs: true
autofix_commit_msg: "chore: pre-commit auto fixes"