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

Added comments usage to style guide #4

Closed
wants to merge 1 commit into from
Closed

Added comments usage to style guide #4

wants to merge 1 commit into from

Conversation

behrendtio
Copy link

Added comments section in style guide to solve #3:

Note: I didn't include a right and a wrong version since wrong is pretty hard to define when using comments. So I just included the best practice version.


```js
// Instantiate configuration
var config = { port: 3000 };
Copy link
Owner

Choose a reason for hiding this comment

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

If you look at the other examples in this guide, you'll notice that I don't use spaces after opening braces.

@felixge felixge closed this in 19f4e9e Aug 6, 2012
@felixge
Copy link
Owner

felixge commented Aug 6, 2012

Thanks. Unfortunately your examples where sort of anti patterns for comments (adding no value to the code being commented on). So I did a patch myself: https://github.com/felixge/node-style-guide/blob/master/Readme.md#use-slashes-for-comments

What do you think?

@behrendtio
Copy link
Author

Very well!

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

Successfully merging this pull request may close these issues.

None yet

2 participants