-
Notifications
You must be signed in to change notification settings - Fork 4
/
.pre-commit-config.yaml
89 lines (89 loc) · 2.72 KB
/
.pre-commit-config.yaml
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
82
83
84
85
86
87
88
89
repos:
- repo: local
hooks:
- id: check-json
name: "✅ Check JSON files"
language: system
types: [json]
entry: poetry run check-json
- id: check-toml
name: "✅ Check TOML files"
language: system
types: [toml]
entry: poetry run check-toml
- id: check-yaml
name: "✅ Check YAML files"
language: system
types: [yaml]
entry: poetry run check-yaml
- id: check-json
name: "📁 Check for large files"
language: system
entry: poetry run check-added-large-files
- id: check-json
name: "🐛 Check for forgotten debug statemens"
language: system
types: [python]
entry: poetry run debug-statement-hook
- id: check-merge-conflict
name: "💥 Check for merge conflicts"
language: system
types: [text]
entry: poetry run check-merge-conflict
- id: check-symlinks
name: "🔗 Check for broken symlinks"
language: system
types: [symlink]
entry: poetry run check-symlinks
- id: codespell
name: "💭 Check for code spelling"
entry: poetry run codespell --write-changes --skip="./*"
language: system
pass_filenames: false
always_run: true
- id: end-of-file-fixer
name: "🔚 Fix End of Files"
language: system
types: [text]
entry: poetry run end-of-file-fixer
stages: [commit, push, manual]
- id: end-of-file-fixer
name: "⬜ Fix trailing whitespaces"
language: system
types: [text]
entry: poetry run end-of-file-fixer
stages: [commit, push, manual]
- id: ruff-check
name: "🐶 Ruff Linter"
language: system
types: [python]
entry: poetry run ruff check --fix
require_serial: true
stages: [commit, push, manual]
- id: ruff-format
name: "🐶 Ruff Formatter"
language: system
types: [python]
entry: poetry run ruff format
require_serial: true
stages: [commit, push, manual]
- id: poetry pyproject check
name: "📜 Check pyproject with Poetry"
language: system
entry: poetry check
pass_filenames: false
always_run: true
- id: no-commit-to-branch
name: "🛑 Don't commit to main branch"
language: system
entry: poetry run no-commit-to-branch
pass_filenames: false
always_run: true
args:
- --branch=master
- --branch=main
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
name: 🎨 Format using prettier