Skip to content

Commit

Permalink
feat: migrate from left hook to husky (#13)
Browse files Browse the repository at this point in the history
* feat: migrate from lefthook to husky

* feat: test husky

* fix: delete lefthook from yarn.lock file
  • Loading branch information
IvanIhnatsiuk authored Sep 23, 2024
1 parent 0deaa77 commit bc3e242
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 27 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 && yarn tsc
14 changes: 0 additions & 14 deletions lefthook.yml

This file was deleted.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint": "eslint \"**/*.{js,ts,tsx}\"",
"lint-clang": "sh clang.sh",
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
"prepare": "bob build",
"prepare": "husky",
"release": "release-it"
},
"keywords": [
Expand All @@ -54,7 +54,6 @@
},
"devDependencies": {
"@commitlint/config-conventional": "^17.0.2",
"@evilmartians/lefthook": "^1.5.0",
"@react-native/eslint-config": "^0.73.1",
"@release-it/conventional-changelog": "^5.0.0",
"@types/jest": "^29.5.5",
Expand All @@ -65,6 +64,7 @@
"eslint": "^8.51.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"husky": "^9.1.6",
"jest": "^29.7.0",
"prettier": "^3.0.3",
"react": "18.3.1",
Expand Down Expand Up @@ -141,6 +141,9 @@
"node_modules/",
"lib/"
],
"husky": {
"pre-commit": "lint-stage"
},
"prettier": {
"quoteProps": "consistent",
"singleQuote": true,
Expand Down
21 changes: 10 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1877,16 +1877,6 @@ __metadata:
languageName: node
linkType: hard

"@evilmartians/lefthook@npm:^1.5.0":
version: 1.7.12
resolution: "@evilmartians/lefthook@npm:1.7.12"
bin:
lefthook: bin/index.js
checksum: 2c2e19b298ca40dca6d87482e997bb559f4a481d39453dd8893b60b5e9cff8b8db89917eee38e9f8c482e91d26040ea1aa5a1da11cec6c93a6501a1c6cb8ce6a
conditions: (os=darwin | os=linux | os=win32) & (cpu=x64 | cpu=arm64 | cpu=ia32)
languageName: node
linkType: hard

"@hapi/hoek@npm:^9.0.0, @hapi/hoek@npm:^9.3.0":
version: 9.3.0
resolution: "@hapi/hoek@npm:9.3.0"
Expand Down Expand Up @@ -7545,6 +7535,15 @@ __metadata:
languageName: node
linkType: hard

"husky@npm:^9.1.6":
version: 9.1.6
resolution: "husky@npm:9.1.6"
bin:
husky: bin.js
checksum: 421ccd8850378231aaefd70dbe9e4f1549b84ffe3a6897f93a202242bbc04e48bd498169aef43849411105d9fcf7c192b757d42661e28d06b934a609a4eb8771
languageName: node
linkType: hard

"iconv-lite@npm:^0.4.24":
version: 0.4.24
resolution: "iconv-lite@npm:0.4.24"
Expand Down Expand Up @@ -11235,7 +11234,6 @@ __metadata:
resolution: "react-native-fast-secure-storage@workspace:."
dependencies:
"@commitlint/config-conventional": ^17.0.2
"@evilmartians/lefthook": ^1.5.0
"@react-native/eslint-config": ^0.73.1
"@release-it/conventional-changelog": ^5.0.0
"@types/jest": ^29.5.5
Expand All @@ -11246,6 +11244,7 @@ __metadata:
eslint: ^8.51.0
eslint-config-prettier: ^9.0.0
eslint-plugin-prettier: ^5.0.1
husky: ^9.1.6
jest: ^29.7.0
prettier: ^3.0.3
react: 18.3.1
Expand Down

0 comments on commit bc3e242

Please sign in to comment.