jsx-eslint/eslint-plugin-react

ElementConfig should be used to determine props required

Open

#1 904 ouverte le 26 juil. 2018

Voir sur GitHub
 (3 commentaires) (6 réactions) (0 assignés)JavaScript (2 797 forks)batch import
flowhelp wantedtypescript

Métriques du dépôt

Stars
 (8 630 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

ESLint currently uses ElementProps to determine what types are required by a component with Flow-annotated props, but it should be using ElementConfig instead.

See Using Default Props for Functional Components in Flow's docs for an explanation of why. See also their comparison of ElementProps and ElementConfig.

@ljharb suggested I open an issue here to get it changed.

Guide contributeur