ci: commitlint

This commit is contained in:
ocean-gao
2024-12-20 14:14:20 +08:00
parent 4b4fe29118
commit 3198bf548c
9 changed files with 2458 additions and 14 deletions

View File

@@ -20,7 +20,9 @@
"lint": "eslint --fix",
"export": "pnpm mask && cross-env BUILD_MODE=export BUILD_APP=1 next build",
"export:dev": "concurrently -r \"pnpm mask:watch\" \"cross-env BUILD_MODE=export BUILD_APP=1 next dev\"",
"prompts": "node ./scripts/fetch-prompts.mjs"
"prompts": "node ./scripts/fetch-prompts.mjs",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"changelog:versions": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0"
},
"dependencies": {
"@fortaine/fetch-event-source": "^3.0.6",
@@ -60,6 +62,8 @@
},
"devDependencies": {
"@antfu/eslint-config": "3.9.1",
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@eslint-react/eslint-plugin": "^1.21.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/react": "^16.0.1",
@@ -70,12 +74,18 @@
"@types/react-dom": "^18.2.7",
"@types/react-katex": "^3.0.0",
"@types/spark-md5": "^3.0.4",
"bumpp": "9.8.1",
"chalk": "5.3.0",
"commitizen": "4.3.1",
"concurrently": "^8.2.2",
"conventional-changelog-cli": "5.0.0",
"cross-env": "^7.0.3",
"cz-conventional-changelog": "3.3.0",
"eslint": "^9.14.0",
"eslint-plugin-format": "^0.1.3",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.16",
"execa": "9.5.1",
"lint-staged": "^15.2.10",
"simple-git-hooks": "2.11.1",
"ts-node": "^10.9.2",
@@ -85,11 +95,17 @@
"webpack": "^5.88.1"
},
"simple-git-hooks": {
"pre-commit": "npx lint-staged"
"pre-commit": "npx lint-staged",
"commit-msg": "npx commitlint --edit $1"
},
"lint-staged": {
"*.{js,jsx,vue,ts,tsx,css,html}": [
"npm run lint"
]
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}