Skip to content

Commit

Permalink
feat: support git cz
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxy0551 authored and Cythia828 committed Oct 9, 2024
1 parent 3658ee0 commit a8f6ea8
Show file tree
Hide file tree
Showing 3 changed files with 997 additions and 16 deletions.
12 changes: 12 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
['feat', 'fix', 'docs', 'style', 'refactor', 'test', 'build', 'ci', 'chore']
],
'scope-case': [0, 'always'],
'scope-empty': [0, 'always']
}
};
16 changes: 15 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@
"registry": "https://registry.npmjs.org/"
},
"devDependencies": {
"@commitlint/cli": "^17.7.2",
"@commitlint/config-conventional": "^17.7.0",
"@commitlint/cz-commitlint": "^17.7.2",
"@types/mocha": "^9.1.0",
"@types/node": "^20.4.0",
"commitizen": "^4.3.0",
"fast-glob": "^3.3.2",
"gh-pages": "^3.2.3",
"inquirer": "^8.2.2",
Expand All @@ -71,5 +75,15 @@
"engines": {
"node": ">=18"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"config": {
"commitizen": {
"path": "./node_modules/@commitlint/cz-commitlint"
}
},
"lint-staged": {
"*": [
"prettier --write --ignore-unknown"
]
}
}
Loading

0 comments on commit a8f6ea8

Please sign in to comment.