Skip to content

Commit

Permalink
Migrated to husky@v9
Browse files Browse the repository at this point in the history
  • Loading branch information
CatChen committed Jul 31, 2024
1 parent 7cadb4d commit 1830011
Show file tree
Hide file tree
Showing 3 changed files with 318 additions and 38 deletions.
5 changes: 1 addition & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn pretty-quick --staged
yarn lint-staged
15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"build": "babel src -d lib --ignore '**/__tests__/**' && flow-copy-source -v -i '**/__tests__/**' src lib && tsc",
"registry:github": "cat package.json | json -e 'this.name = \"@CatChen/\" + this.name; this.publishConfig = {}; this.publishConfig.registry = \"https://npm.pkg.github.com/\"' > package.github.json && mv -f package.github.json package.json",
"registry:npm": "cat package.json | json -e 'this.name = this.name.replace(new RegExp(\"^@CatChen/\"), \"\"); this.publishConfig = undefined' > package.npm.json && mv -f package.npm.json package.json",
"prepublish": "npm run build",
"postinstall": "is-ci || husky install",
"prepublish": "rm -rf lib && yarn build",
"prepare": "is-ci || husky",
"prepublishOnly": "pinst --disable",
"postpublish": "pinst --enable"
},
Expand Down Expand Up @@ -64,17 +64,24 @@
"flow-bin": "^0.242.1",
"flow-copy-source": "^2.0.8",
"flow-remove-types": "^2.111.3",
"is-ci": "^3.0.1",
"jest": "^29.0.1",
"json": "^11.0.0",
"pinst": "^3.0.0",
"prettier": "^3.0.2",
"pretty-quick": "^4.0.0",
"typescript": "^5.0.2"
},
"optionalDependencies": {
"husky": "9"
"husky": "^9.1.4",
"lint-staged": "^15.2.7"
},
"engines": {
"node": ">=18"
},
"lint-staged": {
"*.(js,ts)": "yarn prettier -w",
"*.json": "yarn prettier -w",
"*.(yml,yaml)": "yarn prettier -w",
"*.(md,markdown)": "yarn prettier -w"
}
}
Loading

0 comments on commit 1830011

Please sign in to comment.