File tree Expand file tree Collapse file tree 3 files changed +276
-11
lines changed Expand file tree Collapse file tree 3 files changed +276
-11
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env sh
2
2
. " $( dirname -- " $0 " ) /_/husky.sh"
3
3
4
- yarn run format
5
- yarn run lint
4
+ yarn run lint-staged
Original file line number Diff line number Diff line change 40
40
"html-webpack-plugin" : " ^5.5.0" ,
41
41
"husky" : " ^8.0.3" ,
42
42
"jest" : " ^29.4.3" ,
43
+ "lint-staged" : " ^13.2.3" ,
43
44
"npm-run-all" : " ^4.1.5" ,
44
45
"prettier" : " ^2.8.4" ,
45
46
"react" : " ^18.2.0" ,
59
60
"dev:client" : " webpack --watch" ,
60
61
"dev:server" : " tsc --build --watch" ,
61
62
"dev" : " run-p dev:*" ,
62
- "format" : " eslint --fix . && prettier --write ." ,
63
+ "format" : " eslint --fix . && prettier --list-different -- write ." ,
63
64
"lint" : " run-p lint:*" ,
65
+ "lint:prettier:fix" : " prettier --list-different --ignore-unknown --write" ,
64
66
"lint:prettier" : " prettier --check ." ,
67
+ "lint:eslint:fix" : " eslint --fix" ,
65
68
"lint:eslint" : " eslint ." ,
66
69
"lint:typecheck" : " tsc --noEmit" ,
67
70
"prepare" : " husky install" ,
82
85
"packageManager" : " yarn@1.22.19" ,
83
86
"engines" : {
84
87
"node" : " >=18.0.0"
88
+ },
89
+ "lint-staged" : {
90
+ "*.{js,ts,tsx}" : [
91
+ " yarn run lint:eslint:fix"
92
+ ],
93
+ "*" : [
94
+ " yarn run lint:prettier:fix"
95
+ ]
85
96
}
86
97
}
You can’t perform that action at this time.
0 commit comments