"Krinkle" posted a comment on MediaWiki.r108533.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/108533#c29314

Commit summary for MediaWiki.r108533:

[MoodBar] Clean up + minor bug fix
* Declare missing dependency on 'user.tokens'
* Use $ instead of $j (deprecated)
* Use <shorttag> for element creation, and <valid></valid> for parsed snippets. 
jQuery uses a regex to detect <shorttag> and does doc.createElement('tag'). For 
anything else it uses innerHTML parser which should be given valid html, not 
shorthand code.
* Various JSLint/JSHint best practices
* Other code conventions (whitespace: like a space between // and the comment, 
no space between function name and arguments list, one space between operators 
and their value: `if ( .. ) `, `function ( .. ) `, `for ( .. ) `, and 
`someThing( .. )`, etc.)
* Function order
* Fix global variable leakage "$link"
* Fix global variable leakage "$item" (2x)
* Fix global variable leakage "$responseForm"
* CSS: One selector per line and space after colon for readability
* Trim trailing whitespace

Krinkle's comment:

:''Any particular reason why you're doing this?''
Nope, bad copy paste by me. Intended to make a IIFE closure for <code>$, mw, 
undefined</code> (since all three are used, and the latter two are used as 
globals), but failed to do so.

:''Oh please, I'd really like for this not to become an enforced convention. 
There's nothing unclear about using <code>i++</code> by itself in a for loop 
like that.''
Fine by me, added it as disabled filter in JSLint per recommended JSLint 
settings 
[{{fullurl:Manual:Coding_conventions/JavaScript|diff=483662&oldid=476726}} here]

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to