-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlefthook.yml
More file actions
44 lines (37 loc) · 1.18 KB
/
lefthook.yml
File metadata and controls
44 lines (37 loc) · 1.18 KB
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
templates:
lint_flags: --fix --format unix
fmt_flags: --no-error-on-unmatched-pattern
turbo_flags: --log-order grouped --no-color
pre-commit:
piped: true
jobs:
- name: lint
run: pnpm turbo {turbo_flags} lint -- {lint_flags}
stage_fixed: true
- name: format
run: pnpm turbo {turbo_flags} fmt -- {fmt_flags}
stage_fixed: true
- name: type checking
run: pnpm turbo {turbo_flags} type-check
commit-msg:
jobs:
- name: lint message
run: pnpm commitlint --edit {1}
pre-push:
piped: true
jobs:
# - name: changeset check
# skip: merge-commit
# run: |
# BRANCH=$(git rev-parse --abbrev-ref HEAD)
# EXISTS_IN_REMOTE=$(git ls-remote --heads origin ${BRANCH})
# if [[ -z ${EXISTS_IN_REMOTE} ]]; then
# echo "${BRANCH} doesn't exists on remote, checking if changeset is empty"
# pnpm changeset status
# else
# echo "${BRANCH} exists on remote, checking changeset against last push"
# LATEST_PUSHED=$(git rev-parse @{push})
# pnpm changeset status --since "${LATEST_PUSHED}"
# fi
- name: tests
run: pnpm turbo {turbo_flags} test