Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
elenatorro committed Feb 17, 2020
1 parent 911f6f7 commit a8d2a4b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/renderer/viz/expressions/RampGeneric.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion test/unit/renderer/viz/expressions/color/Opacity.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
12 changes: 6 additions & 6 deletions test/unit/renderer/viz/expressions/ramp.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -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],
Expand All @@ -1119,7 +1119,7 @@ describe('src/renderer/viz/expressions/ramp', () => {
];

expect(actual).toEqual(expected);
})
});
});

describe('and it is a linear input', () => {
Expand Down Expand Up @@ -1167,7 +1167,7 @@ describe('src/renderer/viz/expressions/ramp', () => {
{
key: 1,
value: red.value
}
}
];
expect(actual).toEqual(expected);
});
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit a8d2a4b

Please sign in to comment.