-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlefthook.yml
32 lines (32 loc) · 985 Bytes
/
lefthook.yml
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
pre-commit:
piped: true
commands:
lint-js:
# Run linter for JS/TS files if any of them are staged
files: git diff --name-only --cached
glob: "*.{js,ts,jsx,tsx}"
run: yarn lint:js
typescript:
# Run type-checking for TS files if any of them are staged
files: git diff --name-only --cached
glob: "*.{js,ts,jsx,tsx}"
run: yarn typescript
lint-android:
# Run linter for Kotlin files if any of them are staged
files: git diff --name-only --cached
glob: "*.{kt,kts}"
run: yarn lint:android
lint-objc:
# Run linter for ObjC files if any of them are staged
files: git diff --name-only --cached
glob: "*.{h,m,mm}"
run: yarn lint:objc
lint-swift:
# Run linter for Swift files if any of them are staged
files: git diff --name-only --cached
glob: "*.{swift}"
run: yarn lint:swift
commit-msg:
commands:
commitlint:
run: yarn commitlint --edit