Lint: object-curly-spacing (error) (#4198)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-11-01 08:45:45 -04:00
1 parent 0759b80435
commit 41863e87ce
89 files changed
+230 -216

No files matched your search

+1 -1
View File
@@ -163,7 +163,7 @@ export class CustomResourceDefinition extends KubeObject {
}
} else if (this.spec.version) {
const { additionalPrinterColumns: apc } = this.spec;
const additionalPrinterColumns = apc?.map(({ JSONPath, ...apc}) => ({ ...apc, jsonPath: JSONPath }));
const additionalPrinterColumns = apc?.map(({ JSONPath, ...apc }) => ({ ...apc, jsonPath: JSONPath }));
return {
name: this.spec.version,
@@ -61,7 +61,7 @@ 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() }
}
}
}
@@ -122,7 +122,7 @@ export class Deployment extends WorkloadKubeObject {
declare spec: {
replicas: number;
selector: { matchLabels: { [app: string]: string } };
selector: { matchLabels: { [app: string]: string }};
template: {
metadata: {
creationTimestamp?: string;
+1 -1
View File
@@ -83,7 +83,7 @@ export class EndpointAddress implements IEndpointAddress {
getTargetRef(): ITargetRef {
if (this.targetRef) {
return Object.assign(this.targetRef, {apiVersion: "v1"});
return Object.assign(this.targetRef, { apiVersion: "v1" });
} else {
return null;
}
+4 -4
View File
@@ -128,7 +128,7 @@ export class Ingress extends KubeObject {
}
getRoutes() {
const { spec: { tls, rules } } = this;
const { spec: { tls, rules }} = this;
if (!rules) return [];
@@ -165,7 +165,7 @@ export class Ingress extends KubeObject {
}
getHosts() {
const { spec: { rules } } = this;
const { spec: { rules }} = this;
if (!rules) return [];
@@ -174,7 +174,7 @@ export class Ingress extends KubeObject {
getPorts() {
const ports: number[] = [];
const { spec: { tls, rules, backend, defaultBackend } } = this;
const { spec: { tls, rules, backend, defaultBackend }} = this;
const httpPort = 80;
const tlsPort = 443;
// Note: not using the port name (string)
@@ -196,7 +196,7 @@ export class Ingress extends KubeObject {
}
getLoadBalancers() {
const { status: { loadBalancer = { ingress: [] } } } = this;
const { status: { loadBalancer = { ingress: [] }}} = this;
return (loadBalancer.ingress ?? []).map(address => (
address.hostname || address.ip
+1 -1
View File
@@ -30,7 +30,7 @@ export class NodesApi extends KubeApi<Node> {
}
export function getMetricsForAllNodes(): Promise<INodeMetrics> {
const opts = { category: "nodes"};
const opts = { category: "nodes" };
return metricsApi.getMetrics({
memoryUsage: opts,
@@ -29,7 +29,7 @@ export interface PodDisruptionBudget {
spec: {
minAvailable: string;
maxUnavailable: string;
selector: { matchLabels: { [app: string]: string } };
selector: { matchLabels: { [app: string]: string }};
};
status: {
currentHealthy: number
+1 -1
View File
@@ -411,7 +411,7 @@ export class Pod extends WorkloadKubeObject {
}
getNodeSelectors(): string[] {
const { nodeSelector = {} } = this.spec;
const { nodeSelector = {}} = this.spec;
return Object.entries(nodeSelector).map(values => values.join(": "));
}
@@ -78,7 +78,7 @@ export class ReplicaSet extends WorkloadKubeObject {
declare spec: {
replicas?: number;
selector: { matchLabels: { [app: string]: string } };
selector: { matchLabels: { [app: string]: string }};
template?: {
metadata: {
labels: {