-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
59 lines (56 loc) · 1.65 KB
/
.pre-commit-config.yaml
File metadata and controls
59 lines (56 loc) · 1.65 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
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.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/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.1
hooks:
# Run the linter.
- id: ruff
args: [--fix]
# Run the formatter.
- id: ruff-format
- repo: local
hooks:
- id: frontend-lint
name: run frontend lint
entry: sh -c 'cd frontend && bun run lint'
language: system
types: [ file ]
files: ^frontend/.*\.(js|jsx|ts|tsx)$
pass_filenames: true
- id: frontend format
name: Run format on frontend files
entry: sh -c 'cd frontend && bun run format'
language: system
types: [ file ]
files: ^frontend/.*\.(js|jsx|ts|tsx)$
pass_filenames: true
- id: frontend typecheck
name: run frontend typecheck
entry: sh -c 'cd frontend && bun run typecheck'
language: system
types: [ file ]
files: ^frontend/.*\.(ts|tsx)$
pass_filenames: false
- id: generate-frontend-client
name: generate frontend client
entry: sh -c 'just generate-client'
language: system
# Only run frontend client generation if frontend files have changed:
files: openapi\.json$
pass_filenames: false