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
Docs: Code conventions improvements #6313
Conversation
LGTM |
By analyzing the blame information on this pull request, we identified @nzakas to be a potential reviewer |
* See LICENSE file in root directory for full license. | ||
*/ | ||
``` | ||
The `@author` field gives you credit for having created the file. There is no need to assert copyright on individual files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use some help here on whether I should mention the jQuery license, or just remove the sentence about copyright altogether, or something else. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove it.
LGTM |
Just one small note. This doc was copied from my book and was focused on web deployments, that's why strict mode was the reverse of what we do. I guess further proof that no one reads this doc. :) |
@nzakas Even if nobody else reads the doc, I do! 😄 I will make your suggested change and push tonight. |
LGTM |
@nzakas Should be good to go now. Thanks for your patience. |
Lgtm |
Highlights:
File Overview
I removed everything to do with copyright from that section. Now that we are in the jQuery foundation, we have decided to just use the "author" field and no copyright or license.
Strict Mode
Our repository enforces global "strict", but the code conventions imply that we should have "strict" mode in functions.
My assumption is that those conventions have more to do with non-module code, whereas NodeJS actually has an extra scope, global return, etc. and so it is safe to have "use strict" globally (and possibly better, since it means we don't have sections of files that are not strict).
Other
Whitespace notes were slightly ambiguous about the spacing between elements of the for loop initialization. I added a note specifying that whitespace should only be after semicolons, not before.
(Apologies to @nzakas for creating a branch on the main repo-- I was using the GitHub editor and apparently did something wrong. Hopefully I'll figure it out before I do another GitHub doc change.)