jsx-eslint/eslint-plugin-react

no-unused-prop-types cannot detect unused property

Open

#880 aperta il 3 ott 2016

Vedi su GitHub
 (2 commenti) (1 reazione) (0 assegnatari)JavaScript (2797 fork)batch import
bughelp wanted

Metriche repository

Star
 (8630 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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}].

Guida contributor