-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
95 lines (86 loc) · 2.92 KB
/
.pre-commit-config.yaml
File metadata and controls
95 lines (86 loc) · 2.92 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
# Pre-commit configuration for awesome-omarchy
# This file includes all the same validation tools that run in CI
# Install: pip install pre-commit && pre-commit install
# Run manually: pre-commit run --all-files
repos:
# Awesome List Validation
- repo: local
hooks:
- id: awesome-lint
name: Awesome List Lint
entry: npx awesome-lint
language: system
files: README\.md$
description: "Validate README.md against awesome list standards"
pass_filenames: false
require_serial: true
# Markdown Formatting and Linting
- repo: local
hooks:
- id: remark-lint
name: Markdown Lint (remark)
entry: bash -c 'npx remark --frail --quiet --no-stdout README.md CONTRIBUTING.md'
language: system
files: \.(md|markdown)$
description: "Lint markdown files with remark-cli"
pass_filenames: false
require_serial: true
# Spell Checking
- repo: https://github.com/crate-ci/typos
rev: v1.35.4
hooks:
- id: typos
name: Spell Check (typos)
files: \.(md|markdown)$
description: "Check spelling in markdown files"
# Link Checking (Optional - can be slow)
- repo: local
hooks:
- id: lychee-links
name: Link Check (lychee)
entry: lychee
language: system
files: \.(md|markdown)$
args: ['--config', '.github/workflows/lychee.toml', '--verbose', '--no-progress']
description: "Check links in markdown files"
pass_filenames: true
# Set to manual stage so it doesn't run automatically on every commit
stages: [manual]
# Basic Git Hooks (Additional Quality Checks)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
name: Trim Trailing Whitespace
description: "Remove trailing whitespace"
exclude: ^\.pages/
- id: end-of-file-fixer
name: Fix End of Files
description: "Ensure files end with a newline"
exclude: ^\.pages/
- id: check-yaml
name: Check YAML Syntax
description: "Validate YAML file syntax"
exclude: ^\.pages/
- id: check-toml
name: Check TOML Syntax
description: "Validate TOML file syntax"
exclude: ^\.pages/
- id: check-merge-conflict
name: Check Merge Conflicts
description: "Check for merge conflict markers"
exclude: ^\.pages/
- id: mixed-line-ending
name: Mixed Line Ending
description: "Replace or check mixed line endings"
exclude: ^\.pages/
# CI Environment Setup (for local development)
# These settings ensure your local environment matches CI
default_language_version:
node: '22'
# Configure specific stages
default_stages: [pre-commit, pre-push]
# Fail fast - stop on first failure
fail_fast: true
# Minimum pre-commit version required
minimum_pre_commit_version: '3.0.0'