Skip to content

Commit

Permalink
fix: husky can not auto install issue after upgrade. (#2325)
Browse files Browse the repository at this point in the history
  • Loading branch information
Koooooo-7 committed Jan 17, 2024
1 parent a416f97 commit cec43d7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -5,7 +5,9 @@
/_playwright-results
/lib
/node_modules
/.husky/_

# exceptions
!.gitkeep
.vercel

5 changes: 5 additions & 0 deletions .husky/pre-commit
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run prettier
npx lint-staged
7 changes: 1 addition & 6 deletions package.json
Expand Up @@ -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",
Expand All @@ -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"
},
Expand Down

1 comment on commit cec43d7

@vercel
Copy link

@vercel vercel bot commented on cec43d7 Jan 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.