Add JSHint to CategoryTree

Bug: T65112
Change-Id: Ib10f4b043fab5b3163f6e343ae5ff926300b60c8
This commit is contained in:
Derk-Jan Hartman 2015-03-15 09:41:56 +01:00
parent ae2d72081f
commit 696ca276f5
4 changed files with 34 additions and 3 deletions

7
.jscsrc Normal file
View file

@ -0,0 +1,7 @@
{
"preset": "wikimedia",
"disallowQuotedKeysInObjects": null,
"requireSpacesInsideParentheses": null,
"requireSpacesInsideArrayBrackets": null
}

View file

@ -1,2 +0,0 @@
# Someone should make this pass...
modules/ext.categoryTree.js

26
.jshintrc Normal file
View file

@ -0,0 +1,26 @@
{
// Enforcing
"bitwise": true,
"eqeqeq": true,
"es3": true,
"freeze": true,
"latedef": true,
"noarg": true,
"nonew": true,
"undef": true,
"unused": true,
"strict": false,
// Relaxing
"laxbreak": true,
"multistr": true,
// Environment
"browser": true,
"globals": {
"mediaWiki": true,
"jQuery": false,
"QUnit": false
}
}

View file

@ -25,7 +25,7 @@
* @context {Element} CategoryTreeToggle
* @param e {jQuery.Event}
*/
function handleNode( e ) {
function handleNode( /*e*/ ) {
var $link = $( this );
if ( $link.data( 'ct-state' ) === 'collapsed' ) {
expandNode( $link );