diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..3867a0f --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npm run lint diff --git a/package-lock.json b/package-lock.json index 5f8c79a..91001ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,6 +45,7 @@ "axe-playwright": "2.0.3", "eslint-config-torchbox": "1.1.0", "eslint-plugin-storybook": "0.8.0", + "husky": "^9.1.7", "storybook": "8.2.7", "stylelint": "16.8.1", "stylelint-config-css-modules": "4.4.0", @@ -11461,6 +11462,22 @@ "ms": "^2.0.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.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -28014,6 +28031,12 @@ "ms": "^2.0.0" } }, + "husky": { + "version": "9.1.7", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz", + "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==", + "dev": true + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", diff --git a/package.json b/package.json index 099e94b..defce34 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "react-to-storybook": "tsx scripts/react-to-storybook.ts", "generate-visual-tests": "tsx scripts/generate-visual-tests.ts", "make-migration": "tsx scripts/make-migration.ts", - "apply-migration": "tsx scripts/apply-migration.ts" + "apply-migration": "tsx scripts/apply-migration.ts", + "prepare": "husky" }, "dependencies": { "@anthropic-ai/sdk": "0.30.1", @@ -58,6 +59,7 @@ "axe-playwright": "2.0.3", "eslint-config-torchbox": "1.1.0", "eslint-plugin-storybook": "0.8.0", + "husky": "^9.1.7", "storybook": "8.2.7", "stylelint": "16.8.1", "stylelint-config-css-modules": "4.4.0",