-
-
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
eslint showing error when using variable from parent scope #2352
Comments
renderContent is being detected as a component; but either way you should be destructuring props directly inside your component, not later. |
@ljharb, you mean like this?
If yes, I'm still getting error:
|
gotcha, in that case it seems like a bug. |
i'm having a likely issue I have following component:
is warning DayDiv is used only on a Calendar component, Calendar is exported, DayDiv is not, that's why the eslint-disable-next-line line, before updating this warning was not appearing |
Even not exported, it needs propTypes; separately, you’d need the disable at each prop’s usage site as well (when a property is accessed off of it) |
yeah, but the prop is selection, which warning was disabled in line 1, why now the attributes of the props are evaluated too? |
Because a recent update improved prop detection. Prop shapes should be typed too. |
Is there a way to opt-out from nested props validation? It's so annoying to have this error for |
If it’s typed as an array, array methods should just work. Is it? |
+1 running into this as well with nested scope:
Complains that It looks like it's just looking for the textual name |
This one is fixed too with #2699 |
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using?
default
Please show your full configuration:
Configuration
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
What did you expect to happen?
eslint show no errors
What actually happened? Please include the actual, raw output from ESLint.
Additional info: issue first created on
eslint
repo eslint/eslint#12004The text was updated successfully, but these errors were encountered: