This repository was archived by the owner on Mar 26, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
81 lines (72 loc) · 2.2 KB
/
.pre-commit-config.yaml
File metadata and controls
81 lines (72 loc) · 2.2 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
74
75
76
77
78
79
80
81
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.13
repos:
# 標準チェック(FastAPI公式参考)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
# Ruff(format + lint:fix)- 並列実行対応
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.7
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
# uv lock同期(推奨)
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.5
hooks:
- id: uv-lock
# Local hooks(uv環境活用)
- repo: local
hooks:
# OpenAPI生成(pre-commitのみ)
- id: openapi-generate
name: Generate OpenAPI spec
entry: make openapi:generate
language: system
pass_filenames: false
files: ^app/.*\.py$
stages: [pre-commit]
# Frontend lint(pre-commitのみ)
- id: frontend-lint
name: Frontend lint with ESLint
entry: make frontend:lint:fix
language: system
pass_filenames: false
files: ^frontend/.*\.(ts|tsx|js|jsx)$
stages: [pre-commit]
# Backend Type check(pre-pushのみ)
- id: mypy
name: Backend type check with mypy
entry: make type-check
language: system
pass_filenames: false
always_run: true
stages: [pre-push]
# Frontend Type check(pre-pushのみ)
- id: frontend-type-check
name: Frontend type check with tsc
entry: make frontend:type-check
language: system
pass_filenames: false
files: ^frontend/.*\.(ts|tsx)$
stages: [pre-push]
# Backend Tests(pre-pushのみ)
- id: pytest
name: Run backend tests
entry: make test
language: system
pass_filenames: false
always_run: true
stages: [pre-push]
ci:
autofix_commit_msg: 🎨 [pre-commit.ci] Auto format
autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate