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] no-unused-prop-types: returns no errors when using the spread operator in JSX element #3570

Merged

Conversation

akulsr0
Copy link
Contributor

@akulsr0 akulsr0 commented May 3, 2023

Fixes #3566

@akulsr0 akulsr0 changed the title fix: not showing error when using spread with object expression in jsx [Fix] no-unused-prop-types: returns no errors when using the spread operator in JSX element May 3, 2023
@codecov
Copy link

codecov bot commented May 3, 2023

Codecov Report

Merging #3570 (4404a66) into master (13f5c19) will not change coverage.
The diff coverage is n/a.

❗ Current head 4404a66 differs from pull request most recent head 747fad0. Consider uploading reports for the commit 747fad0 to get more accurate results

@@           Coverage Diff           @@
##           master    #3570   +/-   ##
=======================================
  Coverage   97.62%   97.62%           
=======================================
  Files         132      132           
  Lines        9295     9295           
  Branches     3400     3400           
=======================================
  Hits         9074     9074           
  Misses        221      221           
Impacted Files Coverage Δ
lib/util/usedPropTypes.js 97.76% <ø> (ø)

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.

LGTM assuming tests pass!

lib/util/usedPropTypes.js Outdated Show resolved Hide resolved
tests/lib/rules/no-unused-prop-types.js Outdated Show resolved Hide resolved
@ljharb
Copy link
Member

ljharb commented May 3, 2023

Looks like it's failing in eslint < 8 - perhaps the node type is different there?

@ljharb ljharb marked this pull request as draft May 3, 2023 17:43
@akulsr0
Copy link
Contributor Author

akulsr0 commented May 9, 2023

I have fixed failing tests, there are still some tests failing probably an nvm issue since nvm install failed.

@akulsr0 akulsr0 marked this pull request as ready for review May 11, 2023 04:53
@akulsr0
Copy link
Contributor Author

akulsr0 commented May 17, 2023

I have fixed failing tests, there are still some tests failing probably an nvm issue since nvm install failed.

@ljharb Should we try rerunning the checks once?

@ljharb
Copy link
Member

ljharb commented May 17, 2023

Sure, done.

@ljharb ljharb force-pushed the fix/no-unused-prop-types-spread-no-error branch from 4404a66 to 747fad0 Compare May 17, 2023 19:38
@ljharb ljharb merged commit 747fad0 into jsx-eslint:master May 17, 2023
287 checks passed
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.

[Bug]: react/no-unused-prop-types returns no errors when using the spread operator in JSX element
2 participants