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

skipShapeProps should be enabled by default until it works properly #953

Merged

Conversation

everdimension
Copy link
Contributor

The option no-unused-prop-types doesn't work properly for shape proptypes in lots of popular cases: #851, #819 and other cases, like when used outside of the component class.

This causes very annoying inconviences.

So currently the option only works without problems if the skipShapeProps is set to true. Therefore it's best to skip linting shape props by default until the mentioned problems are fixed and setting this option to false actually becomes useful.

@ljharb
Copy link
Member

ljharb commented Nov 9, 2016

Actually I think this is probably a good change. @yannickcr?

@ljharb ljharb reopened this Nov 9, 2016
@everdimension
Copy link
Contributor Author

@ljharb yea, I planned to fix the failing checks and then reopen the pr. Perhaps a bit later today.

@everdimension
Copy link
Contributor Author

@ljharb, @yannickcr Updated the PR

@yannickcr
Copy link
Member

Seems the rule is not working properly if theskipShapeProps option is set to false, so is it useful to keep this option?

@everdimension
Copy link
Contributor Author

@yannickcr Well, it does work for simple cases (which are in tests) so it might be enough for someone's writing style.
And hopefully it will once work just as expected for all other cases, too.

@yannickcr
Copy link
Member

@everdimension I see. But in this case passing this option to true by default is a breaking change, so it should be done in a major release.

@ljharb
Copy link
Member

ljharb commented Nov 12, 2016

@yannickcr why is it a breaking change? Setting that default causes fewer errors, so by eslint's semver policy that's just a patch.

@yannickcr
Copy link
Member

@ljharb Ho, you're right. LGTM then :)

@ljharb ljharb merged commit 1df6118 into jsx-eslint:master Nov 12, 2016
@everdimension everdimension deleted the default-skipshapeprops-enable branch November 12, 2016 19:51
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.

3 participants