Skip to content

Commit edd675b

Browse files
Fix husky precommit
1 parent 640165a commit edd675b

File tree

4 files changed

+17
-251
lines changed

4 files changed

+17
-251
lines changed

.husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run lint:fix
5+
git add

package.json

+2-16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"main": "index.js",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"scripts": {
55
"android": "react-native run-android",
66
"ios": "react-native run-ios",
@@ -9,7 +9,7 @@
99
"test": "jest",
1010
"lint-js": "eslint --ignore-path .gitignore --ignore-pattern \"!**/.*\" .",
1111
"lint": "npm run lint-js",
12-
"fix-js": "npm run lint-js --fix"
12+
"lint:fix": "npm run lint-js --fix"
1313
},
1414
"dependencies": {
1515
"@react-native-community/async-storage": "^1.12.1",
@@ -61,26 +61,12 @@
6161
"eslint-plugin-react-hooks": "^4.2.0",
6262
"husky": "^6.0.0",
6363
"jest": "~25.2.6",
64-
"lint-staged": "^10.5.4",
65-
"pre-commit": "^1.2.2",
6664
"prettier": "^2.2.1",
6765
"react-test-renderer": "~16.13.1",
6866
"redux-devtools-extension": "^2.13.9"
6967
},
7068
"jest": {
7169
"preset": "react-native"
7270
},
73-
"husky": {
74-
"hooks": {
75-
"pre-commit": "lint-staged"
76-
}
77-
},
78-
"lint-staged": {
79-
"*.{js,jsx}": [
80-
"eslint --fix",
81-
"prettier --write",
82-
"git add"
83-
]
84-
},
8571
"private": true
8672
}

0 commit comments

Comments
 (0)