This repository was archived by the owner on Feb 12, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
101 lines (87 loc) · 2.99 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
101 lines (87 loc) · 2.99 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Pre-commit Hooks Configuration
# Applies to: apps/* (Rust) and apps/web (TypeScript/React)
# Installation: https://pre-commit.com/
#
# Quick start:
# 1. Install pre-commit: 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:
# ============================================================================
# Backend (Rust) - apps/core and apps/tauri
# ============================================================================
# Cargo fmt: Rust formatter
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt (Rust)
entry: mise exec -- cargo fmt --all --
language: system
files: \.rs$
pass_filenames: false
# Cargo clippy: Rust linter (only check core, tauri need to build frontend first)
- repo: local
hooks:
- id: cargo-clippy
name: cargo clippy (Rust)
entry: mise exec -- cargo clippy -p echovault-core -- -D warnings
language: system
files: \.rs$
pass_filenames: false
# Cargo test: Rust tests (only test core, tauri need to build frontend first)
- repo: local
hooks:
- id: cargo-test
name: cargo test (Rust)
entry: mise exec -- cargo test -p echovault-core
language: system
files: \.rs$
pass_filenames: false
# ============================================================================
# Frontend (TypeScript/React) - apps/web
# ============================================================================
# Biome: Linter + Formatter for TypeScript/React
- repo: local
hooks:
- id: biome
name: biome check (TypeScript/React)
entry: mise exec -- pnpm -C apps/web exec biome check --write
language: system
files: ^apps/web/
exclude: ^apps/web/(dist|node_modules)/
types_or: [javascript, tsx, jsx, json]
pass_filenames: false
# TypeScript: Type checker
- repo: local
hooks:
- id: typescript-check
name: typescript type check (TypeScript/React)
entry: mise exec -- pnpm -C apps/web run typecheck
language: system
files: ^apps/web/
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]