Skip to content

relay/generated-typescript-types false positive when the type is defined in a separate file #165

@Hypnosphi

Description

@Hypnosphi

Reproduction: https://github.com/Hypnosphi/eslint-relay-issue, run npm install && npm run lint

/src/App.tsx
  13:16  error  The prop passed to useFragment() should be typed with the type 'AppFragment$key' imported from 'AppFragment.graphql', e.g.:

  import type {AppFragment$key} from 'AppFragment.graphql';  relay/generated-typescript-types

✖ 1 problem (1 error, 0 warnings)

It works fine if I move the Props definition from App.types.ts to App.tsx

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions