Skip to content
This repository was archived by the owner on Jul 25, 2022. It is now read-only.

Commit 61747a0

Browse files
committed
chore: Add husky to lint before commit
1 parent 0285912 commit 61747a0

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

.husky/.gitignore

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

.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

+7-5
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
"compile": "electron-webpack",
1515
"dist": "yarn compile && electron-builder",
1616
"deploy:win": "yarn compile && electron-builder -w -p onTagOrDraft",
17-
"deploy:mac": "yarn compile && electron-builder -m -p onTagOrDraft",
18-
"deploy:linux": "yarn compile && electron-builder -l -p onTagOrDraft",
19-
"rebuild": "electron-rebuild",
20-
"lint": "eslint . --ext .ts,.tsx"
17+
"deploy:mac": "yarn compile && electron-builder -m -p onTagOrDraft",
18+
"deploy:linux": "yarn compile && electron-builder -l -p onTagOrDraft",
19+
"rebuild": "electron-rebuild",
20+
"lint": "eslint . --ext .ts,.tsx",
21+
"postinstall": "husky install"
2122
},
2223
"dependencies": {
2324
"electron-acrylic-window": "0.4.7",
@@ -57,12 +58,13 @@
5758
"eslint-plugin-react": "^7.21.5",
5859
"eslint-plugin-tsdoc": "^0.2.10",
5960
"eslint-plugin-unused-imports": "^1.0.1",
61+
"husky": "^5.0.6",
6062
"node-sass": "^5.0.0",
6163
"sass-loader": "^10.1.0",
6264
"typescript": "^4.1.3",
6365
"webpack": "~4.42.1"
6466
},
6567
"optionalDependencies": {
66-
"native-reg": "^0.3.4"
68+
"native-reg": "^0.3.4"
6769
}
6870
}

yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -4786,6 +4786,11 @@ https-browserify@^1.0.0:
47864786
resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"
47874787
integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=
47884788

4789+
husky@^5.0.6:
4790+
version "5.0.6"
4791+
resolved "https://registry.yarnpkg.com/husky/-/husky-5.0.6.tgz#27dbefe8603c6c0912fd89a3a67edfed9fac8bb9"
4792+
integrity sha512-SM+evfvcHT3rAYJKvPlatz3L5RqzgeM6xIvDjhs8VuhKj6iKqFDOt/Ov8sPjvWuE4FDB385gJBwWXRj7G3c1hg==
4793+
47894794
[email protected], iconv-lite@^0.4.4:
47904795
version "0.4.24"
47914796
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"

0 commit comments

Comments
 (0)