Enforce member-delimiter-style using eslint (#4870)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-02-16 14:43:03 -05:00
1 parent 1c7641708e
commit 600bd659f6
158 files changed
+304 -294

No files matched your search

+15 -15
View File
@@ -44,26 +44,26 @@ users:
`;
interface kubeconfig {
apiVersion: string,
apiVersion: string;
clusters: [{
name: string,
name: string;
cluster: {
server: string
}
}],
server: string;
};
}];
contexts: [{
context: {
cluster: string,
user: string,
},
name: string
}],
cluster: string;
user: string;
};
name: string;
}];
users: [{
name: string
}],
kind: string,
"current-context": string,
preferences: {}
name: string;
}];
kind: string;
"current-context": string;
preferences: {};
}
let mockKubeConfig: kubeconfig;
+3 -3
View File
@@ -160,7 +160,7 @@ export abstract class CatalogCategory extends (EventEmitter as new () => TypedEm
* @param id The id of a category is parse
* @returns The group and kind parts of the ID
*/
public static parseId(id: string): { group?: string, kind?: string } {
public static parseId(id: string): { group?: string; kind?: string } {
const [group, kind] = id.split("/") ?? [];
return { group, kind };
@@ -245,7 +245,7 @@ export interface CatalogEntityContextMenu {
*/
confirm?: {
message: string;
}
};
}
export interface CatalogEntityAddMenu extends CatalogEntityContextMenu {
@@ -257,7 +257,7 @@ export interface CatalogEntitySettingsMenu {
group?: string;
title: string;
components: {
View: React.ComponentType<any>
View: React.ComponentType<any>;
};
}
+1 -1
View File
@@ -7,7 +7,7 @@ import { observable } from "mobx";
export interface ClusterFrameInfo {
frameId: number;
processId: number
processId: number;
}
export const clusterFrameMap = observable.map<string, ClusterFrameInfo>();
+1 -1
View File
@@ -22,7 +22,7 @@ export interface ClusterStoreModel {
}
interface Dependencies {
createCluster: (model: ClusterModel) => Cluster
createCluster: (model: ClusterModel) => Cluster;
}
export class ClusterStore extends BaseStore<ClusterStoreModel> {
+3 -3
View File
@@ -157,7 +157,7 @@ export const initialNodeShellImage = "docker.io/alpine:3.13";
* The arguments for requesting to refresh a cluster's metadata
*/
export interface ClusterRefreshOptions {
refreshMetadata?: boolean
refreshMetadata?: boolean;
}
/**
@@ -170,7 +170,7 @@ export interface ClusterState {
accessible: boolean;
ready: boolean;
isAdmin: boolean;
allowedNamespaces: string[]
allowedResources: string[]
allowedNamespaces: string[];
allowedResources: string[];
isGlobalWatchEnabled: boolean;
}
+1 -1
View File
@@ -14,7 +14,7 @@ export interface HotbarItem {
};
params?: {
[key: string]: string;
}
};
}
export type Hotbar = Required<CreateHotbarData>;
+11 -11
View File
@@ -29,10 +29,10 @@ export function onceCorrect<
listener,
verifier,
}: {
source: IPC,
channel: string,
listener: Listener,
verifier: ListVerifier<Rest<Parameters<Listener>>>,
source: IPC;
channel: string;
listener: Listener;
verifier: ListVerifier<Rest<Parameters<Listener>>>;
}): void {
function wrappedListener(event: ListenerEvent<IPC>, ...args: unknown[]): void {
if (verifier(args)) {
@@ -63,10 +63,10 @@ export function onCorrect<
listener,
verifier,
}: {
source: IPC,
channel: string,
listener: Listener,
verifier: ListVerifier<Rest<Parameters<Listener>>>,
source: IPC;
channel: string;
listener: Listener;
verifier: ListVerifier<Rest<Parameters<Listener>>>;
}): Disposer {
function wrappedListener(event: ListenerEvent<IPC>, ...args: unknown[]) {
if (verifier(args)) {
@@ -89,9 +89,9 @@ export function handleCorrect<
handler,
verifier,
}: {
channel: string,
handler: Handler,
verifier: ListVerifier<Rest<Parameters<Handler>>>,
channel: string;
handler: Handler;
verifier: ListVerifier<Rest<Parameters<Handler>>>;
}): Disposer {
function wrappedHandler(event: Electron.IpcMainInvokeEvent, ...args: unknown[]): ReturnType<Handler> {
if (verifier(args)) {
@@ -90,7 +90,7 @@ export interface RawHelmChart {
urls?: string[];
maintainers?: HelmChartMaintainer[];
dependencies?: RawHelmChartDependency[];
annotations?: Record<string, string>,
annotations?: Record<string, string>;
}
const helmChartMaintainerValidator = Joi.object<HelmChartMaintainer>({
@@ -70,8 +70,8 @@ export interface IReleaseRevision {
type EndpointParams = {}
| { namespace: string }
| { namespace: string, name: string }
| { namespace: string, name: string, route: string };
| { namespace: string; name: string }
| { namespace: string; name: string; route: string };
interface EndpointQuery {
all?: boolean;
@@ -163,13 +163,13 @@ interface HelmReleaseDto {
}
export interface HelmRelease extends HelmReleaseDto, ItemObject {
getNs: () => string
getChart: (withVersion?: boolean) => string
getRevision: () => number
getStatus: () => string
getVersion: () => string
getUpdated: (humanize?: boolean, compact?: boolean) => string | number
getRepo: () => Promise<string>
getNs: () => string;
getChart: (withVersion?: boolean) => string;
getRevision: () => number;
getStatus: () => string;
getVersion: () => string;
getUpdated: (humanize?: boolean, compact?: boolean) => string | number;
getRepo: () => Promise<string>;
}
const toHelmRelease = (release: HelmReleaseDto) : HelmRelease => ({
+3 -3
View File
@@ -58,7 +58,7 @@ export interface IIngressService {
port: {
name?: string;
number?: number;
}
};
}
export const getBackendServiceNamePort = (backend: IIngressBackend) => {
@@ -96,8 +96,8 @@ export interface Ingress {
apiGroup: string;
kind: string;
name: string;
}
}>
};
}>;
};
status: {
loadBalancer: {
@@ -33,7 +33,7 @@ export enum LimitPart {
type LimitRangeParts = Partial<Record<LimitPart, Record<string, string>>>;
export interface LimitRangeItem extends LimitRangeParts {
type: string
type: string;
}
export interface LimitRange {
+2 -2
View File
@@ -101,8 +101,8 @@ export interface Node {
daemonEndpoints?: {
kubeletEndpoint: {
Port: number; //it must be uppercase for backwards compatibility
}
}
};
};
nodeInfo?: {
machineID: string;
systemUUID: string;
@@ -16,10 +16,10 @@ export interface PodDisruptionBudget {
selector: LabelSelector;
};
status: {
currentHealthy: number
desiredHealthy: number
disruptionsAllowed: number
expectedPods: number
currentHealthy: number;
desiredHealthy: number;
disruptionsAllowed: number;
expectedPods: number;
};
}
+5 -5
View File
@@ -43,9 +43,9 @@ export interface IPodMetrics<T = IMetrics> {
[metric: string]: T;
cpuUsage: T;
memoryUsage: T;
fsUsage: T,
fsWrites: T,
fsReads: T,
fsUsage: T;
fsWrites: T;
fsReads: T;
networkReceive: T;
networkTransmit: T;
cpuRequests?: T;
@@ -117,7 +117,7 @@ export interface IPodContainer extends Partial<Record<PodContainerProbe, IContai
};
secretRef?: {
name: string;
}
};
}[];
volumeMounts?: {
name: string;
@@ -273,7 +273,7 @@ export class Pod extends WorkloadKubeObject {
hostIP: string;
podIP: string;
podIPs?: {
ip: string
ip: string;
}[];
startTime: string;
initContainerStatuses?: IPodContainerStatus[];
+6 -6
View File
@@ -88,7 +88,7 @@ export interface KubeApiListOptions {
export interface IKubePreferredVersion {
preferredVersion?: {
version: string;
}
};
}
export interface IKubeResourceList {
@@ -105,7 +105,7 @@ export interface IKubeResourceList {
export interface ILocalKubeApiConfig {
metadata: {
uid: string;
}
};
}
export type PropagationPolicy = undefined | "Orphan" | "Foreground" | "Background";
@@ -116,7 +116,7 @@ export type PropagationPolicy = undefined | "Orphan" | "Foreground" | "Backgroun
export interface IKubeApiCluster extends ILocalKubeApiConfig { }
export type PartialKubeObject<T extends KubeObject> = Partial<Omit<T, "metadata">> & {
metadata?: Partial<T["metadata"]>,
metadata?: Partial<T["metadata"]>;
};
export interface IRemoteKubeApiConfig {
@@ -124,12 +124,12 @@ export interface IRemoteKubeApiConfig {
server: string;
caData?: string;
skipTLSVerify?: boolean;
}
};
user: {
token?: string | (() => Promise<string>);
clientCertificateData?: string;
clientKeyData?: string;
}
};
}
export function forCluster<T extends KubeObject, Y extends KubeApi<T> = KubeApi<T>>(cluster: ILocalKubeApiConfig, kubeClass: KubeObjectConstructor<T>, apiClass: new (apiOpts: IKubeApiOptions<T>) => Y = null): KubeApi<T> {
@@ -219,7 +219,7 @@ export type KubeApiWatchCallback = (data: IKubeWatchEvent<KubeJsonApiData>, erro
export type KubeApiWatchOptions = {
namespace: string;
callback?: KubeApiWatchCallback;
abortController?: AbortController
abortController?: AbortController;
watchId?: string;
retry?: boolean;
+1 -1
View File
@@ -247,7 +247,7 @@ export abstract class KubeObjectStore<T extends KubeObject> extends ItemStore<T>
}
@action
async reloadAll(opts: { force?: boolean, namespaces?: string[], merge?: boolean } = {}) {
async reloadAll(opts: { force?: boolean; namespaces?: string[]; merge?: boolean } = {}) {
const { force = false, ...loadingOptions } = opts;
if (this.isLoading || (this.isLoaded && !force)) {
+1 -1
View File
@@ -147,7 +147,7 @@ export function loadConfigFromString(content: string): ConfigResult {
}
export interface SplitConfigEntry {
config: KubeConfig,
config: KubeConfig;
error?: string;
}
+2 -2
View File
@@ -63,8 +63,8 @@ export function foldAttemptResults(mainAttempt: RouteAttempt, rendererAttempt: R
}
interface Dependencies {
extensionLoader: ExtensionLoader
extensionsStore: ExtensionsStore
extensionLoader: ExtensionLoader;
extensionsStore: ExtensionsStore;
}
export abstract class LensProtocolRouter {
+1 -1
View File
@@ -327,7 +327,7 @@ export type ExtensionRegistry = {
location: ExtensionRegistryLocation.DEFAULT | ExtensionRegistryLocation.NPMRC;
customUrl?: undefined;
} | {
location: ExtensionRegistryLocation.CUSTOM,
location: ExtensionRegistryLocation.CUSTOM;
customUrl: string;
};