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

Code convention for antd #1244

Closed
benjycui opened this issue Mar 22, 2016 · 4 comments
Closed

Code convention for antd #1244

benjycui opened this issue Mar 22, 2016 · 4 comments

Comments

@benjycui
Copy link
Contributor

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.

@benjycui
Copy link
Contributor Author

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,
};

@awaw00
Copy link

awaw00 commented Mar 22, 2016

// Good
Button.propTypes = {
  type: PropTypes.string,
}
// Bad
Button.propTypes = {
  type: PropTypes.string,
};

自从写js后看到分号总觉得不自在。。。

@yiminghe
Copy link
Contributor

based on eslint-config-airbnb@6.x

@afc163 afc163 closed this as completed Apr 25, 2016
@lock
Copy link

lock bot commented May 5, 2018

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.

@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants