-
Notifications
You must be signed in to change notification settings - Fork 5
/
.pre-commit-config.yaml
62 lines (62 loc) · 2.03 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: check-json
exclude: vboard-front/.+lintrc
- id: check-yaml
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.13
hooks:
- id: remove-crlf
- id: remove-tabs
- id: insert-license
files: \.(css|java|js)$
exclude: vboard-front/src/main/common/app/styles/module/loading.css
args:
- --license-filepath
- LICENSE-short.txt
- --comment-style
- /*| *| */
- id: insert-license
files: \.html$
args:
- --license-filepath
- LICENSE-short.txt
- --comment-style
- <!--| ~| -->
# The following hook installation always end up failing due to connection issues,
# so I (Lucas) am disabling it for now.
# - repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs
# rev: v1.1.0
# hooks:
# - id: markdown-toc
# files: ^README\.md$
# - id: markdown-toc
# files: ^CONTRIBUTING\.md$
# vboard-front
- repo: local
hooks:
- id: angular-forbid-$apply
name: In AngularJS, use $digest over $apply
language: pygrep
entry: $apply
files: ^vboard-front.+\.js$
- id: angular-forbid-ngrepeat-without-trackby
name: In AngularJS, ALWAYS use 'track by' with ng-repeat
language: pygrep
entry: ng-repeat(?!.*track by)
files: ^vboard-front.+\.html$
- id: angular-forbid-ngmodel-with-no-dot
name: In AngularJS, "Whenever you have ng-model there's gotta be a dot in there somewhere"
language: pygrep
entry: ng-model="[^.]+"
files: ^vboard-front.+\.html$
exclude: vboard-front/src/main/common/vboardProfil.*
- id: angular-element-cannot-select-by-id
name: In AngularJS, angular.element('#some-id') will not work
language: pygrep
entry: angular.element\(.+#
files: ^vboard-front.+\.js$