-
Notifications
You must be signed in to change notification settings - Fork 74
/
.pre-commit-config-with-static-check.yml
65 lines (57 loc) · 1.88 KB
/
.pre-commit-config-with-static-check.yml
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
minimum_pre_commit_version: "2"
# To use hooks on the pre-commit stage only, run
# pre-commit install --hook-type pre-commit
fail_fast: true
repos:
- repo: local
hooks:
- id: gitleaks-pre-commit
name: gitleaks-pre-commit
description: Detect hardcoded secrets pre-commit using Gitleaks
entry: gitleaks protect --verbose --no-banner --redact --staged
language: system
stages: [commit]
- id: gitleaks-pre-push
# To use this pre-push hook, run
# pre-commit install --hook-type pre-push
name: gitleaks-pre-push
description: Detect hardcoded secrets pre-push using Gitleaks
entry: gitleaks detect --verbose --no-banner --redact --log-opts "origin..HEAD"
language: system
stages: [push]
- id: black
name: black
description: Format code using Black
entry: nox -s "black(fix)" --
language: system
types: [python]
- id: isort
name: isort
description: Sort imports alphabetically
entry: nox -s "isort(fix)" --
language: system
types: [python]
- id: mypy
name: mypy
description: Check for type hints
entry: nox -s "mypy" --
language: system
types: [python]
- id: pylint
name: pylint
description: Check for linting errors
entry: nox -s "pylint" --
language: system
types: [python]
- id: npm-run-format
name: npm-run-format
description: Check for frontend linting errors
entry: sh -c 'cd clients; npm run format'
language: system
types: [javascript, jsx, ts, tsx]
- id: npm-run-lint
name: npm-run-lint
description: Check for frontend linting errors
entry: sh -c 'cd clients; npm run lint:fix'
language: system
types: [javascript, jsx, ts, tsx]