Skip to content

Commit fb65cab

Browse files
committed
add husky
1 parent 6adc18f commit fb65cab

File tree

3 files changed

+292
-11
lines changed

3 files changed

+292
-11
lines changed

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged

package.json

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22
"name": "@barelyhuman/preact-native",
33
"version": "0.1.1-beta.4",
44
"description": "",
5+
"bugs": "https://github.com/barelyhuman/preact-native/issues",
6+
"repository": "barelyhuman/preact-native",
57
"license": "MIT",
68
"author": "",
7-
"repository": "barelyhuman/preact-native",
8-
"bugs": "https://github.com/barelyhuman/preact-native/issues",
9-
"publishConfig": {
10-
"access": "public"
11-
},
129
"exports": {
1310
".": {
1411
"types": "./dist/index.d.ts",
@@ -45,13 +42,21 @@
4542
"example:ios": "cd example; yarn ios",
4643
"example:android": "cd example; yarn android",
4744
"fix": "npx prettier --write .",
48-
"next": "bumpp --tag --commit"
45+
"next": "bumpp --tag --commit",
46+
"prepare": "husky install"
47+
},
48+
"lint-staged": {
49+
"*.{js,mjs,ts,tsx,json,md}": [
50+
"prettier --write"
51+
]
4952
},
5053
"prettier": "@barelyhuman/prettier-config",
5154
"dependencies": {},
5255
"devDependencies": {
5356
"@barelyhuman/prettier-config": "^1.1.0",
5457
"bumpp": "^8.2.1",
58+
"husky": "^8.0.1",
59+
"lint-staged": "^13.0.3",
5560
"microbundle": "^0.15.1",
5661
"npm-run-all": "^4.1.5",
5762
"preact": "^10.11.0",
@@ -63,5 +68,8 @@
6368
"preact": ">10",
6469
"react": ">=17",
6570
"react-native": ">=0.65"
71+
},
72+
"publishConfig": {
73+
"access": "public"
6674
}
6775
}

0 commit comments

Comments
 (0)