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

no-typos rule doesn't support isRequired when destructuring #1488

Closed
ranneyd opened this issue Oct 18, 2017 · 1 comment
Closed

no-typos rule doesn't support isRequired when destructuring #1488

ranneyd opened this issue Oct 18, 2017 · 1 comment

Comments

@ranneyd
Copy link

ranneyd commented Oct 18, 2017

I have the following:

const { func } = PropTypes;
Component.propTypes = {
   prop: func.isRequired,
}

The plugin is marking isRequired as invalid, saying

Typo in declared proptype: isRequired (react/no-typos)

Perhaps there's some regular expression thing that's checking after the first ., aka assuming it begins with PropTypes?

@ljharb
Copy link
Member

ljharb commented Oct 19, 2017

Duplicate of #1389.

@ljharb ljharb closed this as completed Oct 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants