Skip to content

Commit 386ed3e

Browse files
committed
fix: husky setup is updated
1 parent 5371595 commit 386ed3e

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.husky/commit-msg

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

.husky/pre-commit

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

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"eslint-plugin-react-hooks": "4.3.0",
4949
"eslint-plugin-react-native": "3.11.0",
5050
"eslint-plugin-unused-imports": "^2.0.0",
51-
"husky": "^7.0.4",
51+
"husky": "^7.0.0",
5252
"metro-react-native-babel-preset": "^0.66.2",
5353
"prettier": "^2.5.1",
5454
"typescript": "^4.5.4"
@@ -57,9 +57,9 @@
5757
"android": "npx react-native run-android",
5858
"ios": "npx react-native run-ios",
5959
"start": "react-native start --reset-cache",
60-
"husky:setup": "npx husky-init && npm run husky:commitlint && npm run husky:prettier",
60+
"husky:setup": "npx husky-init && npm run husky:commitlint && npm run husky:prettier && npm run husky:lint",
6161
"husky:commitlint": "npx husky add .husky/commit-msg 'npx --no-install commitlint --edit'",
62-
"husky:prettier": "npx husky add .husky/pre-commit 'npm run prettier'",
62+
"husky:prettier": "npx husky set .husky/pre-commit 'npm run prettier'",
6363
"husky:lint": "npx husky add .husky/pre-commit 'npm run lint'",
6464
"clean-up": "rm -rf .git && rm -rf ./assets && git init && npm run husky:setup",
6565
"clean:android": "cd android && ./gradlew clean",

0 commit comments

Comments
 (0)