-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
71 lines (63 loc) · 2.34 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
71 lines (63 loc) · 2.34 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
default_language_version:
python: python3
exclude: |
(?x)^(
\.pre-commit-config\.yaml|
CLAUDE\.md|
BLOG_POST_TEMPLATE\.md|
_site/.*|
Gemfile\.lock
)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-yaml
- id: check-json
- id: check-added-large-files
args: [--maxkb=1024]
- id: mixed-line-ending
args: [--fix=lf]
- repo: local
hooks:
# Prose-focused hooks are markdown-only. The existing hand-written
# HTML pages use em dashes intentionally in titles, headings, and
# quote attributions; widening scope to all text would flag those.
- id: no-em-dash
name: em dash detected (use comma, period, or parentheses)
entry: '—'
language: pygrep
types: [markdown]
- id: no-smart-quotes
# Alternation, not a character class. pygrep matches the pattern
# against raw file bytes, so [“”‘’] becomes a class of individual
# UTF-8 bytes (\xe2, \x80, ...) and false-positives on any other
# multi-byte char that shares those bytes (e.g. ↗, └, ⚙️).
name: smart quotes detected (use straight quotes)
entry: '“|”|‘|’'
language: pygrep
types: [markdown]
- id: no-unicode-ellipsis
name: unicode ellipsis detected (use three dots)
entry: '…'
language: pygrep
types: [markdown]
- id: no-ai-filler
name: AI filler vocabulary detected
entry: '(?i)\b(delve|delving|leverage(s|d|ing)?|seamless(ly)?|robust|comprehensive(ly)?|in conclusion|to summarize|it is worth noting|dive deep(er)?|navigate the (landscape|complexities))\b'
language: pygrep
types: [markdown]
- id: no-bold-section-titles
name: bolded section title (use a markdown heading instead)
entry: '^\*\*[^*\n]+\*\*\s*$'
language: pygrep
types: [markdown]
- id: no-bold-callout-prefix
name: bolded callout prefix like **Note:** (rewrite as prose)
entry: '^\s*\*\*(Note|Tip|Warning|Important|Caution|Info|Remember|Pro tip|Heads up|Key insight):\*\*'
language: pygrep
types: [markdown]