From adac9ca2cb4078f5ce06a5ea1f0b80affcbdf525 Mon Sep 17 00:00:00 2001 From: orcus Date: Mon, 27 May 2024 23:22:46 +0800 Subject: [PATCH 1/7] chore: add lint-staged --- package.json | 1 + yarn.lock | 298 +++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 291 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 29d2f81f..ff073bc1 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,7 @@ "eslint-plugin-unicorn": "21.0", "jest": "^26.1.0", "lerna": "^3.22.1", + "lint-staged": "^9.2.0", "mini-css-extract-plugin": "^2.7.6", "postcss-loader": "^7.3.3", "prop-types": "^15.6.2", diff --git a/yarn.lock b/yarn.lock index 885ceb5c..16807456 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3330,6 +3330,13 @@ schema-utils "^3.0.0" source-map "^0.7.3" +"@samverschueren/stream-to-observable@^0.3.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.1.tgz#a21117b19ee9be70c379ec1877537ef2e1c63301" + integrity sha512-c/qwwcHyafOQuVQJj0IlBjf5yYgBI7YPJ77k4fOJYesb41jio65eaJODRUmfYKhTOFBrIZ66kgvGPlNbjuoRdQ== + dependencies: + any-observable "^0.3.0" + "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz" @@ -5108,7 +5115,7 @@ ansi-colors@^4.1.1: resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== -ansi-escapes@^3.2.0: +ansi-escapes@^3.0.0, ansi-escapes@^3.2.0: version "3.2.0" resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz" integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== @@ -5150,6 +5157,11 @@ ansi-regex@^5.0.1: resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA== + ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" @@ -5184,6 +5196,11 @@ ansi-to-html@^0.6.11: dependencies: entities "^1.1.2" +any-observable@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.3.0.tgz#af933475e5806a67d0d7df090dd5e8bef65d119b" + integrity sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog== + any-promise@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" @@ -6329,6 +6346,17 @@ ccount@^1.0.0: resolved "https://registry.npmjs.org/ccount/-/ccount-1.0.4.tgz" integrity sha512-fpZ81yYfzentuieinmGnphk0pLkOTMm6MZdVqwd77ROvhko6iujLNGrHH5E7utq3ygWklwfmwuG+A7P+NpqT6w== +chalk@^1.0.0, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A== + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" @@ -6566,7 +6594,7 @@ cli-boxes@^2.2.1: resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== -cli-cursor@^2.1.0: +cli-cursor@^2.0.0, cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" integrity sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw== @@ -6582,6 +6610,14 @@ cli-table3@^0.6.1: optionalDependencies: "@colors/colors" "1.5.0" +cli-truncate@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" + integrity sha512-f4r4yJnbT++qUPI9NR4XLDLq41gQ+uqnPItWG0F5ZkehuNiTTa3EY0S4AqTSUOeJ7/zU41oWPQSNkW5BqPL9bg== + dependencies: + slice-ansi "0.0.4" + string-width "^1.0.1" + cli-width@^2.0.0: version "2.2.1" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" @@ -7156,7 +7192,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" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -cosmiconfig@^5.1.0, cosmiconfig@^5.2.0: +cosmiconfig@^5.1.0, cosmiconfig@^5.2.0, cosmiconfig@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== @@ -7473,6 +7509,11 @@ data-urls@^2.0.0: whatwg-mimetype "^2.3.0" whatwg-url "^8.0.0" +date-fns@^1.27.2: + version "1.30.1" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" + integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw== + date-now@^0.1.4: version "0.1.4" resolved "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz" @@ -7657,6 +7698,20 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" +del@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/del/-/del-5.1.0.tgz#d9487c94e367410e6eff2925ee58c0c84a75b3a7" + integrity sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA== + dependencies: + globby "^10.0.1" + graceful-fs "^4.2.2" + is-glob "^4.0.1" + is-path-cwd "^2.2.0" + is-path-inside "^3.0.1" + p-map "^3.0.0" + rimraf "^3.0.0" + slash "^3.0.0" + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" @@ -8049,6 +8104,11 @@ electron-to-chromium@^1.4.601: resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.609.tgz" integrity sha512-ihiCP7PJmjoGNuLpl7TjNA8pCQWu09vGyjlPYw1Rqww4gvNuCcmvl+44G+2QyJ6S2K4o+wbTS++Xz0YN8Q9ERw== +elegant-spinner@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" + integrity sha512-B+ZM+RXvRqQaAmkMlO/oSe5nMUOaUnyfGYCEHoR8wrXsZR2mA0XVibsxV1bvTwxdRWah1PkQqso2EzhILGHtEQ== + elliptic@^6.0.0: version "6.5.4" resolved "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz" @@ -8403,7 +8463,7 @@ escape-html@~1.0.3: resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= -escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= @@ -8774,6 +8834,21 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +execa@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-2.1.0.tgz#e5d3ecd837d2a60ec50f3da78fd39767747bbe99" + integrity sha512-Y/URAVapfbYy2Xp/gb6A0E7iR8xeqOCXsuuaoMn7A5PzrXUK84E1gyiEfq0wQd/GHA6GsoHWwhNq8anb0mleIw== + dependencies: + cross-spawn "^7.0.0" + get-stream "^5.0.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^3.0.0" + onetime "^5.1.0" + p-finally "^2.0.0" + signal-exit "^3.0.2" + strip-final-newline "^2.0.0" + execa@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" @@ -8969,7 +9044,7 @@ fast-glob@^2.2.6: merge2 "^1.2.3" micromatch "^3.1.10" -fast-glob@^3.2.9: +fast-glob@^3.0.3, fast-glob@^3.2.9: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== @@ -9024,6 +9099,14 @@ figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: resolved "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz" integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== +figures@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + integrity sha512-UxKlfCRuCBxSXU4C6t9scbDyWZ4VlaFFdojKtzJuSkuOBQ5CNFum+zZXFwHjo+CxBC1t6zlYPgHIgFjL8ggoEQ== + dependencies: + escape-string-regexp "^1.0.5" + object-assign "^4.1.0" + figures@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" @@ -9502,6 +9585,11 @@ get-intrinsic@^1.2.1, get-intrinsic@^1.2.2: has-symbols "^1.0.3" hasown "^2.0.0" +get-own-enumerable-property-symbols@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" + integrity sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g== + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -9770,6 +9858,20 @@ globalthis@^1.0.3: dependencies: define-properties "^1.1.3" +globby@^10.0.1: + version "10.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" + integrity sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg== + dependencies: + "@types/glob" "^7.1.1" + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.0.3" + glob "^7.1.3" + ignore "^5.1.1" + merge2 "^1.2.3" + slash "^3.0.0" + globby@^11.0.2: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" @@ -9885,6 +9987,13 @@ hard-rejection@^2.1.0: resolved "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg== + dependencies: + ansi-regex "^2.0.0" + has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz" @@ -10365,6 +10474,11 @@ ignore@^5.0.6: resolved "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz" integrity sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A== +ignore@^5.1.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" + integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== + ignore@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78" @@ -10893,7 +11007,7 @@ is-number@^7.0.0: resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-obj@^1.0.0: +is-obj@^1.0.0, is-obj@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz" integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= @@ -10908,6 +11022,23 @@ is-object@^1.0.1: resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== +is-observable@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-1.1.0.tgz#b3e986c8f44de950867cab5403f5a3465005975e" + integrity sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA== + dependencies: + symbol-observable "^1.1.0" + +is-path-cwd@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" + integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== + +is-path-inside@^3.0.1: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz" @@ -10935,6 +11066,11 @@ is-potential-custom-element-name@^1.0.1: resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== +is-promise@^2.1.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" + integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== + is-regex@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz" @@ -10957,6 +11093,11 @@ is-regex@^1.1.2, is-regex@^1.1.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" + integrity sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA== + is-regexp@^2.0.0: version "2.1.0" resolved "https://registry.npmjs.org/is-regexp/-/is-regexp-2.1.0.tgz" @@ -11986,6 +12127,70 @@ lines-and-columns@^1.1.6: resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz" integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= +lint-staged@^9.2.0: + version "9.5.0" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-9.5.0.tgz#290ec605252af646d9b74d73a0fa118362b05a33" + integrity sha512-nawMob9cb/G1J98nb8v3VC/E8rcX1rryUYXVZ69aT9kde6YWX+uvNOEHY5yf2gcWcTJGiD0kqXmCnS3oD75GIA== + dependencies: + chalk "^2.4.2" + commander "^2.20.0" + cosmiconfig "^5.2.1" + debug "^4.1.1" + dedent "^0.7.0" + del "^5.0.0" + execa "^2.0.3" + listr "^0.14.3" + log-symbols "^3.0.0" + micromatch "^4.0.2" + normalize-path "^3.0.0" + please-upgrade-node "^3.1.1" + string-argv "^0.3.0" + stringify-object "^3.3.0" + +listr-silent-renderer@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" + integrity sha512-L26cIFm7/oZeSNVhWB6faeorXhMg4HNlb/dS/7jHhr708jxlXrtrBWo4YUxZQkc6dGoxEAe6J/D3juTRBUzjtA== + +listr-update-renderer@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.5.0.tgz#4ea8368548a7b8aecb7e06d8c95cb45ae2ede6a2" + integrity sha512-tKRsZpKz8GSGqoI/+caPmfrypiaq+OQCbd+CovEC24uk1h952lVj5sC7SqyFUm+OaJ5HN/a1YLt5cit2FMNsFA== + dependencies: + chalk "^1.1.3" + cli-truncate "^0.2.1" + elegant-spinner "^1.0.1" + figures "^1.7.0" + indent-string "^3.0.0" + log-symbols "^1.0.2" + log-update "^2.3.0" + strip-ansi "^3.0.1" + +listr-verbose-renderer@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.5.0.tgz#f1132167535ea4c1261102b9f28dac7cba1e03db" + integrity sha512-04PDPqSlsqIOaaaGZ+41vq5FejI9auqTInicFRndCBgE3bXG8D6W1I+mWhk+1nqbHmyhla/6BUrd5OSiHwKRXw== + dependencies: + chalk "^2.4.1" + cli-cursor "^2.1.0" + date-fns "^1.27.2" + figures "^2.0.0" + +listr@^0.14.3: + version "0.14.3" + resolved "https://registry.yarnpkg.com/listr/-/listr-0.14.3.tgz#2fea909604e434be464c50bddba0d496928fa586" + integrity sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA== + dependencies: + "@samverschueren/stream-to-observable" "^0.3.0" + is-observable "^1.1.0" + is-promise "^2.1.0" + is-stream "^1.1.0" + listr-silent-renderer "^1.1.1" + listr-update-renderer "^0.5.0" + listr-verbose-renderer "^0.5.0" + p-map "^2.0.0" + rxjs "^6.3.3" + load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz" @@ -12196,6 +12401,13 @@ log-driver@^1.2.5: resolved "https://registry.npmjs.org/log-driver/-/log-driver-1.2.5.tgz" integrity sha1-euTsJXMC/XkNVXyxDJcQDYV7AFY= +log-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" + integrity sha512-mmPrW0Fh2fxOzdBbFv4g1m6pR72haFLPJ2G5SJEELf1y+iaQrDG6cWCPjy54RHYbZAt7X+ls690Kw62AdWXBzQ== + dependencies: + chalk "^1.0.0" + log-symbols@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz" @@ -12210,6 +12422,15 @@ log-symbols@^3.0.0: dependencies: chalk "^2.4.2" +log-update@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-2.3.0.tgz#88328fd7d1ce7938b29283746f0b1bc126b24708" + integrity sha512-vlP11XfFGyeNQlmEn9tJ66rEW1coA/79m5z6BCkudjbAGE83uhAcGYrBFwfs3AdLiLzGRusRPAbSPK9xZteCmg== + dependencies: + ansi-escapes "^3.0.0" + cli-cursor "^2.0.0" + wrap-ansi "^3.0.1" + longest-streak@^2.0.1: version "2.0.3" resolved "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.3.tgz" @@ -13255,6 +13476,13 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" +npm-run-path@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-3.1.0.tgz#7f91be317f6a466efed3c9f2980ad8a4ee8b0fa5" + integrity sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg== + dependencies: + path-key "^3.0.0" + npm-run-path@^4.0.0, npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" @@ -13606,6 +13834,11 @@ p-finally@^1.0.0: resolved "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz" integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= +p-finally@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-2.0.1.tgz#bd6fcaa9c559a096b680806f4d657b3f0f240561" + integrity sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw== + p-limit@^1.1.0: version "1.2.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz" @@ -14079,6 +14312,13 @@ pkg-up@^2.0.0: dependencies: find-up "^2.1.0" +please-upgrade-node@^3.1.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" + integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg== + dependencies: + semver-compare "^1.0.0" + pluralize@^8.0.0: version "8.0.0" resolved "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz" @@ -15571,7 +15811,7 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs@^6.4.0: +rxjs@^6.3.3, rxjs@^6.4.0: version "6.6.7" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== @@ -15732,6 +15972,11 @@ schema-utils@^4.0.0: ajv-formats "^2.1.1" ajv-keywords "^5.1.0" +semver-compare@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" + integrity sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow== + "semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: version "5.7.1" resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz" @@ -15967,6 +16212,11 @@ slash@^3.0.0: resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +slice-ansi@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" + integrity sha512-up04hB2hR92PgjpyU3y/eg91yIBILyjVY26NvvciY3EVVPjybkMszMpXQ9QAkcS3I5rtJBDLoTxxg+qvW8c7rw== + slice-ansi@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz" @@ -16283,6 +16533,11 @@ strict-uri-encode@^2.0.0: resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== +string-argv@^0.3.0: + version "0.3.2" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" + integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== + string-length@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" @@ -16309,7 +16564,7 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -string-width@^2.1.0: +string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -16453,6 +16708,15 @@ stringify-entities@^1.0.1: is-alphanumerical "^1.0.0" is-hexadecimal "^1.0.0" +stringify-object@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629" + integrity sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw== + dependencies: + get-own-enumerable-property-symbols "^3.0.0" + is-obj "^1.0.1" + is-regexp "^1.0.0" + strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" @@ -16652,6 +16916,11 @@ sugarss@^2.0.0: dependencies: postcss "^7.0.2" +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g== + supports-color@^5.3.0, supports-color@^5.4.0: version "5.5.0" resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" @@ -16705,6 +16974,11 @@ svg-tags@^1.0.0: resolved "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz" integrity sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q= +symbol-observable@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" + integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== + symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" @@ -18189,6 +18463,14 @@ worker-rpc@^0.1.0: dependencies: microevent.ts "~0.1.1" +wrap-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-3.0.1.tgz#288a04d87eda5c286e060dfe8f135ce8d007f8ba" + integrity sha512-iXR3tDXpbnTpzjKSylUJRkLuOrEC7hwEB221cgn6wtF8wpmz28puFXAEfPT5zrjM3wahygB//VuWEr1vTkDcNQ== + dependencies: + string-width "^2.1.1" + strip-ansi "^4.0.0" + wrap-ansi@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" From 9a2bb12fc7b1841369707c8ee565c2d0de136387 Mon Sep 17 00:00:00 2001 From: orcus Date: Mon, 27 May 2024 23:24:05 +0800 Subject: [PATCH 2/7] chore: add husky --- package.json | 1 + yarn.lock | 29 ++++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ff073bc1..5ed9ddc2 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,7 @@ "eslint-plugin-react": "7.20", "eslint-plugin-react-hooks": "4.1", "eslint-plugin-unicorn": "21.0", + "husky": "^3.0.0", "jest": "^26.1.0", "lerna": "^3.22.1", "lint-staged": "^9.2.0", diff --git a/yarn.lock b/yarn.lock index 16807456..82c60c19 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10421,6 +10421,23 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" +husky@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/husky/-/husky-3.1.0.tgz#5faad520ab860582ed94f0c1a77f0f04c90b57c0" + integrity sha512-FJkPoHHB+6s4a+jwPqBudBDvYZsoQW5/HBuMSehC8qDiCe50kpcxeqFoDSlow+9I6wg47YxBoT3WxaURlrDIIQ== + dependencies: + chalk "^2.4.2" + ci-info "^2.0.0" + cosmiconfig "^5.2.1" + execa "^1.0.0" + get-stdin "^7.0.0" + opencollective-postinstall "^2.0.2" + pkg-dir "^4.2.0" + please-upgrade-node "^3.2.0" + read-pkg "^5.2.0" + run-node "^1.0.0" + slash "^3.0.0" + iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4: version "0.4.24" resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" @@ -13746,6 +13763,11 @@ open@^8.4.0: is-docker "^2.1.1" is-wsl "^2.2.0" +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.9.1: version "0.9.1" resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz" @@ -14312,7 +14334,7 @@ pkg-up@^2.0.0: dependencies: find-up "^2.1.0" -please-upgrade-node@^3.1.1: +please-upgrade-node@^3.1.1, 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" integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg== @@ -15797,6 +15819,11 @@ run-async@^2.2.0: resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== +run-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/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.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" From d9e7aeb4fb7f2b7b8a83e628a0380d2039ff439d Mon Sep 17 00:00:00 2001 From: orcus Date: Tue, 28 May 2024 13:45:00 +0800 Subject: [PATCH 3/7] chore: add lint-staged and husky command in package.json --- package.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/package.json b/package.json index 5ed9ddc2..25022188 100644 --- a/package.json +++ b/package.json @@ -93,5 +93,16 @@ }, "publishConfig": { "registry": "https://registry.npmjs.org" + }, + "lint-staged": { + "*.{js,jsx}": [ + "eslint --quiet", + "stylelint" + ] + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } } } From 823603fea3776564214ab0340e34d404d846dd50 Mon Sep 17 00:00:00 2001 From: orcus Date: Mon, 27 May 2024 23:40:25 +0800 Subject: [PATCH 4/7] chore: add prettier --- .prettierignore | 8 ++++++++ package.json | 10 +++++++++- prettier.config.js | 23 +++++++++++++++++++++++ yarn.lock | 10 ++++++++++ 4 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 .prettierignore create mode 100644 prettier.config.js diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..f13c7b7b --- /dev/null +++ b/.prettierignore @@ -0,0 +1,8 @@ +# Ignore artifacts: +coverage +patches +locales +node_modules +.yarn +.github +.vscode diff --git a/package.json b/package.json index 25022188..633f8484 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "eslint": "7.8", "eslint-config-airbnb": "18.2", "eslint-config-ichef": "8.0", + "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-babel-module": "^5.0.0-beta.1", "eslint-plugin-babel": "5.3", "eslint-plugin-filenames": "1.3", @@ -72,6 +73,7 @@ "lint-staged": "^9.2.0", "mini-css-extract-plugin": "^2.7.6", "postcss-loader": "^7.3.3", + "prettier": "3.1.1", "prop-types": "^15.6.2", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -95,9 +97,15 @@ "registry": "https://registry.npmjs.org" }, "lint-staged": { + "*.{yml,json,md}": [ + "prettier --write", + "git add" + ], "*.{js,jsx}": [ + "prettier --write", "eslint --quiet", - "stylelint" + "stylelint", + "git add" ] }, "husky": { diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 00000000..73ffc936 --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,23 @@ +const config = { + arrowParens: 'always', + bracketSameLine: false, + bracketSpacing: true, + semi: true, + experimentalTernaries: false, + singleQuote: true, + jsxSingleQuote: false, + quoteProps: 'as-needed', + trailingComma: 'all', + singleAttributePerLine: true, + htmlWhitespaceSensitivity: 'ignore', + vueIndentScriptAndStyle: false, + proseWrap: 'preserve', + insertPragma: false, + printWidth: 100, + requirePragma: false, + tabWidth: 2, + useTabs: false, + embeddedLanguageFormatting: 'auto', +}; + +module.exports = config; diff --git a/yarn.lock b/yarn.lock index 82c60c19..68024c67 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8515,6 +8515,11 @@ eslint-config-ichef@8.0: resolved "https://registry.npmjs.org/eslint-config-ichef/-/eslint-config-ichef-8.0.0.tgz" integrity sha512-Y4Pg7BHTZMZQ3DUck0i6mIu4g33nR1XCbIfNLDggTM3w2Qcqn5asxBtA+uBNI9bla/6K9YYyKqdl8VxlfNBr8w== +eslint-config-prettier@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f" + integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== + eslint-import-resolver-babel-module@^5.0.0-beta.1: version "5.0.0-beta.1" resolved "https://registry.npmjs.org/eslint-import-resolver-babel-module/-/eslint-import-resolver-babel-module-5.0.0-beta.1.tgz" @@ -14610,6 +14615,11 @@ prelude-ls@^1.2.1: resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== +prettier@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848" + integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw== + "prettier@>=2.2.1 <=2.3.0": version "2.3.0" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.0.tgz#b6a5bf1284026ae640f17f7ff5658a7567fc0d18" From 2c44c0d89d4b7aaed8344372646c9d434cf32ecc Mon Sep 17 00:00:00 2001 From: orcus Date: Mon, 27 May 2024 23:41:13 +0800 Subject: [PATCH 5/7] chore(eslintrc): add prettier extend --- configs/.eslintrc.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/configs/.eslintrc.yml b/configs/.eslintrc.yml index 233f3381..ec8b629e 100644 --- a/configs/.eslintrc.yml +++ b/configs/.eslintrc.yml @@ -1,13 +1,15 @@ -extends: ichef +extends: + - ichef + - prettier env: - browser: true - es6: true - jest: true + browser: true + es6: true + jest: true settings: - import/resolver: - babel-module: {} + import/resolver: + babel-module: {} parserOptions: - sourceType: module + sourceType: module From 459ac5740d070f1bfb68f1749063a08656a6f772 Mon Sep 17 00:00:00 2001 From: orcus Date: Tue, 28 May 2024 17:04:09 +0800 Subject: [PATCH 6/7] style: format code by using prettier --- CHANGELOG.md | 559 +++++++++++------- README.md | 27 +- babel.config.js | 63 +- codecov.yml | 2 +- configs/.stylelintrc.yml | 12 +- configs/jest.config.json | 4 +- configs/webpack.dist.js | 11 +- jsconfig.json | 21 +- lerna.json | 4 +- .../core/configs/svgr/componentTemplate.js | 18 +- packages/core/configs/svgr/indexTemplate.js | 10 +- packages/core/configs/webpack.dist.js | 4 +- packages/core/src/Avatar.js | 18 +- packages/core/src/BasicRow.js | 8 +- packages/core/src/Button.js | 9 +- packages/core/src/Checkbox.js | 192 +++--- packages/core/src/ColumnView.js | 3 +- packages/core/src/EditableBasicRow.js | 181 +++--- packages/core/src/EditableText.js | 136 ++--- packages/core/src/EditableTextLabel.js | 251 ++++---- packages/core/src/FlexCell.js | 21 +- packages/core/src/HeaderRow.js | 30 +- packages/core/src/Icon.js | 30 +- packages/core/src/IconButton.js | 10 +- packages/core/src/IconLayout.js | 125 ++-- packages/core/src/InfiniteScroll.js | 495 ++++++++-------- packages/core/src/List.js | 10 +- packages/core/src/ListRow.js | 139 +++-- packages/core/src/Modal.js | 46 +- packages/core/src/Popover.js | 21 +- packages/core/src/Popup.js | 46 +- packages/core/src/PopupButton.js | 5 +- packages/core/src/Radio.js | 12 +- packages/core/src/SearchInput.js | 298 +++++----- packages/core/src/Section.js | 24 +- packages/core/src/SplitView.js | 11 +- packages/core/src/SplitViewColumn.js | 5 +- packages/core/src/StatusIcon.js | 110 ++-- packages/core/src/Switch.js | 156 ++--- packages/core/src/SwitchIcon.js | 5 +- packages/core/src/Tag.js | 5 +- packages/core/src/Text.js | 165 +++--- packages/core/src/TextEllipsis.js | 6 +- packages/core/src/TextInput.js | 48 +- packages/core/src/TextLabel.js | 5 +- packages/core/src/Tooltip.js | 18 +- packages/core/src/__tests__/Avatar.test.js | 38 +- packages/core/src/__tests__/BasicRow.test.js | 29 +- packages/core/src/__tests__/Button.test.js | 13 +- packages/core/src/__tests__/Checkbox.test.js | 33 +- .../core/src/__tests__/ColumnView.test.js | 28 +- .../src/__tests__/EditableBasicRow.test.js | 16 +- .../core/src/__tests__/EditableText.test.js | 22 +- .../src/__tests__/EditableTextLabel.test.js | 49 +- packages/core/src/__tests__/HeaderRow.test.js | 25 +- .../core/src/__tests__/IconButton.test.js | 16 +- .../core/src/__tests__/IconLayout.test.js | 28 +- .../core/src/__tests__/InfiniteScroll.test.js | 30 +- packages/core/src/__tests__/List.test.js | 4 +- packages/core/src/__tests__/ListRow.test.js | 13 +- packages/core/src/__tests__/Modal.test.js | 26 +- packages/core/src/__tests__/Popover.test.js | 47 +- packages/core/src/__tests__/Popup.test.js | 119 ++-- .../core/src/__tests__/PopupButton.test.js | 28 +- packages/core/src/__tests__/Radio.test.js | 21 +- .../core/src/__tests__/SearchInput.test.js | 18 +- packages/core/src/__tests__/Section.test.js | 8 +- .../src/__tests__/SplitViewColumn.test.js | 4 +- .../core/src/__tests__/StatusIcon.test.js | 22 +- packages/core/src/__tests__/Switch.test.js | 16 +- .../core/src/__tests__/SwitchIcon.test.js | 1 - packages/core/src/__tests__/Text.test.js | 25 +- .../core/src/__tests__/TextEllipsis.test.js | 6 +- packages/core/src/__tests__/TextInput.test.js | 55 +- .../core/src/icons/components/CopyLink.js | 11 +- .../core/src/icons/components/Dropdown.js | 5 +- .../core/src/icons/components/FirstPage.js | 5 +- .../src/icons/components/InlineDropdown.js | 5 +- .../core/src/icons/components/InlineInfo.js | 10 +- .../core/src/icons/components/LastPage.js | 5 +- packages/core/src/icons/components/More.js | 18 +- packages/core/src/icons/components/People.js | 10 +- packages/core/src/icons/components/Printer.js | 5 +- .../core/src/icons/components/Question.js | 5 +- packages/core/src/index.js | 3 - .../src/mixins/__tests__/closable.test.js | 142 +++-- .../src/mixins/__tests__/escapable.test.js | 4 +- .../mixins/__tests__/renderToLayer.test.js | 3 +- .../core/src/mixins/__tests__/rowComp.test.js | 57 +- .../src/mixins/__tests__/withStatus.test.js | 37 +- .../__tests__/getPositionState.test.js | 39 +- .../src/mixins/anchored/__tests__/index.js | 45 +- .../__tests__/placementStrategies.test.js | 59 +- .../src/mixins/anchored/getPositionState.js | 101 ++-- packages/core/src/mixins/anchored/index.js | 202 +++---- .../mixins/anchored/placementStrategies.js | 75 +-- packages/core/src/mixins/closable.js | 202 ++++--- packages/core/src/mixins/escapable.js | 57 +- packages/core/src/mixins/renderToLayer.js | 93 ++- packages/core/src/mixins/rowComp.js | 76 +-- packages/core/src/mixins/withStatus.js | 117 ++-- packages/core/src/styles/Avatar.scss | 4 +- packages/core/src/styles/Button.scss | 4 +- packages/core/src/styles/Checkbox.scss | 2 +- packages/core/src/styles/Closable.scss | 2 +- packages/core/src/styles/ColumnView.scss | 2 +- .../core/src/styles/EditableBasicRow.scss | 2 +- packages/core/src/styles/FlexCell.scss | 2 +- packages/core/src/styles/HeaderRow.scss | 2 +- packages/core/src/styles/Icon.scss | 16 +- packages/core/src/styles/IconLayout.scss | 2 +- packages/core/src/styles/InfiniteScroll.scss | 2 +- packages/core/src/styles/List.scss | 5 +- packages/core/src/styles/ListRow.scss | 2 +- packages/core/src/styles/Modal.scss | 4 +- packages/core/src/styles/Overlay.scss | 4 +- packages/core/src/styles/Popover.scss | 2 +- packages/core/src/styles/Popup.scss | 6 +- packages/core/src/styles/PopupButton.scss | 2 +- packages/core/src/styles/Radio.scss | 2 +- packages/core/src/styles/RenderToLayer.scss | 2 +- packages/core/src/styles/RowComp.scss | 8 +- packages/core/src/styles/SearchInput.scss | 2 +- packages/core/src/styles/Section.scss | 6 +- packages/core/src/styles/SplitView.scss | 2 +- packages/core/src/styles/StatusIcon.scss | 2 +- packages/core/src/styles/Switch.scss | 2 +- packages/core/src/styles/SwitchIcon.scss | 8 +- packages/core/src/styles/Tag.scss | 2 +- packages/core/src/styles/Text.scss | 2 +- packages/core/src/styles/TextEllipsis.scss | 2 +- packages/core/src/styles/TextInput.scss | 4 +- packages/core/src/styles/TextLabel.scss | 2 +- packages/core/src/styles/Tooltip.scss | 2 +- packages/core/src/styles/_animations.scss | 10 +- packages/core/src/styles/_color_helpers.scss | 19 +- packages/core/src/styles/_colors.scss | 66 +-- packages/core/src/styles/_mixins.scss | 2 +- packages/core/src/styles/_states.scss | 6 +- packages/core/src/styles/_variables.scss | 24 +- packages/core/src/styles/index.scss | 4 +- .../utils/__tests__/enhancedPropTypes.test.js | 2 +- .../utils/__tests__/getComponentName.test.js | 16 +- .../__tests__/getStateClassnames.test.js | 10 +- .../core/src/utils/__tests__/icBEM.test.js | 38 +- .../utils/__tests__/wrapIfNotElement.test.js | 8 +- packages/core/src/utils/enhancedPropTypes.js | 14 +- packages/core/src/utils/getComponentName.js | 4 +- packages/core/src/utils/icBEM.js | 25 +- packages/core/src/utils/isNonEmptyString.js | 2 +- packages/core/src/utils/wrapIfNotElement.js | 5 +- packages/form/src/RadioSelectOption.js | 11 +- packages/form/src/SelectList.js | 309 +++++----- packages/form/src/SelectOption.js | 11 +- packages/form/src/SelectRow.js | 366 ++++++------ packages/form/src/SwitchRow.js | 114 ++-- .../src/__tests__/RadioSelectList.test.js | 20 +- .../src/__tests__/RadioSelectOption.test.js | 29 +- .../form/src/__tests__/SelectList.test.js | 251 ++++++-- .../form/src/__tests__/SelectOption.test.js | 29 +- packages/form/src/__tests__/SelectRow.test.js | 189 ++++-- packages/form/src/__tests__/SwitchRow.test.js | 9 +- .../form/src/__tests__/TextInputRow.test.js | 47 +- packages/form/src/index.js | 1 - .../form/src/mixins/__tests__/formRow.test.js | 6 +- packages/form/src/mixins/formRow.js | 114 ++-- packages/form/src/styles/SelectRow.scss | 2 +- packages/form/src/styles/TextInputRow.scss | 2 +- .../__tests__/parseSelectOptions.test.js | 66 ++- packages/form/src/utils/parseSelectOptions.js | 8 +- packages/imageeditor/src/EditorPlaceholder.js | 12 +- packages/imageeditor/src/ImageEditor.js | 380 ++++++------ .../src/__tests__/EditorPlaceholder.test.js | 19 +- .../src/__tests__/ImageEditor.test.js | 66 +-- packages/imageeditor/src/styles/index.scss | 8 +- .../utils/__tests__/getInitPosition.test.js | 28 +- .../__tests__/getScaleFromCropRect.test.js | 28 +- .../imageeditor/src/utils/getInitPosition.js | 11 +- .../src/utils/getScaleFromCropRect.js | 2 +- packages/storybook/.storybook/Code.js | 6 +- packages/storybook/.storybook/main.js | 10 +- .../storybook/.storybook/preview-head.html | 51 +- packages/storybook/.storybook/preview.js | 2 +- .../storybook/.storybook/webpack.config.js | 18 +- .../storybook/examples/core/Avatar.stories.js | 23 +- .../storybook/examples/core/Button.stories.js | 12 +- .../examples/core/Checkbox.stories.js | 13 +- .../examples/core/ColumnView.stories.js | 24 +- .../examples/core/HeaderRow.stories.js | 27 +- .../storybook/examples/core/Icon.stories.js | 50 +- .../examples/core/InfiniteScroll.stories.js | 13 +- .../storybook/examples/core/List.stories.js | 175 ++++-- .../storybook/examples/core/Modal.stories.js | 61 +- .../examples/core/Popover.stories.js | 44 +- .../storybook/examples/core/Popup.stories.js | 89 ++- .../storybook/examples/core/Radio.stories.js | 5 +- .../examples/core/SearchInput.stories.js | 5 +- .../examples/core/Section.stories.js | 18 +- .../examples/core/SplitView.stories.js | 18 +- .../examples/core/StatusIcon.stories.js | 41 +- .../storybook/examples/core/Switch.stories.js | 1 - .../examples/core/SwitchIcon.stories.js | 1 - .../storybook/examples/core/Tag.stories.js | 12 +- .../storybook/examples/core/Text.stories.js | 13 +- .../examples/core/TextInput.stories.js | 12 +- .../examples/core/TextLabel.stories.js | 10 +- .../examples/core/Tooltip.stories.js | 17 +- .../examples/form/RadioSelectList.stories.js | 56 +- .../examples/form/SelectList.stories.js | 116 +++- .../examples/form/SelectRow.stories.js | 179 ++++-- .../examples/form/SwitchRow.stories.js | 10 +- .../examples/form/TextInputRow.stories.js | 1 - .../imageeditor/ImageEditor/index.stories.js | 4 +- packages/storybook/examples/intro.stories.mdx | 4 +- packages/storybook/utils/ColoredBox.js | 16 +- packages/storybook/utils/DebugBox.js | 16 +- packages/storybook/utils/getComponentProps.js | 21 +- 217 files changed, 5070 insertions(+), 4140 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2541df12..fbd56237 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,170 +1,136 @@ # [7.1.0](https://github.com/iCHEF/gypcrete/compare/v7.0.1...v7.1.0) (2024-04-12) - ### Bug Fixes -* pass down disabled prop in the rowComp Hoc ([723ba8b](https://github.com/iCHEF/gypcrete/commit/723ba8b31d1b7d0c7d901b2466a364b2a3616a76)) - +- pass down disabled prop in the rowComp Hoc ([723ba8b](https://github.com/iCHEF/gypcrete/commit/723ba8b31d1b7d0c7d901b2466a364b2a3616a76)) ### Features -* remove opacity style of disabled html attribute ([c96eb64](https://github.com/iCHEF/gypcrete/commit/c96eb64447514efc79bcd0a33e9a3729fc854de3)) - - +- remove opacity style of disabled html attribute ([c96eb64](https://github.com/iCHEF/gypcrete/commit/c96eb64447514efc79bcd0a33e9a3729fc854de3)) ## [7.0.1](https://github.com/iCHEF/gypcrete/compare/v7.0.0...v7.0.1) (2024-02-02) - ### Features -* integrate storybook with chromatic ([dd911b8](https://github.com/iCHEF/gypcrete/commit/dd911b82ea31f4e1d1534574d2f70f19ac551c96)) - - +- integrate storybook with chromatic ([dd911b8](https://github.com/iCHEF/gypcrete/commit/dd911b82ea31f4e1d1534574d2f70f19ac551c96)) # [7.0.0](https://github.com/iCHEF/gypcrete/compare/v6.1.0...v7.0.0) (2024-01-26) - ### Bug Fixes -* Fix warning message in SelectRow.js ([26f200f](https://github.com/iCHEF/gypcrete/commit/26f200f8fab14f3bb67dedb69a2deb44eee00749)) - +- Fix warning message in SelectRow.js ([26f200f](https://github.com/iCHEF/gypcrete/commit/26f200f8fab14f3bb67dedb69a2deb44eee00749)) ### Features -* upgrade react to v18 ([f6366f4](https://github.com/iCHEF/gypcrete/commit/f6366f452ccde2955931984a556bc3637b56bb7a)) - - +- upgrade react to v18 ([f6366f4](https://github.com/iCHEF/gypcrete/commit/f6366f452ccde2955931984a556bc3637b56bb7a)) # [6.1.0](https://github.com/iCHEF/gypcrete/compare/v6.0.0...v6.1.0) (2023-09-15) - ### Features -* add 'upload' icon ([380c79c](https://github.com/iCHEF/gypcrete/commit/380c79c70a03b37b4c1725015e8fb3fa5ccae971)) -* add zIndex prop to renderToLayer hoc ([8dc8de2](https://github.com/iCHEF/gypcrete/commit/8dc8de2dccd46618eb8456fad0a55f819afc9ec1)) - - +- add 'upload' icon ([380c79c](https://github.com/iCHEF/gypcrete/commit/380c79c70a03b37b4c1725015e8fb3fa5ccae971)) +- add zIndex prop to renderToLayer hoc ([8dc8de2](https://github.com/iCHEF/gypcrete/commit/8dc8de2dccd46618eb8456fad0a55f819afc9ec1)) # [6.0.0](https://github.com/iCHEF/gypcrete/compare/v5.3.0...v6.0.0) (2023-06-27) - ### Features -* replace create-react-context with the native React Context API ([39b825c](https://github.com/iCHEF/gypcrete/commit/39b825ccf92f6ad3073841285931b516fffa3dc8)) -* upgrade react-textarea-autosize ([58ac7b7](https://github.com/iCHEF/gypcrete/commit/58ac7b762606bc72ff71a2cf03394a11821e35fe)) - - +- replace create-react-context with the native React Context API ([39b825c](https://github.com/iCHEF/gypcrete/commit/39b825ccf92f6ad3073841285931b516fffa3dc8)) +- upgrade react-textarea-autosize ([58ac7b7](https://github.com/iCHEF/gypcrete/commit/58ac7b762606bc72ff71a2cf03394a11821e35fe)) # [5.3.0](https://github.com/iCHEF/gypcrete/compare/v5.2.0...v5.3.0) (2023-03-10) - ### Bug Fixes -* fix export ([399e9c6](https://github.com/iCHEF/gypcrete/commit/399e9c62dac933dad9a83a3dd6350983183df798)) - +- fix export ([399e9c6](https://github.com/iCHEF/gypcrete/commit/399e9c62dac933dad9a83a3dd6350983183df798)) ### Features -* add getCroppingRect method on image editor ([a33b299](https://github.com/iCHEF/gypcrete/commit/a33b2995e06c11f20aeba901911815f17602424b)) -* export getScaleFromCropRect ([c76b03a](https://github.com/iCHEF/gypcrete/commit/c76b03a86dd16e5ea397c04c034eddfe301654a4)) - - +- add getCroppingRect method on image editor ([a33b299](https://github.com/iCHEF/gypcrete/commit/a33b2995e06c11f20aeba901911815f17602424b)) +- export getScaleFromCropRect ([c76b03a](https://github.com/iCHEF/gypcrete/commit/c76b03a86dd16e5ea397c04c034eddfe301654a4)) # [5.2.0](https://github.com/iCHEF/gypcrete/compare/v5.1.0...v5.2.0) (2022-11-04) - ### Bug Fixes -* dont compute maxHeight of popover on horizontal placement ([581fc6c](https://github.com/iCHEF/gypcrete/commit/581fc6cfc7ca5f6b1bc4b170556e26d8839a4afc)) -* offset is different from client rect ([15709f4](https://github.com/iCHEF/gypcrete/commit/15709f480ae05efd2f02c7a365709abb82b04f12)) -* omit defaultPlacement ([25447fd](https://github.com/iCHEF/gypcrete/commit/25447fd118f9ddc3a1313bac13b4f65ff57851c8)) -* should not consider another side arrow position ([c8350f1](https://github.com/iCHEF/gypcrete/commit/c8350f127bf6c2b50b00da8a2893ab467cca1515)) - +- dont compute maxHeight of popover on horizontal placement ([581fc6c](https://github.com/iCHEF/gypcrete/commit/581fc6cfc7ca5f6b1bc4b170556e26d8839a4afc)) +- offset is different from client rect ([15709f4](https://github.com/iCHEF/gypcrete/commit/15709f480ae05efd2f02c7a365709abb82b04f12)) +- omit defaultPlacement ([25447fd](https://github.com/iCHEF/gypcrete/commit/25447fd118f9ddc3a1313bac13b4f65ff57851c8)) +- should not consider another side arrow position ([c8350f1](https://github.com/iCHEF/gypcrete/commit/c8350f127bf6c2b50b00da8a2893ab467cca1515)) ### Features -* add left placement strategies ([04cdd75](https://github.com/iCHEF/gypcrete/commit/04cdd75e953d30d1dfff609bf2d8af80c4aa8292)) -* add right / left placement style ([0c70168](https://github.com/iCHEF/gypcrete/commit/0c70168355567b0f5638ce5d6dd9f63fd6429ebb)) -* add right placement strategy ([80a851f](https://github.com/iCHEF/gypcrete/commit/80a851f4276a45ea9663438127a07a4a368a6763)) -* add top and bottom placement strategy ([deadab0](https://github.com/iCHEF/gypcrete/commit/deadab04f3cec936a5c3c410d368370a0eef31d0)) -* make arrowPosition consider top and left ([0998cce](https://github.com/iCHEF/gypcrete/commit/0998cce139064b63aba15821788c7cb336da12bb)) -* make defaultPlacement changeable for anchored component ([5e84517](https://github.com/iCHEF/gypcrete/commit/5e84517c7c77c84866013930289f06ceef63c8b7)) -* move getPosition logic into placement strategy ([51f4d62](https://github.com/iCHEF/gypcrete/commit/51f4d623c5a78377f196953f9d5d2eed409adbf9)) -* simplify logic ([ff78d60](https://github.com/iCHEF/gypcrete/commit/ff78d60cfda3693898d22e4ecb9a578ea3158ce8)) - - +- add left placement strategies ([04cdd75](https://github.com/iCHEF/gypcrete/commit/04cdd75e953d30d1dfff609bf2d8af80c4aa8292)) +- add right / left placement style ([0c70168](https://github.com/iCHEF/gypcrete/commit/0c70168355567b0f5638ce5d6dd9f63fd6429ebb)) +- add right placement strategy ([80a851f](https://github.com/iCHEF/gypcrete/commit/80a851f4276a45ea9663438127a07a4a368a6763)) +- add top and bottom placement strategy ([deadab0](https://github.com/iCHEF/gypcrete/commit/deadab04f3cec936a5c3c410d368370a0eef31d0)) +- make arrowPosition consider top and left ([0998cce](https://github.com/iCHEF/gypcrete/commit/0998cce139064b63aba15821788c7cb336da12bb)) +- make defaultPlacement changeable for anchored component ([5e84517](https://github.com/iCHEF/gypcrete/commit/5e84517c7c77c84866013930289f06ceef63c8b7)) +- move getPosition logic into placement strategy ([51f4d62](https://github.com/iCHEF/gypcrete/commit/51f4d623c5a78377f196953f9d5d2eed409adbf9)) +- simplify logic ([ff78d60](https://github.com/iCHEF/gypcrete/commit/ff78d60cfda3693898d22e4ecb9a578ea3158ce8)) # [5.1.0](https://github.com/iCHEF/gypcrete/compare/v5.0.1...v5.1.0) (2022-10-21) - ### Features -* add test case ([2c3e460](https://github.com/iCHEF/gypcrete/commit/2c3e4605c00599fe1d730e81c08f9d4ab0ba5ee3)) - - +- add test case ([2c3e460](https://github.com/iCHEF/gypcrete/commit/2c3e4605c00599fe1d730e81c08f9d4ab0ba5ee3)) ## [5.0.1](https://github.com/iCHEF/gypcrete/compare/v5.0.0...v5.0.1) (2022-05-26) - ### Features -* add `release-drafter.yml` ([64195e5](https://github.com/iCHEF/gypcrete/commit/64195e5131784313dd78e8c8e1ad545ac1b912de)) -* upgrade auto assign workflow ([faa0ab4](https://github.com/iCHEF/gypcrete/commit/faa0ab4fe7752aeb3ea14b4d33d15e8bc4fa8cce)) - - +- add `release-drafter.yml` ([64195e5](https://github.com/iCHEF/gypcrete/commit/64195e5131784313dd78e8c8e1ad545ac1b912de)) +- upgrade auto assign workflow ([faa0ab4](https://github.com/iCHEF/gypcrete/commit/faa0ab4fe7752aeb3ea14b4d33d15e8bc4fa8cce)) # [5.0.0](https://github.com/iCHEF/gypcrete/compare/v4.4.0...v5.0.0) (2022-05-13) - ### Bug Fixes -* CI never stop running caused by watch mode ([2da930d](https://github.com/iCHEF/gypcrete/commit/2da930dba2dc161058e3c63bca8fdd1dfb36b6d6)) -* clean code ([d54c000](https://github.com/iCHEF/gypcrete/commit/d54c0009d00b4c2039e11cbe3225d1345998b602)) -* fix code review ([830c305](https://github.com/iCHEF/gypcrete/commit/830c305aeed1d2735b49f11124a98f49b0ee5323)) -* fix props name ([53f3719](https://github.com/iCHEF/gypcrete/commit/53f3719c978a3fae446fa7afd2c6059ae00e1c2b)) -* fix scss file indentation ([176bc6f](https://github.com/iCHEF/gypcrete/commit/176bc6f2f8dfc79521da05fc88b233d77b3c7829)) -* lint error ([e1b1bb1](https://github.com/iCHEF/gypcrete/commit/e1b1bb1e0b01af42ba12064351f711b50aeb95bc)) -* lint error ([1262b03](https://github.com/iCHEF/gypcrete/commit/1262b032f8acf603a2ca1ce7969ee55cd0ab0f1d)) -* lint issue ([488503d](https://github.com/iCHEF/gypcrete/commit/488503d45ce3f5e1c34400bc2598c9d68f6d04a4)) -* linter errors in Radio.scss ([9cf2722](https://github.com/iCHEF/gypcrete/commit/9cf27220d69aa60737c3501823561e9d23c53e70)) -* **package.json:** fix generate-icon-components script ([7b95c83](https://github.com/iCHEF/gypcrete/commit/7b95c8343ae7309ae1037029e19be46c993c6099)) -* remove build job ([94dbe0d](https://github.com/iCHEF/gypcrete/commit/94dbe0d64695e457b86f76c465fa73ba6f057c8c)) -* scss stylelint errors ([ff68819](https://github.com/iCHEF/gypcrete/commit/ff688194a0f201660cfc8804adda03474be1e4c9)) -* should not asideControlClickableOnDisabled if not disabled ([673ad51](https://github.com/iCHEF/gypcrete/commit/673ad5168617d7f16bd58de6ce136dca1550a588)) - +- CI never stop running caused by watch mode ([2da930d](https://github.com/iCHEF/gypcrete/commit/2da930dba2dc161058e3c63bca8fdd1dfb36b6d6)) +- clean code ([d54c000](https://github.com/iCHEF/gypcrete/commit/d54c0009d00b4c2039e11cbe3225d1345998b602)) +- fix code review ([830c305](https://github.com/iCHEF/gypcrete/commit/830c305aeed1d2735b49f11124a98f49b0ee5323)) +- fix props name ([53f3719](https://github.com/iCHEF/gypcrete/commit/53f3719c978a3fae446fa7afd2c6059ae00e1c2b)) +- fix scss file indentation ([176bc6f](https://github.com/iCHEF/gypcrete/commit/176bc6f2f8dfc79521da05fc88b233d77b3c7829)) +- lint error ([e1b1bb1](https://github.com/iCHEF/gypcrete/commit/e1b1bb1e0b01af42ba12064351f711b50aeb95bc)) +- lint error ([1262b03](https://github.com/iCHEF/gypcrete/commit/1262b032f8acf603a2ca1ce7969ee55cd0ab0f1d)) +- lint issue ([488503d](https://github.com/iCHEF/gypcrete/commit/488503d45ce3f5e1c34400bc2598c9d68f6d04a4)) +- linter errors in Radio.scss ([9cf2722](https://github.com/iCHEF/gypcrete/commit/9cf27220d69aa60737c3501823561e9d23c53e70)) +- **package.json:** fix generate-icon-components script ([7b95c83](https://github.com/iCHEF/gypcrete/commit/7b95c8343ae7309ae1037029e19be46c993c6099)) +- remove build job ([94dbe0d](https://github.com/iCHEF/gypcrete/commit/94dbe0d64695e457b86f76c465fa73ba6f057c8c)) +- scss stylelint errors ([ff68819](https://github.com/iCHEF/gypcrete/commit/ff688194a0f201660cfc8804adda03474be1e4c9)) +- should not asideControlClickableOnDisabled if not disabled ([673ad51](https://github.com/iCHEF/gypcrete/commit/673ad5168617d7f16bd58de6ce136dca1550a588)) ### Features -* add .nvmrc for node version ([4c0a1b9](https://github.com/iCHEF/gypcrete/commit/4c0a1b9c28dc1249fec1c5a5fd5aa27df9bf95c7)) -* add "conventional-changelog-cli to package.json ([ad22c1f](https://github.com/iCHEF/gypcrete/commit/ad22c1f6d5d7c3138c6bbd8e2a2ca6e74b53585c)) -* add `add-location` icon ([39aa011](https://github.com/iCHEF/gypcrete/commit/39aa011f88d55aa26b5a9bfd79ebfdc6f5e1d23a)) -* add canary release workflow ([fa17c3d](https://github.com/iCHEF/gypcrete/commit/fa17c3db8a413e3d73b429e7cf5159fc2246d72f)) -* add ci workflow with codecov ([5f56f15](https://github.com/iCHEF/gypcrete/commit/5f56f15384e0ec0d01d96bb55aa71fa4b80eed7d)) -* add Location icon ([d7a5cc3](https://github.com/iCHEF/gypcrete/commit/d7a5cc33f6be93c293ca0c0fe7eb324d7caadea9)) -* add props for RadioSelectList ([984dedc](https://github.com/iCHEF/gypcrete/commit/984dedccdd7a0655de582ccde184000b5c94fd02)) -* add radio-empty.svg and radio-selected.svg ([ad75ef6](https://github.com/iCHEF/gypcrete/commit/ad75ef6e0a11195899a657a5e9d35bba39ce827c)) -* add release workflow ([6620403](https://github.com/iCHEF/gypcrete/commit/66204034d4a1ea59a3d73d26721c609b6b4362aa)) -* add SvgRadioEmpty and SvgRadioSelected ([cdfb6d4](https://github.com/iCHEF/gypcrete/commit/cdfb6d4f4b269748675788f40f7780d2710f6911)) -* change `fill` value to currentColor ([b2e51ca](https://github.com/iCHEF/gypcrete/commit/b2e51ca1bbe82801a1ee510ee9a746e97f810e23)) -* change AddLocation icon ([8ad1d7b](https://github.com/iCHEF/gypcrete/commit/8ad1d7b18587622ce8ccedf1c4f11a697c882c34)) -* change Location icon ([ad2600b](https://github.com/iCHEF/gypcrete/commit/ad2600b299f7f482b3ef96a951145369e6a01a79)) -* **CheckboxEmpty:** rename radio-empty with checkbox-empty ([369a6b3](https://github.com/iCHEF/gypcrete/commit/369a6b387f9fcee626221813a16acf83277f741e)) -* **CheckboxHalf:** rename to CheckboxHalf ([33cf1da](https://github.com/iCHEF/gypcrete/commit/33cf1da858fd6a78a76c22714012c011ecfafe0a)) -* **CheckboxSelected:** rename to CheckboxSelected ([0883c8d](https://github.com/iCHEF/gypcrete/commit/0883c8da39c77caee12ec2aa6857e4a725f6f5d6)) -* deleted unused deploy.sh ([c06773e](https://github.com/iCHEF/gypcrete/commit/c06773e407832ecddc50cdb12ff434b7ee0c051b)) -* deleted unused travis cd ([c4a99b1](https://github.com/iCHEF/gypcrete/commit/c4a99b1ab8e39c9f6a5dd1d9149e488f1a03e03f)) -* export RadioSelectList and RadioSelectOption ([825d0b1](https://github.com/iCHEF/gypcrete/commit/825d0b1f8ad826ebb972929b62a55524e1b365c0)) -* implement Radio component ([df4e347](https://github.com/iCHEF/gypcrete/commit/df4e347d603802fe1fb8ab6132e5928b02619424)) -* implement RadioSelectList and RadioSelectOption ([d595eaf](https://github.com/iCHEF/gypcrete/commit/d595eafc16ad41a435a5970fdd6df1956ff8eb71)) -* remove fixed `fill` color ([87ba9ce](https://github.com/iCHEF/gypcrete/commit/87ba9cedef64c83897925cf9f7901ffe4b336344)) -* specify node maximum version in package.json ([86aee36](https://github.com/iCHEF/gypcrete/commit/86aee360d2b1daf171722a93c7277129b25db4bb)) -* update release workflow ([00fba6d](https://github.com/iCHEF/gypcrete/commit/00fba6d9741fb8b6fb90e38ba90f924a3481a69e)) -* update release workflow with `iCHEF/npm-install-with-cache-action@v1` ([40cfe3a](https://github.com/iCHEF/gypcrete/commit/40cfe3ad3f04b2eb00215235f9447c1838be297d)) -* use ichef npm-install-with-cache-action to install packages ([3ff5ed1](https://github.com/iCHEF/gypcrete/commit/3ff5ed136f5f5c73fde14cbb545b5be5725c9bfa)) - - +- add .nvmrc for node version ([4c0a1b9](https://github.com/iCHEF/gypcrete/commit/4c0a1b9c28dc1249fec1c5a5fd5aa27df9bf95c7)) +- add "conventional-changelog-cli to package.json ([ad22c1f](https://github.com/iCHEF/gypcrete/commit/ad22c1f6d5d7c3138c6bbd8e2a2ca6e74b53585c)) +- add `add-location` icon ([39aa011](https://github.com/iCHEF/gypcrete/commit/39aa011f88d55aa26b5a9bfd79ebfdc6f5e1d23a)) +- add canary release workflow ([fa17c3d](https://github.com/iCHEF/gypcrete/commit/fa17c3db8a413e3d73b429e7cf5159fc2246d72f)) +- add ci workflow with codecov ([5f56f15](https://github.com/iCHEF/gypcrete/commit/5f56f15384e0ec0d01d96bb55aa71fa4b80eed7d)) +- add Location icon ([d7a5cc3](https://github.com/iCHEF/gypcrete/commit/d7a5cc33f6be93c293ca0c0fe7eb324d7caadea9)) +- add props for RadioSelectList ([984dedc](https://github.com/iCHEF/gypcrete/commit/984dedccdd7a0655de582ccde184000b5c94fd02)) +- add radio-empty.svg and radio-selected.svg ([ad75ef6](https://github.com/iCHEF/gypcrete/commit/ad75ef6e0a11195899a657a5e9d35bba39ce827c)) +- add release workflow ([6620403](https://github.com/iCHEF/gypcrete/commit/66204034d4a1ea59a3d73d26721c609b6b4362aa)) +- add SvgRadioEmpty and SvgRadioSelected ([cdfb6d4](https://github.com/iCHEF/gypcrete/commit/cdfb6d4f4b269748675788f40f7780d2710f6911)) +- change `fill` value to currentColor ([b2e51ca](https://github.com/iCHEF/gypcrete/commit/b2e51ca1bbe82801a1ee510ee9a746e97f810e23)) +- change AddLocation icon ([8ad1d7b](https://github.com/iCHEF/gypcrete/commit/8ad1d7b18587622ce8ccedf1c4f11a697c882c34)) +- change Location icon ([ad2600b](https://github.com/iCHEF/gypcrete/commit/ad2600b299f7f482b3ef96a951145369e6a01a79)) +- **CheckboxEmpty:** rename radio-empty with checkbox-empty ([369a6b3](https://github.com/iCHEF/gypcrete/commit/369a6b387f9fcee626221813a16acf83277f741e)) +- **CheckboxHalf:** rename to CheckboxHalf ([33cf1da](https://github.com/iCHEF/gypcrete/commit/33cf1da858fd6a78a76c22714012c011ecfafe0a)) +- **CheckboxSelected:** rename to CheckboxSelected ([0883c8d](https://github.com/iCHEF/gypcrete/commit/0883c8da39c77caee12ec2aa6857e4a725f6f5d6)) +- deleted unused deploy.sh ([c06773e](https://github.com/iCHEF/gypcrete/commit/c06773e407832ecddc50cdb12ff434b7ee0c051b)) +- deleted unused travis cd ([c4a99b1](https://github.com/iCHEF/gypcrete/commit/c4a99b1ab8e39c9f6a5dd1d9149e488f1a03e03f)) +- export RadioSelectList and RadioSelectOption ([825d0b1](https://github.com/iCHEF/gypcrete/commit/825d0b1f8ad826ebb972929b62a55524e1b365c0)) +- implement Radio component ([df4e347](https://github.com/iCHEF/gypcrete/commit/df4e347d603802fe1fb8ab6132e5928b02619424)) +- implement RadioSelectList and RadioSelectOption ([d595eaf](https://github.com/iCHEF/gypcrete/commit/d595eafc16ad41a435a5970fdd6df1956ff8eb71)) +- remove fixed `fill` color ([87ba9ce](https://github.com/iCHEF/gypcrete/commit/87ba9cedef64c83897925cf9f7901ffe4b336344)) +- specify node maximum version in package.json ([86aee36](https://github.com/iCHEF/gypcrete/commit/86aee360d2b1daf171722a93c7277129b25db4bb)) +- update release workflow ([00fba6d](https://github.com/iCHEF/gypcrete/commit/00fba6d9741fb8b6fb90e38ba90f924a3481a69e)) +- update release workflow with `iCHEF/npm-install-with-cache-action@v1` ([40cfe3a](https://github.com/iCHEF/gypcrete/commit/40cfe3ad3f04b2eb00215235f9447c1838be297d)) +- use ichef npm-install-with-cache-action to install packages ([3ff5ed1](https://github.com/iCHEF/gypcrete/commit/3ff5ed136f5f5c73fde14cbb545b5be5725c9bfa)) # Change Log + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) @@ -173,14 +139,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] ### Changed + - [Core] Should not apply asideControlClickableOnDisabled if not disabled. (#332) ### Added + - [Core] Add new icon: Location. (#333) - [Core] Add Radio component (#338, #339) - [Form] Add RadioSelectList and RadioSelectOption (#340) ### Breaking + - [Core] Rename radio-empty.svg to checkbox-empty.svg (#337) - [Core] Rename radio-half.svg to checkbox-half.svg (#337) - [Core] Rename radio-selected.svg to checkbox-selected.svg (#337) @@ -189,15 +158,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [4.4.0] ### Breaking + - [Core] Remove deprecated behavior in Popup, which will treat element of `buttons` as props to ``, if `element.type` is not ``. (#276) - [Core] `` is revised to match latest design spec: (#293) - * no longer supports horizontal buttons. - * ~takes a `{ title, desc }` object format for `message` prop.~ - * supports optional `title` prop. (from #300, dropping change from prev line.) - * uses `size` prop instead of `large` boolean prop. - * drops the following props: `customMessageNode`, `messageTitle`, `messageDesc`, `buttonsDirection`. + - no longer supports horizontal buttons. + - ~takes a `{ title, desc }` object format for `message` prop.~ + - supports optional `title` prop. (from #300, dropping change from prev line.) + - uses `size` prop instead of `large` boolean prop. + - drops the following props: `customMessageNode`, `messageTitle`, `messageDesc`, `buttonsDirection`. ### Changed + - [Core] when message prop of `` is a string, pass it to `` as `title` prop. (#279) - [Core] Change `` implementaion from icon-font to inline-svg. (#280) - [Core] Upgrade `eslint-config-ichef` packages to `v8.0.0`. (#290) @@ -212,14 +183,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - [Core] Remove css property. (#329) ### Added + - [Core] Add `muted` prop on following component: (#278) - - `