Skip to content

Commit

Permalink
chore: use conventional commitlint (#2394)
Browse files Browse the repository at this point in the history
  • Loading branch information
anshumanv authored Feb 2, 2021
1 parent 9967de9 commit 805f9ff
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 95 deletions.
32 changes: 0 additions & 32 deletions .cz-config.js

This file was deleted.

20 changes: 1 addition & 19 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
'use strict';

module.exports = {
extends: ['cz', '@commitlint/config-lerna-scopes'],
rules: {
'body-leading-blank': [1, 'always'],
'footer-leading-blank': [1, 'always'],
'header-max-length': [2, 'always', 80],
'scope-case': [2, 'always', 'lowerCase'],
'scope-empty': [0, 'never'],
'subject-case': [2, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
'subject-empty': [0, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lowerCase'],
// turn it on once CLI will be inside its own package, so the scope will be the name of the packaged
// part of the @commitlint/config-lerna-scopes
'scope-enum': [0, 'never'],
'type-empty': [2, 'never'],
'type-enum': [2, 'always', ['ast', 'break', 'chore', 'cli', 'docs', 'feat', 'fix', 'misc', 'tests', 'refactor']],
},
extends: ['@commitlint/config-conventional'],
};
11 changes: 1 addition & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,12 @@
"publish:monorepo": "yarn build && lerna version && lerna publish from-git",
"update:docs": "node ./scripts/updateDocs"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-customizable"
},
"cz-customizable": {
"config": "./.cz-config.js"
}
},
"peerDependencies": {
"webpack": "4.x.x || 5.x.x"
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-lerna-scopes": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@types/jest": "^26.0.15",
"@types/node": "^14.14.6",
"@typescript-eslint/eslint-plugin": "^2.34.0",
Expand All @@ -67,7 +59,6 @@
"coffeescript": "^2.5.1",
"colorette": "^1.2.1",
"commitlint": "^11.0.0",
"commitlint-config-cz": "^0.13.2",
"concat-stream": "^2.0.0",
"cz-customizable": "^6.3.0",
"del-cli": "^3.0.1",
Expand Down
48 changes: 14 additions & 34 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -419,14 +419,12 @@
resolve-global "1.0.0"
yargs "^15.1.0"

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

"@commitlint/ensure@^11.0.0":
version "11.0.0"
Expand Down Expand Up @@ -2460,11 +2458,6 @@ anymatch@^3.0.3:
normalize-path "^3.0.0"
picomatch "^2.0.4"

app-root-path@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-3.0.0.tgz#210b6f43873227e18a4b810a032283311555d5ad"
integrity sha512-qMcx+Gy2UZynHjOHOIXPNvpf+9cjvk3cWrBBK7zg4gH9+clobJRb9NGzcT7mQTcV/6Gm/1WelUtqxVXnNlrwcw==

append-transform@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-2.0.0.tgz#99d9d29c7b38391e6f428d28ce136551f0b77e12"
Expand Down Expand Up @@ -3399,14 +3392,6 @@ commander@^7.0.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-7.0.0.tgz#3e2bbfd8bb6724760980988fb5b22b7ee6b71ab2"
integrity sha512-ovx/7NkTrnPuIV8sqk/GjUIIM1+iUQeqA3ye2VNpq9sVoiZsooObWlQy+OPWGI17GDaEoybuAGJm6U8yC077BA==

commitlint-config-cz@^0.13.2:
version "0.13.2"
resolved "https://registry.yarnpkg.com/commitlint-config-cz/-/commitlint-config-cz-0.13.2.tgz#83f98a1217fb9e1e7cedd6d1d4fdb2d1492a867e"
integrity sha512-2oN0pXWwDtoKaWW35Haa3xUqWU7761OqM5yu5/UqmklBiznl9WDwoEJ5JIGzHE6qzTmBjAvITToyGNVUcjT/dg==
dependencies:
app-root-path "~3.0.0"
lodash.clonedeep "~4.5.0"

commitlint@^11.0.0:
version "11.0.0"
resolved "https://registry.yarnpkg.com/commitlint/-/commitlint-11.0.0.tgz#a60f759b938c97c5d601c881cfe71b1d4051d219"
Expand Down Expand Up @@ -3520,6 +3505,15 @@ conventional-changelog-angular@^5.0.0, conventional-changelog-angular@^5.0.3:
compare-func "^2.0.0"
q "^1.5.1"

conventional-changelog-conventionalcommits@^4.3.1:
version "4.5.0"
resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.5.0.tgz#a02e0b06d11d342fdc0f00c91d78265ed0bc0a62"
integrity sha512-buge9xDvjjOxJlyxUnar/+6i/aVEVGA7EEh4OafBCXPlLUQPGbRUBhBUveWRxzvR8TEjhKEP4BdepnpG2FSZXw==
dependencies:
compare-func "^2.0.0"
lodash "^4.17.15"
q "^1.5.1"

conventional-changelog-core@^3.1.6:
version "3.2.3"
resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-3.2.3.tgz#b31410856f431c847086a7dcb4d2ca184a7d88fb"
Expand Down Expand Up @@ -5841,13 +5835,6 @@ import-fresh@^3.0.0, import-fresh@^3.2.1:
parent-module "^1.0.0"
resolve-from "^4.0.0"

import-from@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/import-from/-/import-from-3.0.0.tgz#055cfec38cd5a27d8057ca51376d7d3bf0891966"
integrity sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==
dependencies:
resolve-from "^5.0.0"

import-local@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d"
Expand Down Expand Up @@ -7292,7 +7279,7 @@ lodash._reinterpolate@^3.0.0:
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=

lodash.clonedeep@^4.5.0, lodash.clonedeep@~4.5.0:
lodash.clonedeep@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=
Expand Down Expand Up @@ -9384,13 +9371,6 @@ resolve-global@1.0.0, resolve-global@^1.0.0:
dependencies:
global-dirs "^0.1.1"

resolve-pkg@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/resolve-pkg/-/resolve-pkg-2.0.0.tgz#ac06991418a7623edc119084edc98b0e6bf05a41"
integrity sha512-+1lzwXehGCXSeryaISr6WujZzowloigEofRB+dj75y9RRa/obVcYgbHJd53tdYw8pvZj8GojXaaENws8Ktw/hQ==
dependencies:
resolve-from "^5.0.0"

resolve-url@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
Expand Down

0 comments on commit 805f9ff

Please sign in to comment.