mirror of
https://gitee.com/docsifyjs/docsify.git
synced 2024-11-29 10:38:48 +08:00
fix: husky can not auto install issue after upgrade. (#2325)
This commit is contained in:
parent
a416f97237
commit
cec43d7177
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,7 +5,9 @@
|
||||
/_playwright-results
|
||||
/lib
|
||||
/node_modules
|
||||
/.husky/_
|
||||
|
||||
# exceptions
|
||||
!.gitkeep
|
||||
.vercel
|
||||
|
||||
|
5
.husky/pre-commit
Executable file
5
.husky/pre-commit
Executable file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
npm run prettier
|
||||
npx lint-staged
|
@ -43,7 +43,7 @@
|
||||
"jest": "cross-env NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"lint:fix": "eslint . --fix",
|
||||
"lint": "prettier . --check && eslint .",
|
||||
"postinstall": "opencollective-postinstall",
|
||||
"postinstall": "opencollective-postinstall && npx husky install",
|
||||
"prepare": "npm run build",
|
||||
"prettier": "prettier . --write",
|
||||
"pub:next": "cross-env RELEASE_TAG=next sh build/release.sh",
|
||||
@ -57,11 +57,6 @@
|
||||
"watch:css": "npm run build:css -- -w",
|
||||
"watch:js": "node build/build.js"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.js": "eslint --fix"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user