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

+2
View File
@@ -21,3 +21,5 @@
// Don't export the contents here
// It will break the extension webpack
export default {};
+4 -4
View File
@@ -20,13 +20,13 @@
*/
import net from "net";
import http from "http";
import type http from "http";
import spdy from "spdy";
import httpProxy from "http-proxy";
import url from "url";
import { apiPrefix, apiKubePrefix } from "../../common/vars";
import { Router } from "../router";
import { ContextHandler } from "../context-handler";
import type { ContextHandler } from "../context-handler";
import logger from "../logger";
import { Singleton } from "../../common/utils";
import { ClusterManager } from "../cluster-manager";
@@ -205,13 +205,13 @@ export class LensProxy extends Singleton {
return proxy;
}
protected async getProxyTarget(req: http.IncomingMessage, contextHandler: ContextHandler): Promise<httpProxy.ServerOptions> {
protected async getProxyTarget(req: http.IncomingMessage, contextHandler: ContextHandler): Promise<httpProxy.ServerOptions | void> {
if (req.url.startsWith(apiKubePrefix)) {
delete req.headers.authorization;
req.url = req.url.replace(apiKubePrefix, "");
const isWatchRequest = req.url.includes("watch=");
return await contextHandler.getApiTarget(isWatchRequest);
return contextHandler.getApiTarget(isWatchRequest);
}
}
+2 -2
View File
@@ -26,8 +26,8 @@
*/
import * as WebSocket from "ws";
import http from "http";
import net from "net";
import type http from "http";
import type net from "net";
import url from "url";
import { NodeShellSession, LocalShellSession } from "../shell-session";
import { ClusterManager } from "../cluster-manager";