Applied no-mixed-operators linting rule

This commit is contained in:
Filip Barl
2016-12-06 19:36:32 +01:00
parent e60418a986
commit 776b4d72eb
14 changed files with 41 additions and 37 deletions

View File

@@ -6,6 +6,6 @@ export function uniformSelect(array, size) {
}
return _.range(size).map(index =>
array[parseInt(index * array.length / (size - 1 + 1e-9), 10)]
array[parseInt(index * (array.length / (size - (1 - 1e-9))), 10)]
);
}

View File

@@ -6,7 +6,7 @@ import { formatMetricSvg } from './string-utils';
import { colors } from './color-utils';
export function getClipPathDefinition(clipId, size, height,
x = -size * 0.5, y = size * 0.5 - height) {
x = -size * 0.5, y = (size * 0.5) - height) {
return (
<defs>
<clipPath id={clipId}>
@@ -44,7 +44,7 @@ export function getMetricValue(metric, size) {
let displayedValue = Number(value).toFixed(1);
if (displayedValue > 0 && (!max || displayedValue < max)) {
const baseline = 0.1;
displayedValue = valuePercentage * (1 - baseline * 2) + baseline;
displayedValue = (valuePercentage * (1 - (baseline * 2))) + baseline;
} else if (displayedValue >= m.max && displayedValue > 0) {
displayedValue = 1;
}