-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
62 lines (56 loc) · 1.88 KB
/
.pre-commit-config.yaml
File metadata and controls
62 lines (56 loc) · 1.88 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
# Pre-commit configuration for prek
# https://github.com/j178/prek
#
# This replaces simple-git-hooks + nano-staged with a Rust-based alternative.
# Install: curl -LsSf https://prek.sh/install.sh | sh
# Setup: prek install
default_install_hook_types: [pre-commit, pre-push]
repos:
# Biome - JavaScript/TypeScript linter and formatter
- repo: local
hooks:
# Format and lint staged files with Biome
- id: biome-check
name: Biome check (format + lint)
entry: pnpm biome check --write --files-ignore-unknown=true --no-errors-on-unmatched
language: system
types_or: [javascript, jsx, ts, tsx, json, css]
pass_filenames: true
stages: [pre-commit]
priority: 0 # Run first (modifies files)
# Architectural boundaries check
- repo: local
hooks:
- id: lint-boundaries
name: Check architectural boundaries
entry: pnpm lint:boundaries
language: system
files: ".*"
pass_filenames: false
stages: [pre-commit]
priority: 10 # Run after biome (can run in parallel with docs-policy)
# Documentation policy enforcement
- repo: local
hooks:
- id: docs-policy
name: Check documentation policy
entry: pnpm docs:policy
language: system
files: '^(docs/.*\.md$|AGENTS\.md$)'
pass_filenames: false
stages: [pre-commit]
priority: 10 # Run after biome (can run in parallel with lint-boundaries)
# Full CI suite on push
- repo: local
hooks:
- id: ci-suite
name: Run full CI suite
entry: pnpm run ci
language: system
files: ".*"
pass_filenames: false
stages: [pre-push]
verbose: true
# Parallel execution strategy:
# - priority: 0 → biome-check (runs first, modifies files)
# - priority: 10 → lint-boundaries + docs-policy (run in parallel after biome)