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

Commit 5c83af0

Browse files
committed
Add husky & pre-push linting hook
1 parent f4de7c1 commit 5c83af0

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

.husky/pre-push

+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

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"lint:fix": "yarn format:fix && yarn eslint:fix",
1515
"eslint": "eslint . --ext .js,.ts",
1616
"eslint:fix": "eslint . --ext .js,.ts --fix",
17+
"postinstall": "husky install",
1718
"prettier": "prettier --check \"./**/*.{js,ts,md,yml,json}\"",
1819
"prettier:fix": "prettier --write \"./**/*.{js,ts,md,yml,json}\" --ignore-unknown",
1920
"start": "ts-node src/main.ts",
@@ -29,6 +30,7 @@
2930
"eslint-plugin-functional": "^4.2.0",
3031
"eslint-plugin-import": "^2.25.4",
3132
"eslint-plugin-jest": "^26.1.2",
33+
"husky": "^7.0.4",
3234
"jest": "^27.5.1",
3335
"prettier": "^2.6.0",
3436
"rimraf": "^3.0.2",

yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -1868,6 +1868,11 @@ human-signals@^2.1.0:
18681868
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
18691869
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==
18701870

1871+
husky@^7.0.4:
1872+
version "7.0.4"
1873+
resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.4.tgz#242048245dc49c8fb1bf0cc7cfb98dd722531535"
1874+
integrity sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==
1875+
18711876
18721877
version "0.4.24"
18731878
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"

0 commit comments

Comments
 (0)