Closed
Description
I have a prop that is declared using string literal. I expect that it should be sorted by its name and not by the single or double quote.
The way the props are compared doesn't take into account the quotes.
I expect that 'data-t': PropTypes.string.isRequired
should be after
children: PropTypes.node.isRequired
.
class Button extends Component {
render() {
const {children, ...restProps} = this.props;
return (
<button {...restProps}>
{children}
</button>
);
}
}
Button.propTypes = {
children: PropTypes.node.isRequired,
'data-t': PropTypes.string.isRequired, // ESLint warning: Prop types declarations should be sorted alphabetically
className: PropTypes.string,
};