diff --git a/assets/.eslintrc b/assets/.eslintrc index 7045aac502670e62fbab75eadde858c233dabea3..093d45a337a4b3fa88d0d30a82d3db0f7529807c 100644 --- a/assets/.eslintrc +++ b/assets/.eslintrc @@ -14,6 +14,7 @@ "array-bracket-spacing": ["error", "never"], "brace-style": ["error","1tbs", {}], "comma-dangle": [2,"never"], + "comma-spacing": ["error", { "before": false, "after": true }], "curly": "error", "linebreak-style": ["error", "unix"], "no-console": "off", diff --git a/assets/src/scripts/d3-rendering/tick-marks.js b/assets/src/scripts/d3-rendering/tick-marks.js index a90131e2fda11a3d15d22658e9c4dbafc399e7dc..ce2de3eea81df571ea0e4b96a791b3eb808d25af 100644 --- a/assets/src/scripts/d3-rendering/tick-marks.js +++ b/assets/src/scripts/d3-rendering/tick-marks.js @@ -93,68 +93,68 @@ export const generateTimeTicks = function(startMillis, endMillis, ianaTimeZone) if (dayCount <= 3) { // Generates 4 tick marks that are on the start of a hour result = { - dates: getDefaultTicks(startMillis, endMillis,'minute', 3, ianaTimeZone), + dates: getDefaultTicks(startMillis, endMillis, 'minute', 3, ianaTimeZone), format: formatFnc('MMM dd hh:mm a') }; } else if (dayCount > 3 && dayCount <= 8) { // Tick marks every day result = { - dates: getTicks(startDateTime, endDateTime,{days: 1}, {days: 1}), + dates: getTicks(startDateTime, endDateTime, {days: 1}, {days: 1}), format: formatFnc('MMM dd') }; } else if (dayCount > 8 && dayCount <= 15) { // Tick marks every other day result = { - dates: getTicks(startDateTime, endDateTime,{days: 2}, {days: 1}), + dates: getTicks(startDateTime, endDateTime, {days: 2}, {days: 1}), format: formatFnc('MMM dd') }; } else if (dayCount > 15 && dayCount <= 29) { //Tick marks every fourth day result = { - dates: getTicks(startDateTime, endDateTime,{days: 4}, {days: 1}), + dates: getTicks(startDateTime, endDateTime, {days: 4}, {days: 1}), format: formatFnc('MMM dd') }; } else if (weekCount > 4 && weekCount <= 8) { //Tick marks every week result = { - dates: getTicks(startDateTime, endDateTime,{weeks: 1}, {days: 3}), + dates: getTicks(startDateTime, endDateTime, {weeks: 1}, {days: 3}), format: formatFnc('MMM dd') }; } else if (weekCount > 8 && weekCount <= 15) { // Tick marks every other week result = { - dates: getTicks(startDateTime, endDateTime,{weeks: 2}, {days: 7}), + dates: getTicks(startDateTime, endDateTime, {weeks: 2}, {days: 7}), format: formatFnc('MMM dd') }; } else if (weekCount > 15 && monthCount <= 8) { //Tick marks every month result = { - dates: getTicks(startDateTime, endDateTime,{months: 1}, {months : 1}), + dates: getTicks(startDateTime, endDateTime, {months: 1}, {months : 1}), format: formatFnc('MMM yyyy') }; } else if (monthCount > 8 && monthCount <= 15) { //Tick marks every other month result = { - dates: getTicks(startDateTime, endDateTime,{months: 2}, {months: 1}), + dates: getTicks(startDateTime, endDateTime, {months: 2}, {months: 1}), format: formatFnc('MMM yyyy') }; } else if (monthCount > 15 && monthCount <= 29) { // Tick marks every 4 months result = { - dates: getTicks(startDateTime, endDateTime,{months: 4}, {months: 2}), + dates: getTicks(startDateTime, endDateTime, {months: 4}, {months: 2}), format: formatFnc('MMM yyyy') }; } else if (monthCount > 29 && monthCount <= 43) { // Tick marks every 6 months result = { - dates: getTicks(startDateTime, endDateTime,{months: 6}, {months: 3}), + dates: getTicks(startDateTime, endDateTime, {months: 6}, {months: 3}), format: formatFnc('MMM yyyy') }; } else if (monthCount > 43 && yearCount <= 8) { // Tick marks every year result = { - dates: getTicks(startDateTime, endDateTime,{years: 1}, {years: 1}), + dates: getTicks(startDateTime, endDateTime, {years: 1}, {years: 1}), format: formatFnc('MMM yyyy') }; } else { diff --git a/assets/src/scripts/leaflet-rendering/map.js b/assets/src/scripts/leaflet-rendering/map.js index f86a44d0dbcbf204aa92137ee949b42ac4b4b6c1..62db89f8dbc9eaa449be1022c3d27a6df9f7c9df 100644 --- a/assets/src/scripts/leaflet-rendering/map.js +++ b/assets/src/scripts/leaflet-rendering/map.js @@ -13,7 +13,7 @@ import {tiledMapLayer} from 'esri-leaflet'; * @prop {String} tiledBaseMapLayer - To be added to initial base layer * @return {L.map} */ -export const createMap = function(divId, {center=[0,0], zoom=1}) { +export const createMap = function(divId, {center=[0, 0], zoom=1}) { L.Map.addInitHook('addHandler', 'gestureHandling', GestureHandling); const map = L.map(divId, { center: center, diff --git a/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/graph-brush.js b/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/graph-brush.js index e84a45ac9314ef8323df8e3aa3f64717c7c4dcd5..ce7f103b39e2aacf74aebe3e23514f638c8e3186 100644 --- a/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/graph-brush.js +++ b/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/graph-brush.js @@ -63,7 +63,7 @@ export const drawGraphBrush = function(container, store) { .attr('ga-on', 'click') .attr('ga-event-category', 'dv-hydrograph-interaction') .attr('ga-event-action', 'clickOnDVBrush') - .call(link(store,(elem, layout) => { + .call(link(store, (elem, layout) => { elem.attr('viewBox', `0 0 ${layout.width + layout.margin.left + layout.margin.right} ${layout.height + layout.margin.bottom + layout.margin.top}`); }, getBrushLayout )) @@ -71,13 +71,13 @@ export const drawGraphBrush = function(container, store) { svgTarget.append('text') .classed('brush-text-hint', true) .text('drag handles to change timeframe') - .call(link(store,(elem, layout) => elem.attr('transform', `translate(${layout.width / 2 + layout.margin.left}, ${BRUSH_HINT_TOP_POSITION})`), + .call(link(store, (elem, layout) => elem.attr('transform', `translate(${layout.width / 2 + layout.margin.left}, ${BRUSH_HINT_TOP_POSITION})`), getBrushLayout )); }) .call(svg => { svg.append('g') - .call(link(store,(elem, layout) => elem.attr('transform', `translate(${layout.margin.left},${layout.margin.top})`), + .call(link(store, (elem, layout) => elem.attr('transform', `translate(${layout.margin.left},${layout.margin.top})`), getBrushLayout )) .call(link(store, appendXAxis, createStructuredSelector({ diff --git a/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/graph-controls.test.js b/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/graph-controls.test.js index 970d30c47becd6e8c2bbd9e60358000c4275464b..bc72da7550d31ca8b852ee2b6ecb76e30d3bd017 100644 --- a/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/graph-controls.test.js +++ b/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/graph-controls.test.js @@ -13,11 +13,11 @@ describe('monitoring-location/components/dailyValueHydrograph/graphControls', () parameterCode: '72019', statisticCode: '00001', id: '1122' - },{ + }, { parameterCode: '72019', statisticCode: '00003', id: '1123' - },{ + }, { parameterCode: '62610', statisticCode: '00001', id: '1124' diff --git a/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/index.test.js b/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/index.test.js index 98403d68ab672a79f1946d0828abd0253fd40f43..70edce0d6afa928082c8c899db7c9f70352d86f9 100644 --- a/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/index.test.js +++ b/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/index.test.js @@ -19,11 +19,11 @@ describe('monitoring-location/components/dailyValueHydrograph/index', () => { parameterCode: '72019', statisticCode: '00001', id: '1122' - },{ + }, { parameterCode: '72019', statisticCode: '00003', id: '1123' - },{ + }, { parameterCode: '00060', statisticCode: '00001', id: '1124' diff --git a/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/time-series-graph.js b/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/time-series-graph.js index b78496483bac3c3067f0c93c7a95ffcde0e4203e..f48d112d9aa27de1eb103e64f7e453506ff2da23 100644 --- a/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/time-series-graph.js +++ b/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/time-series-graph.js @@ -148,7 +148,7 @@ export const drawTimeSeriesGraph = function(elem, store) { .append('svg') .attr('xmlns', 'http://www.w3.org/2000/svg') .classed('hydrograph-svg', true) - .call(link(store,(elem, layout) => { + .call(link(store, (elem, layout) => { elem.select('#dv-graph-clip').remove(); elem.attr('viewBox', `0 0 ${layout.width + layout.margin.left + layout.margin.right} ${layout.height + layout.margin.top + layout.margin.bottom}`) .append('clipPath') diff --git a/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/tooltip.js b/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/tooltip.js index 3771edf94f35fe9c6b64f3dd4d5a53cc9d11760c..afc73ffad5a8e403027afeaf5c1a7469aed197a0 100644 --- a/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/tooltip.js +++ b/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/tooltip.js @@ -90,7 +90,7 @@ export const drawTooltipCursorSlider = function(elem, store) { elem.append('svg') .classed('cursor-slider-svg', true) .attr('xmlns', 'http://www.w3.org/2000/svg') - .call(link(store,(elem, layout) => { + .call(link(store, (elem, layout) => { elem.attr('viewBox', `0 0 ${layout.width + layout.margin.left + layout.margin.right} 25`); }, getMainLayout)) .call(drawCursorSlider, store); diff --git a/assets/src/scripts/monitoring-location/components/hydrograph/graph-controls.js b/assets/src/scripts/monitoring-location/components/hydrograph/graph-controls.js index fee6f58a3371b43a67d3425094b1914e8795ef15..546ce7d8bf9cd344b4e983278fce499bfb1a7f02 100644 --- a/assets/src/scripts/monitoring-location/components/hydrograph/graph-controls.js +++ b/assets/src/scripts/monitoring-location/components/hydrograph/graph-controls.js @@ -59,7 +59,7 @@ export const drawGraphControls = function(elem, store, siteno) { } }) // Sets the state of the toggle - .call(link(store,function(elem, {checked, selectedTimeSpan, parameterCode}) { + .call(link(store, function(elem, {checked, selectedTimeSpan, parameterCode}) { elem.property('checked', checked) .attr('disabled', hasIVData(parameterCode) && @@ -100,7 +100,7 @@ export const drawGraphControls = function(elem, store, siteno) { } }) // Sets the state of the toggle - .call(link(store,function(elem, checked) { + .call(link(store, function(elem, checked) { elem.property('checked', checked); }, isVisible('median'))); diff --git a/assets/src/scripts/monitoring-location/components/hydrograph/index.test.js b/assets/src/scripts/monitoring-location/components/hydrograph/index.test.js index 28f764e0a4fe4df49fe70411f6ac919b88c0dd3b..50fd1336dab4b1b1a6425cb084026665dd2fab13 100644 --- a/assets/src/scripts/monitoring-location/components/hydrograph/index.test.js +++ b/assets/src/scripts/monitoring-location/components/hydrograph/index.test.js @@ -135,7 +135,7 @@ describe('monitoring-location/components/hydrograph module', () => { describe('Fetching initial hydrograph data', () => { it('With just parameter code set', () => { attachToNode(store, graphNode, INITIAL_PARAMETERS); - expect(retrieveHydrographDataSpy).toHaveBeenCalledWith('11112222', 'USGS',{ + expect(retrieveHydrographDataSpy).toHaveBeenCalledWith('11112222', 'USGS', { parameterCode: '72019', period: 'P7D', startTime: null, diff --git a/assets/src/scripts/monitoring-location/components/hydrograph/selectors/domain.test.js b/assets/src/scripts/monitoring-location/components/hydrograph/selectors/domain.test.js index 20ddf80cc0089478c8b30061ba29e4579a7fcbeb..b0a5179c9d6a23fc10843c2cd576cdd3697d6d14 100644 --- a/assets/src/scripts/monitoring-location/components/hydrograph/selectors/domain.test.js +++ b/assets/src/scripts/monitoring-location/components/hydrograph/selectors/domain.test.js @@ -85,8 +85,8 @@ describe('monitoring-location/components/hydrograph/selectors/domain module', () const yDomain = [-75, 15000]; const tickValues1 = [-1000, -100, -50, 50, 100, 1000]; const tickValues2 = [100, 200, 500, 1000]; - const expectedReturnedArray1 = [-30,-15,-10,-4,-2,30,15,10,4,2,-1000,-100,-50,50,100,1000]; - const expectedReturnedArray2 = [50,30,15,10,4,2,100,200,500,1000]; + const expectedReturnedArray1 = [-30, -15, -10, -4, -2, 30, 15, 10, 4, 2, -1000, -100, -50, 50, 100, 1000]; + const expectedReturnedArray2 = [50, 30, 15, 10, 4, 2, 100, 200, 500, 1000]; expect(getFullArrayOfAdditionalTickMarks(tickValues1, yDomain)).toEqual(expectedReturnedArray1); expect(getFullArrayOfAdditionalTickMarks(tickValues2, yDomain)).toEqual(expectedReturnedArray2); }); @@ -108,12 +108,12 @@ describe('monitoring-location/components/hydrograph/selectors/domain module', () const yDomain_2 = [3000, 15000]; const testTickValues_1 = [3, 35, 210, 490, 780]; const testTickValues_2 = [54, 201, 2120, 99345, 234222]; - const expectedReturnedArray_1_1 = [3,40,300,500,800]; - const expectedReturnedArray_1_2 = [300,500,800]; + const expectedReturnedArray_1_1 = [3, 40, 300, 500, 800]; + const expectedReturnedArray_1_2 = [300, 500, 800]; const expectedReturnedArray_1_3 = []; - const expectedReturnedArray_2_1 = [60,300,3000,100000,240000]; - const expectedReturnedArray_2_2 = [300,3000,100000,240000]; - const expectedReturnedArray_2_3 = [100000,240000]; + const expectedReturnedArray_2_1 = [60, 300, 3000, 100000, 240000]; + const expectedReturnedArray_2_2 = [300, 3000, 100000, 240000]; + const expectedReturnedArray_2_3 = [100000, 240000]; expect(getRoundedTickValues(testTickValues_1, yDomain_0)).toEqual(expectedReturnedArray_1_1); expect(getRoundedTickValues(testTickValues_1, yDomain_1)).toEqual(expectedReturnedArray_1_2); expect(getRoundedTickValues(testTickValues_1, yDomain_2)).toEqual(expectedReturnedArray_1_3); diff --git a/assets/src/scripts/monitoring-location/components/hydrograph/selectors/legend-data.test.js b/assets/src/scripts/monitoring-location/components/hydrograph/selectors/legend-data.test.js index f31f6ef4a9314664b6938e5fb15bf19ef857c571..933ca67413a59738a50be00145202daeeed37a19 100644 --- a/assets/src/scripts/monitoring-location/components/hydrograph/selectors/legend-data.test.js +++ b/assets/src/scripts/monitoring-location/components/hydrograph/selectors/legend-data.test.js @@ -70,7 +70,7 @@ describe('monitoring-location/components/hydrograph/selectors/legend-data', () = name: 'Very high', referenceCode: 'Operational limit - high-Public', referenceValue: '10' - },{ + }, { name: 'Very low', referenceCode: 'Operational limit - low-Public', referenceValue: '1' @@ -215,7 +215,7 @@ describe('monitoring-location/components/hydrograph/selectors/legend-data', () = name: 'Very high', referenceCode: 'Operational limit - high-Public', referenceValue: '10' - },{ + }, { name: 'Very low', referenceCode: 'Operational limit - low-Public', referenceValue: '1' @@ -283,7 +283,7 @@ describe('monitoring-location/components/hydrograph/selectors/legend-data', () = name: 'Very high', referenceCode: 'Operational limit - high-Public', referenceValue: '100' - },{ + }, { name: 'Very low', referenceCode: 'Operational limit - low-Public', referenceValue: '1' diff --git a/assets/src/scripts/monitoring-location/components/hydrograph/selectors/thresholds-data.test.js b/assets/src/scripts/monitoring-location/components/hydrograph/selectors/thresholds-data.test.js index 4fc5095650541e857c8d2fd0ef758bba5da915db..292bce247c8d2e3b7ae87a8f7e23a264fd104698 100644 --- a/assets/src/scripts/monitoring-location/components/hydrograph/selectors/thresholds-data.test.js +++ b/assets/src/scripts/monitoring-location/components/hydrograph/selectors/thresholds-data.test.js @@ -35,7 +35,7 @@ describe('monitoring-location/components/hydrograph/selectors/thresholds-data', name: 'Very high', referenceCode: 'Operational limit - high-Public', referenceValue: '10' - },{ + }, { name: 'Very low', referenceCode: 'Operational limit - low-Public', referenceValue: '1' @@ -110,7 +110,7 @@ describe('monitoring-location/components/hydrograph/selectors/thresholds-data', name: 'Very high', referenceCode: 'Operational limit - high-Public', referenceValue: '22' - },{ + }, { name: 'Very low', referenceCode: 'Operational limit - low-Public', referenceValue: '1' @@ -145,7 +145,7 @@ describe('monitoring-location/components/hydrograph/selectors/thresholds-data', name: 'Very high', referenceCode: 'Operational limit - high-Public', referenceValue: '12' - },{ + }, { name: 'Very low', referenceCode: 'Operational limit - low-Public', referenceValue: '-4' diff --git a/assets/src/scripts/monitoring-location/components/hydrograph/selectors/time-series-data.test.js b/assets/src/scripts/monitoring-location/components/hydrograph/selectors/time-series-data.test.js index d07393810bd74ed78531bee0809b59393cf10f0f..96d2fb1fdd2038599949c6b0f9a0e75daef81a68 100644 --- a/assets/src/scripts/monitoring-location/components/hydrograph/selectors/time-series-data.test.js +++ b/assets/src/scripts/monitoring-location/components/hydrograph/selectors/time-series-data.test.js @@ -23,7 +23,7 @@ const TEST_STATE = { name: 'Very high', referenceCode: 'Operational limit - high-Public', referenceValue: '10' - },{ + }, { name: 'Very low', referenceCode: 'Operational limit - low-Public', referenceValue: '1' @@ -444,7 +444,7 @@ describe('monitoring-location/components/hydrograph/selectors/time-series-data m }); it('If all methods have no points return either methodID', () => { - expect(['69937','252055'].includes(getPreferredIVMethodID(TEST_STATE))).toBe(true); + expect(['69937', '252055'].includes(getPreferredIVMethodID(TEST_STATE))).toBe(true); }); it('Return methodID for method that has points', () => { diff --git a/assets/src/scripts/monitoring-location/components/hydrograph/time-series-graph.js b/assets/src/scripts/monitoring-location/components/hydrograph/time-series-graph.js index 9e4ea97953bffed8e839872937e9f98aee1c401c..7dc09f77c0d78baf1cfc55476c486379aec0c9ad 100644 --- a/assets/src/scripts/monitoring-location/components/hydrograph/time-series-graph.js +++ b/assets/src/scripts/monitoring-location/components/hydrograph/time-series-graph.js @@ -105,7 +105,7 @@ const drawTitle = function(elem, store, siteNo, agencyCode, sitename, showMLName .html(`${sitename}, ${agencyCode} ${siteNo}`); } titleDiv.append('div') - .call(link(store,(elem, {title, parameter}) => { + .call(link(store, (elem, {title, parameter}) => { elem.html(title); if (showTooltip) { elem.call(appendInfoTooltip, parameter ? parameter.description : 'No description available', 'bottom'); @@ -164,7 +164,7 @@ export const initializeTimeSeriesGraph = function(elem, store, siteNo, agencyCod graphDiv.append('svg') .attr('xmlns', 'http://www.w3.org/2000/svg') .classed('hydrograph-svg', true) - .call(link(store,(elem, layout) => { + .call(link(store, (elem, layout) => { elem.select('#graph-clip').remove(); elem.attr('viewBox', `0 0 ${layout.width + layout.margin.left + layout.margin.right} ${layout.height + layout.margin.top + layout.margin.bottom}`) .append('clipPath') diff --git a/assets/src/scripts/monitoring-location/components/hydrograph/tooltip.js b/assets/src/scripts/monitoring-location/components/hydrograph/tooltip.js index ca29db4af5934f99c6ee75c3d259bc9101842fcb..9a0e3cd3ba75fe8978a932e3c8c3e2e1bc1c8ed9 100644 --- a/assets/src/scripts/monitoring-location/components/hydrograph/tooltip.js +++ b/assets/src/scripts/monitoring-location/components/hydrograph/tooltip.js @@ -163,7 +163,7 @@ export const initializeTooltipCursorSlider = function(elem, store) { elem.append('svg') .classed('cursor-slider-svg', true) .attr('xmlns', 'http://www.w3.org/2000/svg') - .call(link(store,(elem, layout) => { + .call(link(store, (elem, layout) => { elem.attr('viewBox', `0 0 ${layout.width + layout.margin.left + layout.margin.right} 25`); }, getMainLayout)); }; diff --git a/assets/src/scripts/monitoring-location/components/map/index.js b/assets/src/scripts/monitoring-location/components/map/index.js index 00bbab0a31b8d58bdf3cb1e1658027d7866e5e71..92401c0cf169bb165d88241a986b9877ed212b53 100644 --- a/assets/src/scripts/monitoring-location/components/map/index.js +++ b/assets/src/scripts/monitoring-location/components/map/index.js @@ -81,7 +81,7 @@ const siteMap = function(node, {siteno, latitude, longitude, zoom}, store) { map.addLayer(baseMapLayers['USGS Topo']); //add layer control - L.control.layers(baseMapLayers,overlayLayers).addTo(map); + L.control.layers(baseMapLayers, overlayLayers).addTo(map); // Add FIM layers const floodLayer = dynamicMapLayer({ diff --git a/assets/src/scripts/monitoring-location/selectors/network-selector.test.js b/assets/src/scripts/monitoring-location/selectors/network-selector.test.js index 78355b1d9d3560fc4dbdf98f3e39267cc9e126ba..b26a9025e16da62850b50aeb70c5bb51444ed4bb 100644 --- a/assets/src/scripts/monitoring-location/selectors/network-selector.test.js +++ b/assets/src/scripts/monitoring-location/selectors/network-selector.test.js @@ -17,9 +17,9 @@ describe('monitoring-location/selectors/network-selector', () => { it('if network list has data, the data is returned', () => { expect(getNetworkList({ networkData: { - networkList: [1,2,3] + networkList: [1, 2, 3] } - })).toEqual([1,2,3]); + })).toEqual([1, 2, 3]); }); }); diff --git a/assets/src/scripts/monitoring-location/selectors/nldi-data-selector.test.js b/assets/src/scripts/monitoring-location/selectors/nldi-data-selector.test.js index 099627c6dbb3f66b1d18a447b1b54e223faaec8c..f9032b72bef038e5332c92e2035a9eec216d0551 100644 --- a/assets/src/scripts/monitoring-location/selectors/nldi-data-selector.test.js +++ b/assets/src/scripts/monitoring-location/selectors/nldi-data-selector.test.js @@ -21,9 +21,9 @@ describe('monitoring-location/selectors/nldi-data-selector', () => { it('if upstream flows has data, the data is returned', () => { expect(getNldiUpstreamFlows({ nldiData: { - upstreamFlows: [1,2,3] + upstreamFlows: [1, 2, 3] } - })).toEqual([1,2,3]); + })).toEqual([1, 2, 3]); }); }); @@ -39,9 +39,9 @@ describe('monitoring-location/selectors/nldi-data-selector', () => { it('if downstream flows has data, the data is returned', () => { expect(getNldiDownstreamFlows({ nldiData: { - downstreamFlows: [1,2,3] + downstreamFlows: [1, 2, 3] } - })).toEqual([1,2,3]); + })).toEqual([1, 2, 3]); }); }); @@ -57,9 +57,9 @@ describe('monitoring-location/selectors/nldi-data-selector', () => { it('if upstream sites has data, the data is returned', () => { expect(getNldiUpstreamSites({ nldiData: { - upstreamSites: [1,2,3] + upstreamSites: [1, 2, 3] } - })).toEqual([1,2,3]); + })).toEqual([1, 2, 3]); }); }); @@ -75,9 +75,9 @@ describe('monitoring-location/selectors/nldi-data-selector', () => { it('if downstream sites has data, the data is returned', () => { expect(getNldiDownstreamSites({ nldiData: { - downstreamSites: [1,2,3] + downstreamSites: [1, 2, 3] } - })).toEqual([1,2,3]); + })).toEqual([1, 2, 3]); }); }); @@ -93,9 +93,9 @@ describe('monitoring-location/selectors/nldi-data-selector', () => { it('if upstream basins has data, the data is returned', () => { expect(getNldiUpstreamBasin({ nldiData: { - upstreamBasin: [1,2,3] + upstreamBasin: [1, 2, 3] } - })).toEqual([1,2,3]); + })).toEqual([1, 2, 3]); }); }); diff --git a/assets/src/scripts/network/components/network-sites/map.js b/assets/src/scripts/network/components/network-sites/map.js index adf764d293d0b3497470cb31983781ddbce67fac..7f1a0f95d192f7903e6d193a481951503b47aad7 100644 --- a/assets/src/scripts/network/components/network-sites/map.js +++ b/assets/src/scripts/network/components/network-sites/map.js @@ -35,7 +35,7 @@ export const createSiteMap = function(extent) { L.control.layers(baseMapLayers, overlayLayers).addTo(map); const pExt = JSON.parse(extent); - const leafletExtent = [[pExt[3],pExt[2]],[pExt[1],pExt[0]]]; + const leafletExtent = [[pExt[3], pExt[2]], [pExt[1], pExt[0]]]; map.fitBounds(leafletExtent); return map; diff --git a/assets/src/scripts/network/selectors/network-data-selector.test.js b/assets/src/scripts/network/selectors/network-data-selector.test.js index 66680b3c07eb6ae033c9ace87aa51d2a7bccd283..9f76fe9a946782e01bd9884b6bafacdb7e87aba6 100644 --- a/assets/src/scripts/network/selectors/network-data-selector.test.js +++ b/assets/src/scripts/network/selectors/network-data-selector.test.js @@ -17,9 +17,9 @@ describe('network-data-selector', () => { it('if network MonitoringLocations, the data is returned', () => { expect(getNetworkMonitoringLocations({ networkData: { - networkMonitoringLocations: [1,2,3] + networkMonitoringLocations: [1, 2, 3] } - })).toEqual([1,2,3]); + })).toEqual([1, 2, 3]); }); }); diff --git a/assets/src/scripts/utils.test.js b/assets/src/scripts/utils.test.js index ed734a91bb81820bd26381b96f16890646f6d05b..560b44ce7857a9fa2049276169afe225fdb57d7d 100644 --- a/assets/src/scripts/utils.test.js +++ b/assets/src/scripts/utils.test.js @@ -200,7 +200,7 @@ describe('Utils module', () => { expect(getNearestTime([], testData[0].dateTime)).toBeNull(); }); - it('return correct DATA points via getNearestTime' , () => { + it('return correct DATA points via getNearestTime', () => { // Check each date with the given offset against the hourly-spaced // test DATA. diff --git a/assets/src/scripts/web-services/instantaneous-values.js b/assets/src/scripts/web-services/instantaneous-values.js index 7b403d466c0fa19e317390741f8931e5981e4c18..3e3253ae76677ddbc51a23fd2c54d4b082228200 100644 --- a/assets/src/scripts/web-services/instantaneous-values.js +++ b/assets/src/scripts/web-services/instantaneous-values.js @@ -23,7 +23,7 @@ function getNumberOfDays(period) { * @param {String} siteno - the unique identifier for the monitoring location * @param {Boolean} isExpanded - if the meta data has additional information */ -export const getSiteMetaDataServiceURL = function({siteno, isExpanded}) { +export const getSiteMetaDataServiceURL = function({siteno, isExpanded}) { return `${config.SITE_DATA_ENDPOINT}/?format=rdb&sites=${siteno}${isExpanded ? '&siteOutput=expanded' : ''}&siteStatus=all`; };