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

Fix prop-types to check for computed prop names. #36

Merged
merged 1 commit into from Mar 29, 2015

Conversation

burnnat
Copy link
Contributor

@burnnat burnnat commented Mar 29, 2015

Previously, accessing props dynamically with an expression like this.props[propName] would result in a linting error like:

'propName' is missing in props validation

However "propName" is simply the name of a variable, not the actual property name. Since there's no easy way to resolve the real property name for dynamic accesses like this, this modification simply ignores such cases.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.73% when pulling 3b5cf97 on burnnat:computed-prop-types into 0d7b069 on yannickcr:master.

@burnnat
Copy link
Contributor Author

burnnat commented Mar 29, 2015

Looks like the Travis failure is unrelated to the code change - seems to be a connection issue, maybe because of the Github DDOS.

yannickcr added a commit that referenced this pull request Mar 29, 2015
Fix prop-types to check for computed prop names
@yannickcr yannickcr merged commit 1577129 into jsx-eslint:master Mar 29, 2015
@yannickcr
Copy link
Member

Merged, thanks.

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

Successfully merging this pull request may close these issues.

None yet

3 participants