main
yaml 55 lines 1.65 KB
Raw
1 exclude: "^backend/app/routers/__init__.py$|^backend/app/db/all_models.py$"
2 repos:
3 - repo: https://github.com/pre-commit/pre-commit-hooks
4 rev: v4.4.0
5 hooks:
6 - id: check-merge-conflict
7 - id: check-yaml
8 args: ["--unsafe"]
9 - id: end-of-file-fixer
10 exclude: '\.json$'
11 - id: check-json
12 - id: trailing-whitespace
13 - id: check-added-large-files
14 #- id: detect-private-key # Not using since uploading nginx key
15 - id: requirements-txt-fixer
16 args: ["backend/requirements.txt", "backend/requirements.in"]
17
18 - repo: https://github.com/PyCQA/isort
19 rev: 5.12.0
20 hooks:
21 - id: isort
22 name: Sort python imports (shows diff)
23 args: ["-c", "--diff"]
24 - id: isort
25 name: Sort python imports (fixes files)
26
27 - repo: https://github.com/psf/black
28 rev: 23.7.0
29 hooks:
30 - id: black
31 language_version: python3.11
32 exclude: ^backend/app/connectors/velociraptor/services/artifacts.py$
33
34 - repo: https://github.com/asottile/setup-cfg-fmt
35 rev: v2.4.0
36 hooks:
37 - id: setup-cfg-fmt
38
39 - repo: https://github.com/asottile/add-trailing-comma
40 rev: v3.2.0
41 hooks:
42 - id: add-trailing-comma
43
44 - repo: https://github.com/PyCQA/flake8
45 rev: 6.0.0
46 hooks:
47 - id: flake8
48 name: Check project styling
49
50 - repo: https://github.com/pre-commit/mirrors-eslint
51 rev: v10.2.1
52 hooks:
53 - id: eslint
54 args: ["--config", "frontend/eslint.config.mjs"]
55 exclude: ^(docs/|tools/)