jsx-eslint/eslint-plugin-react

no-unused-prop-types cannot detect unused property

Open

#880 geöffnet am 3. Okt. 2016

Auf GitHub ansehen
 (2 Kommentare) (1 Reaktion) (0 zugewiesene Personen)JavaScript (8.630 Stars) (2.797 Forks)batch import
bughelp wanted

Beschreibung

const Comp = (props) => <div className={props.nested.className}>{props.nested.text}</div>;
Comp.propTypes = {
    nested: React.PropTypes.object.isRequired,
    text: React.PropTypes.string.isRequired
};

Property text should be marked as unused. Rule configuration: "react/no-unused-prop-types": ["error", {skipShapeProps: true}].

Contributor Guide