Merge "jshint: Enable 'es3' option"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 10 Apr 2014 07:40:34 +0000 (07:40 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 10 Apr 2014 07:40:34 +0000 (07:40 +0000)
.jshintrc
resources/src/mediawiki/mediawiki.debug.profile.js
resources/src/mediawiki/mediawiki.jqueryMsg.js
skins/common/IEFixes.js
tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.test.js
tests/qunit/suites/resources/startup.test.js

index 9d6c4d2..4eec7a0 100644 (file)
--- a/.jshintrc
+++ b/.jshintrc
@@ -3,6 +3,7 @@
 
        // Enforcing
        "eqeqeq": true,
+       "es3": true,
        "latedef": true,
        "noarg": true,
        "nonew": true,
index f6bc81d..9b0711a 100644 (file)
                                        [ tail, 8 ],
                                        [ tail, 19 ],
                                        [ tail - 8, 8 ],
-                                       [ tail, 8 ],
+                                       [ tail, 8 ]
                                ] ) );
                                g.appendChild( node );
 
                                trigger: 'manual',
                                title: function () {
                                        return profile.buildFlyout( $( this ).data( 'period' ) ).html();
-                               },
+                               }
                        } ).on( 'mouseenter', function () {
                                hide();
                                addClass( this, 'tipsy-visible' );
                 */
                xCoord: function ( msTimestamp ) {
                        return ( msTimestamp - profile.data.timespan.start ) * profile.ratio;
-               },
+               }
        };
 
        function ProfileData( data, width, mergeThresholdPx, dropThresholdPx ) {
                return Object.keys( groups ).map( function ( group ) {
                        return {
                                name: group,
-                               events: groups[group],
+                               events: groups[group]
                        };
                } );
        };
                                return [{
                                        start: period.start,
                                        end: period.end,
-                                       contained: [period],
+                                       contained: [period]
                                }];
                        }
                        var last = result[result.length - 1];
                                result.push({
                                        start: period.start,
                                        end: period.end,
-                                       contained: [period],
+                                       contained: [period]
                                });
                        }
                        return result;
index 0a0b4f6..8ea71d9 100644 (file)
                 * @param {Array} nodes List of nodes
                 * @return {string} Other message
                 */
-               int: function ( nodes ) {
+               'int': function ( nodes ) {
                        return mw.jqueryMsg.getMessageFunction()( nodes[0].toLowerCase() );
                },
 
index 03f133e..3174af1 100644 (file)
@@ -91,7 +91,7 @@ relativeforfloats = window.relativeforfloats = function () {
 setrelative = window.setrelative = function ( nodes ) {
        var i = 0;
        while ( i < nodes.length ) {
-               if ( ( ( nodes[i].style.float && nodes[i].style.float !== ( 'none' ) ||
+               if ( ( ( nodes[i].style['float'] && nodes[i].style['float'] !== ( 'none' ) ||
                        ( nodes[i].align && nodes[i].align !== ( 'none' ) ) ) &&
                        ( !nodes[i].style.position || nodes[i].style.position !== 'relative' ) ) )
                {
index f49be49..f5fd16d 100644 (file)
@@ -1,3 +1,4 @@
+/*jshint -W024 */
 ( function ( mw, $ ) {
        // mw.Title relies on these three config vars
        // Restore them after each test run
index b6a8a46..7a58d38 100644 (file)
@@ -1,3 +1,4 @@
+/*jshint -W024 */
 ( function ( mw, $ ) {
        QUnit.module( 'mediawiki.Uri', QUnit.newMwEnvironment( {
                setup: function () {
index 8fd789a..4e26bdc 100644 (file)
@@ -73,7 +73,7 @@
                        'Mozilla/5.0 (Series40; NokiaX3-02/05.60; Profile/MIDP-2.1 Configuration/CLDC-1.1) Gecko/20100401 S40OviBrowser/3.2.0.0.6',
                        'Mozilla/5.0 (Series40; Nokia305/05.92; Profile/MIDP-2.1 Configuration/CLDC-1.1) Gecko/20100401 S40OviBrowser/3.7.0.0.11',
                        // Google Glass
-                       'Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; Glass 1 Build/IMM76L; XE11) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30',
+                       'Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; Glass 1 Build/IMM76L; XE11) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30'
                ],
                // No explicit support for or against these browsers, they're
                // given a shot at Grade A at their own risk.