-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
66 lines (60 loc) · 2.1 KB
/
.pre-commit-config.yaml
File metadata and controls
66 lines (60 loc) · 2.1 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
# Pre-commit hooks for ScriptHammer
# Install: pip install pre-commit && pre-commit install
# For commit-msg hooks: pre-commit install --hook-type commit-msg
# Run manually: pre-commit run --all-files
repos:
# Basic file hygiene
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
exclude: \.svg$
- id: end-of-file-fixer
exclude: \.svg$
- id: check-yaml
args: [--unsafe] # Allow custom tags in GitHub Actions
- id: check-json
- id: check-added-large-files
args: ['--maxkb=1000']
- id: check-merge-conflict
- id: detect-private-key
# Python linting with Ruff (fast, modern)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
files: ^docs/design/wireframes/.*\.py$
- id: ruff-format
files: ^docs/design/wireframes/.*\.py$
# Shell script linting
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.6
hooks:
- id: shellcheck
args: [-x] # Follow sourced files
# Markdown linting
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.39.0
hooks:
- id: markdownlint
args: [--fix, --disable, MD013, MD033, MD041, --]
# MD013: Line length (too strict for specs)
# MD033: Inline HTML (needed for some docs)
# MD041: First line heading (not always applicable)
# Local hooks for project-specific validation
- repo: local
hooks:
- id: validate-wireframes
name: Validate SVG wireframes
entry: python docs/design/wireframes/validate-wireframe.py
language: system
files: ^docs/design/wireframes/.*\.svg$
pass_filenames: true
# Conventional commits (install with: pre-commit install --hook-type commit-msg)
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.1.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: [feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert]