-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Enable ESLint rules of hooks + fix new lint errors #5714
Conversation
✔️ [V2] 🔨 Explore the source changes: ef656a1 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61699bdeaffe1d0007428b4d 😎 Browse the preview: https://deploy-preview-5714--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5714--docusaurus-2.netlify.app/ |
Size Change: +245 B (0%) Total Size: 885 kB
ℹ️ View Unchanged
|
oh noh, just broke the search page 😓 |
useEffect(() => { | ||
onLocationChange({ | ||
onLocationChangeDynamic({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@slorber I just noticed that this change negatively affects on the hideable sidebar feature. After location change (I suppose), while closing a sidebar, the current scroll position is reset to zero, i.e. a page scrolls to the top.
Actual behavior:
ezgif.com-gif-maker.mp4
Expected behavior
ezgif.com-gif-maker.1.mp4
Could you please see how this can be fixed?
Motivation
Enable missing React rules of hook ESLint plugin
Fixes 22 reported errors:
Will need some non-regression testing, in particular, worth testing: