-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
64 lines (60 loc) · 2.12 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
64 lines (60 loc) · 2.12 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
# Pre-commit hooks configuration for HashHive
# See https://pre-commit.com for more information
#
# Install: pip install pre-commit
# Then run: pre-commit install
# Update hooks: pre-commit autoupdate
repos:
# General file quality checks (well-maintained by pre-commit team)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
exclude: ^(node_modules/|dist/|coverage/|\.git/|package-lock\.json)
- id: end-of-file-fixer
exclude: ^(node_modules/|dist/|coverage/|\.git/|\.hook)
- id: check-yaml
args: [--unsafe] # Allow custom tags in YAML
types: [yaml]
- id: check-json
exclude: ^(node_modules/|dist/|coverage/|\.git/|package-lock\.json)
types: [json]
- id: check-added-large-files
args: [--maxkb=1000] # Warn on files > 1MB
- id: check-merge-conflict
- id: detect-private-key
exclude: ^(\.env\.example|\.env\.local\.example)
- id: check-vcs-permalinks
- id: check-case-conflict
- id: check-illegal-windows-names
- id: check-shebang-scripts-are-executable
types: [shell]
- id: check-symlinks
# Local hooks for oxc tooling and TypeScript
- repo: local
hooks:
# Format code with oxfmt (JS/TS/JSON/CSS) + taplo (TOML)
- id: format-check
name: Format Check (oxfmt + taplo)
entry: bash -c 'just format-check'
language: system
types_or: [javascript, jsx, ts, tsx, json, css, toml]
pass_filenames: false
always_run: true
# Lint with oxlint
- id: oxlint
name: oxlint
entry: bash -c 'just lint'
language: system
types_or: [javascript, jsx, ts, tsx]
pass_filenames: false
always_run: true
# Type checking before commit
# Note: No well-maintained 3rd party hook exists for tsc, so we use a local hook
- id: type-check
name: TypeScript Type Check
entry: bash -c 'mise x -- bun run type-check'
language: system
types: [javascript, jsx, ts, tsx]
pass_filenames: false
always_run: true