[Bug]: react/no-unused-prop-types
reports false positives if multiple components use the same prop type
#3868
Labels
react/no-unused-prop-types
reports false positives if multiple components use the same prop type
#3868
Is there an existing issue for this?
Description Overview
I have 2 components that both share the same prop type. The first component doesn't use all props, the second does. The rule reports an error on the second prop claiming it's unused (since it's not used by the first component). It seems that the rule only looks at the first component it can find and doesn't take further components into consideration:
Expected Behavior
I would expect the rule to look at all components that use a certain prop type instead of only the first one it can find.
eslint-plugin-react version
7.37.2
eslint version
9.16.0
node version
18.20.5
The text was updated successfully, but these errors were encountered: