Lint: comma-spacing (error) & comma-dangle (error) (#4200)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-11-02 17:38:20 -04:00
1 parent 02e77afcd1
commit c6dce043a7
406 files changed
+1590 -1580

No files matched your search

@@ -66,5 +66,5 @@ if (isClusterPageContext()) {
}
export {
clusterRoleBindingApi
clusterRoleBindingApi,
};
@@ -54,5 +54,5 @@ if (isClusterPageContext()) { // initialize automatically only when within a clu
}
export {
clusterRoleApi
clusterRoleApi,
};
+3 -3
View File
@@ -49,7 +49,7 @@ export function getMetricsByNodeNames(nodeNames: string[], params?: IMetricsReqP
podCapacity: opts,
podAllocatableCapacity: opts,
fsSize: opts,
fsUsage: opts
fsUsage: opts,
}, params);
}
@@ -57,7 +57,7 @@ export enum ClusterStatus {
ACTIVE = "Active",
CREATING = "Creating",
REMOVING = "Removing",
ERROR = "Error"
ERROR = "Error",
}
export interface IClusterMetrics<T = IMetrics> {
@@ -135,5 +135,5 @@ if (isClusterPageContext()) { // initialize automatically only when within a clu
}
export {
clusterApi
clusterApi,
};
@@ -60,5 +60,5 @@ if (isClusterPageContext()) {
}
export {
configMapApi
configMapApi,
};
+3 -3
View File
@@ -117,7 +117,7 @@ export class CustomResourceDefinition extends KubeObject {
params: {
group: this.getGroup(),
name: this.getPluralName(),
}
},
});
}
@@ -217,7 +217,7 @@ export class CustomResourceDefinition extends KubeObject {
return {
...condition,
isReady: status === "True",
tooltip: `${message || reason} (${lastTransitionTime})`
tooltip: `${message || reason} (${lastTransitionTime})`,
};
});
}
@@ -236,5 +236,5 @@ if (isClusterPageContext()) {
}
export {
crdApi
crdApi,
};
+11 -11
View File
@@ -33,14 +33,14 @@ export class CronJobApi extends KubeApi<CronJob> {
return this.request.patch(this.getUrl(params), {
data: {
spec: {
suspend: true
}
}
suspend: true,
},
},
},
{
headers: {
"content-type": "application/strategic-merge-patch+json"
}
"content-type": "application/strategic-merge-patch+json",
},
});
}
@@ -48,14 +48,14 @@ export class CronJobApi extends KubeApi<CronJob> {
return this.request.patch(this.getUrl(params), {
data: {
spec: {
suspend: false
}
}
suspend: false,
},
},
},
{
headers: {
"content-type": "application/strategic-merge-patch+json"
}
"content-type": "application/strategic-merge-patch+json",
},
});
}
}
@@ -153,5 +153,5 @@ if (isClusterPageContext()) {
}
export {
cronJobApi
cronJobApi,
};
@@ -129,5 +129,5 @@ if (isClusterPageContext()) {
}
export {
daemonSetApi
daemonSetApi,
};
+13 -13
View File
@@ -44,14 +44,14 @@ export class DeploymentApi extends KubeApi<Deployment> {
return this.request.patch(this.getScaleApiUrl(params), {
data: {
spec: {
replicas
}
}
replicas,
},
},
},
{
headers: {
"content-type": "application/merge-patch+json"
}
"content-type": "application/merge-patch+json",
},
});
}
@@ -61,16 +61,16 @@ export class DeploymentApi extends KubeApi<Deployment> {
spec: {
template: {
metadata: {
annotations: { "kubectl.kubernetes.io/restartedAt" : moment.utc().format() }
}
}
}
}
annotations: { "kubectl.kubernetes.io/restartedAt" : moment.utc().format() },
},
},
},
},
},
{
headers: {
"content-type": "application/strategic-merge-patch+json"
}
"content-type": "application/strategic-merge-patch+json",
},
});
}
}
@@ -246,5 +246,5 @@ if (isClusterPageContext()) {
}
export {
deploymentApi
deploymentApi,
};
+1 -1
View File
@@ -159,5 +159,5 @@ if (isClusterPageContext()) {
}
export {
endpointApi
endpointApi,
};
+1 -1
View File
@@ -87,5 +87,5 @@ if (isClusterPageContext()) {
}
export {
eventApi
eventApi,
};
@@ -191,7 +191,7 @@ const helmChartValidator = Joi.object<RawHelmChart>({
.items(Joi.string())
.options({
stripUnknown: {
arrays: true
arrays: true,
},
})
.default(() => ([])),
@@ -200,7 +200,7 @@ const helmChartValidator = Joi.object<RawHelmChart>({
.items(Joi.string())
.options({
stripUnknown: {
arrays: true
arrays: true,
},
})
.default(() => ([])),
@@ -209,7 +209,7 @@ const helmChartValidator = Joi.object<RawHelmChart>({
.items(Joi.string())
.options({
stripUnknown: {
arrays: true
arrays: true,
},
})
.default(() => ([])),
@@ -218,7 +218,7 @@ const helmChartValidator = Joi.object<RawHelmChart>({
.items(helmChartMaintainerValidator)
.options({
stripUnknown: {
arrays: true
arrays: true,
},
})
.default(() => ([])),
@@ -227,7 +227,7 @@ const helmChartValidator = Joi.object<RawHelmChart>({
.items(helmChartDependencyValidator)
.options({
stripUnknown: {
arrays: true
arrays: true,
},
})
.default(() => ([])),
@@ -108,7 +108,7 @@ export async function getRelease(name: string, namespace: string): Promise<IRele
return {
...details,
resources
resources,
};
}
@@ -122,7 +122,7 @@ export async function createRelease(payload: IReleaseCreatePayload): Promise<IRe
chart,
values,
...data,
}
},
});
}
@@ -136,7 +136,7 @@ export async function updateRelease(name: string, namespace: string, payload: IR
chart,
values,
...data,
}
},
});
}
+3 -3
View File
@@ -111,7 +111,7 @@ export class HorizontalPodAutoscaler extends KubeObject {
return {
...condition,
isReady: status === "True",
tooltip: `${message || reason} (${lastTransitionTime})`
tooltip: `${message || reason} (${lastTransitionTime})`,
};
});
}
@@ -143,7 +143,7 @@ export class HorizontalPodAutoscaler extends KubeObject {
getMetricValues(metric: IHpaMetric): string {
const metricType = metric.type.toLowerCase();
const currentMetric = this.getCurrentMetrics().find(current =>
metric.type == current.type && this.getMetricName(metric) == this.getMetricName(current)
metric.type == current.type && this.getMetricName(metric) == this.getMetricName(current),
);
const current = currentMetric ? currentMetric[metricType] : null;
const target = metric[metricType];
@@ -173,5 +173,5 @@ if (isClusterPageContext()) {
}
export {
hpaApi
hpaApi,
};
+3 -3
View File
@@ -36,7 +36,7 @@ export function getMetricsForIngress(ingress: string, namespace: string): Promis
bytesSentSuccess: opts,
bytesSentFailure: opts,
requestDurationSeconds: opts,
responseDurationSeconds: opts
responseDurationSeconds: opts,
}, {
namespace,
});
@@ -160,7 +160,7 @@ export class Ingress extends KubeObject {
return {
serviceName,
servicePort
servicePort,
};
}
@@ -216,5 +216,5 @@ if (isClusterPageContext()) {
}
export {
ingressApi
ingressApi,
};
+2 -2
View File
@@ -124,7 +124,7 @@ export class Job extends WorkloadKubeObject {
delete() {
const params: JsonApiParams = {
query: { propagationPolicy: "Background" }
query: { propagationPolicy: "Background" },
};
return super.delete(params);
@@ -158,5 +158,5 @@ if (isClusterPageContext()) {
}
export {
jobApi
jobApi,
};
@@ -90,5 +90,5 @@ if (isClusterPageContext()) {
}
export {
limitRangeApi
limitRangeApi,
};
+4 -4
View File
@@ -87,13 +87,13 @@ export const metricsApi = {
query: {
start, end, step,
"kubernetes_namespace": namespace,
}
},
});
},
async getMetricProviders(): Promise<MetricProviderInfo[]> {
return apiBase.get("/metrics/providers");
}
},
};
export function normalizeMetrics(metrics: IMetrics, frames = 60): IMetrics {
@@ -103,7 +103,7 @@ export function normalizeMetrics(metrics: IMetrics, frames = 60): IMetrics {
resultType: "",
result: [{
metric: {},
values: []
values: [],
} as IMetricsResult],
},
status: "",
@@ -144,7 +144,7 @@ export function normalizeMetrics(metrics: IMetrics, frames = 60): IMetrics {
// always return at least empty values array
result.push({
metric: {},
values: []
values: [],
} as IMetricsResult);
}
@@ -79,5 +79,5 @@ if (isClusterPageContext()) {
}
export {
namespacesApi
namespacesApi,
};
@@ -106,5 +106,5 @@ if (isClusterPageContext()) {
}
export {
networkPolicyApi
networkPolicyApi,
};
+2 -2
View File
@@ -40,7 +40,7 @@ export function getMetricsForAllNodes(): Promise<INodeMetrics> {
cpuUsage: opts,
cpuCapacity: opts,
fsSize: opts,
fsUsage: opts
fsUsage: opts,
});
}
@@ -259,5 +259,5 @@ if (isClusterPageContext()) {
}
export {
nodesApi
nodesApi,
};
@@ -35,9 +35,9 @@ export function getMetricsForPvc(pvc: PersistentVolumeClaim): Promise<IPvcMetric
return metricsApi.getMetrics({
diskUsage: opts,
diskCapacity: opts
diskCapacity: opts,
}, {
namespace: opts.namespace
namespace: opts.namespace,
});
}
@@ -88,7 +88,7 @@ export class PersistentVolumeClaim extends KubeObject {
return pods.filter(pod => {
return pod.getVolumes().filter(volume =>
volume.persistentVolumeClaim &&
volume.persistentVolumeClaim.claimName === this.getName()
volume.persistentVolumeClaim.claimName === this.getName(),
).length > 0;
});
}
@@ -128,5 +128,5 @@ if (isClusterPageContext()) {
}
export {
pvcApi
pvcApi,
};
@@ -111,5 +111,5 @@ if (isClusterPageContext()) {
}
export {
persistentVolumeApi
persistentVolumeApi,
};
@@ -50,5 +50,5 @@ if (isClusterPageContext()) {
}
export {
podMetricsApi
podMetricsApi,
};
@@ -82,5 +82,5 @@ if (isClusterPageContext()) {
}
export {
pdbApi
pdbApi,
};
+4 -4
View File
@@ -82,7 +82,7 @@ export enum PodStatus {
PENDING = "Pending",
RUNNING = "Running",
SUCCEEDED = "Succeeded",
EVICTED = "Evicted"
EVICTED = "Evicted",
}
export interface IPodContainer extends Partial<Record<PodContainerProbe, IContainerProbe>> {
@@ -310,7 +310,7 @@ export class Pod extends WorkloadKubeObject {
const runningContainerNames = new Set(
this.getContainerStatuses()
.filter(({ state }) => state.running)
.map(({ name }) => name)
.map(({ name }) => name),
);
return this.getAllContainers()
@@ -466,7 +466,7 @@ export class Pod extends WorkloadKubeObject {
timeoutSeconds = 0,
periodSeconds = 0,
successThreshold = 0,
failureThreshold = 0
failureThreshold = 0,
} = probeData;
// HTTP Request
@@ -529,5 +529,5 @@ if (isClusterPageContext()) {
}
export {
podsApi
podsApi,
};
@@ -127,5 +127,5 @@ if (isClusterPageContext()) {
}
export {
pspApi
pspApi,
};
@@ -44,9 +44,9 @@ export class ReplicaSetApi extends KubeApi<ReplicaSet> {
data: {
metadata: params,
spec: {
replicas
}
}
replicas,
},
},
});
}
}
@@ -133,5 +133,5 @@ if (isClusterPageContext()) {
}
export {
replicaSetApi
replicaSetApi,
};
@@ -25,7 +25,7 @@ import { apiBase } from "../index";
import type { Patch } from "rfc6902";
export const annotations = [
"kubectl.kubernetes.io/last-applied-configuration"
"kubectl.kubernetes.io/last-applied-configuration",
];
export async function update(resource: object | string): Promise<KubeJsonApiData> {
@@ -90,5 +90,5 @@ if (isClusterPageContext()) {
}
export {
resourceQuotaApi
resourceQuotaApi,
};
@@ -71,5 +71,5 @@ if (isClusterPageContext()) {
}
export {
roleBindingApi
roleBindingApi,
};
+1 -1
View File
@@ -51,5 +51,5 @@ if (isClusterPageContext()) {
}
export{
roleApi
roleApi,
};
+1 -1
View File
@@ -79,5 +79,5 @@ if (isClusterPageContext()) {
}
export {
secretsApi
secretsApi,
};
@@ -27,7 +27,7 @@ export class SelfSubjectRulesReviewApi extends KubeApi<SelfSubjectRulesReview> {
create({ namespace = "default" }): Promise<SelfSubjectRulesReview> {
return super.create({}, {
spec: {
namespace
namespace,
},
});
}
@@ -82,7 +82,7 @@ export class SelfSubjectRulesReview extends KubeObject {
const separator = apiGroup == "" ? "" : ".";
return resource + separator + apiGroup;
})
}),
};
}
}
@@ -96,6 +96,6 @@ if (isClusterPageContext()) {
}
export {
selfSubjectRulesReviewApi
selfSubjectRulesReviewApi,
};
@@ -62,5 +62,5 @@ if (isClusterPageContext()) {
}
export {
serviceAccountsApi
serviceAccountsApi,
};
+1 -1
View File
@@ -157,5 +157,5 @@ if (isClusterPageContext()) {
}
export {
serviceApi
serviceApi,
};
@@ -42,14 +42,14 @@ export class StatefulSetApi extends KubeApi<StatefulSet> {
return this.request.patch(this.getScaleApiUrl(params), {
data: {
spec: {
replicas
}
}
replicas,
},
},
},
{
headers: {
"content-type": "application/merge-patch+json"
}
"content-type": "application/merge-patch+json",
},
});
}
}
@@ -162,5 +162,5 @@ if (isClusterPageContext()) {
}
export {
statefulSetApi
statefulSetApi,
};
@@ -72,5 +72,5 @@ if (isClusterPageContext()) {
}
export {
storageClassApi
storageClassApi,
};