-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlefthook.json
More file actions
107 lines (107 loc) · 3.55 KB
/
lefthook.json
File metadata and controls
107 lines (107 loc) · 3.55 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
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
{
"$schema": "https://raw.githubusercontent.com/evilmartians/lefthook/refs/heads/master/schema.json",
"assert_lefthook_installed": true,
"colors": true,
"no_tty": false,
"min_version": "1.5.0",
"pre-commit": {
"commands": {
"install": {
"glob": "{pnpm-lock.yaml,lefthook.yml,lefthook.yaml,lefthook.json}",
"run": "pnpm install && pnpm lefthook install && git update-index",
"stage_fixed": true
},
"schema-gen": {
"glob": "packages/config/src/schema.ts",
"run": "pnpm nx generate @storm-software/workspace-tools:config-schema --outputFile='./packages/config/schemas/storm-workspace.schema.json'",
"stage_fixed": true
},
"prepare": {
"glob": "**/{lefthook.yml,lefthook.yaml,lefthook.json,biome.json}",
"run": "pnpm node ./dist/packages/git-tools/bin/git.cjs prepare --files {files}",
"stage_fixed": true
},
"pre-commit": {
"files": "git diff --name-only HEAD @{push}",
"glob": "**/*",
"run": "pnpm node ./dist/packages/git-tools/bin/git.cjs pre-commit --files {files}",
"stage_fixed": true
},
"lint-codeowners": {
"files": "git diff --name-only HEAD @{push}",
"glob": "**/CODEOWNERS",
"run": "pnpm node ./dist/packages/linting-tools/bin/lint.js codeowners"
},
"lint": {
"files": "git diff --name-only HEAD @{push}",
"glob": "**/*.{js,ts,rs,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}",
"run": "pnpm lint",
"stage_fixed": true
},
"prettier": {
"files": "git diff --name-only HEAD @{push}",
"glob": "!**/generators/*/files/**/*",
"run": "pnpm exec prettier {files} --write --ignore-unknown --no-error-on-unmatched-pattern --cache --config='./packages/prettier/src/config.json' && git update-index",
"stage_fixed": true
}
}
},
"commit-msg": {
"commands": {
"validate": {
"run": "pnpm node ./dist/packages/git-tools/bin/git.cjs commitlint --message {1}"
}
}
},
"pre-push": {
"piped": true,
"commands": {
"build": {
"glob": "**/*",
"run": "pnpm build-dev",
"stage_fixed": true
},
"lint-github-actions": {
"glob": ".github/workflows/*.*",
"run": "zizmor --offline --config='./tools/config/zizmor.yml' .github/workflows/"
},
"readme": {
"glob": "**/{README.md,README.*.md,readme/**/*,package.json,executors.json,generators.json}",
"run": "pnpm format-readme && git update-index",
"stage_fixed": true
},
"pre-push": {
"files": "git diff --name-only HEAD @{push}",
"glob": "**/*",
"run": "pnpm node ./dist/packages/git-tools/bin/git.cjs pre-push --files {files}",
"stage_fixed": true
},
"sherif": {
"files": "git diff --name-only HEAD @{push}",
"glob": "**/*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}",
"run": "pnpm lint-sherif",
"stage_fixed": true
}
}
},
"post-merge": {
"commands": {
"validate": {
"files": "git diff --name-only HEAD @{push}",
"glob": "**/*",
"run": "pnpm node ./dist/packages/git-tools/bin/git.cjs post-merge --files {files}",
"stage_fixed": true
}
}
},
"post-commit": {
"commands": {
"validate": {
"files": "git diff --name-only HEAD @{push}",
"glob": "**/*",
"run": "pnpm node ./dist/packages/git-tools/bin/git.cjs post-commit --files {files}",
"stage_fixed": true
}
}
}
}