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 with typescript eslint parser #2661

Merged
merged 1 commit into from Jun 12, 2020

Conversation

eltonio450
Copy link
Contributor

Hi there,

This is a first draft to solve #2569

I would be thankful if someone involved in this rule creation could give feedback about edge cases to be handled (spread operator, etc.). I am afraid to have forgotten some...

Thank you !

Fixes jsx-eslint#2569.

Co-authored-by: Antoine <antoine.sauvage@melix.net>
Co-authored-by: Jordan Harband <ljharb@gmail.com>
lib/util/propTypes.js Outdated Show resolved Hide resolved
lib/util/propTypes.js Outdated Show resolved Hide resolved
lib/util/propTypes.js Outdated Show resolved Hide resolved
@eltonio450
Copy link
Contributor Author

ok I pushed a new version with :

  • flatMap
  • handling interfaces props declaration (and a test)
  • better variable names

@eltonio450
Copy link
Contributor Author

ok, I don't get how to make flatmap work :(

@ljharb
Copy link
Member

ljharb commented Jun 12, 2020

@eltonio450 i can fix the branch, but since you made the PR from ovrsea and not from eltonio450, i can't. can you add me to https://github.com/ovrsea/eslint-plugin-react so i can force push to it?

@eltonio450
Copy link
Contributor Author

done :) thank you :)

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

lib/util/propTypes.js Show resolved Hide resolved
lib/util/propTypes.js Show resolved Hide resolved
@ljharb ljharb merged commit 13a863b into jsx-eslint:master Jun 12, 2020
@ljharb ljharb deleted the fix-no-unused branch June 12, 2020 20:33
@eltonio450
Copy link
Contributor Author

thank you !

@ljharb
Copy link
Member

ljharb commented Jun 13, 2020

no no, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants