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

Handle no-props-unused-props in custom validators #1518

Merged
merged 1 commit into from Nov 7, 2017

Conversation

petersendidit
Copy link
Contributor

When a custom prop validator is used mark props used inside the
validator as used.

Fixes #1068

static propTypes = {
validate: PropTypes.bool,
options: PropTypes.array,
value: function ({options, value, validate}) {
Copy link
Member

Choose a reason for hiding this comment

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

can you also add a test case for value({options, value, validate}) {?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 Added the test case.

When a custom prop validator is used mark props used inside the
validator as used.

Fixes jsx-eslint#1068
@ljharb
Copy link
Member

ljharb commented Nov 6, 2017

Will merge this tomorrow if no objections.

@ljharb ljharb merged commit 2010205 into jsx-eslint:master Nov 7, 2017
@petersendidit petersendidit deleted the 1068-fix branch November 8, 2017 14:53
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