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: Discourage findDOMNode usage #99115

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

tyxla
Copy link
Member

@tyxla tyxla commented Jan 30, 2025

Proposed Changes

Trigger ESLint warnings for findDOMNode usage.

Why are these changes being made?

Currently, the browser console in dev mode is cluttered with this kind of errors:

Screenshot 2025-01-30 at 19 13 56

We need to migrate all findDOMNode usages, but since no one is specifically focusing on that right now, enabling a specific warning could help motivate people to fix it so we can crowdsource the effort.

Testing Instructions

  • Run a fresh yarn install
  • Pick an instance of findDOMNode in code and verify you're now getting an ESLint warning.

@tyxla tyxla added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it Code Style Changes related to eslint rules labels Jan 30, 2025
@tyxla tyxla requested a review from a team January 30, 2025 17:24
@tyxla tyxla self-assigned this Jan 30, 2025
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jan 30, 2025
@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/eslint-discourage-find-dom-node on your sandbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Changes related to eslint rules [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants