-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlefthook.yml
153 lines (144 loc) · 3.38 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#
# 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
plugins:
glob: "**/*"
run: pnpm exec zx tools/scripts/src/bootstrap.mjs
pre-commit:
piped: true
commands:
install:
glob: "./{pnpm-lock.yaml,lefthook.yml}"
run: "pnpm install && pnpm lefthook install"
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:
- "*.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 exec storm-lint all --skip-cspell --skip-circular-deps
stage_fixed: true
commit-msg:
commands:
validate:
run: "pnpm exec storm-git commitlint --message {1}"
pre-push:
piped: true
commands:
build:
glob: "**/*"
run: pnpm build-dev
stage_fixed: true
validate:
glob: "**/*"
run: "pnpm exec storm-pre-push {staged_files}"
stage_fixed: true
lint-filename:
glob: "**/*"
run:
'pnpm exec ls-lint
--config="./node_modules/@storm-software/linting-tools/ls-lint/config.yml"'
lint-codeowners:
glob: "**/CODEOWNERS"
run: pnpm exec storm-lint codeowners
lint-github-actions:
glob: ".github/workflows/*.*"
run: zizmor --offline .github/workflows/
sherif:
glob:
- "*.js"
- "*.ts"
- "*.cjs"
- "*.mjs"
- "*.d.cts"
- "*.d.mts"
- "*.jsx"
- "*.tsx"
- "*.json"
- "*.jsonc"
run: pnpm exec sherif -i typescript -i react -i react-dom
stage_fixed: true
readme:
glob: "**/*"
run:
'pnpm exec storm-git readme --templates="tools/readme-templates"
--project="@stryke/monorepo" '
stage_fixed: true
format:
glob: "**/*"
run: "pnpm format {staged_files}"
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}"