Skip to content

react/jsx-wrap-multilines should throw when using arrow functions #874

Closed
@eTorAken

Description

@eTorAken

Hi,

When activating react/jsx-wrap-multilines (with declaration, assignment and return set to true), I'm a bit surprised that this code does not throw any warning:

const MyComponent= () =>
  <AChildComponent className={style.aChildComponent}>
    <AnotherChildComponent />
  </AChildComponent>;

Imho, it should be written that way:

const MyComponent= () => (
  <AChildComponent className={style.aChildComponent}>
    <AnotherChildComponent />
  </AChildComponent>
);

Activity

changed the title [-]`react/jsx-wrap-multilines` show throw when using arrow functions[/-] [+]`react/jsx-wrap-multilines` should throw when using arrow functions[/+] on Oct 6, 2016
SpainTrain

SpainTrain commented on Oct 17, 2016

@SpainTrain

Think this is dupe of #790?

eTorAken

eTorAken commented on Oct 18, 2016

@eTorAken
Author

Indeed, thank you for noticing it @SpainTrain, I close this one.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ljharb@SpainTrain@eTorAken

        Issue actions

          `react/jsx-wrap-multilines` should throw when using arrow functions · Issue #874 · jsx-eslint/eslint-plugin-react