Skip to content
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

Merged
merged 8 commits into from May 23, 2019
Merged

Fix requireReadOnlyReactProps #406

merged 8 commits into from May 23, 2019

Conversation

kangax
Copy link
Contributor

@kangax kangax commented May 23, 2019

  • $FlowFixMe is ignored
  • {||} is considered to be read-only

@gajus gajus merged commit 712d840 into gajus:master May 23, 2019
@gajus
Copy link
Owner

gajus commented May 23, 2019

🎉 This PR is included in version 3.9.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label May 23, 2019
@@ -1,6 +1,7 @@
const schema = [];

const reComponentName = /^(Pure)?Component$/;
const reReadOnly = /^\$(ReadOnly|FlowFixMe)$/;
Copy link
Contributor

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.

Copy link
Contributor Author

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)?

Copy link
Contributor

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. :)

Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants