jsx-eslint/eslint-plugin-react

New rule: identify missing PropType definition

Open

#1 887 ouverte le 18 juil. 2018

Voir sur GitHub
 (9 commentaires) (0 réactions) (0 assignés)JavaScript (2 797 forks)batch import
help wantednew rule

Métriques du dépôt

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

Description

I accidentally forgot to add the PropTypes assignment to a prop and this was not picked up by eslint:

const propTypes = {
    actions: {
        something: PropTypes.func.isRequired,
    }.isRequired,
};

should have been

const propTypes = {
    actions: PropTypes.shape({
        something: PropTypes.func.isRequired,
    }).isRequired,
};

Guide contributeur