-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathlefthook.yml
More file actions
27 lines (27 loc) · 902 Bytes
/
lefthook.yml
File metadata and controls
27 lines (27 loc) · 902 Bytes
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
pre-commit:
parallel: true
commands:
lint:
glob: '*.{js,ts,jsx,tsx}'
run: npx eslint {staged_files}
types:
glob: '*.{js,ts,jsx,tsx}'
run: yarn typecheck
format-js:
glob: '*.{js,ts,jsx,tsx}'
run: npx prettier --write {staged_files} && git add {staged_files}
format-objc:
glob: '*.{h,hpp,m,mm,c,cpp}'
run: clang-format -i {staged_files} && git add {staged_files}
format-kotlin:
glob: '*.{kt}'
run: ktlint -F {staged_files} && git add {staged_files}
lint-docs:
glob: '*.{md}'
run: npx eslint {staged_files}
format-other:
glob: '*.{json,yml,watchmanconfig,md,css}'
run: npx prettier --write {staged_files} && git add {staged_files}
spell-check-other:
glob: '*.{md,css}'
run: cspell {staged_files} --config .cspell.json --quiet --no-must-find-files && git add {staged_files}