-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.pre-commit-config.yaml
176 lines (171 loc) · 5.02 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
167
168
169
170
171
172
173
174
175
176
# https://pre-commit.com/
exclude: ^(.*\/migrations|.*package.json|.*package-lock.json|Pipfile*|.vscode|.*.spec.js|.*jsconfig.json|.*\/tests/files/.*.tsv)
repos:
# GENERAL
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: forbid-new-submodules
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-symlinks
- id: check-vcs-permalinks
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.9
hooks:
- id: forbid-crlf
- id: remove-crlf
- id: forbid-tabs
- id: remove-tabs
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-json
- id: pretty-format-json
args: [--autofix, --no-ensure-ascii]
# PYTHON
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-ast
- id: check-builtin-literals
- id: check-docstring-first
- id: debug-statements
- id: fix-encoding-pragma
args: [--remove]
- id: requirements-txt-fixer
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.2
hooks:
- id: pyupgrade
- repo: https://github.com/ambv/black
rev: 24.4.2
hooks:
- id: black
args: [--line-length=119]
exclude: ^migrations/
- repo: https://github.com/pycqa/flake8
rev: 3.8.3
hooks:
- id: flake8
args: [--config=.flake8]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.1.3
hooks:
- id: python-safety-dependencies-check
# BASH
- repo: https://github.com/bemeurer/beautysh.git
rev: 6.0.1
hooks:
- id: beautysh
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 2.1.4
hooks:
- id: script-must-have-extension
# XML / YAML
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-xml
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.24.2
hooks:
- id: yamllint
args: ["-d {rules: {line-length: {max: 999}}}"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-yaml
- id: sort-simple-yaml
- repo: https://gitlab.com/devopshq/gitlab-ci-linter
rev: v1.0.1
hooks:
- id: gitlab-ci-linter
# JS (Vue 2 app)
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v7.32.0
hooks:
- id: eslint
name: vue2-eslint
additional_dependencies:
- vue-eslint-parser@latest
- eslint-plugin-vue@latest
- eslint-plugin-jquery@latest
- eslint-plugin-eslint-plugin@latest
- prettier@latest
- eslint-config-prettier@latest
- eslint-plugin-prettier@latest
- babel-eslint
args: [-c=frontend/.eslintrc.js, --fix]
types:
- vue
files: ^frontend/
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v7.32.0
hooks:
- id: eslint
name: js-eslint-v2
additional_dependencies:
- vue-eslint-parser@latest
- eslint-plugin-vue@latest
- eslint-plugin-jquery@latest
- eslint-plugin-eslint-plugin@latest
- prettier@latest
- eslint-config-prettier@latest
- eslint-plugin-prettier@latest
- babel-eslint
args: [-c=frontend/.eslintrc.js, --fix]
files: ^frontend/
# JS (Vue 3 app)
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.55.0
hooks:
- id: eslint
name: vue3-eslint
additional_dependencies:
- vue-eslint-parser@latest
- eslint-plugin-vue@latest
- eslint-plugin-jquery@latest
- eslint-plugin-eslint-plugin@latest
- prettier@latest
- eslint-config-prettier@latest
- eslint-plugin-prettier@latest
- babel-eslint
args: [-c=2024-frontend/.eslintrc.cjs, --fix]
types:
- vue
files: ^2024-frontend/
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.55.0
hooks:
- id: eslint
name: js-eslint-v3
additional_dependencies:
- vue-eslint-parser@latest
- eslint-plugin-vue@latest
- eslint-plugin-jquery@latest
- eslint-plugin-eslint-plugin@latest
- prettier@latest
- eslint-config-prettier@latest
- eslint-plugin-prettier@latest
- babel-eslint
args: [-c=2024-frontend/.eslintrc.cjs, --fix]
files: ^2024-frontend/