diff --git a/rollup.config.js b/rollup.config.mjs similarity index 93% rename from rollup.config.js rename to rollup.config.mjs index 26825ea24..b69b72502 100644 --- a/rollup.config.js +++ b/rollup.config.mjs @@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -/* eslint-disable no-undef */ import commonjs from "@rollup/plugin-commonjs"; import resolve from "@rollup/plugin-node-resolve"; import typescript from "@rollup/plugin-typescript"; diff --git a/src/components/text-elements/Legend/Legend.tsx b/src/components/text-elements/Legend/Legend.tsx index 6ace484df..94622381d 100644 --- a/src/components/text-elements/Legend/Legend.tsx +++ b/src/components/text-elements/Legend/Legend.tsx @@ -288,7 +288,7 @@ const Legend = React.forwardRef((props, ref) => { setIsKeyDowned(null); scrollToTest("left"); }} - disabled={!hasScroll?.left ?? true} + disabled={!hasScroll?.left} /> ((props, ref) => { setIsKeyDowned(null); scrollToTest("right"); }} - disabled={!hasScroll?.right ?? true} + disabled={!hasScroll?.right} /> diff --git a/src/stories/chart-elements/AreaChart.stories.tsx b/src/stories/chart-elements/AreaChart.stories.tsx index 19268ecee..5adc080ac 100644 --- a/src/stories/chart-elements/AreaChart.stories.tsx +++ b/src/stories/chart-elements/AreaChart.stories.tsx @@ -271,7 +271,7 @@ export const CustomTooltipPreviousDay: Story = { const previousIndex = data.findIndex((e) => e[customTooltipIndex] === label); const previousValues: any = previousIndex > 0 ? data[previousIndex - 1] : {}; const prev = previousValues ? previousValues[dataKey] : undefined; - const percentage = ((value - prev) / prev) * 100 ?? undefined; + const percentage = ((value - prev) / prev) * 100; const color = getBadgeColor(percentage); return ( @@ -315,7 +315,7 @@ export const CustomTooltipComplex: Story = { const previousIndex = data.findIndex((e) => e[customTooltipIndex] === label); const previousValues: any = previousIndex > 0 ? data[previousIndex - 1] : {}; const prev = previousValues ? previousValues[dataKey] : undefined; - const percentage = ((value - prev) / prev) * 100 ?? undefined; + const percentage = ((value - prev) / prev) * 100; const badgeColor = getBadgeColor(percentage); return ( diff --git a/src/stories/chart-elements/BarChart.stories.tsx b/src/stories/chart-elements/BarChart.stories.tsx index f42a4f89c..af3c7958c 100644 --- a/src/stories/chart-elements/BarChart.stories.tsx +++ b/src/stories/chart-elements/BarChart.stories.tsx @@ -287,7 +287,7 @@ export const CustomTooltipPreviousDay: Story = { const previousIndex = data.findIndex((e) => e[customTooltipIndex] === label); const previousValues: any = previousIndex > 0 ? data[previousIndex - 1] : {}; const prev = previousValues ? previousValues[dataKey] : undefined; - const percentage = ((value - prev) / prev) * 100 ?? undefined; + const percentage = ((value - prev) / prev) * 100; const color = getBadgeColor(percentage); return ( @@ -331,7 +331,7 @@ export const CustomTooltipComplex: Story = { const previousIndex = data.findIndex((e) => e[customTooltipIndex] === label); const previousValues: any = previousIndex > 0 ? data[previousIndex - 1] : {}; const prev = previousValues ? previousValues[dataKey] : undefined; - const percentage = ((value - prev) / prev) * 100 ?? undefined; + const percentage = ((value - prev) / prev) * 100; const badgeColor = getBadgeColor(percentage); return ( diff --git a/src/stories/chart-elements/LineChart.stories.tsx b/src/stories/chart-elements/LineChart.stories.tsx index 1318b81c4..bd8c423c8 100644 --- a/src/stories/chart-elements/LineChart.stories.tsx +++ b/src/stories/chart-elements/LineChart.stories.tsx @@ -231,7 +231,7 @@ export const CustomTooltipPreviousDay: Story = { const previousIndex = data.findIndex((e) => e[customTooltipIndex] === label); const previousValues: any = previousIndex > 0 ? data[previousIndex - 1] : {}; const prev = previousValues ? previousValues[dataKey] : undefined; - const percentage = ((value - prev) / prev) * 100 ?? undefined; + const percentage = ((value - prev) / prev) * 100; const color = getBadgeColor(percentage); return ( @@ -275,7 +275,7 @@ export const CustomTooltipComplex: Story = { const previousIndex = data.findIndex((e) => e[customTooltipIndex] === label); const previousValues: any = previousIndex > 0 ? data[previousIndex - 1] : {}; const prev = previousValues ? previousValues[dataKey] : undefined; - const percentage = ((value - prev) / prev) * 100 ?? undefined; + const percentage = ((value - prev) / prev) * 100; const badgeColor = getBadgeColor(percentage); return (