Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Commit 2a27782

Browse files
committed
fix: eslint nits
1 parent 84e1810 commit 2a27782

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

packages/superset-ui-legacy-plugin-chart-treemap/src/transformProps.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function transformProps(chartProps) {
2424

2525
if (!numberFormat && chartProps.datasource && chartProps.datasource.metrics) {
2626
chartProps.datasource.metrics.forEach(metric => {
27-
if (metric.metric_name == chartProps.formData.metrics[0] && metric.d3format) {
27+
if (metric.metric_name === chartProps.formData.metrics[0] && metric.d3format) {
2828
numberFormat = metric.d3format;
2929
}
3030
});

packages/superset-ui-legacy-preset-chart-big-number/src/BigNumber/transformProps.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ export default function transformProps(chartProps) {
8686
}
8787
let metricFormat = yAxisFormat;
8888
if (!yAxisFormat && chartProps.datasource && chartProps.datasource.metrics) {
89-
chartProps.datasource.metrics.forEach(metric => {
90-
if (metric.metric_name == metric && metric.d3format) {
91-
metricFormat = metric.d3format;
89+
chartProps.datasource.metrics.forEach(metricEntry => {
90+
if (metricEntry.metric_name === metric && metricEntry.d3format) {
91+
metricFormat = metricEntry.d3format;
9292
}
9393
});
9494
}

packages/superset-ui-legacy-preset-chart-nvd3/src/transformProps.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,13 @@ export default function transformProps(chartProps) {
8585
foundFormatter = metric.d3format;
8686
}
8787
});
88+
8889
return foundFormatter;
8990
};
9091

91-
if (chartProps.formData.vizType == 'pie') {
92+
if (chartProps.formData.vizType === 'pie') {
9293
numberFormat = grabD3Format(chartProps.formData.metric) || numberFormat;
93-
} else if (chartProps.formData.vizType == 'dual_line') {
94+
} else if (chartProps.formData.vizType === 'dual_line') {
9495
yAxisFormat = grabD3Format(chartProps.formData.metric) || yAxisFormat;
9596
yAxis2Format = grabD3Format(chartProps.formData.metric2) || yAxis2Format;
9697
} else if (['line', 'dist_bar', 'bar', 'area'].indexOf(chartProps.formData.vizType) > -1) {

0 commit comments

Comments
 (0)