Enable object-shorthand rule (#1500)

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
Panu Horsmalahti authored and GitHub committed 2020-11-24 13:16:35 +02:00
1 parent 2a8cfe5e67
commit ff93760dc4
42 files changed
+69 -66

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ export class ClusterApi extends KubeApi<Cluster> {
async getMetrics(nodeNames: string[], params?: IMetricsReqParams): Promise<IClusterMetrics> {
const nodes = nodeNames.join("|");
const opts = { category: "cluster", nodes: nodes };
const opts = { category: "cluster", nodes };
return metricsApi.getMetrics({
memoryUsage: opts,
+1 -1
View File
@@ -20,7 +20,7 @@ export class DeploymentApi extends KubeApi<Deployment> {
data: {
metadata: params,
spec: {
replicas: replicas
replicas
}
}
});
@@ -119,7 +119,7 @@ export const helmReleasesApi = {
const path = endpoint({ name, namespace }) + "/rollback";
return apiBase.put(path, {
data: {
revision: revision
revision
}
});
}
+2 -2
View File
@@ -84,8 +84,8 @@ export class JsonApi<D = JsonApiData, P extends JsonApiParams = JsonApiParams> {
}
const infoLog: JsonApiLog = {
method: reqInit.method.toUpperCase(),
reqUrl: reqUrl,
reqInit: reqInit,
reqUrl,
reqInit,
};
return cancelableFetch(reqUrl, reqInit).then(res => {
return this.parseResponse<D>(res, infoLog);
+3 -3
View File
@@ -73,7 +73,7 @@ export function forCluster<T extends KubeObject>(cluster: IKubeApiCluster, kubeC
});
return new KubeApi({
objectConstructor: kubeClass,
request: request
request
});
}
@@ -228,7 +228,7 @@ export class KubeApi<T extends KubeObject = any> {
apiVersion: this.apiVersionWithGroup,
resource: this.apiResource,
namespace: this.isNamespaced ? namespace : undefined,
name: name,
name,
});
return resourcePath + (query ? `?` + stringify(this.normalizeQuery(query)) : "");
}
@@ -256,7 +256,7 @@ export class KubeApi<T extends KubeObject = any> {
this.setResourceVersion("", metadata.resourceVersion);
return items.map(item => new KubeObjectConstructor({
kind: this.kind,
apiVersion: apiVersion,
apiVersion,
...item,
}));
}