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

Create rule S6788: Disallow usage of findDOMNode (react/no-find-dom-node) #4359

Merged
merged 3 commits into from
Nov 6, 2023

Conversation

vdiez
Copy link
Contributor

@vdiez vdiez commented Nov 6, 2023

Fixes #3659

Copy link

sonarqube-next bot commented Nov 6, 2023

Quality Gate passed Quality Gate passed

Kudos, no new issues are introduced in this PR!

0 New issues
0 Security Hotspots
100.0% 100.0% Coverage on New Code
0.0% 0.0% Duplication on New Code

See analysis details on SonarQube

// Rewording issue message reported by the core implementation.
export function decorate(rule: Rule.RuleModule): Rule.RuleModule {
rule.meta!.messages!['noFindDOMNode'] =
"Do not use findDOMNode. It doesn't work with function components and is deprecated in StrictMode.";
Copy link
Contributor

Choose a reason for hiding this comment

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

I am never sure, but is "function component", "functional component", or both can be used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

both can be used. at least in the docs they use both

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@vdiez vdiez merged commit 037559d into master Nov 6, 2023
19 checks passed
@vdiez vdiez deleted the add-S6788 branch November 6, 2023 15:31
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.

Create rule S6788: Disallow usage of findDOMNode (react/no-find-dom-node)
2 participants