Skip to content

Commit

Permalink
setting: setting commitlint
Browse files Browse the repository at this point in the history
  • Loading branch information
gahyuun committed May 28, 2024
1 parent f8ac361 commit 2cd6fc3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .husky/commit-msg
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
npx --no-install 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"

npx lint-staged
2 changes: 0 additions & 2 deletions commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ module.exports = {
2,
'always',
[
'setting',
'feat',
'fix',
'style',
Expand All @@ -19,6 +18,5 @@ module.exports = {
'setting',
],
],
'type-case': [2, 'always', 'lower-case'],
},
};
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@
"lib/**/*"
],
"devDependencies": {
"husky": "^9.0.11",
"@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^17.7.0"
"@commitlint/cli": "^17.8.1",
"@commitlint/config-conventional": "^17.8.1",
"husky": "^8.0.3",
"lint-staged": "^15.2.5"
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx}": [
"eslint --cache --fix",
"prettier --cache --write"
]
}
}

0 comments on commit 2cd6fc3

Please sign in to comment.