Turn on noUnusedLocals, noImplicitReturns, importsNotUsedAsValues: error, and isolatedModules (#2777)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-05-19 12:11:54 -04:00
1 parent 489cef9595
commit 5ed4537979
287 files changed
+704 -628

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ import merge from "lodash/merge";
import moment from "moment";
import Color from "color";
import { observer } from "mobx-react";
import { ChartData, ChartOptions, ChartPoint, ChartTooltipItem, Scriptable } from "chart.js";
import type { ChartData, ChartOptions, ChartPoint, ChartTooltipItem, Scriptable } from "chart.js";
import { Chart, ChartKind, ChartProps } from "./chart";
import { bytesToUnits, cssNames } from "../../utils";
import { ZebraStripes } from "./zebra-stripes.plugin";
@@ -22,7 +22,7 @@
// Plugin for drawing stripe bars on top of any timeseries barchart
// Based on cover DIV element with repeating-linear-gradient style
import ChartJS, { ChartPoint } from "chart.js";
import type ChartJS from "chart.js";
import moment, { Moment } from "moment";
import get from "lodash/get";
@@ -39,7 +39,7 @@ export const ZebraStripes = {
},
getLastUpdate(chart: ChartJS) {
const data = chart.data.datasets[0].data[0] as ChartPoint;
const data = chart.data.datasets[0].data[0] as ChartJS.ChartPoint;
return moment.unix(parseInt(data.x as string));
},