Closed
Description
My Button component allows to override the type
arg but button-has-type
is still complaining about. It seems it does not validate the real AST path of prop assignment
Button = ({ type = "button" }) => <button type={type}/>
Button.propTypes = {
type: PropTypes.arrayOf(["submit", "button", "reset"]),
Does the plugin have access to the propTypes and can match that the only possible allowed values are within the rules allowed values and that the default type
is also set to something specific, like in my example to button
?
Metadata
Metadata
Assignees
Labels
No labels