-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
166 lines (149 loc) · 4.11 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# A config file for pre-commit.com
#
# Install pre-commit.com: https://pre-commit.com/#install
#
# Then run the following line to set up a pre-commit hook:
# pre-commit install
#
# And this to update hooks to the newest version:
# pre-commit autoupdate
#
# Now, whenever you try to commit, hooks defined in this file would run
# and check your files. They would run only only on staged files that
# had changes.
#
# You can manually trigger the hooks like this:
# pre-commit run
#
# You can tell it to check specific files:
# pre-commit run --files *.ts
#
# Or give it all files:
# pre-commit run --all-files
#
# Finally, you can disable some hooks by listing them in the `SKIP`
# variable. Example:
# SKIP=flake8,black git commit -m "foo"
default_language_version:
python: python3
default_stages:
- commit
- merge-commit
exclude: ^(lib|.idea)
repos:
#- repo: https://github.com/awebdeveloper/pre-commit-stylelint
# global hooks:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- id: check-case-conflict
- id: check-docstring-first
- id: check-xml
- id: check-shebang-scripts-are-executable
- id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: fix-byte-order-marker
- id: fix-encoding-pragma
- id: forbid-new-submodules
- repo: https://github.com/maxpatiiuk/pre-commit
rev: v1.0.6
hooks:
- id: tsc
- id: regex-blacklist
args:
- ~/site/git/dotfiles/git/regex-blacklist.txt
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
args:
- --skip="./node_modules/,package-lock.json,./.idea/"
- repo: https://github.com/psf/black
rev: 21.11b1
hooks:
- id: black
args:
- --line-length=72
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
args:
# these settings are needed to make flake8 compatible with black
- --max-line-length=88
- --select=C,E,F,W,B,B950
- --extend-ignore=E203,E501
- repo: https://github.com/terrencepreilly/darglint
rev: v1.8.1
hooks:
- id: darglint
args:
- -v 2
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910-1
hooks:
- id: mypy
exclude: ^docs/
- repo: https://github.com/asottile/pyupgrade
rev: v2.29.1
hooks:
- id: pyupgrade
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.20.0
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.0
hooks:
- id: prettier
additional_dependencies:
- prettier@^2.5.0
- '@prettier/plugin-xml@^0.13.1'
- prettier-plugin-package@^1.3.0
- prettier-plugin-sh@^0.8.1
- prettier-plugin-tailwind-css@^1.5.0
- prettier-plugin-firebase-database@^1.0.1
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.3.0
hooks:
- id: eslint
types: [text]
types_or: [javascript, jsx, ts, tsx]
additional_dependencies:
- '@maxxxxxdlp/eslint-config@^1.0.9'
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.2.2
hooks:
- id: python-safety-dependencies-check
- repo: https://github.com/jorisroovers/gitlint
rev: v0.17.0
hooks:
- id: gitlint
- repo: https://github.com/IamTheFij/docker-pre-commit
rev: v2.0.1
hooks:
- id: docker-compose-check
- repo: https://github.com/markdownlint/markdownlint
rev: v0.11.0
hooks:
- id: markdownlint
files: \.md$
args:
- --git-recurse
- repo: https://github.com/maxpatiiuk/mirrors-jscpd
rev: v3.3.26
hooks:
- id: jscpd
types: [text]