Skip to content

Commit a50955a

Browse files
committed
fix: replace husky v6 with husky v4 as v5+ ruins CI lint autofix
1 parent cadc323 commit a50955a

File tree

6 files changed

+37
-19
lines changed

6 files changed

+37
-19
lines changed

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,3 @@ node_modules
66
/esm
77
/esnext
88
/types
9-
10-
# husky ruins linting autofixes wince it is always touching /.husky/.gitignore on preinstall
11-
/.husky/.gitignore
12-
/.husky/_

.husky/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.husky/commit-msg

Lines changed: 0 additions & 4 deletions
This file was deleted.

.husky/pre-commit

Lines changed: 0 additions & 4 deletions
This file was deleted.

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,16 @@
3939
"test:coverage": "yarn test --coverage",
4040
"lint": "eslint ./ ./.storybook --ext ts,js,tsx,jsx,md,mdx",
4141
"lint:fix": "yarn lint --fix",
42-
"prepare": "husky install",
4342
"storybook:watch": "start-storybook -p 6006 --docs",
4443
"storybook:build": "build-storybook --docs -o ./storybook-build",
4544
"storybook:deploy": "storybook-to-ghpages -s storybook:build"
4645
},
46+
"husky": {
47+
"hooks": {
48+
"pre-commit": "lint-staged",
49+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
50+
}
51+
},
4752
"lint-staged": {
4853
"*.{js,jsx,ts,tsx,md,mdx}": "eslint --fix"
4954
},
@@ -99,7 +104,7 @@
99104
"eslint-plugin-prettier": "^3.4.0",
100105
"eslint-plugin-react": "^7.23.2",
101106
"eslint-plugin-react-hooks": "^4.2.0",
102-
"husky": "^6.0.0",
107+
"husky": "4",
103108
"jest": "^26.6.3",
104109
"lint-staged": "^10.5.4",
105110
"prettier": "^2.2.1",

yarn.lock

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4834,6 +4834,11 @@ compare-func@^2.0.0:
48344834
array-ify "^1.0.0"
48354835
dot-prop "^5.1.0"
48364836

4837+
compare-versions@^3.6.0:
4838+
version "3.6.0"
4839+
resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62"
4840+
integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==
4841+
48374842
component-emitter@^1.2.1:
48384843
version "1.3.0"
48394844
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
@@ -7462,10 +7467,21 @@ humanize-ms@^1.2.1:
74627467
dependencies:
74637468
ms "^2.0.0"
74647469

7465-
husky@^6.0.0:
7466-
version "6.0.0"
7467-
resolved "https://registry.yarnpkg.com/husky/-/husky-6.0.0.tgz#810f11869adf51604c32ea577edbc377d7f9319e"
7468-
integrity sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ==
7470+
husky@4:
7471+
version "4.3.8"
7472+
resolved "https://registry.yarnpkg.com/husky/-/husky-4.3.8.tgz#31144060be963fd6850e5cc8f019a1dfe194296d"
7473+
integrity sha512-LCqqsB0PzJQ/AlCgfrfzRe3e3+NvmefAdKQhRYpxS4u6clblBoDdzzvHi8fmxKRzvMxPY/1WZWzomPZww0Anow==
7474+
dependencies:
7475+
chalk "^4.0.0"
7476+
ci-info "^2.0.0"
7477+
compare-versions "^3.6.0"
7478+
cosmiconfig "^7.0.0"
7479+
find-versions "^4.0.0"
7480+
opencollective-postinstall "^2.0.2"
7481+
pkg-dir "^5.0.0"
7482+
please-upgrade-node "^3.2.0"
7483+
slash "^3.0.0"
7484+
which-pm-runs "^1.0.0"
74697485

74707486
74717487
version "0.4.24"
@@ -10198,6 +10214,11 @@ open@^7.0.2, open@^7.0.3:
1019810214
is-docker "^2.0.0"
1019910215
is-wsl "^2.1.1"
1020010216

10217+
opencollective-postinstall@^2.0.2:
10218+
version "2.0.3"
10219+
resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259"
10220+
integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==
10221+
1020110222
opener@^1.5.2:
1020210223
version "1.5.2"
1020310224
resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598"
@@ -13776,6 +13797,11 @@ which-module@^2.0.0:
1377613797
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
1377713798
integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
1377813799

13800+
which-pm-runs@^1.0.0:
13801+
version "1.0.0"
13802+
resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb"
13803+
integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=
13804+
1377913805
which@^1.2.9, which@^1.3.1:
1378013806
version "1.3.1"
1378113807
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"

0 commit comments

Comments
 (0)