Jforrester has uploaded a new change for review.
https://gerrit.wikimedia.org/r/189637
Change subject: build: Bump various devDependencies
......................................................................
build: Bump various devDependencies
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, with the big ones postponed for now.
Change-Id: I5f2348c3cf96cf5aa20eeb9083300155b3920c5b
---
M .jscsrc
M package.json
M resources/src/jquery/jquery.mwExtension.js
M resources/src/jquery/jquery.placeholder.js
M resources/src/jquery/jquery.textSelection.js
M resources/src/mediawiki.action/mediawiki.action.view.postEdit.js
M resources/src/mediawiki.special/mediawiki.special.pageLanguage.js
M resources/src/mediawiki/mediawiki.cookie.js
M tests/qunit/suites/resources/jquery/jquery.accessKeyLabel.test.js
M tests/qunit/suites/resources/jquery/jquery.placeholder.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
11 files changed, 31 insertions(+), 26 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/37/189637/1
diff --git a/.jscsrc b/.jscsrc
index 2ebd40e..34b2435 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -3,6 +3,10 @@
"disallowKeywordsOnNewLine": null,
"disallowQuotedKeysInObjects": null,
+ "disallowImplicitTypeConversion": null,
+ "requireLineBreakAfterVariableAssignment": null,
+ "requireSpaceAfterLineComment": null,
+ "requireSpacesInsideParentheses": null,
"requireSpacesInsideArrayBrackets": null,
"validateIndentation": null
}
diff --git a/package.json b/package.json
index 6bbcf39..4ef12ba 100644
--- a/package.json
+++ b/package.json
@@ -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"
}
}
diff --git a/resources/src/jquery/jquery.mwExtension.js
b/resources/src/jquery/jquery.mwExtension.js
index dc7aaa4..e6e33ad 100644
--- a/resources/src/jquery/jquery.mwExtension.js
+++ b/resources/src/jquery/jquery.mwExtension.js
@@ -15,16 +15,16 @@
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
diff --git a/resources/src/jquery/jquery.placeholder.js
b/resources/src/jquery/jquery.placeholder.js
index d458019..d50422e 100644
--- a/resources/src/jquery/jquery.placeholder.js
+++ b/resources/src/jquery/jquery.placeholder.js
@@ -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({
@@ -114,12 +114,12 @@
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);
});
@@ -127,7 +127,7 @@
// Clear placeholder values upon page reload
$(window).bind('beforeunload.placeholder', function () {
- $('.placeholder').each(function () {
+ $('.placeholder').each( function () {
this.value = '';
});
});
diff --git a/resources/src/jquery/jquery.textSelection.js
b/resources/src/jquery/jquery.textSelection.js
index bd6518d..e8fc8e4 100644
--- a/resources/src/jquery/jquery.textSelection.js
+++ b/resources/src/jquery/jquery.textSelection.js
@@ -211,9 +211,10 @@
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.
diff --git a/resources/src/mediawiki.action/mediawiki.action.view.postEdit.js
b/resources/src/mediawiki.action/mediawiki.action.view.postEdit.js
index 95ef62c..c008dfd 100644
--- a/resources/src/mediawiki.action/mediawiki.action.view.postEdit.js
+++ b/resources/src/mediawiki.action/mediawiki.action.view.postEdit.js
@@ -76,4 +76,4 @@
mw.cookie.set( cookieKey, null );
}
-} ( mediaWiki, jQuery ) );
+}( mediaWiki, jQuery ) );
diff --git a/resources/src/mediawiki.special/mediawiki.special.pageLanguage.js
b/resources/src/mediawiki.special/mediawiki.special.pageLanguage.js
index ba7f734..7c2269f 100644
--- a/resources/src/mediawiki.special/mediawiki.special.pageLanguage.js
+++ b/resources/src/mediawiki.special/mediawiki.special.pageLanguage.js
@@ -6,4 +6,4 @@
$( '#mw-pl-options-2' ).prop( 'checked', true );
} );
} );
-} ( jQuery ) );
+}( jQuery ) );
diff --git a/resources/src/mediawiki/mediawiki.cookie.js
b/resources/src/mediawiki/mediawiki.cookie.js
index 85f4ffa..73e7f6e 100644
--- a/resources/src/mediawiki/mediawiki.cookie.js
+++ b/resources/src/mediawiki/mediawiki.cookie.js
@@ -124,4 +124,4 @@
}
};
-} ( mediaWiki, jQuery ) );
+}( mediaWiki, jQuery ) );
diff --git a/tests/qunit/suites/resources/jquery/jquery.accessKeyLabel.test.js
b/tests/qunit/suites/resources/jquery/jquery.accessKeyLabel.test.js
index f6ea1b4..a87721b 100644
--- a/tests/qunit/suites/resources/jquery/jquery.accessKeyLabel.test.js
+++ b/tests/qunit/suites/resources/jquery/jquery.accessKeyLabel.test.js
@@ -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.
diff --git a/tests/qunit/suites/resources/jquery/jquery.placeholder.test.js
b/tests/qunit/suites/resources/jquery/jquery.placeholder.test.js
index bbea829..78c185f 100644
--- a/tests/qunit/suites/resources/jquery/jquery.placeholder.test.js
+++ b/tests/qunit/suites/resources/jquery/jquery.placeholder.test.js
@@ -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) {
diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
b/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
index ece5116..28d6d92 100644
--- a/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
+++ b/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
@@ -80,7 +80,7 @@
only: 'scripts'
},
dataType: 'script'
- } ).done(function () {
+ } ).done( function () {
mwLanguageCache[langCode].fire( mw.language );
} ).fail( function () {
mwLanguageCache[langCode].fire( false );
--
To view, visit https://gerrit.wikimedia.org/r/189637
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5f2348c3cf96cf5aa20eeb9083300155b3920c5b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jforrester <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits