Thanks to @waywardmonkeys, antd's code style is more consistent now :-)
And I think we had better to write those code convention in a document, so others can refer to it (as a complement or ESLint). I had created a wiki.
Maybe we could discuss code convention in this issue, and update the wiki when we draw a conclusion.
cc @afc163 @yiminghe
Maybe @hotoo is interested in this :-)
Note: antd's code style should be super set of eslint-config-airbnb.
We can discuss questions like this:
I think PropTypes.string
is better than React.PropTypes.string
, for it's more concise.
// Good
Button.propTypes = {
type: PropTypes.string,
};
// Bad
Button.propTypes = {
type: React.PropTypes.string,
};
// Good
Button.propTypes = {
type: PropTypes.string,
}
// Bad
Button.propTypes = {
type: PropTypes.string,
};
自从写js后看到分号总觉得不自在。。。
based on [email protected]
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.
Most helpful comment
自从写js后看到分号总觉得不自在。。。