-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path.pre-commit-config.yaml
70 lines (65 loc) · 2.22 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
default_stages: [pre-commit]
default_install_hook_types: [pre-commit, commit-msg]
repos:
- repo: local
hooks:
- id: generate-api-client
name: "Build: API TypeScript types"
entry: ./web/generate-api-typescript-client-pre-commit.sh
language: system
pass_filenames: false
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.4.0
hooks:
- id: conventional-pre-commit
name: "Check: conventional formatted commit message"
stages: [commit-msg]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-merge-conflict
name: "Check: no merge conflict strings"
- id: no-commit-to-branch
name: "Check: no commit to main"
args: [--branch, main, --branch, master]
stages: [commit-msg]
- id: check-ast
name: "Check: parse .py files"
language_version: python3.12
- id: check-json
name: "Check: parse .json files"
- id: check-toml
name: "Check: parse .toml files"
- id: check-yaml
name: "Check: parse .yaml files"
- id: check-case-conflict
name: "Check: no case conflicting file names"
- id: trailing-whitespace
name: "Lint : remove trailing whitespaces"
exclude: ^web/src/api/generated/|^.*\.(lock)$
- id: end-of-file-fixer
name: "Lint : files end with only newline"
exclude: ^web/src/api/generated/|^.*\.(lock)$
- id: mixed-line-ending
name: "Lint : consistent file ending"
exclude: ^.*\.(lock)$
- id: detect-private-key
name: "Check: no private keys are commited"
exclude: api/src/tests/integration/mock_authentication.py
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.9.7"
hooks:
- id: ruff
name: "Lint : ruff (python)"
files: ^api/.*\.py$
args: ["--fix"]
- id: ruff-format
name: "Lint : ruff-format (python)"
files: ^api/.*\.py$
- repo: https://github.com/biomejs/pre-commit
rev: v0.6.1
hooks:
- id: biome-check
name: "Lint : biome (ts/js)"
additional_dependencies: ["@biomejs/biome@1.9.4"]
args: ["--config-path", "web"]