Skip to content

Commit

Permalink
chore: add husky, commitlint, and some eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
mrevanzak committed Dec 22, 2023
1 parent 7012619 commit da641b8
Show file tree
Hide file tree
Showing 9 changed files with 889 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .github/FUNDING.yml

This file was deleted.

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"

pnpm dlx --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"

pnpm i
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"

pnpm dlx lint-staged
23 changes: 23 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
rules: {
"scope-enum": [2, "always", ["web", "api", "expo"]],
"type-enum": [
2,
"always",
[
"feat",
"fix",
"docs",
"chore",
"style",
"refactor",
"ci",
"test",
"perf",
"revert",
"vercel",
],
],
},
};
15 changes: 14 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@
"typecheck": "turbo typecheck"
},
"dependencies": {
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"@manypkg/cli": "^0.21.0",
"@turbo/gen": "^1.10.15",
"@vivat/prettier-config": "^0.1.0",
"husky": "^8.0.3",
"lint-staged": "^15.2.0",
"prettier": "^3.0.3",
"turbo": "^1.10.15",
"typescript": "^5.2.2"
Expand All @@ -36,5 +40,14 @@
"apps/*",
"packages/*",
"tooling/*"
]
],
"lint-staged": {
"**/*.{js,jsx,ts,tsx}": [
"pnpm format:fix",
"pnpm lint"
],
"**/*.{json,css,scss,md,webmanifest}": [
"pnpm lint"
]
}
}
Loading

0 comments on commit da641b8

Please sign in to comment.