-
Notifications
You must be signed in to change notification settings - Fork 39
Include deprecated jsx prop checks #81
Comments
I've run into the same issue. Within the source file, the deprecation is properly reported: export interface DialogHeaderProps {
/** @deprecated use children instead. */
heading?: string
}
const DialogHeader = React.forwardRef<HTMLElement, DialogHeaderProps>(
(
{
className: classNameProp,
// eslint-disable-next-line deprecation/deprecation
heading, But any consumers of the component outside the source don't report // no error
<DialogHeader heading="Hire employee" /> VSCode marks the property as deprecated, which means the JSDoc is applied properly. @sebakerckhof I tried installing your plugin but didn't see an error either :( |
@gmathieu It works for similar code when I test it. If you can make a reproduction repo, I can take a look. |
Hey @sebakerckhof, I think we can bring your fixes into the current rules in the way that does not introduce extra rule, since this plugin already checks JSX code. |
Looking forward to this feature! |
Hi, is there any progress on this topic? |
I noticed that this plugin does not warn for usage of deprecated jsx props.
Since we needed this, I've written this plugin: https://github.com/sebakerckhof/eslint-plugin-deprecated-jsx-props
I originally started with bringing https://github.com/Drawbotics/eslint-plugin-deprecated-props up to date, but its approach is fundamentally flawed, so I ended up rewriting most of it.
Anyway, it seems to work well on our codebase, but I have no desire to maintain it and therefore I wanted to check if you're interested in adopting it as part of this plugin. I could make a PR for it if you're interested.
It has tests to ensure it works with:
The text was updated successfully, but these errors were encountered: