-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
150 lines (138 loc) · 3.65 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
143
144
145
146
147
148
149
150
repos:
## Common
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: pretty-format-json
- id: trailing-whitespace
# shell
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.7.0-4
hooks:
- id: shfmt
# lua
- repo: https://github.com/JohnnyMorganz/StyLua
rev: v0.20.0
hooks:
- id: stylua
# security
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.2
hooks:
- id: gitleaks-system
# Python
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.5
hooks:
- id: ruff
args: ["--fix", --exit-non-zero-on-fix]
- id: ruff-format
# rust
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
- id: cargo-check
- id: clippy
# config
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.24.0
hooks:
- id: check-github-workflows
- id: check-github-actions
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.29.0
hooks:
- id: yamllint
args: [--strict, -c=/path/to/.yamllint]
# golang
- repo: https://github.com/tekwizely/pre-commit-golang
rev: master
hooks:
- id: go-build-mod
- id: go-mod-tidy
- id: go-vet
- id: go-sec-repo-pkg
- id: go-staticcheck-repo-pkg
- id: go-structslop-repo-pkg
- id: go-fmt
- id: go-fmt-repo
- id: go-lint
- id: go-critic
# web
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
args: [--config, site/.prettierrc.yml, --write] # edit files in-place
additional_dependencies:
- prettier
- prettier-plugin-svelte
- svelte
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.10.0
hooks:
- id: eslint
types: [file]
args: [--fix, --config, site/eslint.config.js]
files: \.(js|ts|svelte)$
additional_dependencies:
- eslint
- eslint-plugin-svelte
- svelte
- typescript
- typescript-eslint
- repo: https://github.com/shssoichiro/oxipng
rev: v9.0.0
hooks:
- id: oxipng
args: ["-o", "4", "--strip", "safe", "--alpha"]
# writing
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
hooks:
- id: markdownlint
args: ['--']
- repo: https://github.com/rhysd/actionlint
rev: v1.7.4
hooks:
- id: actionlint
- repo: https://github.com/PrincetonUniversity/blocklint
rev: v0.2.4
hooks:
- id: blocklint
- repo: https://github.com/crate-ci/typos
rev: v1.27.3
hooks:
- id: typos
- repo: https://github.com/FlamingTempura/bibtex-tidy
rev: v1.14.0
hooks:
- id: bibtex-tidy
args: ['--align=100', '--curly']
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.96.2
hooks:
- id: terraform_fmt
- id: terraform_tflint
- id: terraform_validate
- id: terraform_tfsec
- repo: https://github.com/djlint/djLint.git
rev: v1.34.1
hooks:
- id: djlint-reformat-jinja
- id: djlint-jinja