-
Notifications
You must be signed in to change notification settings - Fork 543
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
73 lines (73 loc) · 2.14 KB
/
.pre-commit-config.yaml
File metadata and controls
73 lines (73 loc) · 2.14 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
args: ["--maxkb=500"]
exclude: >
(?x)^(
package-lock\.json
)$
- id: fix-byte-order-marker
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements
- id: detect-private-key
- repo: https://github.com/adamchainz/django-upgrade
rev: "1.15.0"
hooks:
- id: django-upgrade
args: [--target-version, "5.0"]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.6
hooks:
# Run the linter.
- id: ruff
args: [--fix]
# Run the formatter.
- id: ruff-format
- repo: local
hooks:
- id: eslint
name: eslint-local
entry: pnpm run lint
language: system
types: [file]
files: \.(js|jsx|ts|tsx)$
exclude: >
(?x)^(
.+\.config\.js|
.+\.setup\.js|
openapi-ts\.config\.ts |
frontend/js/api/.*
)$
pass_filenames: true
- id: tsc
name: tsc-local
entry: pnpm run tsc
language: system
types: [file]
files: \.(ts|tsx)$
pass_filenames: false
- id: missing-migrations
name: missing-migrations-local
entry: poetry run python backend/manage.py makemigrations --check
language: system
# Only run missing migration check if migration-generating files have changed:
files: (.*/?(settings|migrations|models)/.+|.+models\.py|.+constants\.py|.+choices\.py|.+pyproject\.toml)
pass_filenames: false
- id: backend-schema
name: backend-schema-local
entry: poetry run python backend/manage.py spectacular --color --file backend/schema.yml
language: system
files: ^backend/
pass_filenames: false
- id: frontend-api
name: frontend-api-local
entry: pnpm run openapi-ts
language: system
files: backend/schema\.yml$
pass_filenames: false