Skip to content
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

[Bug]: react/prop-types fails when using custom FunctionComponent type #3625

Open
2 tasks done
Kyzegs opened this issue Aug 27, 2023 · 0 comments
Open
2 tasks done

[Bug]: react/prop-types fails when using custom FunctionComponent type #3625

Kyzegs opened this issue Aug 27, 2023 · 0 comments
Labels

Comments

@Kyzegs
Copy link

Kyzegs commented Aug 27, 2023

Is there an existing issue for this?

  • I have searched the existing issues and my issue is unique
  • My issue appears in the command-line and not only in the text editor

Description Overview

As the title states, the react/prop-types rule fails when using a custom FunctionComponent type.

export type FC<P = {}> = React.FC<P> & {
  layout?: (page: React.ReactNode) => React.JSX.Element
};

image

Expected Behavior

I'd expect that this should work as it extends the React.FC type.

eslint-plugin-react version

v7.32.2

eslint version

v8.43.0

node version

v16.17.0

@Kyzegs Kyzegs added the bug label Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant