-
Notifications
You must be signed in to change notification settings - Fork 2
/
lefthook.json
50 lines (50 loc) · 1.56 KB
/
lefthook.json
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
{
"pre-commit": {
"parallel": true,
"commands": {
"main-branch-check": {
"only": [{ "ref": "main" }],
"run": "exit 1",
"fail_text": "Please switch to another branch before committing. Use `git switch -c <branch-name>`."
},
"prettier": {
"run": "npx prettier {staged_files} --check --ignore-unknown",
"fail_text": "Please fix the formatting issues before committing. Use `npm run format`."
},
"eslint": {
"glob": "*.{mjs,ts}",
"run": "npx eslint {staged_files}",
"fail_text": "Please fix the ESLint issues before committing. Try `npx eslint --fix .`."
},
"markdownlint": {
"glob": "*.md",
"run": "npx markdownlint {staged_files}",
"fail_text": "Please fix the markdownlint issues before committing. Try `npx markdownlint --fix .`."
},
"build": {
"glob": "src/**",
"run": "npm run build",
"fail_text": "Please fix the build issues before committing. Try `npm run build`."
},
"test": {
"glob": "{src,tests}/**",
"run": "npm run test",
"fail_text": "Please fix the test issues before committing. Try `npm run test:watch`."
},
"type-test": {
"glob": "{src,type-tests}/**",
"run": "npm run type-test",
"fail_text": "Please fix the type test issues before committing. Try `npm run type-test:watch`."
}
}
},
"output": [
"summary",
"success",
"failure",
"execution",
"execution_out",
"execution_info",
"skips"
]
}