jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/369344 )
Change subject: build: bump grunt-jscs to 2.1.0 ...................................................................... build: bump grunt-jscs to 2.1.0 Avoid a peer dependency incompatibility with grunt Update file comment /** -> /*! per T119193 Ignore requireSpacesInsideBrackets for sake of simplicity. Update param/returns doc in resources/importarticles.js Change-Id: If81ad41eaf4b3ea9405f15b8a2d20c4b83ba5a56 --- M .jscsrc M package.json M resources/importarticles.js 3 files changed, 12 insertions(+), 10 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/.jscsrc b/.jscsrc index 9d22e3f..713de07 100644 --- a/.jscsrc +++ b/.jscsrc @@ -1,3 +1,4 @@ { - "preset": "wikimedia" + "preset": "wikimedia", + "requireSpacesInsideBrackets": false } diff --git a/package.json b/package.json index 47a6b83..978f941 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "grunt": "1.0.1", "grunt-banana-checker": "0.4.0", "grunt-contrib-jshint": "0.11.2", - "grunt-jscs": "1.8.0", + "grunt-jscs": "2.1.0", "grunt-jsonlint": "1.1.0" } } diff --git a/resources/importarticles.js b/resources/importarticles.js index c74e21d..76ee067 100644 --- a/resources/importarticles.js +++ b/resources/importarticles.js @@ -1,4 +1,4 @@ -/** +/*! * Import JavaScript and Stylesheet articles. * * @version 1.3 @@ -9,9 +9,9 @@ /** * Call the api and send the data then output the return * - * @param {Array} The data to use. - * @param String The method to use: either 'GET' or 'POST'. - * @param Function The function to call back to. + * @param {Array} data The data to use. + * @param {string} method The method to use: either 'GET' or 'POST'. + * @param {Function} callback The function to call back to. */ function callAPI( data, method, callback ) { data.format = 'json'; @@ -49,9 +49,9 @@ * ] * }); * - * @param String The type to load: Either 'script' or 'style'. - * @param (String/{Array}) The file(s) to load. - * @returns Boolean Whether success or fail + * @param {string} type The type to load: Either 'script' or 'style'. + * @param {string|Array} pages The file(s) to load. + * @return {boolean} Whether success or fail */ function importArticles( type, pages ) { var page, @@ -80,7 +80,8 @@ query, 'GET', function ( response ) { - for ( var i = 0; i < response.query.pageids.length; i++ ) { + var i; + for ( i = 0; i < response.query.pageids.length; i++ ) { page = response.query.pages[response.query.pageids[i]]; if ( response.query.pageids[i] === '-1' ) { mw.error( 'The page does not exist: ' + page.title ); -- To view, visit https://gerrit.wikimedia.org/r/369344 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If81ad41eaf4b3ea9405f15b8a2d20c4b83ba5a56 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ImportArticles Gerrit-Branch: master Gerrit-Owner: Hashar <has...@free.fr> Gerrit-Reviewer: Cblair91 <cblai...@gmail.com> Gerrit-Reviewer: Legoktm <lego...@member.fsf.org> Gerrit-Reviewer: Reedy <re...@wikimedia.org> Gerrit-Reviewer: Umherirrender <umherirrender_de...@web.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits