diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 000000000..8f84f044c --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npm run fix diff --git a/package-lock.json b/package-lock.json index fc2984528..8400b2575 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@sanity/preview-url-secret": "^1.6.11", "@sanity/react-loader": "^1.10.7", "@sanity/vision": "^3.39.1", + "husky": "^9.1.7", "negotiator": "^0.6.3", "next": "^14.2.15", "next-intl": "^3.24.0", @@ -15787,6 +15788,20 @@ "integrity": "sha512-4+p3fCRF21oUqxhK0yZ6yaSP/H5/wZumc7q1fH99RkW7Q13aAxDeP78BKjoR+6y+kaHqKF/JWuQhsNuuI2NKtA==", "license": "MIT" }, + "node_modules/husky": { + "version": "9.1.7", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz", + "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==", + "bin": { + "husky": "bin.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/i18next": { "version": "23.14.0", "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.14.0.tgz", diff --git a/package.json b/package.json index 31822d41e..af7bd8218 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "fix": "run-s lint format", "storybook": "storybook dev -p 6006", "build-storybook": "storybook build", - "test-storybook": "test-storybook" + "test-storybook": "test-storybook", + "prepare": "husky" }, "dependencies": { "@sanity/color-input": "^4.0.1", @@ -20,6 +21,7 @@ "@sanity/preview-url-secret": "^1.6.11", "@sanity/react-loader": "^1.10.7", "@sanity/vision": "^3.39.1", + "husky": "^9.1.7", "negotiator": "^0.6.3", "next": "^14.2.15", "next-intl": "^3.24.0",