prefer-shorthand rule should handle differently-named props
MitchLillie opened this issue · comments
In #10 this example was put forward about triggering false positives for the prefer-object
rule:
const mapDispatchToProps = dispatch => ({
onDoSomething: () => dispatch(toSomethingElse()),
});
That seems to have been fixed, however I'm wondering if this instance should fail the prefer-shorthand
rule. Because this could be refactored to:
const mapDispatchToProps = {
onDoSomething: toSomethingElse
};
Any thoughts on this? Thanks for a great lib btw :)
@MitchLillie , you are not wrong :) Thanks for pointing this out. Created a PR to fix it.