-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
65 lines (61 loc) · 1.66 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-merge-conflict # No merge conflict markers
name: No merge conflict markers
stages: [commit]
- id: mixed-line-ending # No mix of \n and \r\n
name: No mixed line endings (LF and CRLF)
stages: [commit]
- id: no-commit-to-branch
name: Not committing to master
args: [--branch, master]
stages: [commit]
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
stages: [commit]
types: [python]
exclude: gen/
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.262
hooks:
- id: ruff
args: [--fix]
stages: [commit]
types: [python]
exclude: gen/
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier
stages: [commit]
files: "js/"
exclude: gen/
- repo: local
hooks:
- id: npm-run-build
name: npm-run-build
# npm install to ensure we have the latest dependencies installed
entry: bash -c "npm install && npm run build;"
stages: [push]
files: js/
language: system
pass_filenames: false
- id: mypy-all
name: MyPy (all)
pass_filenames: false
files: src/
entry: hatch -e dev run mypy src/
stages: [push]
language: system
- id: pytest
name: pytest
stages: [push]
language: system
entry: hatch -e test run pytest
types: [python]
pass_filenames: false
verbose: true