-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlefthook.yml
107 lines (98 loc) · 3.06 KB
/
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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#
# Refer for explanation to following link:
# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md
#
assert_lefthook_installed: true
colors: true
no_tty: false
min_version: 1.5.0
pre-install:
commands:
validate:
glob: "**/*.*"
run: "pnpm exec storm-pre-install"
prepare:
commands:
validate:
glob: "**/*.*"
run: "pnpm exec storm-prepare"
pre-commit:
piped: true
commands:
install:
glob: "./{pnpm-lock.yaml,lefthook.yml}"
run: "pnpm install && pnpm lefthook install && git update-index"
stage_fixed: true
prepare:
glob: "**/{lefthook.yml,biome.json}"
run: "pnpm exec storm-prepare"
# validate:
# glob: "**/*.*"
# run: "pnpm exec storm-pre-commit {staged_files}"
# stage_fixed: true
# lint:
# glob: "**/*.*"
# run: "pnpm lint"
# stage_fixed: true
lint-toml:
glob: "**/*.toml"
run: 'pnpm exec taplo format --check
--config="./node_modules/@storm-software/linting-tools/taplo/config.toml"'
lint-filename:
glob: "**/*.*"
run: 'pnpm exec ls-lint --config="./node_modules/@storm-software/linting-tools/ls-lint/config.yml"'
commit-msg:
commands:
validate:
run: 'pnpm exec commitlint
--config="./node_modules/@storm-software/git-tools/commitlint/config.cjs"
--edit {1}'
pre-push:
piped: true
commands:
# format:
# glob: "**/*.*"
# run: "pnpm format"
# stage_fixed: true
# format-prettier:
# glob: "!packages/workspace-tools/src/generators/*/files/**/*"
# run: "pnpm exec prettier {staged_files} --write --ignore-unknown
# --no-error-on-unmatched-pattern --cache && git update-index"
# stage_fixed: true
# format-toml:
# glob: "**/*.toml"
# run: 'pnpm exec taplo format
# --config="./node_modules/@storm-software/linting-tools/taplo/config.toml" && git
# update-index'
# format-readme:
# glob: "**/{README.md,package.json,executors.json,generators.json}"
# run: 'pnpm exec storm-git readme-gen --templates="./tools/readme-templates"'
# stage_fixed: true
build:
glob: "**/*.*"
run: "pnpm build-all"
stage_fixed: true
validate:
glob: "**/*.*"
run: "pnpm exec storm-pre-push {staged_files}"
stage_fixed: true
lint:
glob: "**/*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc,yaml,yml,md,mdx,markdown,css,scss,sass,less,styl,stylus,graphql,gql,xml,svg,txt,log,env,env.example,env.local,env.development,env.test,env.production,env.staging,env.local.example,env.development.example,env.test.example,env.production.example,env.staging.example}"
run: "pnpm lint"
stage_fixed: true
post-merge:
commands:
validate:
glob: "**/*.*"
run: "pnpm exec storm-post-merge {staged_files}"
stage_fixed: true
post-checkout:
commands:
validate:
glob: "**/*.*"
run: "pnpm exec storm-post-checkout {staged_files}"
post-commit:
commands:
validate:
glob: "**/*.*"
run: "pnpm exec storm-post-commit {staged_files}"