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

Docs: Code conventions improvements #6313

Merged
merged 3 commits into from Jun 5, 2016
Merged

Docs: Code conventions improvements #6313

merged 3 commits into from Jun 5, 2016

Conversation

platinumazure
Copy link
Member

Highlights:

  • File overview section: Removed notes about copyright
  • Strict mode: Rewrote guidelines to favor global "strict" mode
  • Other tweaks: Fixed ambiguity about for statement spacing

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.)

@eslintbot
Copy link

LGTM

@mention-bot
Copy link

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.
Copy link
Member Author

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!

Copy link
Member

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.

@eslintbot
Copy link

LGTM

@nzakas
Copy link
Member

nzakas commented Jun 3, 2016

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. :)

@platinumazure
Copy link
Member Author

@nzakas Even if nobody else reads the doc, I do! 😄 I will make your suggested change and push tonight.

@eslintbot
Copy link

LGTM

@platinumazure
Copy link
Member Author

@nzakas Should be good to go now. Thanks for your patience.

@nzakas
Copy link
Member

nzakas commented Jun 5, 2016

Lgtm

@nzakas nzakas merged commit d49ab4b into master Jun 5, 2016
@platinumazure platinumazure deleted the platinumazure-patch-1 branch June 13, 2016 17:18
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants