This repository has been archived by the owner on Aug 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
142 lines (131 loc) · 4.05 KB
/
.pre-commit-config.yaml
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# yamllint disable rule:line-length
# Initially copied from https://github.com/davidsneighbour/kollitsch.dev/blob/main/.pre-commit-config.yaml
# cspell:ignore reforme
# yamllint enable
ci:
autofix_prs: false
autoupdate_branch: pre-commit-updates
submodules: true
fail_fast: true
minimum_pre_commit_version: 2.18.1
# yamllint disable rule:key-ordering
repos:
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: v4.3.0
hooks:
- id: check-added-large-files
# - Prevent giant files from being committed.
- id: check-case-conflict
# - checks for files that would conflict in
# case-insensitive filesystems.
- id: check-docstring-first
# - checks a common error of defining a docstring after code.
- id: check-executables-have-shebangs
# - ensures that (non-binary) executables have a shebang.
- id: check-json
# - checks json files for parseable syntax.
exclude: ^(layouts/|.vscode/|_vendor)
- id: check-shebang-scripts-are-executable
# - ensures that (non-binary) files with a shebang are executable.
- id: check-merge-conflict
# - checks for files that contain merge conflict strings.
- id: check-symlinks
# - checks for symlinks which do not point to anything.
- id: check-toml
# - checks toml files for parseable syntax.
- id: check-vcs-permalinks
# - ensures that links to vcs websites are permalinks.
- id: check-xml
# - checks xml files for parseable syntax.
exclude: ^(layouts/|_vendor)
- id: check-yaml
# - checks yaml files for parseable syntax.
- id: destroyed-symlinks
# - detects symlinks which are changed to regular
# files with a content of a path which that symlink was pointing to.
- id: detect-private-key
# - detects the presence of private keys.
- id: file-contents-sorter
files: ^(tests/config/words-.*.txt$)
args: [--unique]
- id: fix-byte-order-marker
# - removes utf-8 byte order marker
- id: forbid-new-submodules
# - prevents addition of new git submodules.
- id: mixed-line-ending
# replaces or checks mixed line ending.
- id: no-commit-to-branch # - don't commit to branch
args:
- --branch
- main,
- --branch
- "v0.[0-9]" # yamllint disable-line
- id: pretty-format-json
# - Checks that all your JSON files are pretty. "Pretty"
# here means that keys are sorted and indented.
args: [--autofix, --indent, " "]
- id: trailing-whitespace
exclude: ^(_vendor)
args: [--markdown-linebreak-ext=md]
- repo: "https://github.com/pre-commit/mirrors-csslint"
rev: v1.0.5
# See https://github.com/CSSLint/csslint
hooks:
- id: csslint
- repo: "https://github.com/pre-commit/mirrors-scss-lint"
rev: v0.59.0
# See https://github.com/causes/scss-lint
hooks:
- id: scss-lint
- repo: "https://github.com/igorshubovych/markdownlint-cli"
rev: v0.32.1
hooks:
- id: markdownlint
args: [--config, tests/config/markdownlint.json]
files: .+\.(md|markdown)$
- repo: "https://github.com/PrincetonUniversity/blocklint"
rev: v0.2.3
hooks:
- id: blocklint
- repo: "https://github.com/adrienverge/yamllint"
rev: v1.26.3
hooks:
- id: yamllint
args: [-c=./tests/config/yamllint.yaml]
exclude: ^(_vendor)
- repo: "https://github.com/zricethezav/gitleaks"
rev: v8.8.4
hooks:
- id: gitleaks
- repo: "https://github.com/jorisroovers/gitlint"
rev: v0.17.0
hooks:
- id: gitlint
- repo: "https://github.com/editorconfig-checker/editorconfig-checker.python"
rev: 2.4.0
hooks:
- id: editorconfig-checker
alias: ec
args:
- -no-color
exclude: ^(LICENSE-|package(-lock)?.json$)
- repo: "https://github.com/streetsidesoftware/cspell-cli"
rev: v6.8.0
hooks:
- id: cspell
args:
- --config
- tests/config/cspell.json
- --gitignore
- --gitignore-root
- --no-cache
- --no-must-find-files
- --show-context
- --show-suggestions
- --validate-directives
exclude: ^(LICENSE-|tests/config/cspell.json$) # yamllint disable-line
# yamllint enable rule:key-ordering
...