From 4895155ea5d1f2e47aaaa064b8294ee2835d4e97 Mon Sep 17 00:00:00 2001 From: SxBxcoder Date: Tue, 24 Mar 2026 18:09:44 +0530 Subject: [PATCH 1/3] chore(devops): implement husky pre-commit hooks and lint-staged for strict CI gating --- frontend/.husky/pre-commit | 1 + frontend/package.json | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 frontend/.husky/pre-commit diff --git a/frontend/.husky/pre-commit b/frontend/.husky/pre-commit new file mode 100644 index 00000000..2312dc58 --- /dev/null +++ b/frontend/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/frontend/package.json b/frontend/package.json index 61a2806e..73a121ea 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -7,7 +7,8 @@ "dev": "vite", "build": "vite build", "lint": "eslint .", - "preview": "vite preview" + "preview": "vite preview", + "prepare": "husky" }, "dependencies": { "@emotion/react": "^11.14.0", @@ -66,8 +67,19 @@ "eslint-plugin-react-hooks": "^5.0.0", "eslint-plugin-react-refresh": "^0.4.16", "globals": "^15.14.0", + "husky": "^9.1.7", + "lint-staged": "^16.4.0", "postcss": "^8.5.0", "tailwindcss": "^3.4.17", "vite": "^6.0.5" + }, + "lint-staged": { + "*.{js,jsx,ts,tsx}": [ + "eslint --fix", + "prettier --write" + ], + "*.{json,css,md}": [ + "prettier --write" + ] } } From 3ead4d4e14290029e26a59c02544292eca05a323 Mon Sep 17 00:00:00 2001 From: SxBxcoder Date: Tue, 24 Mar 2026 18:16:08 +0530 Subject: [PATCH 2/3] chore(devops): implement husky pre-commit hooks and lint-staged for strict CI gating --- frontend/package.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 73a121ea..60efa949 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -75,11 +75,7 @@ }, "lint-staged": { "*.{js,jsx,ts,tsx}": [ - "eslint --fix", - "prettier --write" - ], - "*.{json,css,md}": [ - "prettier --write" + "eslint --fix" ] } } From 7289f12414b1ccd5f1025da1628fa2a4775188ec Mon Sep 17 00:00:00 2001 From: SxBxcoder Date: Tue, 24 Mar 2026 18:59:34 +0530 Subject: [PATCH 3/3] chore(devops): refine lint-staged version and enforce zero-warning policy --- frontend/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 60efa949..6d4ef80d 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -68,14 +68,14 @@ "eslint-plugin-react-refresh": "^0.4.16", "globals": "^15.14.0", "husky": "^9.1.7", - "lint-staged": "^16.4.0", + "lint-staged": "^15.2.2", "postcss": "^8.5.0", "tailwindcss": "^3.4.17", "vite": "^6.0.5" }, "lint-staged": { "*.{js,jsx,ts,tsx}": [ - "eslint --fix" + "eslint --fix --max-warnings=0" ] } }