new rule: mapDispatchToProps-consistent-dispatch
DianaSuvorova opened this issue · comments
DianaSuvorova commented
mapDispatchToProps-consistent-dispatch
This rule would warn the following case:
const mapDispatchToProps = dispatch => ({
onDoSomething: () => dispatch(toSomethingElse()),
action1: action1
});
while below two are correct:
const mapDispatchToProps = dispatch => ({
onDoSomething: () => dispatch(toSomethingElse()),
action1: () => dispatch(action1())
});
const mapDispatchToProps = {
onDoSomething: doSomethingElse
action1,
});
as per discussion #10