Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Add precommit hooks

Jonathan ARNAULT736aba45fa28
diff --git a/.husky/pre-commit b/.husky/pre-commit
new file mode 100644
index 00000000..1ab7ca63
--- /dev/null
+++ b/.husky/pre-commit
@@ -0,0 +1,2 @@
+make registry-gen
+make lint
diff --git a/package-lock.json b/package-lock.json
index 182ee83e..61107b11 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -78,6 +78,7 @@
"eslint-plugin-storybook": "^9.0.13",
"glob": "^11.0.3",
"globals": "^16.3.0",
+ "husky": "^9.1.7",
"prettier": "^3.6.2",
"shadcn": "^3.5.0",
"supabase": "^2.53.6",
@@ -7205,6 +7206,22 @@
"node": ">=18.18.0"
}
},
+ "node_modules/husky": {
+ "version": "9.1.7",
+ "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz",
+ "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "husky": "bin.js"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/typicode"
+ }
+ },
"node_modules/iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
diff --git a/package.json b/package.json
index c62e30bd..ddc5a5f9 100644
--- a/package.json
+++ b/package.json
@@ -16,7 +16,8 @@
"registry:build": "shadcn build",
"registry:gen": "./bin/generate-registry.mjs",
"ghpages:deploy": "node ./scripts/ghpages-deploy.mjs",
- "supabase:remote:init": "node ./scripts/supabase-remote-init.mjs"
+ "supabase:remote:init": "node ./scripts/supabase-remote-init.mjs",
+ "prepare": "husky"
},
"dependencies": {
"@hello-pangea/dnd": "^18.0.1",
@@ -89,6 +90,7 @@
"eslint-plugin-storybook": "^9.0.13",
"glob": "^11.0.3",
"globals": "^16.3.0",
+ "husky": "^9.1.7",
"prettier": "^3.6.2",
"shadcn": "^3.5.0",
"supabase": "^2.53.6",