forked from Servarr/Wiki
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
53 lines (49 loc) · 1.79 KB
/
.pre-commit-config.yaml
File metadata and controls
53 lines (49 loc) · 1.79 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
default_stages: [pre-commit]
fail_fast: true
repos:
# General file checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
exclude: \.(png|jpg|jpeg|gif|svg|webp)$
stages: [pre-commit, pre-merge-commit, pre-push, manual]
- id: end-of-file-fixer
exclude: \.(md|hash|png|jpg|jpeg|gif|svg|webp)$
stages: [pre-commit, pre-merge-commit, pre-push, manual]
- id: check-yaml
stages: [pre-commit, pre-merge-commit, pre-push, manual]
- id: check-json
stages: [pre-commit, pre-merge-commit, pre-push, manual]
- id: check-merge-conflict
stages: [pre-commit, pre-merge-commit, pre-push, manual]
- id: check-case-conflict
stages: [pre-commit, pre-merge-commit, pre-push, manual]
- id: check-added-large-files
args: ["--maxkb=1000"]
exclude: \.(png|jpg|jpeg|gif|svg|webp)$
stages: [pre-commit, pre-merge-commit, pre-push, manual]
# Markdown specific formatting and linting
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.37.0
hooks:
- id: markdownlint
args: ["--config", ".markdownlint.json", "--fix"]
files: \.md$
stages: [pre-commit, pre-merge-commit, pre-push, manual]
# Spell checking for markdown files
- repo: https://github.com/crate-ci/typos
rev: v1.24.6
hooks:
- id: typos
args: ["--config", ".typos.toml"]
files: \.md$
stages: [pre-commit, pre-merge-commit, pre-push, manual]
# YAML formatting
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
files: \.(yaml|yml)$
args: ["--tab-width", "2"]
stages: [pre-commit, pre-merge-commit, pre-push, manual]