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

jsx-wrap-multilines check arrow functions without block body #791

Merged
merged 3 commits into from
Apr 23, 2017

Conversation

ColCh
Copy link
Contributor

@ColCh ColCh commented Aug 29, 2016

Aka "lambdas"

Close #790

I will duplicate issue desc here:

Given this code, check should not pass

const Grade = ({ grade }) =>
  <View style={styles.gradeContainer}>
    <Text style={styles.grade}>{grade}</Text>
  </View>;

For this code, check should pass:

const Grade = ({ grade }) => (
  <View style={styles.gradeContainer}>
    <Text style={styles.grade}>{grade}</Text>
  </View>
);

I leaved this behaviour by-default, but it can break backward compatibility?

May be It should be turned off by default?

@yannickcr
Copy link
Member

Thanks for this.

I leaved this behaviour by-default, but it can break backward compatibility?
May be It should be turned off by default?

If I'm not mistaken, according to ESLint Semantic Versioning Policy this is a breaking change, so I'll wait for the next major release to merge it.

@ColCh
Copy link
Contributor Author

ColCh commented Nov 14, 2016

okay, thanks!

var ARROW_NO_PAREN = '\
var hello = () => <div>\n\
<p>Hello</p>\n\
</div>;';
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ljharb After your Node 4+ PR this could get cleaned up a little.

Copy link
Member

Choose a reason for hiding this comment

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

Good call; I'll include this in my PR.

@yannickcr yannickcr merged commit b5856ca into jsx-eslint:master Apr 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants