jsx-eslint/eslint-plugin-react

no-unused-prop-types cannot detect unused property

Aperta

#880 aperta il 3 ott 2016

 (2 commenti) (1 reazione) (0 assegnatari)JavaScript (2731 fork)batch import
bughelp wanted

Metriche repository

Star
 (9293 stelle)
Metriche merge PR
 (Metriche PR in attesa)

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