Skip to content

Conversation

@Monsef-Noubadji
Copy link

@Monsef-Noubadji Monsef-Noubadji commented Aug 14, 2025

Description

removed eslint + deps array from useEffect

Validation

just removed the deps array from useEffect

Related Issues

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run pnpm format to ensure the code follows the style guide.
  • I have run pnpm test to check if all tests are passing.
  • I have run pnpm build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

Signed-off-by: Monsef Noubadji <67560520+Monsef-Noubadji@users.noreply.github.com>
@Monsef-Noubadji Monsef-Noubadji requested a review from a team as a code owner August 14, 2025 16:36
@vercel
Copy link

vercel bot commented Aug 14, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nodejs-org Ready Preview Aug 14, 2025 5:28pm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the ESLint disable comment and dependencies array from a useEffect hook in the useNavigationState hook, changing it from a mount-only effect to one that runs on every render.

  • Removes the // eslint-disable-next-line react-hooks/exhaustive-deps comment
  • Removes the empty dependencies array [] from the useEffect hook

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Monsef Noubadji <67560520+Monsef-Noubadji@users.noreply.github.com>
@ovflowd ovflowd added the github_actions:pull-request Trigger Pull Request Checks label Aug 15, 2025
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Aug 15, 2025
@ovflowd
Copy link
Member

ovflowd commented Aug 15, 2025

I do believe eslint will complain because of the removed eslint rule. I don't really see the benefit of this PR...

@github-actions
Copy link
Contributor

github-actions bot commented Aug 15, 2025

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 98 🟢 100 🟢 100 🟢 100 🔗
/en/about 🟢 98 🟢 97 🟢 100 🟠 88 🔗
/en/about/previous-releases 🟢 99 🟢 93 🟢 100 🟠 89 🔗
/en/download 🟢 95 🟢 100 🟢 100 🟢 100 🔗
/en/blog 🟢 100 🟢 100 🟢 96 🟢 100 🔗

@codecov
Copy link

codecov bot commented Aug 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.81%. Comparing base (cd078de) to head (3242493).
⚠️ Report is 5 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8076      +/-   ##
==========================================
- Coverage   72.82%   72.81%   -0.02%     
==========================================
  Files          96       96              
  Lines        8328     8327       -1     
  Branches      214      214              
==========================================
- Hits         6065     6063       -2     
- Misses       2262     2263       +1     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@mikeesto mikeesto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The purpose of this disable next line is because without it we get:

React Hook useEffect has missing dependencies: 'handleScroll', 'id', 'navigationState', and 'ref'. Either include them or remove the dependency array.eslint[react-hooks/exhaustive-deps](https://github.com/facebook/react/issues/14920)

@ovflowd
Copy link
Member

ovflowd commented Aug 15, 2025

Apologies, @Monsef-Noubadji I'm closing this PR as it unfortunately brings no value. Although, appreciate the time you've put in here ;)

@ovflowd ovflowd closed this Aug 15, 2025
@Monsef-Noubadji Monsef-Noubadji deleted the patch-1 branch August 16, 2025 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants