Skip to content

Commit c973f3b

Browse files
Add husky for setting lint in commit hook. (#248)
Co-authored-by: nabarun <[email protected]>
1 parent 6560639 commit c973f3b

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn lint

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
],
88
"devDependencies": {
99
"depcheck": "^1.4.2",
10+
"husky": "^7.0.2",
1011
"lerna": "^4.0.0"
1112
},
1213
"scripts": {
@@ -15,6 +16,7 @@
1516
"build": "lerna run build --stream",
1617
"build:watch": "lerna run build --stream --parallel -- -w",
1718
"build:contracts": "lerna run build:contracts",
18-
"db:reset": "sudo ./scripts/reset-dbs.sh"
19+
"db:reset": "sudo ./scripts/reset-dbs.sh",
20+
"prepare": "husky install"
1921
}
2022
}

yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -8120,6 +8120,11 @@ humanize-ms@^1.2.1:
81208120
dependencies:
81218121
ms "^2.0.0"
81228122

8123+
husky@^7.0.2:
8124+
version "7.0.2"
8125+
resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.2.tgz#21900da0f30199acca43a46c043c4ad84ae88dff"
8126+
integrity sha512-8yKEWNX4z2YsofXAMT7KvA1g8p+GxtB1ffV8XtpAEGuXNAbCV5wdNKH+qTpw8SM9fh4aMPDR+yQuKfgnreyZlg==
8127+
81238128
[email protected], iconv-lite@^0.4.24:
81248129
version "0.4.24"
81258130
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"

0 commit comments

Comments
 (0)