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

ESLint: update error message for @emotion/css with info about the useCx hook #34418

Merged
merged 1 commit into from
Aug 31, 2021

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented Aug 31, 2021

Description

Update ESLint error message when importing from the @emotion/css package.

The updated message reflects how the useCx hook should be used instead of importing the cx function directly.

How has this been tested?

Install locally, and remove this comment from packages/components/src/utils/hooks/use-cx.ts — the updated error message should be shown.

Screenshots

N/A

Types of changes

New feature (updated ESLint error message)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • N/A I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@ciampo ciampo self-assigned this Aug 31, 2021
@ciampo ciampo added the [Type] Code Quality Issues or PRs that relate to code quality label Aug 31, 2021
@ciampo ciampo added this to In progress (owned) ⏳ in WordPress Components via automation Aug 31, 2021
Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

Nice, thank you for clarification 👍

Copy link
Contributor

@sarayourfriend sarayourfriend left a comment

Choose a reason for hiding this comment

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

LGTM!

@gziolo gziolo merged commit 7c0c66d into trunk Aug 31, 2021
WordPress Components automation moved this from In progress (owned) ⏳ to Done 🎉 Aug 31, 2021
@gziolo gziolo deleted the feat/eslint-use-cx-error-message branch August 31, 2021 18:40
@github-actions github-actions bot added this to the Gutenberg 11.5 milestone Aug 31, 2021
@getsource getsource added the [Type] Build Tooling Issues or PRs related to build tooling label Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Build Tooling Issues or PRs related to build tooling [Type] Code Quality Issues or PRs that relate to code quality
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants