Skip to content

Commit

Permalink
eslint rule for use strict in modules has changed so we don't need …
Browse files Browse the repository at this point in the history
…it any more.

also a few cases of enforcing consistent returns.
  • Loading branch information
tmcgee committed Apr 5, 2016
1 parent 4ab37f7 commit b125888
Show file tree
Hide file tree
Showing 50 changed files with 18 additions and 61 deletions.
1 change: 0 additions & 1 deletion viewer/js/config/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(function () {
'use strict';
var path = location.pathname.replace(/[^\/]+$/, '');
window.dojoConfig = {
async: true,
Expand Down
1 change: 0 additions & 1 deletion viewer/js/config/basemaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ define([
//'esri/dijit/Basemap',
//'esri/dijit/BasemapLayer'
], function (/* Basemap, BasemapLayer */) {
'use strict';

return {
map: true, // needs a reference to the map
Expand Down
2 changes: 1 addition & 1 deletion viewer/js/config/find.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*eslint strict: 0, no-console: 0, no-alert: 0*/
/*eslint no-console: 0, no-alert: 0*/
define({
map: true,
zoomExtentFactor: 2,
Expand Down
1 change: 0 additions & 1 deletion viewer/js/config/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ define([
'esri/tasks/GeometryService',
'esri/layers/ImageParameters'
], function (units, Extent, esriConfig, /*urlUtils,*/ GeometryService, ImageParameters) {
'use strict';

// url to your proxy page, must be on same machine hosting you app. See proxy folder for readme.
esriConfig.defaults.io.proxyUrl = 'proxy/proxy.ashx';
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/Basemaps.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint strict: 0*/
define([
'dojo/_base/declare',
'dijit/_WidgetBase',
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/Bookmarks.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint strict: 0*/
define([
'dojo/_base/declare',
'dijit/_WidgetBase',
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/Directions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint strict: 0*/
define([
'dojo/_base/declare',
'dijit/_WidgetBase',
Expand Down
2 changes: 0 additions & 2 deletions viewer/js/gis/dijit/Draw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint strict: 0*/
define([
'dojo/_base/declare',
'dijit/_WidgetBase',
Expand Down Expand Up @@ -216,7 +215,6 @@ define([
} else {
return false;
}
return false;

},
onLayoutChange: function (open) {
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/Editor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint strict: 0*/
define([
'dojo/_base/declare',
'dijit/_WidgetBase',
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/Find.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint strict: 0*/
define([
'dojo/_base/declare',
'dijit/_WidgetBase',
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/FloatingTitlePane.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint strict: 0*/
define([
'dojo/_base/declare',
'dijit/TitlePane',
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/FloatingWidgetDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ define([
'dojo/_base/declare',
'dijit/Dialog'
], function (declare, Dialog) {
'use strict';

return declare([Dialog], {
declaredClass: 'gis.dijit.FloatingWidget',
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/Geocoder.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint strict: 0*/
// adapted from https://github.com/esri/arcgis-dijit-geocoder-button-js/
define([
'dojo/_base/declare',
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/Growler.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint strict: 0*/
define([
'dojo/_base/declare',
'dijit/_WidgetBase',
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/Help.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint strict: 0*/
define([
'dojo/_base/declare',
'dijit/_WidgetBase',
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/Identify.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint strict: 0*/
define([
'dojo/_base/declare',
'dijit/_WidgetBase',
Expand Down
9 changes: 4 additions & 5 deletions viewer/js/gis/dijit/LayerControl.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint strict: 0*/
define([
'dojo/_base/declare',
'dojo/_base/array',
Expand Down Expand Up @@ -181,7 +180,7 @@ define([
this._vectorContainer.getChildren().filter(function (c) {
return _filterList(c);
})).concat(
this.getChildren().filter(function (c) {
this.getChildren().filter(function (c) {
return _filterList(c);
}));
// follow the same logic as when the layers were added
Expand Down Expand Up @@ -237,10 +236,10 @@ define([
_applyLayerControlOptions: function (controlOptions, layer) {
if (typeof controlOptions.includeUnspecifiedLayers === 'undefined' && typeof controlOptions.subLayerInfos === 'undefined' && typeof controlOptions.excludedLayers === 'undefined') {
return;
}
}
var esriLayerInfos = [];
// Case 1: only show the layers that are explicitly listed
if (!controlOptions.includeUnspecifiedLayers && controlOptions.subLayerInfos && controlOptions.subLayerInfos.length !== 0) {
if (!controlOptions.includeUnspecifiedLayers && controlOptions.subLayerInfos && controlOptions.subLayerInfos.length !== 0) {
var subLayerInfos = array.map(controlOptions.subLayerInfos, function (sli) {
return sli.id;
});
Expand Down Expand Up @@ -276,7 +275,7 @@ define([
}), function (l) {
return l.id;
});
layer.setVisibleLayers(visibleIds);
layer.setVisibleLayers(visibleIds);
},
_mixinLayerInfos: function (esriLayerInfos, subLayerInfos) {
// for each of the sublayers, go through the subLayerInfos from the controlOptions and see if defaultVisiblity is set to true or false
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/LayerControl/controls/CSV.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ define([
_Control,
legendUtil
) {
'use strict';

var CSVControl = declare([_WidgetBase, _TemplatedMixin, _Contained, _Control], {
_layerType: 'vector', // constant
Expand Down
7 changes: 3 additions & 4 deletions viewer/js/gis/dijit/LayerControl/controls/Dynamic.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ define([
legendUtil,
i18n
) {
'use strict';

var DynamicControl = declare([_WidgetBase, _TemplatedMixin, _Contained, _Control], {
_layerType: 'overlay', // constant
Expand Down Expand Up @@ -100,8 +99,8 @@ define([
_createSublayers: function (layer) {
// check for single sublayer - if so no sublayer/folder controls
if (layer.layerInfos.length > 1) {
var allLayers = array.map(layer.layerInfos, function (l) {
return l.id;
var allLayers = array.map(layer.layerInfos, function (l) {
return l.id;
});
array.forEach(layer.layerInfos, lang.hitch(this, function (info) {
// see if there was any override needed from the subLayerInfos array in the controlOptions
Expand All @@ -113,7 +112,7 @@ define([
slids = info.subLayerIds,
controlId = layer.id + '-' + info.id + '-sublayer-control',
control;
// it's a top level
// it's a top level
if (pid === -1 || allLayers.indexOf(pid) === -1) {
if (slids === null) {
// it's a top level sublayer
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/LayerControl/controls/Feature.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ define([
_Control,
legendUtil
) {
'use strict';

var FeatureControl = declare([_WidgetBase, _TemplatedMixin, _Contained, _Control], {
_layerType: 'vector', // constant
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/LayerControl/controls/GeoRSS.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ define([
_Contained,
_Control
) {
'use strict';

var GeoRSSControl = declare([_WidgetBase, _TemplatedMixin, _Contained, _Control], {
_layerType: 'vector', // constant
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/LayerControl/controls/Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ define([
_Control,
legendUtil
) {
'use strict';

var ImageControl = declare([_WidgetBase, _TemplatedMixin, _Contained, _Control], {
_layerType: 'overlay', // constant
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/LayerControl/controls/ImageVector.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ define([
_Control,
legendUtil
) {
'use strict';

var ImageVectorControl = declare([_WidgetBase, _TemplatedMixin, _Contained, _Control], {
_layerType: 'overlay', // constant
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/LayerControl/controls/KML.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ define([
_Control,
legendUtil
) {
'use strict';

var KMLControl = declare([_WidgetBase, _TemplatedMixin, _Contained, _Control], {
_layerType: 'vector', // constant
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/LayerControl/controls/Raster.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ define([
_Contained,
_Control
) {
'use strict';

var RasterControl = declare([_WidgetBase, _TemplatedMixin, _Contained, _Control], {
_layerType: 'overlay', // constant
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/LayerControl/controls/Stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ define([
_Control,
legendUtil
) {
'use strict';

var StreamControl = declare([_WidgetBase, _TemplatedMixin, _Contained, _Control], {
_layerType: 'overlay', // constant
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/LayerControl/controls/Tiled.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ define([
_Control,
legendUtil
) {
'use strict';

var TiledControl = declare([_WidgetBase, _TemplatedMixin, _Contained, _Control], {
_layerType: 'overlay', // constant
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/LayerControl/controls/VectorTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ define([
_Contained,
_Control
) {
'use strict';

var VectorTileControl = declare([_WidgetBase, _TemplatedMixin, _Contained, _Control], {
_layerType: 'overlay', // constant
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/LayerControl/controls/WFS.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ define([
_Contained,
_Control
) {
'use strict';

var WFSControl = declare([_WidgetBase, _TemplatedMixin, _Contained, _Control], {
_layerType: 'vector', // constant
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/LayerControl/controls/WMS.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ define([
_Contained,
_Control
) {
'use strict';

var WMSControl = declare([_WidgetBase, _TemplatedMixin, _Contained, _Control], {
_layerType: 'overlay', // constant
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/LayerControl/controls/WebTiled.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ define([
_Contained,
_Control
) {
'use strict';

var WebTiledControl = declare([_WidgetBase, _TemplatedMixin, _Contained, _Control], {
_layerType: 'overlay', // constant
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/LayerControl/controls/_Control.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint strict: 0*/
define([
'dojo/_base/declare',
'dojo/_base/lang',
Expand Down
5 changes: 2 additions & 3 deletions viewer/js/gis/dijit/LayerControl/controls/_DynamicFolder.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint strict: 0*/
define([
'dojo/_base/declare',
'dojo/_base/lang',
Expand Down Expand Up @@ -119,8 +118,8 @@ define([
},
destroy: function () {
this.inherited(arguments);
this._handlers.forEach(function (h) {
h.remove();
this._handlers.forEach(function (h) {
h.remove();
});
}
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint strict: 0*/
define([
'dojo/_base/declare',
'dojo/_base/lang',
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/LayerControl/plugins/LayerMenu.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint strict: 0*/
define([
'dojo/_base/declare',
'dijit/Menu',
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/LayerControl/plugins/Transparency.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint strict: 0*/
/* transparency component */
define([
'dojo/_base/declare',
Expand Down
5 changes: 3 additions & 2 deletions viewer/js/gis/dijit/LayerControl/plugins/legendUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ define([
esriBundle,
i18n
) {
'use strict';

esriBundle.widgets.legend.NLS_noLegend = i18n.noLegend;

Expand All @@ -55,6 +54,7 @@ define([
return false;
}
}
return false;
},
// request legend json
_legendRequest: function (layer, expandNode, callback, errback) {
Expand Down Expand Up @@ -335,8 +335,9 @@ define([
param.push(e);
}
}, this);
return JSON.stringify(param);
return JSON.stringify(param);
}
return null;
}
};
});
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/LocateButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ define([
'esri/InfoTemplate',
'dojo/topic'
], function (declare, lang, LocateButton, SimpleRenderer, PictureMarkerSymbol, GraphicsLayer, InfoTemplate, topic) {
'use strict';

return declare(null, {
growlTemplate: 'latitude: {latitude}<br/>longitude: {longitude}<br/>accuracy: {accuracy}<br/>altitude: {altitude}<br/>altitude accuracy: {altitudeAccuracy}<br/>heading: {heading}<br/>speed: {speed}',
Expand Down
2 changes: 1 addition & 1 deletion viewer/js/gis/dijit/MapInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ define([
topic,
proj4
) {
'use strict';

return declare([WidgetBase, TemplatedMixin], {
map: null,
mode: 'map',
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/Measurement.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint strict: 0*/
define([
'dojo/_base/declare',
'dijit/_WidgetBase',
Expand Down
2 changes: 1 addition & 1 deletion viewer/js/gis/dijit/Print.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*eslint strict: 0, no-eval: 0 */
/*eslint no-eval: 0 */
define([
'dojo/_base/declare',
'dijit/_WidgetBase',
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/StreetView.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/*global google */
/*eslint strict: 0*/
define([
'dojo/_base/declare',
'dijit/_WidgetBase',
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/Vim.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ define([
'dojo/_base/unload',
'dojo/_base/lang'
], function (declare, kernel, cookie, JSON, baseUnload, lang) {
'use strict';

return declare(null, {
constructor: function (idStateName) {
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/dijit/_FloatingWidgetMixin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*eslint strict: 0*/
define([
'dojo/_base/declare',
'dojo/on',
Expand Down
1 change: 0 additions & 1 deletion viewer/js/gis/plugins/async.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
define(function () {
'use strict';

var cb = '_asyncApiLoaderCallback';
return {
Expand Down
1 change: 0 additions & 1 deletion viewer/js/viewer/_ConfigMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ define([
lang,
Deferred
) {
'use strict';

return declare(null, {

Expand Down
2 changes: 1 addition & 1 deletion viewer/js/viewer/_ControllerBase.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*eslint strict: 0, no-console: 0*/
/*eslint no-console: 0*/
define([
'dojo/_base/declare',
'dojo/_base/lang'
Expand Down
Loading

0 comments on commit b125888

Please sign in to comment.