Skip to content

Commit

Permalink
Merge pull request #41 from hufs-sports-live/build/setup-husky
Browse files Browse the repository at this point in the history
[BUILD]: husky & commitlint로 커밋 메시지 강제
  • Loading branch information
seongminn authored Nov 7, 2023
2 parents 83fd08a + 9c4a646 commit 50df33e
Show file tree
Hide file tree
Showing 5 changed files with 976 additions and 67 deletions.
21 changes: 21 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"extends": ["@commitlint/config-conventional"],
"rules": {
"type-enum": [
2,
"always",
[
"build",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"test",
"style",
"chore"
]
]
}
}
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"

yarn commitlint --edit $1
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 lint-staged
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"prepare": "husky install"
},
"lint-staged": {
"**/*.{js, jsx, ts, tsx}": [
"eslint",
"prettier --config ./.prettierrc --write -u"
]
},
"dependencies": {
"@sentry/nextjs": "^7.73.0",
Expand All @@ -17,6 +24,8 @@
"react-dom": "^18"
},
"devDependencies": {
"@commitlint/cli": "^18.2.0",
"@commitlint/config-conventional": "^18.1.0",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
Expand All @@ -30,6 +39,7 @@
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-simple-import-sort": "^10.0.0",
"husky": "^8.0.3",
"postcss": "^8",
"prettier": "^3.0.3",
"tailwindcss": "^3",
Expand Down
Loading

0 comments on commit 50df33e

Please sign in to comment.