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: Fix jest-dom/prefer-to-have-style rule violations #44928

Merged
merged 1 commit into from
Oct 13, 2022

Conversation

tyxla
Copy link
Member

@tyxla tyxla commented Oct 13, 2022

What?

This PR fixes all violations of the jest-dom/prefer-to-have-style rule, in preparation for enabling eslint-plugin-jest-dom globally for the project.

See the plugin README for more info on the jest-dom ESLint plugin.

Why?

We've been improving our tests a lot recently with the migration to @testing-library. One way we could improve them is to better standardize them and follow best practices whenever we can, and one of the best ways to get there is to follow the recommended ESLint rules of the libraries and utilities we use under the hood.

How?

We're essentially fixing a single instance that was accessing element.style directly.

Testing Instructions

Verify all checks are green.

@tyxla tyxla added the [Type] Code Quality Issues or PRs that relate to code quality label Oct 13, 2022
@tyxla tyxla self-assigned this Oct 13, 2022
@tyxla tyxla requested a review from ajitbohra as a code owner October 13, 2022 10:12
@tyxla tyxla merged commit a9d2724 into trunk Oct 13, 2022
@tyxla tyxla deleted the fix/jest-dom/prefer-to-have-style branch October 13, 2022 12:45
@github-actions github-actions bot added this to the Gutenberg 14.4 milestone Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants