Skip to content

Commit 805f9ff

Browse files
authored
chore: use conventional commitlint (#2394)
1 parent 9967de9 commit 805f9ff

File tree

4 files changed

+16
-95
lines changed

4 files changed

+16
-95
lines changed

.cz-config.js

-32
This file was deleted.

commitlint.config.js

+1-19
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
1-
'use strict';
2-
31
module.exports = {
4-
extends: ['cz', '@commitlint/config-lerna-scopes'],
5-
rules: {
6-
'body-leading-blank': [1, 'always'],
7-
'footer-leading-blank': [1, 'always'],
8-
'header-max-length': [2, 'always', 80],
9-
'scope-case': [2, 'always', 'lowerCase'],
10-
'scope-empty': [0, 'never'],
11-
'subject-case': [2, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
12-
'subject-empty': [0, 'never'],
13-
'subject-full-stop': [2, 'never', '.'],
14-
'type-case': [2, 'always', 'lowerCase'],
15-
// turn it on once CLI will be inside its own package, so the scope will be the name of the packaged
16-
// part of the @commitlint/config-lerna-scopes
17-
'scope-enum': [0, 'never'],
18-
'type-empty': [2, 'never'],
19-
'type-enum': [2, 'always', ['ast', 'break', 'chore', 'cli', 'docs', 'feat', 'fix', 'misc', 'tests', 'refactor']],
20-
},
2+
extends: ['@commitlint/config-conventional'],
213
};

package.json

+1-10
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,12 @@
4545
"publish:monorepo": "yarn build && lerna version && lerna publish from-git",
4646
"update:docs": "node ./scripts/updateDocs"
4747
},
48-
"config": {
49-
"commitizen": {
50-
"path": "./node_modules/cz-customizable"
51-
},
52-
"cz-customizable": {
53-
"config": "./.cz-config.js"
54-
}
55-
},
5648
"peerDependencies": {
5749
"webpack": "4.x.x || 5.x.x"
5850
},
5951
"devDependencies": {
6052
"@commitlint/cli": "^11.0.0",
61-
"@commitlint/config-lerna-scopes": "^11.0.0",
53+
"@commitlint/config-conventional": "^11.0.0",
6254
"@types/jest": "^26.0.15",
6355
"@types/node": "^14.14.6",
6456
"@typescript-eslint/eslint-plugin": "^2.34.0",
@@ -67,7 +59,6 @@
6759
"coffeescript": "^2.5.1",
6860
"colorette": "^1.2.1",
6961
"commitlint": "^11.0.0",
70-
"commitlint-config-cz": "^0.13.2",
7162
"concat-stream": "^2.0.0",
7263
"cz-customizable": "^6.3.0",
7364
"del-cli": "^3.0.1",

yarn.lock

+14-34
Original file line numberDiff line numberDiff line change
@@ -419,14 +419,12 @@
419419
resolve-global "1.0.0"
420420
yargs "^15.1.0"
421421

422-
"@commitlint/config-lerna-scopes@^11.0.0":
422+
"@commitlint/config-conventional@^11.0.0":
423423
version "11.0.0"
424-
resolved "https://registry.yarnpkg.com/@commitlint/config-lerna-scopes/-/config-lerna-scopes-11.0.0.tgz#4152287c5d13ea844160507523b2f98b015adf4a"
425-
integrity sha512-/PjLKefMlnG+Sk27MY3MZo+T/9/PrgDcLk1YCSPVHNkXibXiS2Hb5NEMuNHzPxwts4IvJo0WIOb0YOBx5GBsdA==
424+
resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-11.0.0.tgz#3fa300a1b639273946de3c3f15e1cda518333422"
425+
integrity sha512-SNDRsb5gLuDd2PL83yCOQX6pE7gevC79UPFx+GLbLfw6jGnnbO9/tlL76MLD8MOViqGbo7ZicjChO9Gn+7tHhA==
426426
dependencies:
427-
import-from "3.0.0"
428-
resolve-pkg "2.0.0"
429-
semver "7.3.2"
427+
conventional-changelog-conventionalcommits "^4.3.1"
430428

431429
"@commitlint/ensure@^11.0.0":
432430
version "11.0.0"
@@ -2460,11 +2458,6 @@ anymatch@^3.0.3:
24602458
normalize-path "^3.0.0"
24612459
picomatch "^2.0.4"
24622460

2463-
app-root-path@~3.0.0:
2464-
version "3.0.0"
2465-
resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-3.0.0.tgz#210b6f43873227e18a4b810a032283311555d5ad"
2466-
integrity sha512-qMcx+Gy2UZynHjOHOIXPNvpf+9cjvk3cWrBBK7zg4gH9+clobJRb9NGzcT7mQTcV/6Gm/1WelUtqxVXnNlrwcw==
2467-
24682461
append-transform@^2.0.0:
24692462
version "2.0.0"
24702463
resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-2.0.0.tgz#99d9d29c7b38391e6f428d28ce136551f0b77e12"
@@ -3399,14 +3392,6 @@ commander@^7.0.0:
33993392
resolved "https://registry.yarnpkg.com/commander/-/commander-7.0.0.tgz#3e2bbfd8bb6724760980988fb5b22b7ee6b71ab2"
34003393
integrity sha512-ovx/7NkTrnPuIV8sqk/GjUIIM1+iUQeqA3ye2VNpq9sVoiZsooObWlQy+OPWGI17GDaEoybuAGJm6U8yC077BA==
34013394

3402-
commitlint-config-cz@^0.13.2:
3403-
version "0.13.2"
3404-
resolved "https://registry.yarnpkg.com/commitlint-config-cz/-/commitlint-config-cz-0.13.2.tgz#83f98a1217fb9e1e7cedd6d1d4fdb2d1492a867e"
3405-
integrity sha512-2oN0pXWwDtoKaWW35Haa3xUqWU7761OqM5yu5/UqmklBiznl9WDwoEJ5JIGzHE6qzTmBjAvITToyGNVUcjT/dg==
3406-
dependencies:
3407-
app-root-path "~3.0.0"
3408-
lodash.clonedeep "~4.5.0"
3409-
34103395
commitlint@^11.0.0:
34113396
version "11.0.0"
34123397
resolved "https://registry.yarnpkg.com/commitlint/-/commitlint-11.0.0.tgz#a60f759b938c97c5d601c881cfe71b1d4051d219"
@@ -3520,6 +3505,15 @@ conventional-changelog-angular@^5.0.0, conventional-changelog-angular@^5.0.3:
35203505
compare-func "^2.0.0"
35213506
q "^1.5.1"
35223507

3508+
conventional-changelog-conventionalcommits@^4.3.1:
3509+
version "4.5.0"
3510+
resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.5.0.tgz#a02e0b06d11d342fdc0f00c91d78265ed0bc0a62"
3511+
integrity sha512-buge9xDvjjOxJlyxUnar/+6i/aVEVGA7EEh4OafBCXPlLUQPGbRUBhBUveWRxzvR8TEjhKEP4BdepnpG2FSZXw==
3512+
dependencies:
3513+
compare-func "^2.0.0"
3514+
lodash "^4.17.15"
3515+
q "^1.5.1"
3516+
35233517
conventional-changelog-core@^3.1.6:
35243518
version "3.2.3"
35253519
resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-3.2.3.tgz#b31410856f431c847086a7dcb4d2ca184a7d88fb"
@@ -5841,13 +5835,6 @@ import-fresh@^3.0.0, import-fresh@^3.2.1:
58415835
parent-module "^1.0.0"
58425836
resolve-from "^4.0.0"
58435837

5844-
5845-
version "3.0.0"
5846-
resolved "https://registry.yarnpkg.com/import-from/-/import-from-3.0.0.tgz#055cfec38cd5a27d8057ca51376d7d3bf0891966"
5847-
integrity sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==
5848-
dependencies:
5849-
resolve-from "^5.0.0"
5850-
58515838
import-local@^2.0.0:
58525839
version "2.0.0"
58535840
resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d"
@@ -7292,7 +7279,7 @@ lodash._reinterpolate@^3.0.0:
72927279
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
72937280
integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=
72947281

7295-
lodash.clonedeep@^4.5.0, lodash.clonedeep@~4.5.0:
7282+
lodash.clonedeep@^4.5.0:
72967283
version "4.5.0"
72977284
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
72987285
integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=
@@ -9384,13 +9371,6 @@ [email protected], resolve-global@^1.0.0:
93849371
dependencies:
93859372
global-dirs "^0.1.1"
93869373

9387-
9388-
version "2.0.0"
9389-
resolved "https://registry.yarnpkg.com/resolve-pkg/-/resolve-pkg-2.0.0.tgz#ac06991418a7623edc119084edc98b0e6bf05a41"
9390-
integrity sha512-+1lzwXehGCXSeryaISr6WujZzowloigEofRB+dj75y9RRa/obVcYgbHJd53tdYw8pvZj8GojXaaENws8Ktw/hQ==
9391-
dependencies:
9392-
resolve-from "^5.0.0"
9393-
93949374
resolve-url@^0.2.1:
93959375
version "0.2.1"
93969376
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"

0 commit comments

Comments
 (0)