Skip to content

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