Skip to content

Commit 7568bde

Browse files
🧹 chore(commitlint): setup emoji for commitlint
1 parent d7db767 commit 7568bde

File tree

4 files changed

+53
-5
lines changed

4 files changed

+53
-5
lines changed

.czrc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"path": "cz-conventional-changelog"
3-
}
2+
"path": "cz-emoji-conventional"
3+
}

commitlint.config.js

+21-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,21 @@
1-
module.exports = { extends: ["@commitlint/config-conventional"] };
1+
module.exports = {
2+
extends: ["git-commit-emoji"],
3+
rules: {
4+
"type-enum": [
5+
2,
6+
"always",
7+
"🎉 init",
8+
"✨ feat",
9+
"🐞 fix",
10+
"📃 docs",
11+
"🌈 style",
12+
"🦄 refactor",
13+
"🎈 perf",
14+
"🧪 test",
15+
"🔧 build",
16+
"🐎 ci",
17+
"🧹 chore",
18+
"↩ revert",
19+
],
20+
},
21+
};

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"chalk": "^5.0.1",
3939
"change-case": "^4.1.2",
4040
"class-validator": "^0.13.2",
41+
"commitlint-config-git-commit-emoji": "^1.0.0",
4142
"crypto-random-string": "^5.0.0",
4243
"cryptr": "^6.0.3",
4344
"execa": "^6.1.0",
@@ -75,7 +76,8 @@
7576
"@testing-library/user-event": "^14.2.1",
7677
"@types/node": "^18.0.0",
7778
"@types/react": "^18.0.9",
78-
"cz-conventional-changelog": "3.3.0",
79+
"commitlint-config-semantic-commit-emoji": "^1.0.5",
80+
"cz-emoji-conventional": "^1.0.1",
7981
"eslint": "^8.2.0",
8082
"husky": "^8.0.1",
8183
"isomorphic-fetch": "^3.0.0",

yarn.lock

+27-1
Original file line numberDiff line numberDiff line change
@@ -3920,7 +3920,7 @@ commander@^9.1.0, commander@^9.3.0:
39203920
resolved "https://registry.npmjs.org/commander/-/commander-9.3.0.tgz"
39213921
integrity sha512-hv95iU5uXPbK83mjrJKuZyFM/LBAoCV/XhVGkS5Je6tl7sxr6A0ITMw5WoRV46/UaJ46Nllm3Xt7IaJhXTIkzw==
39223922

3923-
commitizen@^4.0.3:
3923+
commitizen@^4.0.3, commitizen@^4.2.4:
39243924
version "4.2.5"
39253925
resolved "https://registry.yarnpkg.com/commitizen/-/commitizen-4.2.5.tgz#48e5a5c28334c6e8ed845cc24fc9f072efd3961e"
39263926
integrity sha512-9sXju8Qrz1B4Tw7kC5KhnvwYQN88qs2zbiB8oyMsnXZyJ24PPGiNM3nHr73d32dnE3i8VJEXddBFIbOgYSEXtQ==
@@ -3940,6 +3940,23 @@ commitizen@^4.0.3:
39403940
strip-bom "4.0.0"
39413941
strip-json-comments "3.1.1"
39423942

3943+
commitlint-config-git-commit-emoji@^1.0.0:
3944+
version "1.0.0"
3945+
resolved "https://registry.yarnpkg.com/commitlint-config-git-commit-emoji/-/commitlint-config-git-commit-emoji-1.0.0.tgz#56b9c9b164c55c608da71d8e82424430c87c1dd2"
3946+
integrity sha512-AnWvAu50BZ2ikzlsECKya4nAvPdu62RC3U/8wmb8TlSiLbaLrz10jV8On/8tc2UW1C9ckuLQx3WkLhaiFcvPhg==
3947+
3948+
commitlint-config-semantic-commit-emoji@^1.0.5:
3949+
version "1.0.5"
3950+
resolved "https://registry.yarnpkg.com/commitlint-config-semantic-commit-emoji/-/commitlint-config-semantic-commit-emoji-1.0.5.tgz#1f1823ce46fb6133a4b7b9c98024930204c2f54c"
3951+
integrity sha512-39osya7imFCms5hOESKgQyFFQ+1JeAnhVI1pk7Whna3t5+za8oGDUPwuUVYhKicHaEExZjJt1H3zWsEvEjWVcg==
3952+
dependencies:
3953+
commitlint-plugin-semantic-commit-emoji "1.0.4"
3954+
3955+
3956+
version "1.0.4"
3957+
resolved "https://registry.yarnpkg.com/commitlint-plugin-semantic-commit-emoji/-/commitlint-plugin-semantic-commit-emoji-1.0.4.tgz#2cdf78fdf10d427b2f0c3d656551ba597b525e43"
3958+
integrity sha512-M0UrYiDbH7GZ/ZMybyyz3ivWA9kRTZGXcPzDqwA6LhqpKtfPiBCp6/u5UT3738LYstCCBXeUIitBh9CXMytnbg==
3959+
39433960
compare-func@^2.0.0:
39443961
version "2.0.0"
39453962
resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-2.0.0.tgz#fb65e75edbddfd2e568554e8b5b05fff7a51fcb3"
@@ -4347,6 +4364,15 @@ [email protected]:
43474364
optionalDependencies:
43484365
"@commitlint/load" ">6.1.1"
43494366

4367+
cz-emoji-conventional@^1.0.1:
4368+
version "1.0.1"
4369+
resolved "https://registry.yarnpkg.com/cz-emoji-conventional/-/cz-emoji-conventional-1.0.1.tgz#8f3112c2a8512e60c8363d854507dba939f08a00"
4370+
integrity sha512-jY+jmmbQ9n671gLWSSI34a7efDz1YPfzM3QZC5T+r8CJCCo1/myW8Ik09NV9KQ5hVSc2BBfvcq7e5IsBOZjyjg==
4371+
dependencies:
4372+
chalk "^4.1.1"
4373+
commitizen "^4.2.4"
4374+
word-wrap "^1.2.3"
4375+
43504376
damerau-levenshtein@^1.0.8:
43514377
version "1.0.8"
43524378
resolved "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz"

0 commit comments

Comments
 (0)