jenkins-bot has submitted this change and it was merged.

Change subject: Update Grunt dependencies to allow us to use jscs autofixing
......................................................................


Update Grunt dependencies to allow us to use jscs autofixing

A more recent version of jscs automatically fixes any issues with your
code similar to how jsbeautify works. This change updates our dev tools
so that we can take advantage of this and removes the use of jsbeautify
in MobileFrontend.

Additional changes:
* jscs disable is now more explicit
* Correct issue with documentation in ReferencesGateway that causes jscs
to break
* Add abstract tag to ReferencesGateway class

Change-Id: I709afb9aff9af826dcf6c88b5d9ca846ec2ff6a7
---
M Gruntfile.js
M package.json
M resources/mobile.references.gateway/ReferencesGateway.js
3 files changed, 19 insertions(+), 14 deletions(-)

Approvals:
  Jhobs: Looks good to me, but someone else must approve
  Bmansurov: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Gruntfile.js b/Gruntfile.js
index 0ff4bf1..7992320 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -24,6 +24,10 @@
                        }
                },
                jscs: {
+                       options: {
+                               config: '.jscsrc',
+                               fix: true
+                       },
                        main: [
                                '**/*.js',
                                '!tests/qunit/**'
diff --git a/package.json b/package.json
index 7ca8d9f..895e04f 100644
--- a/package.json
+++ b/package.json
@@ -6,19 +6,18 @@
                "doc": "bundle exec jsduck"
        },
        "dependencies": {
-               "jsdoc": "<=3.3.0",
+               "jsdoc": "3.4.2",
                "svgo": ">=0.4.4"
        },
        "devDependencies": {
-               "grunt": "1.0.1",
-               "grunt-banana-checker": "0.5.0",
-               "grunt-contrib-jshint": "1.0.0",
-               "grunt-contrib-watch": "1.0.0",
-               "grunt-jscs": "2.8.0",
-               "grunt-jsonlint": "1.0.8",
-               "grunt-notify": "0.4.5",
-               "grunt-stylelint": "0.6.0",
-               "js-beautify": "1.5.10",
-               "stylelint-config-wikimedia": "0.3.0"
+               "grunt": "^1.0.1",
+               "grunt-banana-checker": "^0.5.0",
+               "grunt-contrib-jshint": "^1.0.0",
+               "grunt-contrib-watch": "^1.0.0",
+               "grunt-jscs": "^3.0.1",
+               "grunt-jsonlint": "^1.1.0",
+               "grunt-notify": "^0.4.5",
+               "grunt-stylelint": "^0.6.0",
+               "stylelint-config-wikimedia": "^0.3.0"
        }
 }
diff --git a/resources/mobile.references.gateway/ReferencesGateway.js 
b/resources/mobile.references.gateway/ReferencesGateway.js
index 7f5345f..6f63610 100644
--- a/resources/mobile.references.gateway/ReferencesGateway.js
+++ b/resources/mobile.references.gateway/ReferencesGateway.js
@@ -4,6 +4,7 @@
         * Gateway for retrieving references
         *
         * @class ReferencesGateway
+        * @abstract
         * @param {mw.Api} api
         */
        function ReferencesGateway( api ) {
@@ -11,7 +12,8 @@
        }
 
        OO.mfExtend( ReferencesGateway, {
-               // jscs:disable
+               // jscs:disable jsDoc
+               // (Disabled as signature does not match the abstract base 
class arguments/return value)
                /**
                 * Return the matched reference via API or DOM query
                 *
@@ -19,12 +21,12 @@
                 * @param {String} id CSS selector
                 * @param {Page} page to find reference for
                 * @returns {jQuery.Promise} resolves with an Object 
representing reference with a `text` property
-                         or false if the reference does not exist
+                *  or false if the reference does not exist
                 */
                getReference: function () {
                        throw new Error( 'Method unimplemented' );
                }
-               // jscs:enable
+               // jscs:enable jsDoc
        } );
 
        M.define( 'mobile.references.gateway/ReferencesGateway', 
ReferencesGateway );

-- 
To view, visit https://gerrit.wikimedia.org/r/315322
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I709afb9aff9af826dcf6c88b5d9ca846ec2ff6a7
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org>
Gerrit-Reviewer: Bmansurov <bmansu...@wikimedia.org>
Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org>
Gerrit-Reviewer: Jhobs <jhob...@wikimedia.org>
Gerrit-Reviewer: Phuedx <samsm...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to