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 nested forwardRef + memo #3679

Merged
merged 1 commit into from
Feb 18, 2024

Conversation

developer-bandi
Copy link
Contributor

Fix #3521

  • Modified to allow an exception that skips the type check of memo when forwardRef and memo are nested.
  • forwardRef, memo, forwardRef with memo testcase add

Fixes jsx-eslint#3521.

Co-authored-by: 김상두 <[email protected]>
Co-authored-by: Jordan Harband <[email protected]>
Copy link

codecov bot commented Jan 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9f4b2b9) 97.74% compared to head (c1c273c) 97.74%.

❗ Current head c1c273c differs from pull request most recent head 88f7f09. Consider uploading reports for the commit 88f7f09 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3679   +/-   ##
=======================================
  Coverage   97.74%   97.74%           
=======================================
  Files         132      132           
  Lines        9409     9420   +11     
  Branches     3449     3456    +7     
=======================================
+ Hits         9197     9208   +11     
  Misses        212      212           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ljharb ljharb changed the title [FIX] when forwardRef and memo nested, prop-types incorrect [Fix] prop-types: handle nested forwardRef + memo Jan 15, 2024
lib/rules/prop-types.js Outdated Show resolved Hide resolved
@ljharb ljharb added the bug label Jan 15, 2024
@ljharb
Copy link
Member

ljharb commented Jan 15, 2024

With the latest rebase, some tests are failing. Can you update to this commit and take a look?

@developer-bandi
Copy link
Contributor Author

developer-bandi commented Jan 15, 2024

@ljharb yes, so I fix the failed test code but almost code is changed. so may be reivew is nessesary

and some Tests are fail because node install fail. i don't know why it is fail. please tell me hint to fix it. (and Automatic Rebase)

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't have to worry about the automatic rebase check. The PR now lacks any tests, is that intentional?

lib/rules/prop-types.js Outdated Show resolved Hide resolved
@developer-bandi
Copy link
Contributor Author

developer-bandi commented Jan 16, 2024

You don't have to worry about the automatic rebase check. The PR now lacks any tests, is that intentional?

no, it is not intentional. it's my mistake. perhaps i did pull at local codebase, that test code is deleted.
so i revert all test code already exist

@ljharb ljharb merged commit 88f7f09 into jsx-eslint:master Feb 18, 2024
309 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

[Bug]: Error react/prop-types , although the type has been specified
2 participants