New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix requireReadOnlyReactProps #406
Conversation
🎉 This PR is included in version 3.9.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@@ -1,6 +1,7 @@ | |||
const schema = []; | |||
|
|||
const reComponentName = /^(Pure)?Component$/; | |||
const reReadOnly = /^\$(ReadOnly|FlowFixMe)$/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$FlowFixMe
was just an example. It can be anything defined in suppress_type
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how would we know what's defined there (from within a plugin rule)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't. This is why I was suggesting to not throw an error in cases where you don't know it's wrong for sure. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe allow to specify the suppress type name in an option of the rule?
$FlowFixMe
is ignored{||}
is considered to be read-only