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

feat(react-display-name): disable rule #34

Conversation

YevheniiMelikov
Copy link
Contributor

Description

Pr will disable react/display-name rule.
It prohibits defining inline components with arrow functions and requires definition with named function instead.
Example from here (jsx-eslint/eslint-plugin-react#597):

//warn
const wrapWithToastProvider = Comp => props => (
	<ToastProvider>
		<Comp {...props} />
	</ToastProvider>
);
// no warn
function wrapWithToastProvider(Comp) {
  return function WrappedWithToast(props) {
    return (
		<ToastProvider>
			<Comp {...props} />
		</ToastProvider>
    );
  };
}

Checklist

  • Updated the version number in the package.json
  • Test any new configuration on a repo using npm link

Copy link
Contributor

@benoitdeziel benoitdeziel left a comment

Choose a reason for hiding this comment

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

LGTM

@benoitdeziel benoitdeziel merged commit f503443 into LandrAudio:master Feb 26, 2020
@YevheniiMelikov YevheniiMelikov deleted the feat/SRVMKT-1725-display-name-rule branch February 26, 2020 17:56
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.

None yet

2 participants