mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Lint: comma-spacing (error) & comma-dangle (error) (#4200)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
02e77afcd1
commit
c6dce043a7
406 files changed
+1590
-1580
No files matched your search
@@ -35,13 +35,13 @@ jest.mock("winston", () => ({
|
||||
simple: jest.fn(),
|
||||
label: jest.fn(),
|
||||
timestamp: jest.fn(),
|
||||
printf: jest.fn()
|
||||
printf: jest.fn(),
|
||||
},
|
||||
createLogger: jest.fn().mockReturnValue(logger),
|
||||
transports: {
|
||||
Console: jest.fn(),
|
||||
File: jest.fn(),
|
||||
}
|
||||
},
|
||||
}));
|
||||
|
||||
jest.mock("../../common/ipc");
|
||||
@@ -85,7 +85,7 @@ describe("create clusters", () => {
|
||||
}],
|
||||
kind: "Config",
|
||||
preferences: {},
|
||||
})
|
||||
}),
|
||||
};
|
||||
|
||||
mockFs(mockOpts);
|
||||
@@ -93,7 +93,7 @@ describe("create clusters", () => {
|
||||
c = new Cluster({
|
||||
id: "foo",
|
||||
contextName: "minikube",
|
||||
kubeConfigPath: "minikube-config.yml"
|
||||
kubeConfigPath: "minikube-config.yml",
|
||||
});
|
||||
});
|
||||
|
||||
@@ -126,12 +126,12 @@ describe("create clusters", () => {
|
||||
}({
|
||||
id: "foo",
|
||||
contextName: "minikube",
|
||||
kubeConfigPath: "minikube-config.yml"
|
||||
kubeConfigPath: "minikube-config.yml",
|
||||
});
|
||||
|
||||
c.contextHandler = {
|
||||
ensureServer: jest.fn(),
|
||||
stopServer: jest.fn()
|
||||
stopServer: jest.fn(),
|
||||
} as any;
|
||||
|
||||
jest.spyOn(c, "reconnect");
|
||||
|
||||
@@ -91,7 +91,7 @@ AppPaths.init();
|
||||
describe("ContextHandler", () => {
|
||||
beforeEach(() => {
|
||||
mockFs({
|
||||
"tmp": {}
|
||||
"tmp": {},
|
||||
});
|
||||
|
||||
PrometheusProviderRegistry.createInstance();
|
||||
|
||||
@@ -41,7 +41,7 @@ jest.mock("winston", () => ({
|
||||
transports: {
|
||||
Console: jest.fn(),
|
||||
File: jest.fn(),
|
||||
}
|
||||
},
|
||||
}));
|
||||
|
||||
jest.mock("../../common/ipc");
|
||||
|
||||
@@ -43,7 +43,7 @@ jest.mock("winston", () => ({
|
||||
transports: {
|
||||
Console: jest.fn(),
|
||||
File: jest.fn(),
|
||||
}
|
||||
},
|
||||
}));
|
||||
|
||||
import { KubeconfigManager } from "../kubeconfig-manager";
|
||||
@@ -102,7 +102,7 @@ describe("kubeconfig manager tests", () => {
|
||||
}],
|
||||
kind: "Config",
|
||||
preferences: {},
|
||||
})
|
||||
}),
|
||||
};
|
||||
|
||||
mockFs(mockOpts);
|
||||
|
||||
@@ -25,7 +25,7 @@ describe("isLongRunningRequest", () => {
|
||||
it("returns true on watches", () => {
|
||||
["watch=true", "watch=1", "watch"].forEach((param) => {
|
||||
expect(
|
||||
isLongRunningRequest(`/api/v1/namespaces/default/pods?${param}`)
|
||||
isLongRunningRequest(`/api/v1/namespaces/default/pods?${param}`),
|
||||
).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -33,7 +33,7 @@ describe("isLongRunningRequest", () => {
|
||||
it("returns false on disabled watches", () => {
|
||||
["watch=false", "watch=0", ""].forEach((param) => {
|
||||
expect(
|
||||
isLongRunningRequest(`/api/v1/namespaces/default/pods?${param}`)
|
||||
isLongRunningRequest(`/api/v1/namespaces/default/pods?${param}`),
|
||||
).toBeFalsy();
|
||||
});
|
||||
});
|
||||
@@ -41,7 +41,7 @@ describe("isLongRunningRequest", () => {
|
||||
it("returns true on follows", () => {
|
||||
["follow=true", "follow=1", "follow"].forEach((param) => {
|
||||
expect(
|
||||
isLongRunningRequest(`/api/v1/namespaces/default/pods/foo/log?${param}`)
|
||||
isLongRunningRequest(`/api/v1/namespaces/default/pods/foo/log?${param}`),
|
||||
).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -49,7 +49,7 @@ describe("isLongRunningRequest", () => {
|
||||
it("returns false on disabled follows", () => {
|
||||
["follow=false", "follow=0", ""].forEach((param) => {
|
||||
expect(
|
||||
isLongRunningRequest(`/api/v1/namespaces/default/pods/foo/log?${param}`)
|
||||
isLongRunningRequest(`/api/v1/namespaces/default/pods/foo/log?${param}`),
|
||||
).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -44,7 +44,7 @@ describe("Router", () => {
|
||||
it("blocks path traversal attacks", async () => {
|
||||
const response: any = {
|
||||
statusCode: 200,
|
||||
end: jest.fn()
|
||||
end: jest.fn(),
|
||||
};
|
||||
|
||||
await (Router as any).handleStaticFile({
|
||||
@@ -63,10 +63,10 @@ describe("Router", () => {
|
||||
statusCode: 200,
|
||||
write: jest.fn(),
|
||||
setHeader: jest.fn(),
|
||||
end: jest.fn()
|
||||
end: jest.fn(),
|
||||
};
|
||||
const req: any = {
|
||||
url: ""
|
||||
url: "",
|
||||
};
|
||||
|
||||
await (Router as any).handleStaticFile({
|
||||
|
||||
Reference in new issue
Block a user