From f810d4a825845b91b3819ca674fff21dac5c9c67 Mon Sep 17 00:00:00 2001 From: Scott Dickerson Date: Thu, 12 Dec 2019 15:46:04 -0600 Subject: [PATCH] fix(axis): fix linting errors --- packages/core/src/components/axes/axis.ts | 36 +++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/core/src/components/axes/axis.ts b/packages/core/src/components/axes/axis.ts index 706aa5425c..63b917f891 100644 --- a/packages/core/src/components/axes/axis.ts +++ b/packages/core/src/components/axes/axis.ts @@ -148,24 +148,24 @@ export class Axis extends Component { if (axisOptions.scaleType === ScaleTypes.TIME) { if (Tools.getProperty(options, "timeScale", "addSpaceOnEdges")) { - const startDate = new Date(domain[0]); - const endDate = new Date(domain[1]); - if (differenceInYears(endDate, startDate) > 3) { - return [subYears(startDate, 1), addYears(endDate, 1)]; - } - if (differenceInMonths(endDate, startDate) > 3) { - return [subMonths(startDate, 1), addMonths(endDate, 1)]; - } - if (differenceInDays(endDate, startDate) > 3) { - return [subDays(startDate, 1), addDays(endDate, 1)]; - } else if (differenceInHours(endDate, startDate) > 3) { - return [subHours(startDate, 1), addHours(endDate, 1)]; - } else if (differenceInMinutes(endDate, startDate) > 3) { - return [subMinutes(startDate, 1), addMinutes(endDate, 1)]; - } - // Other - return [startDate, endDate]; - } + const startDate = new Date(domain[0]); + const endDate = new Date(domain[1]); + if (differenceInYears(endDate, startDate) > 3) { + return [subYears(startDate, 1), addYears(endDate, 1)]; + } + if (differenceInMonths(endDate, startDate) > 3) { + return [subMonths(startDate, 1), addMonths(endDate, 1)]; + } + if (differenceInDays(endDate, startDate) > 3) { + return [subDays(startDate, 1), addDays(endDate, 1)]; + } else if (differenceInHours(endDate, startDate) > 3) { + return [subHours(startDate, 1), addHours(endDate, 1)]; + } else if (differenceInMinutes(endDate, startDate) > 3) { + return [subMinutes(startDate, 1), addMinutes(endDate, 1)]; + } + // Other + return [startDate, endDate]; + } }