-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
78 lines (66 loc) · 2.16 KB
/
.pre-commit-config.yaml
File metadata and controls
78 lines (66 loc) · 2.16 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
75
76
77
78
# Pre-commit Hooks Configuration
# Installation: https://pre-commit.com/
#
# Quick start:
# 1. Install pre-commit: uv pip install pre-commit
# 2. Install hooks: pre-commit install
# 3. Run manually: pre-commit run --all-files
#
# Bypass checks: git commit --no-verify (use only in emergency)
repos:
# ============================================================================
# TypeScript/JavaScript
# ============================================================================
- repo: local
hooks:
- id: biome-check
name: biome check
entry: bun x biome check --write
language: system
types_or: [javascript, ts, tsx, jsx, json, css]
pass_filenames: true
- id: typescript-check
name: typescript type check
entry: bun x tsc --noEmit
language: system
types: [ts]
pass_filenames: false
- id: test
name: test (TypeScript)
entry: bun run test
language: system
types: [ts]
pass_filenames: false
# ============================================================================
# Common Checks
# ============================================================================
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
name: trim trailing whitespace
exclude_types: [image]
- id: check-merge-conflict
name: check for merge conflicts
- id: check-json
name: check JSON files
types: [json]
- id: check-yaml
name: check YAML files
types: [yaml]
- id: check-toml
name: check TOML files
types: [toml]
- id: end-of-file-fixer
name: fix end of files
exclude_types: [image]
# ============================================================================
# Commit Message Enforcement
# ============================================================================
- repo: local
hooks:
- id: enforce-commit
name: Enforce feat and fix commit prefixes
entry: bash scripts/enforce-commit.sh
language: system
stages: [commit-msg]