[lint] turn no-undef back on, set browser, cypress, and mocha env's (#5879)

* [lint] turn no-undef back on, set browser, cypress, and mocha env's, and fix issues

* [lint] fix undefined var in TimeTable.jsx
This commit is contained in:
Chris Williams
2018-09-13 14:45:24 -07:00
committed by GitHub
parent 7098ada8c5
commit b453cd2bf2
193 changed files with 118 additions and 237 deletions

View File

@@ -1,5 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { XYChart, AreaSeries, CrossHair, LinearGradient } from '@data-ui/xy-chart';
import { brandColor } from '../../modules/colors';

View File

@@ -1,6 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import * as color from 'd3-color';
import d3 from 'd3';
import BigNumberVis, { renderTooltipFactory } from './BigNumber';
import { d3FormatPreset } from '../../modules/utils';

View File

@@ -122,9 +122,9 @@ MapBox.defaultProps = defaultProps;
function createReducer(aggregatorName, customMetric) {
if (aggregatorName === 'sum' || !customMetric) {
return (a, b) => a + b;
} else if (aggName === 'min') {
} else if (aggregatorName === 'min') {
return Math.min;
} else if (aggName === 'max') {
} else if (aggregatorName === 'max') {
return Math.max;
}
return function (a, b) {

View File

@@ -150,7 +150,7 @@ class TimeTable extends React.PureComponent {
const { timeLag } = column;
const totalLag = Object.keys(reversedEntries).length;
if (timeLag > totalLag) {
errorMsg = `The time lag set at ${timeLag} exceeds the length of data at ${reversedData.length}. No data available.`;
errorMsg = `The time lag set at ${timeLag} exceeds the length of data at ${reversedEntries.length}. No data available.`;
} else {
v = reversedEntries[timeLag][valueField];
}

View File

@@ -1,5 +1,6 @@
import dompurify from 'dompurify';
import { fitBounds } from 'viewport-mercator-project';
import d3 from 'd3';
import sandboxedEval from '../../../modules/sandbox';

View File

@@ -28,10 +28,10 @@ const alterProps = (props, propOverrides) => {
}
});
if (typeof props.fillColor === 'string') {
newProps.fillColor = hexToRGB(p.fillColor);
newProps.fillColor = hexToRGB(props.fillColor);
}
if (typeof props.strokeColor === 'string') {
newProps.strokeColor = hexToRGB(p.strokeColor);
newProps.strokeColor = hexToRGB(props.strokeColor);
}
return {
...newProps,

View File

@@ -1,7 +1,8 @@
import d3 from 'd3';
import nvd3Vis from './nvd3_vis';
import { getExploreLongUrl } from '../explore/exploreUtils';
export default function lineMulti(slice, payload) {
/*
* Show multiple line charts