Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES6 quoted propTypes not working #77

Closed
kl3ryk opened this issue May 11, 2015 · 1 comment
Closed

ES6 quoted propTypes not working #77

kl3ryk opened this issue May 11, 2015 · 1 comment

Comments

@kl3ryk
Copy link

kl3ryk commented May 11, 2015

When defining ES6 compatibile propTypes with qoted properties there is an error

export default class OfferList extends React.Component {
    render() {
        //...
    }
}

OfferList.propTypes = {
    "items": React.PropTypes.array.isRequired
};

When propety is unquoted everything works fine:

export default class OfferList extends React.Component {
    render() {
        //..
    }
}

OfferList.propTypes = {
    items: React.PropTypes.array.isRequired
};
@kl3ryk
Copy link
Author

kl3ryk commented May 11, 2015

I think bug is here: https://github.com/yannickcr/eslint-plugin-react/blob/master/lib/rules/prop-types.js#L168 becuase there is no name property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants