Skip to content

Commit

Permalink
feat: add husky&commitlin
Browse files Browse the repository at this point in the history
  • Loading branch information
lingyu committed Mar 19, 2024
1 parent 24df5ad commit 1b6a832
Show file tree
Hide file tree
Showing 4 changed files with 701 additions and 2 deletions.
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run commitlint ${1}
24 changes: 24 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
// TODO Add Scope Enum Here
// 'scope-enum': [2, 'always', ['yourscope', 'yourscope']],
'type-enum': [
2,
'always',
[
'feat',
'fix',
'docs',
'chore',
'style',
'refactor',
'ci',
'test',
'revert',
'perf',
'vercel',
],
],
},
};
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
},
"devDependencies": {
"@biomejs/biome": "1.6.1",
"@commitlint/cli": "^19.2.0",
"@commitlint/config-conventional": "^19.1.0",
"@farmfe/cli": "^1.0.0",
"@farmfe/core": "^1.0.1",
"@farmfe/plugin-react": "^1.0.0",
Expand All @@ -23,6 +25,6 @@
"preview": "farm preview",
"clean": "farm clean",
"check": "pnpm biome check --apply ./src",
"prepare": "husky"
"commitlint": "commitlint --edit"
}
}
Loading

0 comments on commit 1b6a832

Please sign in to comment.