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

Support createClass in no-typos #1828

Merged
merged 1 commit into from Dec 28, 2018

Conversation

alexzherdev
Copy link
Contributor

Resolves #1721

Also added some more tests for good measure.
Not sure about the exact message for an ES5 component, but mentioning static class property didn't make sense.

if (propertyName === 'propTypes' || propertyName === 'contextTypes' || propertyName === 'childContextTypes') {
checkValidPropObject(node);
}
STATIC_CLASS_PROPERTIES.forEach(CLASS_PROP => {
if (propertyName && CLASS_PROP.toLowerCase() === propertyName.toLowerCase() && CLASS_PROP !== propertyName) {
const message = isClassProperty
? 'Typo in static class property declaration'
Copy link
Member

Choose a reason for hiding this comment

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

i think it's fine to have different messages, but "static class property" is a conceptual term prior to the feature landing in the language, so i think that'd be reasonable.

Copy link
Collaborator

@EvHaus EvHaus left a comment

Choose a reason for hiding this comment

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

LGTM.

@ljharb ljharb merged commit d2b5b73 into jsx-eslint:master Dec 28, 2018
@alexzherdev alexzherdev deleted the 1721-no-typos-create-class branch December 28, 2018 01:58
This was referenced Dec 28, 2018
This was referenced Jan 4, 2019
@ghost ghost mentioned this pull request Jan 12, 2019
1 task
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.

None yet

3 participants