-
Notifications
You must be signed in to change notification settings - Fork 65
Add Javascript Coding Standard #91 #111
Add Javascript Coding Standard #91 #111
Conversation
Based on the C++ coding standards md from nus-cs2103#93
Looks like this got left out of the review.
|
I have referenced mainly from the HTML standard file in #93 and copied the content from the link referenced in README.md. Do I recreate a new one to reference from Java/C++ instead? |
See #97 for an example. |
|
||
// G_O_O_D | ||
var FEEDBACK_RESPONSE_RECIPIENT = 'responserecipient'; | ||
``` |
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.
Can you use other examples here? These examples are taken from TEAMMATES and may be confusing to developers not in that project.
I will make the changes! Thanks! |
2. Modified the content based on comments given. 3. Included html file to reference to markdown file
Sorry for the late update! Was away.
|
- __Indentation__ | ||
|
||
Indentation should be 4 spaces for javascript files. | ||
4 spaces should be used instead of 2 `spaces` or `tab`. |
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.
You don't need to wrap spaces
as code.
Also:
|
3. [Future of Javascript (ES6 - Incoming Features)](https://github.com/lukehoban/es6features) | ||
4. [ES6 Compatibility in Browsers](http://kangax.github.io/compat-table/es6/) | ||
5. [Useful CSS Selectors to know](http://code.tutsplus.com/tutorials/the-30-css-selectors-you-must-memorize--net-16048) | ||
6. [W3schools CSS Selectors Reference](http://www.w3schools.com/cssref/css_selectors.asp) |
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 don't think the last two references are relevant.
1. Remove wrap from spaces as code 2. Updated link 3. Updated the presentation of examples 4. Updated link on README.md
<pre lang="javascript"> | ||
// bad | ||
var foobardescription = 'helloworld'; | ||
</pre> |
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.
This one is duplication of the first bad example.
Some general comments:
|
</pre> | ||
</td> | ||
</tr> | ||
</table> |
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.
Actually, for this table, rather than making the good and the bad side-by-side (not balanced since there are 3 bad examples), you can make the table entirely sequential, for e.g the example of good/bad attributes in the HTML coding standard.
@sihaoo I haven't checked on this for a while. Any updates? |
Closing due to inactivity. Reopen if you decide to work on this again @sihaoo |
Fixes #91
Based on the HTML coding standards md from #93