Skip to content

chore: Enable ESLint rules of hooks + fix new lint errors - #5714

Merged
slorber merged 3 commits into
mainfrom
slorber/react-hooks-eslint-rule
Oct 20, 2021
Merged

slorber merged 3 commits into
mainfrom
slorber/react-hooks-eslint-rule

Conversation

@slorber

@slorber slorber commented Oct 15, 2021

Copy link
Copy Markdown
Collaborator

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

netlify Bot commented Oct 15, 2021

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

⚡️ 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
Copy Markdown

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

slorber commented Oct 20, 2021

Copy link
Copy Markdown
Collaborator Author

oh noh, just broke the search page 😓


useEffect(() => {
onLocationChange({
onLocationChangeDynamic({

Copy link
Copy Markdown
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