Skip to content

Commit

Permalink
chore: migrate husky
Browse files Browse the repository at this point in the history
  • Loading branch information
fand committed Jul 8, 2021
1 parent 49a1bbd commit 6751bb8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
5 changes: 5 additions & 0 deletions .husky/pre-publish
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint
yarn build:lib
14 changes: 4 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,14 @@
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^7.0.1",
"husky": "^7.0.0",
"lint-staged": "^11.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.3.2",
"rimraf": "^3.0.2",
"typescript": "^3.9.6"
},
"homepage": "https://amagi.dev/react-vfx",
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"pre-publish": "run-s lint build:lib"
}
},
"keywords": [
"glsl",
"react",
Expand All @@ -49,8 +43,7 @@
"lint-staged": {
"src/*.{ts,tsx}": [
"eslint --fix",
"prettier --write",
"git add"
"prettier --write"
]
},
"main": "lib/index.js",
Expand All @@ -69,7 +62,8 @@
"dev": "run-p watch:lib watch:docs",
"lint": "eslint src/**/*.ts src/**/*.tsx",
"watch:docs": "cd docs && yarn start",
"watch:lib": "tsc -d -w"
"watch:lib": "tsc -d -w",
"prepare": "husky install"
},
"types": "lib/index.d.ts"
}
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ human-signals@^2.1.0:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==

husky@^7.0.1:
husky@^7.0.0:
version "7.0.1"
resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.1.tgz#579f4180b5da4520263e8713cc832942b48e1f1c"
integrity sha512-gceRaITVZ+cJH9sNHqx5tFwbzlLCVxtVZcusME8JYQ8Edy5mpGDOqD8QBCdMhpyo9a+JXddnujQ4rpY2Ff9SJA==
Expand Down

0 comments on commit 6751bb8

Please sign in to comment.