-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
44 lines (40 loc) · 1.21 KB
/
.pre-commit-config.yaml
File metadata and controls
44 lines (40 loc) · 1.21 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
repos:
# Built-in hooks for basic file validation
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
exclude: ^.*\.(md|mdx)$
- id: end-of-file-fixer
exclude: ^.*\.(md|mdx)$
- id: check-yaml
args: [--allow-multiple-documents]
- id: check-json
- id: mixed-line-ending
args: [--fix=lf]
# JSON formatting and validation
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: pretty-format-json
args: [--autofix, --indent=2]
files: ^docs\.json$
# Local hooks for Mintlify-specific validation
- repo: local
hooks:
# Validate docs.json structure and redirects
- id: validate-mintlify-config
name: Validate Mintlify docs.json
entry: python3
args: [.scripts/validate-redirects.py]
language: system
files: ^docs\.json$
always_run: false
pass_filenames: false
# Markdown linting (using markdownlint-cli2)
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.10.0
hooks:
- id: markdownlint-cli2
args: [--config, .markdownlint.yaml]
files: \.mdx?$