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
Prevent non-defined props from getting set in connect
?
#888
Comments
I think this is a good idea |
I'm not sure I understand. How could anyone statically determine that in this IIFE that returns an object, the object is meant to represent props? |
because of this line |
That's some really really specific deduction for one single library. That seems like something that some sort of I'm particularly concerned that usage of https://www.npmjs.com/package/react-with-styles would trigger this, short of the very specific import detection. |
@ljharb I'd argue redux is pretty huge https://www.npmjs.com/package/redux, but you're right a redux specific plugin may make the most sense. Wondering how it would work with the existing propTypes validation if it was separate though 🤔 |
Agreed, this seems like a useful rule but it would be best for a redux or react-redux specific eslint plugin. Can you elaborate on your concerns about existing propTypes validation? |
Thanks for the discussion, y'all. At the very least, it sounds like this is the wrong repository for this rule, so I'm going to close the issue. Please feel free to keep commenting on the issue – it's all really valuable input from my perspective :) |
Given this basic example:
Is there a way to get eslint to report the invalid
bar
prop as an error?The text was updated successfully, but these errors were encountered: