-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
51 lines (45 loc) · 1.4 KB
/
.pre-commit-config.yaml
File metadata and controls
51 lines (45 loc) · 1.4 KB
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
default_stages: [commit, push]
repos:
# Base hooks that run on all files
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v5.0.0"
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: ["--allow-multiple-documents"]
- id: check-merge-conflict
- id: check-json
- id: check-added-large-files
args: [--maxkb=1024]
# Python hooks
- repo: https://github.com/asottile/reorder_python_imports
rev: "v3.14.0"
hooks:
- id: reorder-python-imports
# Only run on Python files in backend and agent directories
files: ^(backend|agent)/.*\.py$
- repo: https://github.com/PyCQA/flake8
rev: "7.1.1"
hooks:
- id: flake8
args: ["--config", "./setup.cfg"]
files: ^(backend|agent)/.*\.py$
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
hooks:
- id: pyupgrade
files: ^(backend|agent)/.*\.py$
# Frontend hooks (example for JavaScript/TypeScript)
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.3"
hooks:
- id: prettier
files: ^(frontend|ui)/.*\.(js|jsx|ts|tsx|css|scss|json|md|html)$
types_or: [javascript, typescript, css, scss, json, markdown, html]
# Git hooks
- repo: https://github.com/jorisroovers/gitlint
rev: v0.19.1
hooks:
- id: gitlint
args: ["--msg-filename"]