Skip to content

Commit

Permalink
chore: add commitlint
Browse files Browse the repository at this point in the history
  • Loading branch information
jkusa committed May 5, 2021
1 parent 807bad6 commit 712e159
Show file tree
Hide file tree
Showing 5 changed files with 205 additions and 7 deletions.
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] }
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
"build-storybook": "build-storybook",
"deploy-storybook": "storybook-to-ghpages",
"pr-storybook": "build-storybook --no-dll -c .storybook -o artifacts/storybook",
"vsc-ext": "extList=$(node ./.vscode/.export-ext.js) && code --install-extension $extList"
"vsc-ext": "extList=$(node ./.vscode/.export-ext.js) && code --install-extension $extList",
"prepare": "husky install"

},
"peerDependencies": {
"@denali-design/icons": "1.x",
Expand All @@ -48,6 +50,8 @@
"@babel/plugin-transform-react-jsx": "7.10.4",
"@babel/preset-env": "7.11.5",
"@babel/preset-react": "7.10.4",
"@commitlint/cli": "12.1.1",
"@commitlint/config-conventional": "12.1.1",
"@denali-design/icons": "1.0.0",
"@storybook/addon-docs": "6.2.0",
"@storybook/addon-knobs": "6.2.0",
Expand Down Expand Up @@ -78,6 +82,7 @@
"eslint-plugin-prettier": "3.1.4",
"eslint-plugin-react": "7.20.6",
"fork-ts-checker-webpack-plugin": "5.2.0",
"husky": "6.0.0",
"identity-obj-proxy": "3.0.0",
"jest": "26.4.2",
"jest-enzyme": "7.1.2",
Expand Down
199 changes: 193 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,144 @@
exec-sh "^0.3.2"
minimist "^1.2.0"

"@commitlint/[email protected]":
version "12.1.1"
resolved "https://registry.npmjs.org/@commitlint/cli/-/cli-12.1.1.tgz#740370e557a8a17f415052821cdd5276ecb0ab98"
integrity sha512-SB67/s6VJ50seoPx/Sr2gj1fMzKrx+udgarecGdr8h43ah+M2e22gjQJ7xHv5KwyPQ+6ug1YOMCL34ubT4zupQ==
dependencies:
"@commitlint/format" "^12.1.1"
"@commitlint/lint" "^12.1.1"
"@commitlint/load" "^12.1.1"
"@commitlint/read" "^12.1.1"
"@commitlint/types" "^12.1.1"
get-stdin "8.0.0"
lodash "^4.17.19"
resolve-from "5.0.0"
resolve-global "1.0.0"
yargs "^16.2.0"

"@commitlint/[email protected]":
version "12.1.1"
resolved "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-12.1.1.tgz#73dd3b1a7912138420d248f334f15c94c250bc9e"
integrity sha512-15CqbXMsQiEb0qbzjEHe2OkzaXPYSp7RxaS6KoSVk/4W0QiigquavQ+M0huBZze92h0lMS6Pxoq4AJ5CQ3D+iQ==
dependencies:
conventional-changelog-conventionalcommits "^4.3.1"

"@commitlint/ensure@^12.1.1":
version "12.1.1"
resolved "https://registry.npmjs.org/@commitlint/ensure/-/ensure-12.1.1.tgz#bcefc85f7f8a41bb31f67d7a8966e322b47a6e43"
integrity sha512-XEUQvUjzBVQM7Uv8vYz+c7PDukFvx0AvQEyX/V+PaTkCK/xPvexu7FLbFwvypjSt9BPMf+T/rhB1hVmldkd6lw==
dependencies:
"@commitlint/types" "^12.1.1"
lodash "^4.17.19"

"@commitlint/execute-rule@^12.1.1":
version "12.1.1"
resolved "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-12.1.1.tgz#8aad1d46fb78b3199e4ae36debdc93570bf765ea"
integrity sha512-6mplMGvLCKF5LieL7BRhydpg32tm6LICnWQADrWU4S5g9PKi2utNvhiaiuNPoHUXr29RdbNaGNcyyPv8DSjJsQ==

"@commitlint/format@^12.1.1":
version "12.1.1"
resolved "https://registry.npmjs.org/@commitlint/format/-/format-12.1.1.tgz#a6b14f8605171374eecc2c463098d63c127ab7df"
integrity sha512-bTAoOryTFLqls17JTaRwk2WDVOP0NwuG4F/JPK8RaF6DMZNVQTfajkgTxFENNZRnESfau1BvivvEXfUAW2ZsvA==
dependencies:
"@commitlint/types" "^12.1.1"
chalk "^4.0.0"

"@commitlint/is-ignored@^12.1.1":
version "12.1.1"
resolved "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-12.1.1.tgz#6075a5cd2dcda7b6ec93322f5dbe2142cfbb3248"
integrity sha512-Sn4fsnWX+wLAJOD/UZeoVruB98te1TyPYRiDEq0MhRJAQIrP+7jE/O3/ass68AAMq00HvH3OK9kt4UBXggcGjA==
dependencies:
"@commitlint/types" "^12.1.1"
semver "7.3.5"

"@commitlint/lint@^12.1.1":
version "12.1.1"
resolved "https://registry.npmjs.org/@commitlint/lint/-/lint-12.1.1.tgz#cdd898af6eadba8f9e71d7f1255b5a479a757078"
integrity sha512-FFFPpku/E0svL1jaUVqosuZJDDWiNWYBlUw5ZEljh3MwWRcoaWtMIX5bseX+IvHpFZsCTAiBs1kCgNulCi0UvA==
dependencies:
"@commitlint/is-ignored" "^12.1.1"
"@commitlint/parse" "^12.1.1"
"@commitlint/rules" "^12.1.1"
"@commitlint/types" "^12.1.1"

"@commitlint/load@^12.1.1":
version "12.1.1"
resolved "https://registry.npmjs.org/@commitlint/load/-/load-12.1.1.tgz#5a7fb8be11e520931d1237c5e8dc401b7cc9c6c1"
integrity sha512-qOQtgNdJRULUQWP9jkpTwhj7aEtnqUtqeUpbQ9rjS+GIUST65HZbteNUX4S0mAEGPWqy2aK5xGd73cUfFSvuuw==
dependencies:
"@commitlint/execute-rule" "^12.1.1"
"@commitlint/resolve-extends" "^12.1.1"
"@commitlint/types" "^12.1.1"
chalk "^4.0.0"
cosmiconfig "^7.0.0"
lodash "^4.17.19"
resolve-from "^5.0.0"

"@commitlint/message@^12.1.1":
version "12.1.1"
resolved "https://registry.npmjs.org/@commitlint/message/-/message-12.1.1.tgz#56eb1dbb561e85e9295380a46ff3b09bc93cac65"
integrity sha512-RakDSLAiOligXjhbLahV8HowF4K75pZIcs0+Ii9Q8Gz5H3DWf1Ngit7alFTWfcbf/+DTjSzVPov5HiwQZPIBUg==

"@commitlint/parse@^12.1.1":
version "12.1.1"
resolved "https://registry.npmjs.org/@commitlint/parse/-/parse-12.1.1.tgz#3e49d6dc113d59cf266af0db99e320e933108c56"
integrity sha512-nuljIvAbBDr93DgL0wCArftEIhjSghawAwhvrKNV9FFcqAJqfVqitwMxJrNDCQ5pgUMCSKULLOEv+dA0bLlTEQ==
dependencies:
"@commitlint/types" "^12.1.1"
conventional-changelog-angular "^5.0.11"
conventional-commits-parser "^3.0.0"

"@commitlint/read@^12.1.1":
version "12.1.1"
resolved "https://registry.npmjs.org/@commitlint/read/-/read-12.1.1.tgz#22a2d7fd1eab5e38b9b262311af28ac42f9a5097"
integrity sha512-1k0CQEoZIdixvmqZRKEcWdj2XiKS7SlizEOJ1SE99Qui5d5FlBey8eaooTGgmpR6zObpIHJehtEPzM3VzUT3qA==
dependencies:
"@commitlint/top-level" "^12.1.1"
"@commitlint/types" "^12.1.1"
fs-extra "^9.0.0"
git-raw-commits "^2.0.0"

"@commitlint/resolve-extends@^12.1.1":
version "12.1.1"
resolved "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-12.1.1.tgz#80a78b0940775d17888dd2985b52f93d93e0a885"
integrity sha512-/DXRt0S0U3o9lq5cc8OL1Lkx0IjW0HcDWjUkUXshAajBIKBYSJB8x/loNCi1krNEJ8SwLXUEFt5OLxNO6wE9yQ==
dependencies:
import-fresh "^3.0.0"
lodash "^4.17.19"
resolve-from "^5.0.0"
resolve-global "^1.0.0"

"@commitlint/rules@^12.1.1":
version "12.1.1"
resolved "https://registry.npmjs.org/@commitlint/rules/-/rules-12.1.1.tgz#d59182a837d2addf301a3a4ef83316ae7e70248f"
integrity sha512-oCcLF/ykcJfhM2DeeaDyrgdaiuKsqIPNocugdPj2WEyhSYqmx1/u18CV96LAtW+WyyiOLCCeiZwiQutx3T5nXg==
dependencies:
"@commitlint/ensure" "^12.1.1"
"@commitlint/message" "^12.1.1"
"@commitlint/to-lines" "^12.1.1"
"@commitlint/types" "^12.1.1"

"@commitlint/to-lines@^12.1.1":
version "12.1.1"
resolved "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-12.1.1.tgz#40fbed1767d637249ce49b311a51909d8361ecf8"
integrity sha512-W23AH2XF5rI27MOAPSSr0TUDoRe7ZbFoRtYhFnPu2MBmcuDA9Tmfd9N5sM2tBXtdE26uq3SazwKqGt1OoGAilQ==

"@commitlint/top-level@^12.1.1":
version "12.1.1"
resolved "https://registry.npmjs.org/@commitlint/top-level/-/top-level-12.1.1.tgz#228df8fc36b6d7ea7ad149badfb6ef53dbc7001d"
integrity sha512-g7uRbr81QEIg+pbii0OkE17Zh/2C/f6dSmiMDVRn1S0+hNHR1bENCh18hVUKcV/qKTUsKkFlhhWXM9mQBfxQJw==
dependencies:
find-up "^5.0.0"

"@commitlint/types@^12.1.1":
version "12.1.1"
resolved "https://registry.npmjs.org/@commitlint/types/-/types-12.1.1.tgz#8e651f6af0171cd4f8d464c6c37a7cf63ee071bd"
integrity sha512-+qGH+s2Lo6qwacV2X3/ZypZwaAI84ift+1HBjXdXtI/q0F5NtmXucV3lcQOTviMTNiJhq4qWON2fjci2NItASw==
dependencies:
chalk "^4.0.0"

"@denali-design/[email protected]":
version "1.0.0"
resolved "https://registry.npmjs.org/@denali-design/icons/-/icons-1.0.0.tgz#7fda99a2706fef427fae5d88c393fd3306c0ffbf"
Expand Down Expand Up @@ -5054,14 +5192,23 @@ content-type@~1.0.4:
resolved "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==

conventional-changelog-angular@^5.0.0:
conventional-changelog-angular@^5.0.0, conventional-changelog-angular@^5.0.11:
version "5.0.12"
resolved "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz#c979b8b921cbfe26402eb3da5bbfda02d865a2b9"
integrity sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw==
dependencies:
compare-func "^2.0.0"
q "^1.5.1"

conventional-changelog-conventionalcommits@^4.3.1:
version "4.6.0"
resolved "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.0.tgz#7fc17211dbca160acf24687bd2fdd5fd767750eb"
integrity sha512-sj9tj3z5cnHaSJCYObA9nISf7eq/YjscLPoq6nmew4SiOjxqL2KRpK20fjnjVbpNDjJ2HR3MoVcWKXwbVvzS0A==
dependencies:
compare-func "^2.0.0"
lodash "^4.17.15"
q "^1.5.1"

conventional-changelog-writer@^4.0.0:
version "4.1.0"
resolved "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.1.0.tgz#1ca7880b75aa28695ad33312a1f2366f4b12659f"
Expand Down Expand Up @@ -5390,6 +5537,11 @@ damerau-levenshtein@^1.0.6:
resolved "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz#143c1641cb3d85c60c32329e26899adea8701791"
integrity sha512-JVrozIeElnj3QzfUIt8tB8YMluBJom4Vw9qTPpjGYQ9fYlB3D/rb6OordUxf3xeFB35LKWs0xqcO5U6ySvBtug==

dargs@^7.0.0:
version "7.0.0"
resolved "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc"
integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==

dashdash@^1.12.0:
version "1.14.1"
resolved "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
Expand Down Expand Up @@ -7129,6 +7281,11 @@ get-package-type@^0.1.0:
resolved "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a"
integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==

[email protected]:
version "8.0.0"
resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53"
integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==

get-stdin@^6.0.0:
version "6.0.0"
resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b"
Expand Down Expand Up @@ -7177,6 +7334,17 @@ git-log-parser@^1.2.0:
through2 "~2.0.0"
traverse "~0.6.6"

git-raw-commits@^2.0.0:
version "2.0.10"
resolved "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.10.tgz#e2255ed9563b1c9c3ea6bd05806410290297bbc1"
integrity sha512-sHhX5lsbG9SOO6yXdlwgEMQ/ljIn7qMpAbJZCGfXX2fq5T8M5SrDnpYk9/4HswTildcIqatsWa91vty6VhWSaQ==
dependencies:
dargs "^7.0.0"
lodash "^4.17.15"
meow "^8.0.0"
split2 "^3.0.0"
through2 "^4.0.0"

git-up@^4.0.0:
version "4.0.2"
resolved "https://registry.npmjs.org/git-up/-/git-up-4.0.2.tgz#10c3d731051b366dc19d3df454bfca3f77913a7c"
Expand Down Expand Up @@ -7253,6 +7421,13 @@ glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
once "^1.3.0"
path-is-absolute "^1.0.0"

global-dirs@^0.1.1:
version "0.1.1"
resolved "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445"
integrity sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=
dependencies:
ini "^1.3.4"

[email protected]:
version "2.0.0"
resolved "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780"
Expand Down Expand Up @@ -7771,6 +7946,11 @@ humanize-ms@^1.2.1:
dependencies:
ms "^2.0.0"

[email protected]:
version "6.0.0"
resolved "https://registry.npmjs.org/husky/-/husky-6.0.0.tgz#810f11869adf51604c32ea577edbc377d7f9319e"
integrity sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ==

[email protected]:
version "0.4.24"
resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
Expand Down Expand Up @@ -12377,15 +12557,22 @@ resolve-cwd@^3.0.0:
dependencies:
resolve-from "^5.0.0"

[email protected], resolve-from@^5.0.0:
version "5.0.0"
resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==

resolve-from@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==

resolve-from@^5.0.0:
version "5.0.0"
resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==
[email protected], resolve-global@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/resolve-global/-/resolve-global-1.0.0.tgz#a2a79df4af2ca3f49bf77ef9ddacd322dad19255"
integrity sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw==
dependencies:
global-dirs "^0.1.1"

resolve-url@^0.2.1:
version "0.2.1"
Expand Down Expand Up @@ -12623,7 +12810,7 @@ [email protected]:
resolved "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e"
integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==

[email protected], semver@^7.1.1, semver@^7.1.2, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5:
semver@7.3.5, semver@7.x, semver@^7.1.1, semver@^7.1.2, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5:
version "7.3.5"
resolved "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7"
integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==
Expand Down

0 comments on commit 712e159

Please sign in to comment.