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: handle anonymous functions #2731

Merged
merged 1 commit into from Jul 28, 2020
Merged

Conversation

wKich
Copy link
Contributor

@wKich wKich commented Jul 27, 2020

For 7.20.4 version of eslint-plugin-react I receive TypeError when I lint this file. I added additional check for anonymous functions where error was raised.

Fixes jsx-eslint#2728.

Co-authored-by: Odin Hørthe Omdal <odin.omdal@gmail.com>
Co-authored-by: Dmitriy Lazarev <w@kich.dev>
Co-authored-by: Jordan Harband <ljharb@gmail.com>
Co-authored-by: Johnny Zabala <jzabala.s@gmail.com>
@wKich
Copy link
Contributor Author

wKich commented Jul 27, 2020

Oh, Didn't see previous PR :)

@wKich wKich closed this Jul 27, 2020
@wKich wKich deleted the patch-2 branch July 27, 2020 11:59
@ljharb
Copy link
Member

ljharb commented Jul 27, 2020

@wKich PR refs can't be deleted; it'd be great if you could restore the branch and reopen the PR so I can keep it in sync with the other one.

@wKich wKich restored the patch-2 branch July 28, 2020 04:35
@wKich
Copy link
Contributor Author

wKich commented Jul 28, 2020

@ljharb, Ok. I reopened PR, but it duplicates #2730

@wKich wKich reopened this Jul 28, 2020
@ljharb
Copy link
Member

ljharb commented Jul 28, 2020

Thanks! This does need a regression test first.

@ljharb ljharb changed the title [Fix]: TypeError on getting name of anonymous function [Fix] prop-types: handle anonymous functions Jul 28, 2020
@ljharb ljharb merged commit e8d2ce9 into jsx-eslint:master Jul 28, 2020
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