Skip to content

fix: enforce react-hooks/exhaustive-deps as an error (#2562) - #3268

Merged
Priyanshu-byte-coder merged 2 commits into
Priyanshu-byte-coder:mainfrom
aaniya22:fix/2562-enforce-exhaustive-deps
Jul 29, 2026
Merged

fix: enforce react-hooks/exhaustive-deps as an error (#2562)#3268
Priyanshu-byte-coder merged 2 commits into
Priyanshu-byte-coder:mainfrom
aaniya22:fix/2562-enforce-exhaustive-deps

Conversation

@aaniya22

Copy link
Copy Markdown
Contributor

Summary

Changed react-hooks/exhaustive-deps from a warning to an error in eslint.config.mjs so missing hook dependencies fail CI/lint instead of silently passing, preventing stale-closure bugs from shipping to production.

Closes #2562


Type of Change

  • 🔒 Security fix
  • ♻️ Refactor / code cleanup (no functional change)

What Changed

  • Added explicit "react-hooks/exhaustive-deps": "error" rule override in eslint.config.mjs

How to Test

  1. Run npx eslint src — should pass cleanly on current codebase (no existing violations)
  2. Temporarily add a useEffect with a missing dependency anywhere in src/ and re-run lint
  3. Confirm it now fails the build/lint step instead of just warning

Expected result: Missing hook dependencies are reported as lint errors, not warnings.


Screenshots / Recordings

N/A — lint config change, no UI impact.


Checklist

  • Linked the related issue above
  • Self-reviewed my own diff
  • No unnecessary console.log, debug code, or commented-out blocks
  • npm run lint passes locally
  • No TypeScript errors (npm run type-check)
  • Added or updated tests where applicable
  • Updated documentation / comments if behavior changed

Accessibility (UI changes only)

N/A — no UI/markup change.


Additional Context

Verified no existing violations in src/ before merging this in, so this shouldn't break current CI — only future PRs with genuinely missing hook dependencies.

…coder#2562)

Previously a warning (or unset, inheriting default), missing hook
dependencies could silently ship to production. No existing violations
found in src/.

Signed-off-by: aaniya22 <aaniyaatomar@gmail.com>
@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix labels Jul 28, 2026
@github-actions

Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

@github-actions github-actions Bot added the type:devops GSSoC type bonus: devops (+15 pts) label Jul 28, 2026
@Priyanshu-byte-coder Priyanshu-byte-coder added gssoc:approved GSSoC: PR approved for scoring level1 GSSoC Level 1 - Beginner (10 points) quality:clean GSSoC: Clean quality multiplier (×1.2) labels Jul 29, 2026
@Priyanshu-byte-coder
Priyanshu-byte-coder merged commit 3e1c820 into Priyanshu-byte-coder:main Jul 29, 2026
16 of 17 checks passed
@github-actions

Copy link
Copy Markdown

🎉 Merged! Thanks for contributing to DevTrack.

If the project has been useful to you, a ⭐ star on the repo is the easiest way to support it — it helps DevTrack get discovered by more developers.

Keep an eye on open issues for your next contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved GSSoC: PR approved for scoring gssoc26 GSSoC 2026 contribution level1 GSSoC Level 1 - Beginner (10 points) quality:clean GSSoC: Clean quality multiplier (×1.2) type:bug GSSoC type bonus: bug fix type:devops GSSoC type bonus: devops (+15 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enforce react-hooks/exhaustive-deps as an error

2 participants