-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
forbid-prop-types: depends on how objectOf
is imported
#2662
Labels
Comments
Please confirm with v7.20.0, but otherwise this is definitely a bug. |
Just tried, and this seems to happen in 7.20.0 as well. |
ljharb
added a commit
to ljharb/eslint-plugin-react
that referenced
this issue
Jun 12, 2020
I've gotten a failing test written, but haven't been able to quickly figure out how to fix it. A PR would be most appreciated. |
Nice test demo. I think I might have a fix in mind for it this nobody minds me taking a crack at it. |
Please do! |
ajkovar
added a commit
to ajkovar/eslint-plugin-react
that referenced
this issue
Jun 16, 2020
ljharb
added a commit
to ajkovar/eslint-plugin-react
that referenced
this issue
Jun 16, 2020
Fixes jsx-eslint#2662. Co-authored-by: Alex Kovar <[email protected]> Co-authored-by: Jordan Harband <[email protected]>
ajkovar
added a commit
to ajkovar/eslint-plugin-react
that referenced
this issue
Jun 16, 2020
ajkovar
added a commit
to ajkovar/eslint-plugin-react
that referenced
this issue
Jun 16, 2020
ajkovar
added a commit
to ajkovar/eslint-plugin-react
that referenced
this issue
Jun 16, 2020
ajkovar
added a commit
to ajkovar/eslint-plugin-react
that referenced
this issue
Jun 16, 2020
ajkovar
added a commit
to ajkovar/eslint-plugin-react
that referenced
this issue
Jun 23, 2020
ljharb
added a commit
to ajkovar/eslint-plugin-react
that referenced
this issue
Jun 27, 2020
Fixes jsx-eslint#2662. Co-authored-by: Alex Kovar <[email protected]> Co-authored-by: Jordan Harband <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider the following rule:
This would yield an error, which is correct:
This would also yield an error, which is correct:
This should yield an error, but doesn't:
This is slightly related to #2657 where
any
should be blocked in the above example, but isn't. But the bug I'm describing here, is thatobjectOf
only yields an error if it's imported as part of a default import, where it doesn't yield an error when imported as a destructured import. Strangely though,any
is not affected by this phenomenon, onlyobjectOf
is.I'm on eslint-plugin-react 7.19.0, as part of react-scripts 3.4.1.
The text was updated successfully, but these errors were encountered: