Skip to content

Commit

Permalink
fix: husky setup is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathChaos committed Mar 30, 2022
1 parent 5371595 commit 386ed3e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run prettier
npm run lint
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"eslint-plugin-react-hooks": "4.3.0",
"eslint-plugin-react-native": "3.11.0",
"eslint-plugin-unused-imports": "^2.0.0",
"husky": "^7.0.4",
"husky": "^7.0.0",
"metro-react-native-babel-preset": "^0.66.2",
"prettier": "^2.5.1",
"typescript": "^4.5.4"
Expand All @@ -57,9 +57,9 @@
"android": "npx react-native run-android",
"ios": "npx react-native run-ios",
"start": "react-native start --reset-cache",
"husky:setup": "npx husky-init && npm run husky:commitlint && npm run husky:prettier",
"husky:setup": "npx husky-init && npm run husky:commitlint && npm run husky:prettier && npm run husky:lint",
"husky:commitlint": "npx husky add .husky/commit-msg 'npx --no-install commitlint --edit'",
"husky:prettier": "npx husky add .husky/pre-commit 'npm run prettier'",
"husky:prettier": "npx husky set .husky/pre-commit 'npm run prettier'",
"husky:lint": "npx husky add .husky/pre-commit 'npm run lint'",
"clean-up": "rm -rf .git && rm -rf ./assets && git init && npm run husky:setup",
"clean:android": "cd android && ./gradlew clean",
Expand Down

0 comments on commit 386ed3e

Please sign in to comment.