forked from gip-inclusion/carnet-de-bord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
99 lines (86 loc) · 2.5 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
ci:
autoupdate_schedule: quarterly
default_stages: [commit]
default_install_hook_types: [pre-commit, commit-msg]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-case-conflict
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
exclude: /__snapshots__/
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
args: [--target-version=py310]
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
- repo: local
hooks:
- id: app-prettier
name: run prettier (app)
language: system
files: ^app/.*$
types_or: [javascript, ts, svelte]
entry: |
bash -c 'npm --prefix app run fix:prettier --write "${@#*/}"' --
- id: app-check
name: run svelte-check (app)
language: system
files: ^app/.*$
types_or: [javascript, ts, svelte]
pass_filenames: false
entry: |
bash -c 'npm --prefix app run check' --
- id: app-eslint
name: run eslint (app)
language: system
files: ^app/.*$
types_or: [javascript, ts, svelte]
exclude: /_gen/
entry: |
bash -c 'npm --prefix app run fix:eslint "${@#*/}"' --
- id: e2e-prettier
name: run prettier (e2e)
language: system
files: ^e2e/.*$
types_or: [javascript]
entry: |
bash -c 'npm --prefix e2e run fix:prettier "${@#*/}"' --
- id: e2e-eslint
name: run eslint (e2e)
language: system
files: ^e2e/.*$
types_or: [javascript]
entry: |
bash -c 'npm --prefix e2e run fix:eslint "${@#*/}"' --
- id: check-hasura-version
name: ensure hasura version consistency
language: system
pass_filenames: false
files: |
(?x)^(
hasura/Dockerfile|
hasura/.hasura_version|
)
entry: |
./scripts/check-hasura-version.sh
- id: check-codegen
name: check if codegen needs to be ran
language: system
pass_filenames: false
files: ^app/.*\.gql$
entry: |
./scripts/check-codegen.sh
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: "v8.0.0"
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]