From a8d2a4bad572deb6f53f033feb80c58d2e61f858 Mon Sep 17 00:00:00 2001 From: elenatorro Date: Mon, 17 Feb 2020 12:42:10 +0100 Subject: [PATCH] Fix lint --- src/renderer/viz/expressions/RampGeneric.js | 2 +- .../aggregation/viewportAggregation.test.js | 2 +- .../renderer/viz/expressions/color/Opacity.test.js | 2 +- test/unit/renderer/viz/expressions/ramp.test.js | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/renderer/viz/expressions/RampGeneric.js b/src/renderer/viz/expressions/RampGeneric.js index 348c80eb0..f908cd7e5 100644 --- a/src/renderer/viz/expressions/RampGeneric.js +++ b/src/renderer/viz/expressions/RampGeneric.js @@ -183,5 +183,5 @@ function _sortNumericValues (data, order) { } function _checkBuckets (data) { - return data[0] && (Array.isArray(data[0].key) || typeof data[0].key === 'number'); + return data[0] && (Array.isArray(data[0].key) || (typeof data[0].key === 'number')); } diff --git a/test/unit/renderer/viz/expressions/aggregation/viewportAggregation.test.js b/test/unit/renderer/viz/expressions/aggregation/viewportAggregation.test.js index 2e50c4bc2..b73f67ea5 100644 --- a/test/unit/renderer/viz/expressions/aggregation/viewportAggregation.test.js +++ b/test/unit/renderer/viz/expressions/aggregation/viewportAggregation.test.js @@ -276,7 +276,7 @@ describe('src/renderer/viz/expressions/viewportAggregation', () => { ramp._bindMetadata(METADATA); fakeDrawMetadata(viewportHistogram); - const values = ramp.getLegendData({order: 'DESC'}).data; + const values = ramp.getLegendData({ order: 'DESC' }).data; const joinedValues = viewportHistogram.getJoinedValues(values); expect(joinedValues).toEqual( diff --git a/test/unit/renderer/viz/expressions/color/Opacity.test.js b/test/unit/renderer/viz/expressions/color/Opacity.test.js index b8f16e909..aa1ac5f0f 100644 --- a/test/unit/renderer/viz/expressions/color/Opacity.test.js +++ b/test/unit/renderer/viz/expressions/color/Opacity.test.js @@ -193,7 +193,7 @@ describe('src/renderer/viz/expressions/opacity', () => { const color = opacity(ramp(property('grade'), [namedColor('blue'), namedColor('red')]), 0.5); color._bindMetadata(METADATA); - const actual = color.getLegendData({order: 'DESC'}); + const actual = color.getLegendData({ order: 'DESC' }); const expected = { type: 'category', diff --git a/test/unit/renderer/viz/expressions/ramp.test.js b/test/unit/renderer/viz/expressions/ramp.test.js index eb7927d57..6c8ed7d83 100644 --- a/test/unit/renderer/viz/expressions/ramp.test.js +++ b/test/unit/renderer/viz/expressions/ramp.test.js @@ -1059,7 +1059,7 @@ describe('src/renderer/viz/expressions/ramp', () => { r._resolveAliases(); r._bindMetadata(METADATA); - actual = r.getLegendData({order: 'DESC'}).data; + actual = r.getLegendData({ order: 'DESC' }).data; expected = [ { key: [2.5, 4], @@ -1106,7 +1106,7 @@ describe('src/renderer/viz/expressions/ramp', () => { r._bindMetadata(METADATA); - actual = r.getLegendData({order: 'DESC'}).data; + actual = r.getLegendData({ order: 'DESC' }).data; expected = [ { key: [2.5, Number.POSITIVE_INFINITY], @@ -1119,7 +1119,7 @@ describe('src/renderer/viz/expressions/ramp', () => { ]; expect(actual).toEqual(expected); - }) + }); }); describe('and it is a linear input', () => { @@ -1167,7 +1167,7 @@ describe('src/renderer/viz/expressions/ramp', () => { { key: 1, value: red.value - } + } ]; expect(actual).toEqual(expected); }); @@ -1230,7 +1230,7 @@ describe('src/renderer/viz/expressions/ramp', () => { it('should return legend data in descending order', () => { const r = ramp(top($grade, 2), [red, blue]); r._bindMetadata(METADATA); - actual = r.getLegendData({order: 'DESC'}).data; + actual = r.getLegendData({ order: 'DESC' }).data; expected = [ { key: 'B', @@ -1296,7 +1296,7 @@ describe('src/renderer/viz/expressions/ramp', () => { r._bindMetadata(METADATA); - actual = r.getLegendData({order: 'DESC'}).data; + actual = r.getLegendData({ order: 'DESC' }).data; expected = [ { key: 'C',