Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

rcc should include propTypes #54

Open
iandanforth opened this issue Jul 6, 2015 · 3 comments
Open

rcc should include propTypes #54

iandanforth opened this issue Jul 6, 2015 · 3 comments

Comments

@iandanforth
Copy link

This would be a "highly opinionated" change, but it's one I think could benefit the entire community. By forcefully suggesting that people include propTypes (https://facebook.github.io/react/docs/reusable-components.html) you could significantly increase the chances that people will document the API of their components.

If you've ever tried to work with a third party component that has a lot of functionality only exposed via searching for "this.props.*" then you'll understand why I suggest this change.

@mathieumg
Copy link

That should probably be a linter's job, not the syntax highlighting package's. Take a look at https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md

@iandanforth
Copy link
Author

@mathieumg Syntax highlighting has been removed from this package. My suggestion relates to the default text inserted by the "rcc" snippet.

@mathieumg
Copy link

I thought this was sublime-babel when reading my emails, my apologies.

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

No branches or pull requests

2 participants