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

[Fix] Improve error message for no-find-dom-node #2741

Merged
merged 1 commit into from Aug 9, 2020

Conversation

ecraig12345
Copy link
Contributor

The error message for no-find-dom-node wasn't very informative, which makes it less likely that people will respect the rule instead of just disabling it. This PR adds a more informative message.

@@ -40,7 +40,7 @@ module.exports = {

context.report({
node: callee,
message: 'Do not use findDOMNode'
message: 'Do not use findDOMNode. It doesn\'t work with function components and is deprecated in StrictMode. See https://reactjs.org/docs/react-dom.html#finddomnode'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
message: 'Do not use findDOMNode. It doesn\'t work with function components and is deprecated in StrictMode. See https://reactjs.org/docs/react-dom.html#finddomnode'
message: 'Do not use findDOMNode. It doesnt work with function components and is deprecated in StrictMode. See https://reactjs.org/docs/react-dom.html#finddomnode'

straight quotes are always typographically incorrect in prose :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe you meant to use the right single quotation mark ’ rather than the left one.

Copy link
Member

Choose a reason for hiding this comment

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

lol yes, thanks :-)

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

thanks! pedantry ftw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants