From 06cdfe7acb2917f229eb57fada6056c330db2711 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Wed, 19 Aug 2015 10:26:19 -0700 Subject: [PATCH] build: Enable jscs rule 'requireDotNotation' and make pass Change-Id: I2586e6959c3bbc7e4204242fc65551747c0e25a9 --- .jscsrc | 1 - modules/ve-mw/dm/models/ve.dm.MWMediaResourceProvider.js | 4 ++-- modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.jscsrc b/.jscsrc index 0552ba9888..027f3287f1 100644 --- a/.jscsrc +++ b/.jscsrc @@ -1,7 +1,6 @@ { "preset": "wikimedia", - "requireDotNotation": null, "requireSpacesInsideBrackets": null, "requireVarDeclFirst": null, "jsDoc": null diff --git a/modules/ve-mw/dm/models/ve.dm.MWMediaResourceProvider.js b/modules/ve-mw/dm/models/ve.dm.MWMediaResourceProvider.js index 0ec5e2e490..9836865360 100644 --- a/modules/ve-mw/dm/models/ve.dm.MWMediaResourceProvider.js +++ b/modules/ve-mw/dm/models/ve.dm.MWMediaResourceProvider.js @@ -166,9 +166,9 @@ ve.dm.MWMediaResourceProvider.prototype.fetchAPIresults = function ( howMany ) { return []; } - if ( data[ 'continue' ] ) { + if ( data.continue ) { // Update the offset for next time - provider.setOffset( data[ 'continue' ].gsroffset ); + provider.setOffset( data.continue.gsroffset ); } else { // This is the last available set of results. Mark as depleted! provider.toggleDepleted( true ); diff --git a/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js b/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js index d68fbbab08..012b1e6e4f 100644 --- a/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js +++ b/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js @@ -208,7 +208,7 @@ ve.dm.MWTemplateSpecModel.prototype.getParameterDescription = function ( name, l * @returns {string} Default parameter value */ ve.dm.MWTemplateSpecModel.prototype.getParameterDefaultValue = function ( name ) { - return this.params[name]['default']; + return this.params[name].default; }; /**