build: Bump various devDependencies
authorJames D. Forrester <jforrester@wikimedia.org>
Tue, 10 Feb 2015 00:47:48 +0000 (16:47 -0800)
committerJforrester <jforrester@wikimedia.org>
Tue, 10 Feb 2015 00:52:15 +0000 (00:52 +0000)
grunt 0.4.2 -> 0.4.5
grunt-contrib-jshint 0.10.0 -> 0.11.0
grunt-jscs 0.8.1 -> 1.5.0
grunt-karma 0.9.0 -> 0.10.1
karma-firefox-launcher 0.1.3 -> 0.1.4
qunitjs 1.15.0 -> 1.17.1

Some minor fixes to pass new jscs rules; big ones postponed for now.

Change-Id: I5f2348c3cf96cf5aa20eeb9083300155b3920c5b

.jscsrc
package.json
resources/src/jquery/jquery.mwExtension.js
resources/src/jquery/jquery.placeholder.js
resources/src/jquery/jquery.textSelection.js
resources/src/mediawiki.action/mediawiki.action.view.postEdit.js
resources/src/mediawiki.special/mediawiki.special.pageLanguage.js
resources/src/mediawiki/mediawiki.cookie.js
tests/qunit/suites/resources/jquery/jquery.accessKeyLabel.test.js
tests/qunit/suites/resources/jquery/jquery.placeholder.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js

diff --git a/.jscsrc b/.jscsrc
index 2ebd40e..34b2435 100644 (file)
--- a/.jscsrc
+++ b/.jscsrc
@@ -3,6 +3,10 @@
 
        "disallowKeywordsOnNewLine": null,
        "disallowQuotedKeysInObjects": null,
+       "disallowImplicitTypeConversion": null,
+       "requireLineBreakAfterVariableAssignment": null,
+       "requireSpaceAfterLineComment": null,
+       "requireSpacesInsideParentheses": null,
        "requireSpacesInsideArrayBrackets": null,
        "validateIndentation": null
 }
index 6bbcf39..4ef12ba 100644 (file)
@@ -5,17 +5,17 @@
     "test": "grunt test"
   },
   "devDependencies": {
-    "grunt": "0.4.2",
+    "grunt": "0.4.5",
     "grunt-banana-checker": "0.2.0",
-    "grunt-contrib-jshint": "0.10.0",
+    "grunt-contrib-jshint": "0.11.0",
     "grunt-contrib-watch": "0.6.1",
-    "grunt-jscs": "0.8.1",
+    "grunt-jscs": "1.5.0",
     "grunt-jsonlint": "1.0.4",
-    "grunt-karma": "0.9.0",
+    "grunt-karma": "0.10.1",
     "karma": "0.12.31",
     "karma-chrome-launcher": "0.1.7",
-    "karma-firefox-launcher": "0.1.3",
+    "karma-firefox-launcher": "0.1.4",
     "karma-qunit": "0.1.4",
-    "qunitjs": "1.15.0"
+    "qunitjs": "1.17.1"
   }
 }
