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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] propType: ignore imported types/interface in forwardRef generic #3280



Copy link

@vedadeepta vedadeepta commented Apr 30, 2022

Fixes: #3140

Fix is to ignore when type declarations are not present in the same file.

Turns out imported external interfaces & types were already handled by the searchDeclaration function, the error was happening because i mistakenly hardcoded ignorePropsValidation: false when handling the forwardRef<element, props> case 馃拃

@vedadeepta vedadeepta changed the title [Fix] propType: handle imported types/interface in forwardRef generic [Fix] propType: ignore imported types/interface in forwardRef generic Apr 30, 2022
Copy link

codecov bot commented Apr 30, 2022

Codecov Report

Merging #3280 (8bfeadd) into master (b7a9c2a) will not change coverage.
The diff coverage is n/a.

Current head 8bfeadd differs from pull request most recent head 6c88912. Consider uploading reports for the commit 6c88912 to get more accurate results

@@           Coverage Diff           @@
##           master    #3280   +/-   ##
  Coverage   97.72%   97.72%           
  Files         123      123           
  Lines        8745     8745           
  Branches     3170     3170           
  Hits         8546     8546           
  Misses        199      199           
Impacted Files Coverage 螖
lib/util/propTypes.js 97.43% <酶> (酶)

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update b7a9c2a...6c88912. Read the comment docs.

@ljharb ljharb force-pushed the 3140-forwardRef-ignore-propTypes branch from 8bfeadd to 6c88912 Compare Apr 30, 2022
ljharb approved these changes Apr 30, 2022
Copy link

@ljharb ljharb left a comment


@ljharb ljharb merged commit 6c88912 into jsx-eslint:master Apr 30, 2022
243 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

2 participants