-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlefthook.yml
110 lines (101 loc) Β· 3.2 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
#
# 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 && git update-index"
stage_fixed: true
prepare:
glob: "**/{lefthook.yml,biome.json}"
run: "pnpm lefthook install"
# 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/.taplo.toml"'
lint-filename:
glob: "./{crates,apps,libs,tools}/**/*.*"
run: 'pnpm exec ls-lint
--config="./node_modules/@storm-software/linting-tools/ls-lint/.ls-lint.yml"'
commit-msg:
commands:
validate:
run: "pnpm exec storm-git commitlint --message {1}"
sign:
run: "mise task run sign-commit"
pre-push:
piped: true
commands:
format-prettier:
glob: "!packages/workspace-tools/src/generators/*/files/**/*"
run: "pnpm exec prettier {staged_files} --write --ignore-unknown --no-error-on-unmatched-pattern --cache"
stage_fixed: true
format-toml:
glob: "**/*.toml"
run: 'pnpm exec taplo format --config="./node_modules/@storm-software/linting-tools/taplo/.taplo.toml"'
stage_fixed: true
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
format:
glob: "**/*.*"
run: "pnpm nx-cloud record -- nx affected --targets=format --configuration=production --files={staged_files}"
stage_fixed: true
# build:
# glob: "**/*.*"
# run: "pnpm build-local"
# 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
lint-codeowners:
files: "git diff --name-only HEAD @{push}"
glob: "**/CODEOWNERS"
run: "pnpm storm-lint codeowners"
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}"