index dc7aaa4..e6e33ad 100644 (file)
                        return str.charAt( 0 ).toUpperCase() + str.slice( 1 );
                },
                escapeRE: function ( str ) {
-                       return str.replace ( /([\\{}()|.?*+\-\^$\[\]])/g, '\\$1' );
+                       return str.replace( /([\\{}()|.?*+\-\^$\[\]])/g, '\\$1' );
                },
                isDomElement: function ( el ) {
                        return !!el && !!el.nodeType;
                },
                isEmpty: function ( v ) {
                        var key;
-                       if ( v === '' || v === 0 || v === '0' || v === null
-                               || v === false || v === undefined )
-                       {
+                       if (
+                               v === '' || v === 0 || v === '0' || v === null || v === false || v === undefined
+                       {
                                return true;
                        }
                        // the for-loop could potentially contain prototypes
index d458019..d50422e 100644 (file)
@@ -13,7 +13,7 @@
  * @version 2.1.0
  * @license MIT
  */
-(function ($) {
+( function ($) {
 
        var isInputSupported = 'placeholder' in document.createElement('input'),
                isTextareaSupported = 'placeholder' in document.createElement('textarea'),
@@ -49,7 +49,7 @@
 
                        $this
                                .filter((isInputSupported ? 'textarea' : ':input') + '[placeholder]')
-                               .filter(function () {
+                               .filter( function () {
                                        return !$(this).data('placeholder-enabled');
                                })
                                .bind({
                        propHooks.value = hooks;
                }
 
-               $(function () {
+               $( function () {
                        // Look for forms
                        $(document).delegate('form', 'submit.placeholder', function () {
                                // Clear the placeholder values so they don't get submitted
                                var $inputs = $('.placeholder', this).each(clearPlaceholder);
-                               setTimeout(function () {
+                               setTimeout( function () {
                                        $inputs.each(setPlaceholder);
                                }, 10);
                        });
 
                // Clear placeholder values upon page reload
                $(window).bind('beforeunload.placeholder', function () {
-                       $('.placeholder').each(function () {
+                       $('.placeholder').each( function () {
                                this.value = '';
                        });
                });
index bd6518d..e8fc8e4 100644 (file)
                                                        endPos = this.selectionEnd;
                                                        scrollTop = this.scrollTop;
                                                        checkSelectedText();
-                                                       if ( options.selectionStart !== undefined
-                                                                       && endPos - startPos !== options.selectionEnd - options.selectionStart )
-                                                       {
+                                                       if (
+                                                               options.selectionStart !== undefined &&
+                                                               endPos - startPos !== options.selectionEnd - options.selectionStart
+                                                       ) {
                                                                // This means there is a difference in the selection range returned by browser and what we passed.
                                                                // This happens for Chrome in the case of composite characters. Ref bug #30130
                                                                // Set the startPos to the correct position.
index 95ef62c..c008dfd 100644 (file)
@@ -76,4 +76,4 @@
                mw.cookie.set( cookieKey, null );
        }
 
-} ( mediaWiki, jQuery ) );
+}( mediaWiki, jQuery ) );
index ba7f734..7c2269f 100644 (file)
@@ -6,4 +6,4 @@
                        $( '#mw-pl-options-2' ).prop( 'checked', true );
                } );
        } );
-} ( jQuery ) );
+}( jQuery ) );
index 85f4ffa..73e7f6e 100644 (file)
                }
        };
 
-} ( mediaWiki, jQuery ) );
+}( mediaWiki, jQuery ) );
index f6ea1b4..a87721b 100644 (file)
@@ -46,7 +46,7 @@
        } );
 
        QUnit.test( 'updateTooltipAccessKeys - current browser', 2, function ( assert ) {
-               var title = $( makeInput ( 'Title', 'a' ) ).updateTooltipAccessKeys().prop( 'title' ),
+               var title = $( makeInput( 'Title', 'a' ) ).updateTooltipAccessKeys().prop( 'title' ),
                        //The new title should be something like "Title [alt-a]", but the exact label will depend on the browser.
                        //The "a" could be capitalized, and the prefix could be anything, e.g. a simple "^" for ctrl-
                        //(no browser is known using such a short prefix, though) or "Alt+Umschalt+" in German Firefox.
index bbea829..78c185f 100644 (file)
@@ -1,10 +1,10 @@
-(function ($) {
+( function ($) {
 
        QUnit.module('jquery.placeholder', QUnit.newMwEnvironment());
 
        QUnit.test('caches results of feature tests', 2, function (assert) {
-               assert.strictEqual(typeof $.fn.placeholder.input, 'boolean', '$.fn.placeholder.input');
-               assert.strictEqual(typeof $.fn.placeholder.textarea, 'boolean', '$.fn.placeholder.textarea');
+               assert.strictEqual( typeof $.fn.placeholder.input, 'boolean', '$.fn.placeholder.input');
+               assert.strictEqual( typeof $.fn.placeholder.textarea, 'boolean', '$.fn.placeholder.textarea');
        });
 
        if ($.fn.placeholder.input && $.fn.placeholder.textarea) {
index ece5116..28d6d92 100644 (file)
@@ -80,7 +80,7 @@
                                only: 'scripts'
                        },
                        dataType: 'script'
-               } ).done(function () {
+               } ).done( function () {
                                mwLanguageCache[langCode].fire( mw.language );
                        } ).fail( function () {
                                mwLanguageCache[langCode].fire( false );