Skip to content

Commit

Permalink
feat!: replace husky with simple-git-hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Mar 23, 2021
1 parent ea7c180 commit 919d3f8
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 54 deletions.
1 change: 0 additions & 1 deletion .huskyrc.js

This file was deleted.

1 change: 1 addition & 0 deletions .simple-git-hooks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@1stg/simple-git-hooks')
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"lint:scss": "stylelint --cache 'tests/*.{scss,vue}'",
"lint:ts": "tslint -p . -t stylish",
"lint:tsc": "tsc",
"postinstall": "yarn-deduplicate --strategy fewer || exit 0",
"postinstall": "simple-git-hooks && yarn-deduplicate --strategy fewer || exit 0",
"test": "jest ---collectCoverage",
"typecov": "type-coverage"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/common-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
"@1stg/babel-preset": "^1.6.0",
"@1stg/commitlint-config": "^1.0.3",
"@1stg/eslint-config": "^1.10.0",
"@1stg/husky-config": "^1.0.2",
"@1stg/lint-staged": "^1.2.1",
"@1stg/prettier-config": "^1.6.0",
"@1stg/remark-config": "^1.1.0",
"@1stg/simple-git-hooks": "^0.1.0",
"@1stg/tsconfig": "^1.2.0",
"@babel/core": "^7.13.10",
"eslint": "^7.22.0",
"husky": "^4.3.8",
"lint-staged": "^10.5.4",
"prettier": "^2.2.1",
"simple-git-hooks": "^2.2.0",
"tslib": "^2.1.0"
},
"publishConfig": {
Expand Down
4 changes: 4 additions & 0 deletions packages/simple-git-hooks/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
'pre-commit': 'npx lint-staged',
'commit-msg': `npx commitlint -e`,
}
14 changes: 14 additions & 0 deletions packages/simple-git-hooks/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "@1stg/simple-git-hooks",
"version": "0.1.0",
"description": "Personal but Shareable simple-git-hooks Configuration for all 1stG.me projects.",
"repository": "[email protected]:1stG/configs.git",
"author": "JounQin <[email protected]>",
"license": "MIT",
"peerDependencies": {
"simple-git-hooks": ">=2.2.0"
},
"publishConfig": {
"access": "public"
}
}
55 changes: 5 additions & 50 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4243,11 +4243,6 @@ compare-func@^2.0.0:
array-ify "^1.0.0"
dot-prop "^5.1.0"

compare-versions@^3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62"
integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==

component-emitter@^1.2.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
Expand Down Expand Up @@ -6042,13 +6037,6 @@ find-versions@^3.0.0:
dependencies:
semver-regex "^2.0.0"

find-versions@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-4.0.0.tgz#3c57e573bf97769b8cb8df16934b627915da4965"
integrity sha512-wgpWy002tA+wgmO27buH/9KzyEOQnKsG/R0yrcjPT9BOFm0zRBVQbZ95nRGXWMywS8YR5knRbpohio0bcJABxQ==
dependencies:
semver-regex "^3.1.2"

flat-cache@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11"
Expand Down Expand Up @@ -6748,22 +6736,6 @@ humanize-ms@^1.2.1:
dependencies:
ms "^2.0.0"

husky@^4.3.8:
version "4.3.8"
resolved "https://registry.yarnpkg.com/husky/-/husky-4.3.8.tgz#31144060be963fd6850e5cc8f019a1dfe194296d"
integrity sha512-LCqqsB0PzJQ/AlCgfrfzRe3e3+NvmefAdKQhRYpxS4u6clblBoDdzzvHi8fmxKRzvMxPY/1WZWzomPZww0Anow==
dependencies:
chalk "^4.0.0"
ci-info "^2.0.0"
compare-versions "^3.6.0"
cosmiconfig "^7.0.0"
find-versions "^4.0.0"
opencollective-postinstall "^2.0.2"
pkg-dir "^5.0.0"
please-upgrade-node "^3.2.0"
slash "^3.0.0"
which-pm-runs "^1.0.0"

[email protected], iconv-lite@^0.4.24:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
Expand Down Expand Up @@ -9434,11 +9406,6 @@ open@^7.0.4:
is-docker "^2.0.0"
is-wsl "^2.1.1"

opencollective-postinstall@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259"
integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==

optionator@^0.8.1:
version "0.8.3"
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
Expand Down Expand Up @@ -9912,13 +9879,6 @@ pkg-dir@^4.2.0:
dependencies:
find-up "^4.0.0"

pkg-dir@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-5.0.0.tgz#a02d6aebe6ba133a928f74aec20bafdfe6b8e760"
integrity sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==
dependencies:
find-up "^5.0.0"

please-upgrade-node@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942"
Expand Down Expand Up @@ -12273,11 +12233,6 @@ semver-regex@^2.0.0:
resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338"
integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==

semver-regex@^3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-3.1.2.tgz#34b4c0d361eef262e07199dbef316d0f2ab11807"
integrity sha512-bXWyL6EAKOJa81XG1OZ/Yyuq+oT0b2YLlxx7c+mrdYPaPbnj6WgVULXhinMIeZGufuUBu/eVRqXEhiv4imfwxA==

semver-truncate@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/semver-truncate/-/semver-truncate-1.1.2.tgz#57f41de69707a62709a7e0104ba2117109ea47e8"
Expand Down Expand Up @@ -12393,6 +12348,11 @@ signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3:
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==

simple-git-hooks@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/simple-git-hooks/-/simple-git-hooks-2.2.0.tgz#97fd946dba9c9c31db495f4f335094d0c3988425"
integrity sha512-bxXq98GQvXAORuugWDhL0ZcydpWE6384nS/qTpqZ5NTd4GECx+HtvaqfU0wu+PHhBQT+HhektpZEpTM5b3VuBA==

simple-swizzle@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a"
Expand Down Expand Up @@ -14032,11 +13992,6 @@ which-module@^2.0.0:
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=

which-pm-runs@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb"
integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=

which@^1.2.9, which@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
Expand Down

0 comments on commit 919d3f8

Please sign in to comment.