Just had an issue on our team with someone missing their curlies to destructure props, eg:
const ProductsTable = (products) => (<table>...</table>);
instead of:
const ProductsTable = ({ products }) => (<table>...</table>);
It would be nice to have a rule that catches that... if a function is a component, the first arg should either be destructured or named props.
This rule should also probably include naming the second argument context for the same reasons. It should also likely apply to React Component class constructors.
What should this be named? sfc-argument-names?
No, because it should also apply to class-based component constructors.
Maybe react-component-argument-names or react-component-props-context-argument-names?
I like react-component-argument-names.
react-component-props-context-argument-names seems very wordy and don't know if adds that much value. The error given will tell you what the argument should be named.