mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Enforce member-delimiter-style using eslint (#4870)
This commit is contained in:
1 parent
1c7641708e
commit
600bd659f6
158 files changed
+304
-294
No files matched your search
@@ -7,7 +7,7 @@ import { pathNames, PathName } from "../../common/app-paths/app-path-names";
|
||||
import type { AppPaths } from "../../common/app-paths/app-path-injection-token";
|
||||
|
||||
interface Dependencies {
|
||||
getAppPath: (name: PathName) => string
|
||||
getAppPath: (name: PathName) => string;
|
||||
}
|
||||
|
||||
export const getAppPaths = ({ getAppPath }: Dependencies) =>
|
||||
|
||||
@@ -48,8 +48,8 @@ const folderSyncMaxAllowedFileReadSize = 2 * 1024 * 1024; // 2 MiB
|
||||
const fileSyncMaxAllowedFileReadSize = 16 * folderSyncMaxAllowedFileReadSize; // 32 MiB
|
||||
|
||||
interface Dependencies {
|
||||
directoryForKubeConfigs: string
|
||||
createCluster: (model: ClusterModel) => Cluster
|
||||
directoryForKubeConfigs: string;
|
||||
createCluster: (model: ClusterModel) => Cluster;
|
||||
}
|
||||
|
||||
const kubeConfigSyncName = "lens:kube-sync";
|
||||
|
||||
@@ -8,8 +8,8 @@ import type { Cluster } from "../../common/cluster/cluster";
|
||||
import { k8sRequest } from "../k8s-request";
|
||||
|
||||
export type ClusterDetectionResult = {
|
||||
value: string | number | boolean
|
||||
accuracy: number
|
||||
value: string | number | boolean;
|
||||
accuracy: number;
|
||||
};
|
||||
|
||||
export class BaseClusterDetector {
|
||||
|
||||
@@ -26,7 +26,7 @@ interface PrometheusServicePreferences {
|
||||
}
|
||||
|
||||
interface Dependencies {
|
||||
createKubeAuthProxy: (cluster: Cluster, environmentVariables: NodeJS.ProcessEnv) => KubeAuthProxy
|
||||
createKubeAuthProxy: (cluster: Cluster, environmentVariables: NodeJS.ProcessEnv) => KubeAuthProxy;
|
||||
}
|
||||
|
||||
export class ContextHandler {
|
||||
|
||||
@@ -14,8 +14,8 @@ import type { RepoHelmChartList } from "../../common/k8s-api/endpoints/helm-char
|
||||
import { iter, sortCharts } from "../../common/utils";
|
||||
|
||||
interface ChartCacheEntry {
|
||||
data: Buffer,
|
||||
mtimeMs: number,
|
||||
data: Buffer;
|
||||
mtimeMs: number;
|
||||
}
|
||||
|
||||
export interface HelmCacheFile {
|
||||
|
||||
@@ -19,19 +19,19 @@ export type HelmEnv = Record<string, string> & {
|
||||
};
|
||||
|
||||
export interface HelmRepoConfig {
|
||||
repositories: HelmRepo[]
|
||||
repositories: HelmRepo[];
|
||||
}
|
||||
|
||||
export interface HelmRepo {
|
||||
name: string;
|
||||
url: string;
|
||||
cacheFilePath?: string
|
||||
caFile?: string,
|
||||
certFile?: string,
|
||||
insecureSkipTlsVerify?: boolean,
|
||||
keyFile?: string,
|
||||
username?: string,
|
||||
password?: string,
|
||||
cacheFilePath?: string;
|
||||
caFile?: string;
|
||||
certFile?: string;
|
||||
insecureSkipTlsVerify?: boolean;
|
||||
keyFile?: string;
|
||||
username?: string;
|
||||
password?: string;
|
||||
}
|
||||
|
||||
async function execHelm(args: string[], options?: BaseEncodingOptions & ExecFileOptions): Promise<string> {
|
||||
|
||||
@@ -26,7 +26,7 @@ import { showOpenDialog } from "../../ipc/dialog";
|
||||
import { windowActionHandleChannel, windowLocationChangedChannel, windowOpenAppMenuAsContextMenuChannel } from "../../../common/ipc/window";
|
||||
|
||||
interface Dependencies {
|
||||
electronMenuItems: IComputedValue<MenuRegistration[]>,
|
||||
electronMenuItems: IComputedValue<MenuRegistration[]>;
|
||||
directoryForLensLocalStorage: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { BrowserWindow, dialog, OpenDialogOptions } from "electron";
|
||||
|
||||
export async function showOpenDialog(dialogOptions: OpenDialogOptions): Promise<{ canceled: boolean; filePaths: string[]; }> {
|
||||
export async function showOpenDialog(dialogOptions: OpenDialogOptions): Promise<{ canceled: boolean; filePaths: string[] }> {
|
||||
const { canceled, filePaths } = await dialog.showOpenDialog(BrowserWindow.getFocusedWindow(), dialogOptions);
|
||||
|
||||
return { canceled, filePaths };
|
||||
|
||||
@@ -13,7 +13,7 @@ import logger from "../logger";
|
||||
import { LensProxy } from "../lens-proxy";
|
||||
|
||||
interface Dependencies {
|
||||
directoryForTemp: string
|
||||
directoryForTemp: string;
|
||||
}
|
||||
|
||||
export class KubeconfigManager {
|
||||
|
||||
@@ -64,10 +64,10 @@ interface Dependencies {
|
||||
directoryForKubectlBinaries: string;
|
||||
|
||||
userStore: {
|
||||
kubectlBinariesPath?: string
|
||||
downloadBinariesPath?: string
|
||||
downloadKubectlBinaries: boolean
|
||||
downloadMirror: string
|
||||
kubectlBinariesPath?: string;
|
||||
downloadBinariesPath?: string;
|
||||
downloadKubectlBinaries: boolean;
|
||||
downloadMirror: string;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import { getBoolean } from "./utils/parse-query";
|
||||
type GetClusterForRequest = (req: http.IncomingMessage) => Cluster | null;
|
||||
|
||||
export interface LensProxyFunctions {
|
||||
getClusterForRequest: GetClusterForRequest,
|
||||
getClusterForRequest: GetClusterForRequest;
|
||||
shellApiRequest: (args: ProxyApiRequestArgs) => void | Promise<void>;
|
||||
kubeApiRequest: (args: ProxyApiRequestArgs) => void | Promise<void>;
|
||||
}
|
||||
|
||||
@@ -37,8 +37,8 @@ function checkHost<Query>(url: URLParse<Query>): boolean {
|
||||
}
|
||||
|
||||
interface Dependencies {
|
||||
extensionLoader: ExtensionLoader
|
||||
extensionsStore: ExtensionsStore
|
||||
extensionLoader: ExtensionLoader;
|
||||
extensionsStore: ExtensionsStore;
|
||||
}
|
||||
|
||||
export class LensProtocolRouterMain extends proto.LensProtocolRouter {
|
||||
|
||||
@@ -12,7 +12,7 @@ import type { Cluster } from "../../../common/cluster/cluster";
|
||||
import type { ClusterId } from "../../../common/cluster-types";
|
||||
|
||||
interface Dependencies {
|
||||
authenticateRequest: (clusterId: ClusterId, tabId: string, shellToken: string) => boolean,
|
||||
authenticateRequest: (clusterId: ClusterId, tabId: string, shellToken: string) => boolean;
|
||||
|
||||
createShellSession: (args: {
|
||||
webSocket: WebSocket;
|
||||
|
||||
@@ -8,8 +8,8 @@ import type net from "net";
|
||||
import type { Cluster } from "../../common/cluster/cluster";
|
||||
|
||||
export interface ProxyApiRequestArgs {
|
||||
req: http.IncomingMessage,
|
||||
socket: net.Socket,
|
||||
head: Buffer,
|
||||
cluster: Cluster,
|
||||
req: http.IncomingMessage;
|
||||
socket: net.Socket;
|
||||
head: Buffer;
|
||||
cluster: Cluster;
|
||||
}
|
||||
+2
-2
@@ -40,7 +40,7 @@ export interface LensApiRequest<P = any> {
|
||||
query: URLSearchParams;
|
||||
raw: {
|
||||
req: http.IncomingMessage;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function getMimeType(filename: string) {
|
||||
@@ -61,7 +61,7 @@ function getMimeType(filename: string) {
|
||||
}
|
||||
|
||||
interface Dependencies {
|
||||
routePortForward: (request: LensApiRequest) => Promise<void>
|
||||
routePortForward: (request: LensApiRequest) => Promise<void>;
|
||||
}
|
||||
|
||||
export class Router {
|
||||
|
||||
@@ -19,7 +19,7 @@ export interface PortForwardArgs {
|
||||
}
|
||||
|
||||
interface Dependencies {
|
||||
getKubectlBinPath: (bundled: boolean) => Promise<string>
|
||||
getKubectlBinPath: (bundled: boolean) => Promise<string>;
|
||||
}
|
||||
|
||||
export class PortForward {
|
||||
|
||||
@@ -133,7 +133,7 @@ export abstract class ShellSession {
|
||||
|
||||
protected abstract get cwd(): string | undefined;
|
||||
|
||||
protected ensureShellProcess(shell: string, args: string[], env: Record<string, string>, cwd: string): { shellProcess: pty.IPty, resume: boolean } {
|
||||
protected ensureShellProcess(shell: string, args: string[], env: Record<string, string>, cwd: string): { shellProcess: pty.IPty; resume: boolean } {
|
||||
const resume = ShellSession.processes.has(this.terminalId);
|
||||
|
||||
if (!resume) {
|
||||
|
||||
@@ -7,8 +7,8 @@ export interface TrayMenuRegistration {
|
||||
label?: string;
|
||||
click?: (menuItem: TrayMenuRegistration) => void;
|
||||
id?: string;
|
||||
type?: "normal" | "separator" | "submenu"
|
||||
type?: "normal" | "separator" | "submenu";
|
||||
toolTip?: string;
|
||||
enabled?: boolean;
|
||||
submenu?: TrayMenuRegistration[]
|
||||
submenu?: TrayMenuRegistration[];
|
||||
}
|
||||
Reference in new issue
Block a user