Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Commit

Permalink
build: validate with pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
noel committed Aug 17, 2021
1 parent 5a84b55 commit 25c2135
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 91 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 validate
12 changes: 3 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"test:integration": "cross-env TEST_ENV=integration jest -c jest.iconfig.js --runInBand --verbose --collectCoverage=false",
"release": "yarn bootstrap && yarn bundle && lerna publish --exact",
"prettier": "prettier --write '**/*.{ts,tsx,js}' --config .prettierrc",
"format": "npm run prettier -- --write",
"format": "yarn prettier -- --write",
"lint": "eslint . --ext .ts -c .eslintrc.js",
"validate": "npm run lint && npm run prettier -- --list-different"
"validate": "yarn lint && yarn prettier -- --list-different"
},
"workspaces": [
"packages/*"
Expand Down Expand Up @@ -79,15 +79,14 @@
"fancy-log": "^1.3.2",
"glob": "^7.1.3",
"glob-parent": "^5.1.2",
"husky": "^1.1.2",
"husky": "^7.0.1",
"jest": "^23.4.2",
"jest-fetch-mock": "^1.6.6",
"jest-json-schema": "^2.0.1",
"jest-watch-typeahead": "^0.2.0",
"lerna": "^3.18.1",
"mkdirp": "^0.5.1",
"prettier": "^2.3.2",
"pretty-quick": "^1.8.0",
"protobufjs": "^6.8.8",
"rimraf": "^2.6.2",
"rollup": "0.66.6",
Expand Down Expand Up @@ -115,10 +114,5 @@
"packages/**/CHANGELOG.md",
"packages/**/README.md"
],
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
},
"dependencies": {}
}
87 changes: 5 additions & 82 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3832,7 +3832,7 @@ core-util-is@1.0.2, core-util-is@~1.0.0:
resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=

cosmiconfig@^5.0.2, cosmiconfig@^5.0.7, cosmiconfig@^5.1.0:
cosmiconfig@^5.0.2, cosmiconfig@^5.1.0:
version "5.2.1"
resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a"
integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==
Expand Down Expand Up @@ -4679,19 +4679,6 @@ execa@^0.7.0:
signal-exit "^3.0.0"
strip-eof "^1.0.0"

execa@^0.8.0:
version "0.8.0"
resolved "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da"
integrity sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=
dependencies:
cross-spawn "^5.0.1"
get-stream "^3.0.0"
is-stream "^1.1.0"
npm-run-path "^2.0.0"
p-finally "^1.0.0"
signal-exit "^3.0.0"
strip-eof "^1.0.0"

execa@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8"
Expand Down Expand Up @@ -5180,11 +5167,6 @@ get-stdin@^4.0.1:
resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=

get-stdin@^6.0.0:
version "6.0.0"
resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b"
integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==

get-stream@^3.0.0:
version "3.0.0"
resolved "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
Expand Down Expand Up @@ -5596,21 +5578,10 @@ humanize-ms@^1.2.1:
dependencies:
ms "^2.0.0"

husky@^1.1.2:
version "1.3.1"
resolved "https://registry.npmjs.org/husky/-/husky-1.3.1.tgz#26823e399300388ca2afff11cfa8a86b0033fae0"
integrity sha512-86U6sVVVf4b5NYSZ0yvv88dRgBSSXXmHaiq5pP4KDj5JVzdwKgBjEtUPOm8hcoytezFwbU+7gotXNhpHdystlg==
dependencies:
cosmiconfig "^5.0.7"
execa "^1.0.0"
find-up "^3.0.0"
get-stdin "^6.0.0"
is-ci "^2.0.0"
pkg-dir "^3.0.0"
please-upgrade-node "^3.1.1"
read-pkg "^4.0.1"
run-node "^1.0.0"
slash "^2.0.0"
husky@^7.0.1:
version "7.0.1"
resolved "https://registry.npmjs.org/husky/-/husky-7.0.1.tgz#579f4180b5da4520263e8713cc832942b48e1f1c"
integrity sha512-gceRaITVZ+cJH9sNHqx5tFwbzlLCVxtVZcusME8JYQ8Edy5mpGDOqD8QBCdMhpyo9a+JXddnujQ4rpY2Ff9SJA==

iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13:
version "0.4.24"
Expand Down Expand Up @@ -5641,11 +5612,6 @@ ignore-walk@^3.0.1:
dependencies:
minimatch "^3.0.4"

ignore@^3.3.7:
version "3.3.10"
resolved "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043"
integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==

ignore@^4.0.3, ignore@^4.0.6:
version "4.0.6"
resolved "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
Expand Down Expand Up @@ -7594,11 +7560,6 @@ move-concurrently@^1.0.1:
rimraf "^2.5.4"
run-queue "^1.0.3"

mri@^1.1.0:
version "1.1.4"
resolved "https://registry.npmjs.org/mri/-/mri-1.1.4.tgz#7cb1dd1b9b40905f1fac053abe25b6720f44744a"
integrity sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w==

ms@2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
Expand Down Expand Up @@ -8468,13 +8429,6 @@ pkg-dir@^3.0.0:
dependencies:
find-up "^3.0.0"

please-upgrade-node@^3.1.1:
version "3.2.0"
resolved "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942"
integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==
dependencies:
semver-compare "^1.0.0"

plur@^3.0.0:
version "3.1.1"
resolved "https://registry.npmjs.org/plur/-/plur-3.1.1.tgz#60267967866a8d811504fe58f2faaba237546a5b"
Expand Down Expand Up @@ -8540,18 +8494,6 @@ pretty-format@^24.9.0:
ansi-styles "^3.2.0"
react-is "^16.8.4"

pretty-quick@^1.8.0:
version "1.11.1"
resolved "https://registry.npmjs.org/pretty-quick/-/pretty-quick-1.11.1.tgz#462ffa2b93d24c05b7a0c3a001e08601a0c55ee4"
integrity sha512-kSXCkcETfak7EQXz6WOkCeCqpbC4GIzrN/vaneTGMP/fAtD8NerA9bPhCUqHAks1geo7biZNl5uEMPceeneLuA==
dependencies:
chalk "^2.3.0"
execa "^0.8.0"
find-up "^2.1.0"
ignore "^3.3.7"
mri "^1.1.0"
multimatch "^3.0.0"

private@^0.1.6, private@^0.1.8:
version "0.1.8"
resolved "https://registry.npmjs.org/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
Expand Down Expand Up @@ -8859,15 +8801,6 @@ read-pkg@^3.0.0:
normalize-package-data "^2.3.2"
path-type "^3.0.0"

read-pkg@^4.0.1:
version "4.0.1"
resolved "https://registry.npmjs.org/read-pkg/-/read-pkg-4.0.1.tgz#963625378f3e1c4d48c85872b5a6ec7d5d093237"
integrity sha1-ljYlN48+HE1IyFhytabsfV0JMjc=
dependencies:
normalize-package-data "^2.3.2"
parse-json "^4.0.0"
pify "^3.0.0"

read@1, read@~1.0.1:
version "1.0.7"
resolved "https://registry.npmjs.org/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4"
Expand Down Expand Up @@ -9339,11 +9272,6 @@ run-async@^2.2.0:
dependencies:
is-promise "^2.1.0"

run-node@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/run-node/-/run-node-1.0.0.tgz#46b50b946a2aa2d4947ae1d886e9856fd9cabe5e"
integrity sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A==

run-parallel@^1.1.9:
version "1.2.0"
resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee"
Expand Down Expand Up @@ -9441,11 +9369,6 @@ secp256k1@^3.0.1:
nan "^2.14.0"
safe-buffer "^5.1.2"

semver-compare@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w=

semver-diff@^2.0.0:
version "2.1.0"
resolved "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36"
Expand Down

0 comments on commit 25c2135

Please sign in to comment.