-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
45 lines (42 loc) · 1.57 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
45 lines (42 loc) · 1.57 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
# NB: Alembic scaffolding (src/career_os/_alembic) is generated + historical and
# has already run against production databases, so the *rewriting* hooks must not
# touch it (G-1350). The exclude is applied per-hook rather than top-level on
# purpose: a global `exclude:` would also switch off detect-private-key,
# check-added-large-files, check-merge-conflict and gitleaks for that path.
# Ruff skips the directory via extend-exclude in pyproject.toml.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
exclude: ^src/career_os/_alembic/
- id: trailing-whitespace
exclude: ^src/career_os/_alembic/
- id: check-yaml
- id: check-added-large-files
args: ["--maxkb=1024"]
- id: check-merge-conflict
- id: detect-private-key
- id: mixed-line-ending
args: ["--fix=lf"]
exclude: ^src/career_os/_alembic/
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
files: ^(src|tests)/
- id: ruff-format
files: ^(src|tests)/
# pre-commit/mirrors-prettier was archived in March 2024.
# rbubley/mirrors-prettier is the actively-maintained fork.
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.3.3
hooks:
- id: prettier
files: ^frontend/src/.*\.(ts|tsx|js|jsx|css|json|md)$
exclude: ^frontend/(dist|node_modules)/
- repo: https://github.com/gitleaks/gitleaks
rev: v8.21.2
hooks:
- id: gitleaks