aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.husky/pre-commit2
-rw-r--r--package.json6
-rw-r--r--pnpm-lock.yaml9
3 files changed, 15 insertions, 2 deletions
diff --git a/.husky/pre-commit b/.husky/pre-commit
new file mode 100644
index 00000000..208f9a12
--- /dev/null
+++ b/.husky/pre-commit
@@ -0,0 +1,2 @@
+pnpm format:check
+pnpm lint
diff --git a/package.json b/package.json
index 4c38dd20..dd94e3f2 100644
--- a/package.json
+++ b/package.json
@@ -6,11 +6,12 @@
"scripts": {
"format": "prettier . --write",
"format:check": "prettier . --check",
- "lint": "eslint .",
+ "lint": "eslint . --ignore-path .gitignore",
"db:migrate": "pnpm --filter @hoarder/db run migrate",
"db:studio": "pnpm --filter @hoarder/db studio",
"workers": "pnpm --filter @hoarder/workers run start",
- "web": "pnpm --filter @hoarder/web run dev"
+ "web": "pnpm --filter @hoarder/web run dev",
+ "prepare": "husky"
},
"dependencies": {
"@next/eslint-plugin-next": "^14.1.0",
@@ -30,6 +31,7 @@
"eslint": "^8.56.0",
"eslint-config-next": "14.1.0",
"eslint-plugin-tailwindcss": "^3.14.2",
+ "husky": "^9.0.11",
"install": "^0.13.0",
"prettier": "3.2.5",
"prettier-plugin-tailwindcss": "^0.5.11"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 2d0e2e74..08859b82 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -54,6 +54,9 @@ importers:
eslint-plugin-tailwindcss:
specifier: ^3.14.2
version: 3.14.3(tailwindcss@3.4.1)
+ husky:
+ specifier: ^9.0.11
+ version: 9.0.11
install:
specifier: ^0.13.0
version: 0.13.0
@@ -7230,6 +7233,12 @@ packages:
ms: 2.1.3
dev: false
+ /husky@9.0.11:
+ resolution: {integrity: sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==}
+ engines: {node: '>=18'}
+ hasBin: true
+ dev: true
+
/iconv-lite@0.6.3:
resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==}
engines: {node: '>=0.10.0'}