-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
45 lines (45 loc) · 1.37 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: local
hooks:
- id: validate-composer-json
name: Validate Composer JSON
entry: "composer validate"
language: system
files: composer\.json
- id: check-php-debug
name: Check php debug statements
language: pygrep
entry: '\b(print_r|dump|var_dump|die|dd)\s*\('
files: .*\.(php|phtml)$
- id: check-js-debug
name: Check javascript debug statements
language: pygrep
entry: '\b(console\s*\.\s*debug|console\s*\.\s*log)\s*\('
files: resources/js/.*\.(js|html|vue)$
- id: check-view-with-with
name: Check for view()->with
language: pygrep
entry: 'view\([^\)]*?\)\s*->with\('
files: .*\.php$
- id: php-cs
name: Run Code Sniffer fixer
language: system
entry: 'composer format'
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- id: check-json
- id: check-yaml
- id: check-xml
- id: check-merge-conflict
- repo: https://github.com/digitalpulp/pre-commit-php.git
rev: 1.3.0
hooks:
- id: php-lint
- id: php-lint-all
exclude: public/.*