forked from hermwong/Wikipedia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
STYLE_GUIDELINES
24 lines (17 loc) · 1.48 KB
/
STYLE_GUIDELINES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
== Javascript ==
Javascript code follows the coding conventions set out in
http://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript
Note: Previously we used our own whitespace guidelines however any future commits should adhere to standards in above link.
== CSS ==
CSS code should follow the guidelines set out in http://www.mediawiki.org/wiki/Manual:Coding_conventions/CSS
== HTML ==
HTML should validate via http://validator.w3.org/
== COMMITS ==
* Commits are important as they give the reviewer more information to successfully review your code and find errors or potential problems you might not have thought of
* Commits are also useful when troubleshooting issues and refactoring. If it's not clear why a line of code is in the repository important bug fixes could be lost.
* Commits should be as minor as possible. Please avoid removing unrelated console.log statements, fixing unrelated whitespace etc.. do that in a separate commit which mentions the word cleanup.
* First line commit should summarise the commit with bug it fixes if applicable. e.g. Fix problem with toggling see bug x
* Second line should be blank
* Third line should go into detail where necessary providing links to blog posts/other bugs to provide more background. Mention the platforms/browsers the change is for where necessary
** e.g. 'this is a problem on android but not osx see http://<url> which explains problem in detail'
** e.g. 'this is a workaround for a known bug in opera mobile see http://<url>'