chore: remove eslint warnings and cleanup unused variables#310
Conversation
|
@VaishnaviP-06 is attempting to deploy a commit to the niharika-mente's projects Team on Vercel. A member of the Team first needs to authorize it. |
Aamod-Dev
left a comment
There was a problem hiding this comment.
The searchProducts function has a broken try/catch structure. The try body is at wrong indentation and the braces don't align with the function scope, creating orphaned catch block.
Fix: Rebase and ensure proper brace matching in searchProducts.
Okay Noted!! |
Aamod-Dev
left a comment
There was a problem hiding this comment.
Request Changes
getRelatedProductsreferencestargetTags(undefined), should betargetTagsSet.getProductBundlefunction body has broken structure — code appears as loose statements outside the function.- Title says lint cleanup but includes a massive controller refactor. Keep scope focused.
|
Scope exceeds lint cleanup, bugs found |
okay i'll check again and do the changes |
Aamod-Dev
left a comment
There was a problem hiding this comment.
Looks good, approved!
Aamod-Dev
left a comment
There was a problem hiding this comment.
Needs changes: There are merge conflicts. Please resolve them.
30a04f9 to
2ad72ac
Compare
|
Hi @aamod, |
Aamod-Dev
left a comment
There was a problem hiding this comment.
Code fixes are solid: targetTagsSet bug fixed, bundle null safety added, proper Cloudinary cleanup on failure, consistent AppError pattern. LGTM.
Tech Debt: Minor Linting and React Hook Warnings
##Issue No. #171
What was wrong
A codebase scan identified a few minor linting and code hygiene issues across the frontend and backend. These issues did not affect functionality but produced unnecessary ESLint warnings and included one technically incorrect React usage.
Changes Made
Frontend
awaitbeforecheckInWishlist()inside theuseEffectinProductCard.jsx.checkInWishlist()is a synchronous array lookup using.some(), so awaiting it was unnecessary and misleading.Backend
product.controller.jsimage-upload error handlers.authMiddleware.js.nextparameter to_nextinerrorMiddleware.jswhile preserving Express error-handler behavior.Files Changed
FRONTEND/src/components/ui/ProductCard.jsxBACKEND/controllers/product.controller.jsBACKEND/middleware/authMiddleware.jsBACKEND/middleware/errorMiddleware.jsTesting
checkInWishlist()is called synchronously.