File tree Expand file tree Collapse file tree 3 files changed +219
-1
lines changed Expand file tree Collapse file tree 3 files changed +219
-1
lines changed Original file line number Diff line number Diff line change
1
+ # lefthook.yml
2
+ # Configuration reference: https://lefthook.dev/configuration/
3
+
4
+ assert_lefthook_installed : true
5
+
6
+ output :
7
+ - meta # Print lefthook version
8
+ - summary # Print summary block (successful and failed steps)
9
+ - empty_summary # Print summary heading when there are no steps to run
10
+ - success # Print successful steps
11
+ - failure # Print failed steps printing
12
+ - execution # Print any execution logs (but prints if the execution failed)
13
+ - execution_out # Print execution output (but still prints failed commands output)
14
+ - execution_info # Print `EXECUTE > ...` logging
15
+ - skips # Print "skip" (i.e. no files matched)
16
+
17
+ pre-commit :
18
+ follow : true
19
+ parallel : true
20
+ jobs :
21
+ - name : ' Lint'
22
+ run : npx --no-install eslint --fix "{staged_files}"
23
+ glob :
24
+ - ' *.ts'
25
+ - ' *.js'
26
+ - ' *.tsx'
27
+ - ' *.jsx'
28
+ stage_fixed : true
29
+
30
+ - name : ' Code Formatting'
31
+ run : npx --no-install prettier --write --ignore-unknown "{staged_files}"
32
+ stage_fixed : true
33
+
34
+ - name : ' Build'
35
+ run : npm run build
36
+ stage_fixed : true
37
+
38
+ - name : ' Test'
39
+ run : npm run fetch:spec-types && npx --no-install jest --passWithNoTests "{staged_files}"
40
+ glob : ' *.{ts,js,json}'
41
+ stage_fixed : true
42
+
43
+ post-checkout :
44
+ jobs :
45
+ - name : ' Install Dependencies'
46
+ run : npm install
47
+
48
+ post-merge :
49
+ jobs :
50
+ - name : ' Install Dependencies'
51
+ run : npm install
Original file line number Diff line number Diff line change 56
56
"examples:simple-server:w" : " tsx --watch src/examples/server/simpleStreamableHttp.ts --oauth" ,
57
57
"prepack" : " npm run build:esm && npm run build:cjs" ,
58
58
"lint" : " eslint src/ && prettier --check ." ,
59
+ "lint:fix" : " eslint src/ --fix && prettier --write ." ,
60
+ "prepare" : " npx --no-install lefthook install" ,
59
61
"test" : " npm run fetch:spec-types && jest" ,
60
62
"start" : " npm run server" ,
61
63
"server" : " tsx watch --clear-screen=false src/cli.ts server" ,
90
92
"@types/ws" : " ^8.5.12" ,
91
93
"eslint" : " ^9.8.0" ,
92
94
"eslint-config-prettier" : " ^10.1.8" ,
93
- "prettier" : " 3.6.2" ,
94
95
"jest" : " ^29.7.0" ,
96
+ "lefthook" : " ^1.13.6" ,
97
+ "prettier" : " 3.6.2" ,
95
98
"supertest" : " ^7.0.0" ,
96
99
"ts-jest" : " ^29.2.4" ,
97
100
"tsx" : " ^4.16.5" ,
You can’t perform that action at this time.
0 commit comments