I recently upgraded my eslint package (and all plugins) from 7.16.0
to 8.30.0
and now in a couple of my components I'm getting the error ESLint: 'propertyName' is missing in props validation(react/prop-types)
. Before the upgrade these components were not getting any linter errors. This is only happening in a couple of components making this even more difficult to determine why only these properties are having errors. In one component it is a prop type used within a function, but when the same prop is used outside that function no error is thrown. In this image if you look at the templateProps
object just above the error it also contains onRowClicked
but does not have a linter error.
On the other component the props having the issue are coming from an inherited interface; however not all of the inherited props are having the issue. Here label
and inputRef
are also coming from the inherited interface, but they don't seem to have an issue.
This library contains a number of components that are inheriting from the same base interface as this component here but none of them are throwing errors. I have checked the eslint-plugin-react
repo on GitHub and no one has reported this issue yet. On other posts I have seen the advice to disable this rule, but I really don't want to do that unless absolutely necessary (although I may change it to a warning for the time being). Before I log this as a potential issue I was wondering if anyone else has seen a similar problem. Thanks in advance.