-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlefthook.yaml
More file actions
47 lines (38 loc) · 1.14 KB
/
lefthook.yaml
File metadata and controls
47 lines (38 loc) · 1.14 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
45
46
47
# Refer for explanation to following link: https://lefthook.dev/configuration/
assert_lefthook_installed: true
colors: false
commit-msg:
commands:
lint-commit:
run: node_modules/.bin/commitlint --edit {1}
pre-commit:
parallel: true
jobs:
- name: format-source
glob: '*.{js,json,md,ts,yaml}'
run: node_modules/.bin/prettier --check --write {staged_files}
stage_fixed: true
- name: lint-source
glob: '*.{js,ts}'
run: node_modules/.bin/eslint --fix {staged_files}
stage_fixed: true
- name: format-infra
glob: '*.{hcl,tf,tfvars}'
run: terraform fmt -no-color {staged_files}
stage_fixed: true
- name: lint-infra-core
glob: 'infra/core/*.{hcl,tf,tfvars}'
root: infra/core
run: tflint --no-color --recursive -f compact
- name: lint-infra-instance
glob: 'infra/instance/*.{hcl,tf,tfvars}'
root: infra/instance
run: tflint --no-color --recursive -f compact
pre-push:
commands:
lint-branch:
run: node branch.helper.ts
lint-source:
run: node_modules/.bin/eslint
typecheck-source:
run: node_modules/.bin/tsc --noEmit