-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
76 lines (61 loc) · 2.08 KB
/
.pre-commit-config.yaml
File metadata and controls
76 lines (61 loc) · 2.08 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
repos:
# Gitleaksでシークレットスキャン
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.1
hooks:
- id: gitleaks
# 基本的なファイルチェック
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
# 大きなファイルの追加をチェック
- id: check-added-large-files
args: ['--maxkb=1000']
# マージコンフリクトマーカーをチェック
- id: check-merge-conflict
# YAML構文チェック
- id: check-yaml
args: ['--unsafe'] # カスタムYAMLタグを許可
# JSON構文チェック
- id: check-json
exclude: 'tsconfig.*\.json$' # TypeScriptの設定ファイルはコメントを含むため除外
# ファイル末尾の改行を修正
- id: end-of-file-fixer
# 行末の空白を削除
- id: trailing-whitespace
# プライベートキーの検出
- id: detect-private-key
# AWS認証情報の検出
- id: detect-aws-credentials
args: ['--allow-missing-credentials']
# 大文字小文字の競合をチェック
- id: check-case-conflict
# 実行可能なシェルスクリプトにshebangがあるかチェック
- id: check-executables-have-shebangs
# シンボリックリンクの整合性チェック
- id: check-symlinks
# 破損したシンボリックリンクをチェック
- id: destroyed-symlinks
# TypeScript/JavaScript用のlint
- repo: local
hooks:
- id: eslint
name: ESLint
entry: npx eslint --fix
language: system
types: [javascript, jsx, ts, tsx]
require_serial: true
# Python用のlint(必要に応じて)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9
hooks:
- id: ruff
args: [--fix]
types_or: [python, pyi]
- id: ruff-format
types_or: [python, pyi]
# 設定
default_install_hook_types: [pre-commit, commit-msg]
default_stages: [pre-commit]
fail_fast: false
minimum_pre_commit_version: 2.15.0