mirror of
https://github.com/apache/superset.git
synced 2026-04-25 11:04:48 +00:00
[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:
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import dompurify from 'dompurify';
|
||||
import { fitBounds } from 'viewport-mercator-project';
|
||||
import d3 from 'd3';
|
||||
|
||||
import sandboxedEval from '../../../modules/sandbox';
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user