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

+4 -4
View File
@@ -19,8 +19,8 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
import { PrometheusProvider, PrometheusQueryOpts, PrometheusQuery, PrometheusService } from "./provider-registry";
import { CoreV1Api } from "@kubernetes/client-node";
import type { PrometheusProvider, PrometheusQueryOpts, PrometheusQuery, PrometheusService } from "./provider-registry";
import type { CoreV1Api } from "@kubernetes/client-node";
import logger from "../logger";
export class PrometheusStacklight implements PrometheusProvider {
@@ -28,7 +28,7 @@ export class PrometheusStacklight implements PrometheusProvider {
name = "Stacklight";
rateAccuracy = "1m";
public async getPrometheusService(client: CoreV1Api): Promise<PrometheusService> {
public async getPrometheusService(client: CoreV1Api): Promise<PrometheusService | void> {
try {
const resp = await client.readNamespacedService("prometheus-server", "stacklight");
const service = resp.body;
@@ -44,7 +44,7 @@ export class PrometheusStacklight implements PrometheusProvider {
}
}
public getQueries(opts: PrometheusQueryOpts): PrometheusQuery {
public getQueries(opts: PrometheusQueryOpts): PrometheusQuery | void {
switch(opts.category) {
case "cluster":
return {