jsx-eslint/eslint-plugin-react

New rule: identify missing PropType definition

Open

#1.887 aberto em 18 de jul. de 2018

Ver no GitHub
 (9 comments) (0 reactions) (0 assignees)JavaScript (2.797 forks)batch import
help wantednew rule

Métricas do repositório

Stars
 (8.630 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

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,
};

Guia do colaborador