Skip to content

Commit

Permalink
feat: 🎸 add commitlint lib and update husky lib
Browse files Browse the repository at this point in the history
  • Loading branch information
yeukfei02 committed Jan 11, 2023
1 parent f5a3ce1 commit f017e9f
Show file tree
Hide file tree
Showing 5 changed files with 567 additions and 67 deletions.
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 --no -- commitlint --edit
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn run lint && yarn run format
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
};
12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
"styled-components": "^4.4.1"
},
"devDependencies": {
"@commitlint/cli": "^17.4.1",
"@commitlint/config-conventional": "^17.4.0",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^8.0.3",
Expand Down Expand Up @@ -66,7 +68,7 @@
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.18.0",
"git-cz": "^4.8.0",
"husky": "4.2.5",
"husky": "^8.0.0",
"prettier": "^1.19.1",
"rimraf": "^3.0.2",
"serve": "^13.0.2",
Expand All @@ -84,7 +86,8 @@
"format": "prettier --write '*/**/*.{ts,tsx}'",
"deploy-firebase": "rimraf build && yarn run build && firebase deploy",
"commit": "git-cz",
"release": "standard-version"
"release": "standard-version",
"prepare": "husky install"
},
"eslintConfig": {
"extends": "react-app"
Expand All @@ -100,10 +103,5 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"husky": {
"hooks": {
"pre-commit": "yarn run lint && yarn run format"
}
}
}
Loading

0 comments on commit f017e9f

Please sign in to comment.