jsx-eslint/eslint-plugin-react

New rule: identify missing PropType definition

Open

#1.887 geöffnet am 18. Juli 2018

Auf GitHub ansehen
 (9 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (2.797 Forks)batch import
help wantednew rule

Repository-Metriken

Stars
 (8.630 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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

Contributor Guide