Skip to content

Commit bbafed6

Browse files
committed
chore: add conventional commit linting support
1 parent ad0f1f9 commit bbafed6

File tree

4 files changed

+322
-19
lines changed

4 files changed

+322
-19
lines changed

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
yarn commitlint --edit $1

commitlint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
};

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@
1515
"lint:fix": "eslint --ext \".js,.vue,.ts\" --fix --ignore-path .gitignore .",
1616
"dev": "yarn build && concurrently 'nx run-many --target=dev --all' 'sleep 1; open-cli http://127.0.0.1:8080'",
1717
"build": "nx run-many --target=build --all",
18-
"build:watch": "nx run-many --target=build --all"
18+
"build:watch": "nx run-many --target=build --all",
19+
"prepare": "husky install"
1920
},
2021
"devDependencies": {
22+
"@commitlint/cli": "^17.0.2",
23+
"@commitlint/config-conventional": "^17.0.2",
2124
"concurrently": "^7.2.2",
2225
"eslint": "^8.17.0",
2326
"eslint-config-airbnb": "19.0.4",

0 commit comments

Comments
 (0)