-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
66 lines (61 loc) · 2.2 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
66 lines (61 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
# prek (pre-commit hooks) configuration
# See: https://prek.j178.dev/ and https://github.com/j178/prek
#
# Hooks run automatically on `git commit` once the git hook is installed
# (`just prek-install-git-pre-commit-hook`). Some hooks (trailing-whitespace,
# end-of-file-fixer) auto-fix issues; when they do, the commit aborts so you
# can stage the fixes and commit again.
#
# See docs/development.md for setup instructions and usage.
repos:
# Fast built-in hooks (Rust-native, no dependencies)
- repo: builtin
hooks:
- id: trailing-whitespace
# Exclude dependencies, runtime data, and the legacy front-end assets
exclude: '^(app/vendor/|var/|app/var/|app/public/)'
- id: end-of-file-fixer
exclude: '^(app/vendor/|var/|app/var/|app/public/)'
- id: check-yaml
exclude: '^app/vendor/'
- id: check-json
exclude: '^app/vendor/'
- id: check-merge-conflict
- id: check-added-large-files
args: ['--maxkb=1024']
- id: detect-private-key
# Local hooks that run project-specific tools
- repo: local
hooks:
# PHP static analysis (PHPStan)
- id: php-analyze
name: PHP Static Analysis (PHPStan)
entry: just php-analyze
language: system
files: '\.php$'
exclude: '^app/vendor/'
pass_filenames: false
# PHP code formatting and style (PHP CS Fixer)
- id: php-format-check
name: PHP Formatting and Style (PHP CS Fixer)
entry: just php-format-check
language: system
files: '\.php$'
exclude: '^app/vendor/'
pass_filenames: false
# Twig template formatting and style (Twig CS Fixer)
- id: twig-format-check
name: Twig Formatting and Style (Twig CS Fixer)
entry: just twig-format-check
language: system
files: '\.twig$'
exclude: '^app/vendor/'
pass_filenames: false
# JavaScript/TypeScript analysis (ESLint + TypeScript)
- id: js-analyze
name: JS/TS Analysis (ESLint + TypeScript)
entry: just js-analyze
language: system
files: '^app/frontend/.*\.(tsx?|jsx?|mjs)$'
exclude: '^app/frontend/node_modules/'
pass_filenames: false