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

Do not modify AST directly (fixes #249) #253

Merged
merged 2 commits into from
Oct 18, 2015

Conversation

rhysd
Copy link
Contributor

@rhysd rhysd commented Oct 16, 2015

I believe this fixes #249.

The cause of the issue is that checkForbidden() modifies AST. I fixed the issue by making local variable value.

Note that this PR is work in progress. I don't commit test case yet. But I'm already sure that the case reported in #249 was resolved.

@rhysd
Copy link
Contributor Author

rhysd commented Oct 16, 2015

OK, I added test to ensure the issue is fixed and it passed. I believe it's ready to merge.

yannickcr added a commit that referenced this pull request Oct 18, 2015
Fix forbid-prop-types to do not modify AST directly (fixes #249)
@yannickcr yannickcr merged commit f4cbdfc into jsx-eslint:master Oct 18, 2015
@yannickcr
Copy link
Member

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.

'react/forbid-prop-types' makes eslint crash on PropTypes.instanceOf
2 participants