Skip to content

Commit

Permalink
chore: add husky and commitlint
Browse files Browse the repository at this point in the history
  • Loading branch information
mrevanzak committed May 6, 2024
1 parent e5409f9 commit 333049c
Show file tree
Hide file tree
Showing 7 changed files with 2,090 additions and 38 deletions.
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

bun x --no-install commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/post-merge
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

bun install
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

bun x lint-staged
Binary file modified bun.lockb
Binary file not shown.
22 changes: 22 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
rules: {
"type-enum": [
2,
"always",
[
"feat",
"fix",
"docs",
"chore",
"style",
"refactor",
"ci",
"test",
"perf",
"revert",
"vercel",
],
],
},
};
14 changes: 14 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,31 @@
"lint:ws": "bun x sherif@latest",
"postinstall": "bun lint:ws",
"typecheck": "turbo typecheck",
"prepare": "husky install",
"ui-add:shadcn": "turbo shadcn:add",
"ui-add:nextui": "turbo nextui:add"
},
"devDependencies": {
"@tanya.in/prettier-config": "*",
"@turbo/gen": "^1.13.3",
"@commitlint/cli": "^16.3.0",
"@commitlint/config-conventional": "^16.2.4",
"husky": "^7.0.4",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
"turbo": "^1.13.3",
"typescript": "^5.4.5"
},
"prettier": "@tanya.in/prettier-config",
"lint-staged": {
"**/*.{js,jsx,ts,tsx}": [
"bun format:fix",
"bun lint"
],
"**/*.{json,css,scss,md,webmanifest}": [
"bun lint"
]
},
"packageManager": "[email protected]",
"workspaces": [
"apps/*",
Expand Down
Loading

0 comments on commit 333049c

Please sign in to comment.