Merge pull request #28 from DoctorDerek/update-husky-to-v6-round-3

Update husky to v6
This commit is contained in:
Timothy 2021-04-20 23:15:36 +08:00 committed by GitHub
commit 582800c156
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9308 additions and 22 deletions

1
.husky/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
_

4
.husky/pre-commit Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no-install lint-staged

9317
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,8 @@
"dev": "next dev", "dev": "next dev",
"build": "next build && node ./scripts/generate-sitemap", "build": "next build && node ./scripts/generate-sitemap",
"serve": "next start", "serve": "next start",
"analyze": "env ANALYZE=true next build" "analyze": "env ANALYZE=true next build",
"prepare": "husky install"
}, },
"dependencies": { "dependencies": {
"@mapbox/rehype-prism": "^0.5.0", "@mapbox/rehype-prism": "^0.5.0",
@ -60,11 +61,6 @@
"unified": "9.2.1", "unified": "9.2.1",
"unist-util-visit": "2.0.3" "unist-util-visit": "2.0.3"
}, },
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": { "lint-staged": {
"*.+(js|jsx|ts|tsx)": [ "*.+(js|jsx|ts|tsx)": [
"eslint --fix" "eslint --fix"