Skip to content
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

Merged
merged 3 commits into from
Oct 20, 2021

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Oct 15, 2021

Motivation

Enable missing React rules of hook ESLint plugin

Fixes 22 reported errors:

Will need some non-regression testing, in particular, worth testing:

  • link prefetching
  • scroll-related features
  • Search page

@slorber slorber added the pr: maintenance This PR does not produce any behavior differences to end users when upgrading. label Oct 15, 2021
@slorber slorber requested a review from lex111 as a code owner October 15, 2021 14:22
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Oct 15, 2021
@netlify
Copy link

netlify bot commented Oct 15, 2021

✔️ [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

@github-actions
Copy link

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 94
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-5714--docusaurus-2.netlify.app/

@github-actions
Copy link

Size Change: +245 B (0%)

Total Size: 885 kB

Filename Size Change
website/build/assets/js/main.********.js 457 kB +239 B (0%)
ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/globalData.json 50.5 kB 0 B
website/build/assets/css/styles.********.css 93.8 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus/index.html 67.4 kB 0 B
website/build/blog/index.html 38.2 kB 0 B
website/build/docs/index.html 45.3 kB +3 B (0%)
website/build/docs/installation/index.html 53.1 kB +3 B (0%)
website/build/index.html 30.8 kB 0 B
website/build/tests/docs/index.html 26.3 kB 0 B
website/build/tests/docs/standalone/index.html 23 kB 0 B

compressed-size-action

@slorber slorber merged commit 098f210 into main Oct 20, 2021
@slorber slorber deleted the slorber/react-hooks-eslint-rule branch October 20, 2021 14:09
@slorber
Copy link
Collaborator Author

slorber commented Oct 20, 2021

oh noh, just broke the search page 😓

useEffect(() => {
onLocationChange({
onLocationChangeDynamic({
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: maintenance This PR does not produce any behavior differences to end users when upgrading.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants