-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
81 lines (79 loc) · 2.19 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: trailing-whitespace
exclude: |
(?x)(
^.*/vendor/.*$|
^generator/src/lib/openapi.ts$|
^scanner/src/lib/openapi.ts$|
^openapi.json$|
^openapi_hash.sha256$|
^NOT-EXISTING-LAST-ENTRY$
)
- id: end-of-file-fixer
exclude: |
(?x)(
^.*/vendor/.*$|
^generator/src/lib/openapi.ts$|
^scanner/src/lib/openapi.ts$|
^openapi.json$|
^openapi_hash.sha256$|
^NOT-EXISTING-LAST-ENTRY$
)
# All non-bat files should end with LF
- id: mixed-line-ending
args: ["--fix=lf"]
exclude: |
(?x)(
\.bat$|
^NOT-EXISTING-LAST-ENTRY$
)
# Bat files should be CRLF ending
- id: mixed-line-ending
args: ["--fix=crlf"]
files: \.bat$
- repo: local
hooks:
- id: export-api
name: export-api
entry: python3 export_api.py
language: system
pass_filenames: false
- id: import-api
name: import-api
entry: python3 import_api.py
language: system
pass_filenames: false
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.6.2
hooks:
- id: prettier
additional_dependencies:
exclude: |
(?x)(
^.*/vendor/.*$|
/pnpm-lock.yaml$|
^generator/src/lib/openapi.ts$|
^scanner/src/lib/openapi.ts$|
^openapi.json$|
^openapi_hash.sha256$|
^NOT-EXISTING-LAST-ENTRY$
)
- repo: local
hooks:
- id: eslint-generator
name: eslint
entry: pnpm run --dir generator eslint
language: system
pass_filenames: false
- id: eslint-scanner
name: eslint
entry: pnpm run --dir scanner eslint
language: system
pass_filenames: false