Skip to content

Bug: eslint-plugin-react-hooks error with Flow component syntax #34279

@necolas

Description

@necolas

Plugin version: 4.5

I don't know if I've overlooked something or made a mistake, but after switching to Flow's component syntax I have lint errors coming from eslint-plugin-react-hooks.

Steps To Reproduce

  1. Use flow component syntax in a React component
  2. Run linter

Link to code example: facebook/react-strict-dom#377

The current behavior

Error:

React Hook "useStrictDOMElement" is called in function "createStrictDOMTextInputComponent" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use"

The expected behavior

No error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UnconfirmedA potential issue that we haven't yet confirmed as a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions