Skip to content

Commit

Permalink
feat: add commit lint to pre commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksandr Lavrusenko authored and Oleksandr Lavrusenko committed Aug 3, 2023
1 parent cd55319 commit b8ddac3
Show file tree
Hide file tree
Showing 6 changed files with 588 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-commit-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: wagoid/commitlint-github-action@v5
- uses: wagoid/commitlint-github-action@v5
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx commitlint --edit $1
3 changes: 3 additions & 0 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
"react-toastify": "^9.1.3"
},
"devDependencies": {
"@commitlint/cli": "^17.6.7",
"@commitlint/config-conventional": "^17.6.7",
"@storybook/addon-actions": "^7.0.18",
"@storybook/addon-essentials": "^7.0.18",
"@storybook/addon-interactions": "^7.0.18",
Expand Down
Loading

0 comments on commit b8ddac3

Please sign in to comment.