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

sort-prop-types: follow variable reference #622

Closed
oliviertassinari opened this issue Jun 5, 2016 · 4 comments · Fixed by singapore/lint-condo#214
Closed

sort-prop-types: follow variable reference #622

oliviertassinari opened this issue Jun 5, 2016 · 4 comments · Fixed by singapore/lint-condo#214

Comments

@oliviertassinari
Copy link
Contributor

As discussed in this failing test case
I think that it would be great to support the following type of pattern:

const propTypes = {
  muiTheme: PropTypes.object.isRequired,
  className: PropTypes.string,
};

const TextFieldLabel = (props) => {
  return (
    <div />
  );
};

TextFieldLabel.propTypes = propTypes

However, it's not simple, it requires to follow variable reference.

@ljharb
Copy link
Member

ljharb commented Jun 5, 2016

When it's in the same file, this absolutely should work imo.

@Bouncey
Copy link

Bouncey commented Jan 4, 2017

👍 Would love this

@Bouncey
Copy link

Bouncey commented Jan 7, 2017

Great news @yannickcr!! 🏅

The next question is obviously about the next release 👍 😉

@yannickcr
Copy link
Member

I hope to publish a new release tomorrow :)

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

Successfully merging a pull request may close this issue.

4 participants