no-typos rule doesn't handle custom proptypes classes #1389
Closed
Description
opened on Aug 22, 2017
with the 7.2.1
-> 7.3.0
upgrade this rule started breaking on this code:
import * as MyPropTypes from 'lib/my-prop-types'
const Foo = ({ bar } = {} ) => <div className={bar} />
Foo.propTypes = {
bar: MyPropTypes.bar.isRequired
}
with
29:25 error Typo in declared prop type: bar react/no-typos
interestingly enough if i change to this:
Foo.propTypes = {
bar: MyPropTypes.string.isRequired
}
then the rule passes, even though MyPropTypes
doesn't export a string
prop.
Activity