chore(tools): use commithelper instead of commitlint

commitlint can't provide the user with a convenient prompt to create a
fitting commit message, while commitizen is not able to lint an existing
commit message. The newly released commithelper does both
pull/948/head
Jan van Brügge 4 years ago
parent aad70ebb8c
commit 821d12af27
No known key found for this signature in database
GPG Key ID: 88E0BF7B7A546481

@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx commitlint --config commitlint.config.json --edit $1
npm exec commithelper -- check --file $1 --fix

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
exec < /dev/tty && npm exec commithelper -- prompt --file $1

@ -1,31 +0,0 @@
{
"extends": ["@commitlint/config-conventional"],
"rules": {
"scope-empty": [2, "never"],
"scope-enum": [
2,
"always",
[
"ci",
"commitlint",
"deps",
"docs",
"eslint",
"eventlisteners",
"examples",
"exports",
"format",
"git",
"github",
"karma",
"npm",
"package",
"relic",
"style",
"ttypescript",
"typescript",
"vscode"
]
]
}
}

20549
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -7,9 +7,6 @@
"devDependencies": {
"@babel/core": "7.12.16",
"@babel/preset-env": "7.12.16",
"@commitlint/cli": "11.0.0",
"@commitlint/config-conventional": "11.0.0",
"@commitlint/travis-cli": "11.0.0",
"@types/chai": "4.2.12",
"@types/faker": "5.1.6",
"@types/lodash.shuffle": "4.2.6",
@ -20,6 +17,7 @@
"benchmark": "2.1.4",
"chai": "4.2.0",
"chalk": "4.1.0",
"commithelper": "^1.1.1",
"core-js": "3.8.3",
"cross-env": "7.0.3",
"editorconfig-checker": "3.2.0",
@ -49,7 +47,6 @@
"npm-run-all": "4.1.5",
"p-map-series": "2.1.0",
"p-reduce": "2.1.0",
"pinst": "2.1.4",
"prettier": "^2.2.1",
"regenerator-runtime": "0.13.7",
"remark-cli": "8.0.1",
@ -63,9 +60,7 @@
"build": "tsc && npm run bundle:cjs",
"bundle:cjs": "rollup build/index.js --format cjs --file build/snabbdom.cjs.js",
"format": "prettier --write .",
"postinstall": "husky install",
"prepublishOnly": "pinst --disable",
"postpublish": "pinst --enable",
"prepare": "husky install",
"docs": "remark . --output",
"check-docs": "npm run docs && git diff --exit-code",
"lint:js": "eslint --ext .ts,.tsx,.js --ignore-path .gitignore .",
@ -95,7 +90,23 @@
"prettier": {},
"lint-staged": {
"*.(ts|tsx|js)": "prettier --write",
"*.md": ["npm run check-docs", "prettier --write"]
"*.md": [
"npm run check-docs",
"prettier --write"
]
},
"commithelper": {
"scopeOverrides": {
"chore": [
"tools",
"refactor",
"release",
"test",
"deps",
"docs",
"examples"
]
}
},
"remarkConfig": {
"plugins": [

Loading…
Cancel
Save