Create .pre-commit-config.yaml
taylor_socfortress committed
Jul 10, 2023 at 16:35 UTC
afd3b0e9132d314fe0a720cd0e2df5b7859013df
1 file changed
+62
.pre-commit-config.yaml
new
+62
@@ -0,0 +1,62 @@
1
+repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v4.4.0
4
+ hooks:
5
+ - id: check-merge-conflict
6
+ - id: check-yaml
7
+ args: ["--unsafe"]
8
+ - id: end-of-file-fixer
9
+ - id: check-json
10
+ - id: trailing-whitespace
11
+ - id: check-added-large-files
12
+ - id: detect-private-key
13
+ - id: requirements-txt-fixer
14
+ args: ["backend/requirements.txt", "backend/requirements.in"]
15
+ - repo: https://github.com/PyCQA/isort
16
+ rev: 5.12.0
17
+ hooks:
18
+ - id: isort
19
+ name: Sort python imports (shows diff)
20
+ args: ["-c", "--diff"]
21
+ - id: isort
22
+ name: Sort python imports (fixes files)
23
+
24
+ - repo: https://github.com/psf/black
25
+ rev: 23.3.0
26
+ hooks:
27
+ - id: black
28
+ language_version: python3.9
29
+
30
+ - repo: https://github.com/asottile/setup-cfg-fmt
31
+ rev: v2.3.0
32
+ hooks:
33
+ - id: setup-cfg-fmt
34
+
35
+ - repo: https://github.com/asottile/add-trailing-comma
36
+ rev: v2.4.0
37
+ hooks:
38
+ - id: add-trailing-comma
39
+
40
+ - repo: https://github.com/PyCQA/flake8
41
+ rev: 6.0.0
42
+ hooks:
43
+ - id: flake8
44
+ name: Check project styling
45
+
46
+ - repo: https://github.com/pre-commit/mirrors-prettier
47
+ rev: "v3.0.0-alpha.6"
48
+ hooks:
49
+ - id: prettier
50
+
51
+ - repo: https://github.com/pre-commit/mirrors-eslint
52
+ rev: v8.41.0
53
+ hooks:
54
+ - id: eslint
55
+ files: \.([cjt]sx?|[cm]ts|[cm]js|cvue)$ # *.js, *.jsx, *.ts, *.tsx and *.vue
56
+ additional_dependencies:
57
+ - "@rushstack/eslint-patch@1.2.0"
58
+ - eslint@8.39.0
59
+ - "@vue/eslint-config-prettier@7.1.0"
60
+ - "@vue/eslint-config-typescript@11.0.2"
61
+ - eslint-plugin-cypress@2.13.3
62
+ - eslint-plugin-vue@9.11.1