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

Components: fix useCx story to satisfy exhaustive-deps eslint rule #45614

Merged
merged 3 commits into from
Nov 9, 2022

Conversation

flootr
Copy link
Contributor

@flootr flootr commented Nov 8, 2022

What?

Ensure useCx stories satisfy the exhaustive-deps eslint rule.

Why?

Part of the effort in #41166 to apply exhaustive-deps to the Components package

How?

The useCx utility includes a story with bad useMemo usages. In this case the missing dependency is expected and therefore we intend ignore it but it's on the wrong line.

Move the eslint-disable-next-line comment to the correct line.

Testing Instructions

  1. From your local Gutenberg directory, run npx eslint --rule 'react-hooks/exhaustive-deps: warn' packages/components/src/utils/hooks/stories/use-cx.js
  2. Confirm that the linter returns no errors

@codesandbox
Copy link

codesandbox bot commented Nov 8, 2022

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@flootr flootr force-pushed the refactor/useCx-story-exhaustive-deps branch from fcc15b9 to 41a2733 Compare November 8, 2022 22:06
Copy link
Contributor

@chad1008 chad1008 left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀 🚢

@ciampo ciampo merged commit 5411c05 into WordPress:trunk Nov 9, 2022
@ciampo
Copy link
Contributor

ciampo commented Nov 9, 2022

Merged, failing e2e tests were not related

@github-actions github-actions bot added this to the Gutenberg 14.6 milestone Nov 9, 2022
@flootr flootr deleted the refactor/useCx-story-exhaustive-deps branch November 9, 2022 21:43
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