From cc8db57defe854bce4b9d8037904d59246ab720f Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Mon, 10 Oct 2022 13:02:07 +0300 Subject: [PATCH] Linter fixes Signed-off-by: Alex Andreev --- src/extensions/registries/modal-registry.ts | 6 +++++- .../cluster/cluster-modal-items.test.tsx | 16 +++++++++++----- ...s-cluster-frame-child-component.injectable.ts | 6 +++++- .../cluster-modals-registrator.injectable.ts | 9 +++++++-- .../cluster-modals/cluster-modals.injectable.ts | 11 ++++++++--- src/renderer/cluster-modals/cluster-modals.tsx | 8 ++++++-- 6 files changed, 42 insertions(+), 14 deletions(-) diff --git a/src/extensions/registries/modal-registry.ts b/src/extensions/registries/modal-registry.ts index ed1a14e115..bdee1f118f 100644 --- a/src/extensions/registries/modal-registry.ts +++ b/src/extensions/registries/modal-registry.ts @@ -1,3 +1,7 @@ +/** + * Copyright (c) OpenLens Authors. All rights reserved. + * Licensed under MIT License. See LICENSE in root directory for more information. + */ // Extensions-api -> Cluster frame custom modal registration @@ -12,4 +16,4 @@ export interface ClusterModalRegistration { export const clusterModalsInjectionToken = getInjectionToken< IComputedValue ->({ id: "cluster-modals-injection-token" }); \ No newline at end of file +>({ id: "cluster-modals-injection-token" }); diff --git a/src/features/cluster/cluster-modal-items.test.tsx b/src/features/cluster/cluster-modal-items.test.tsx index 46b6e83247..ccc517a435 100644 --- a/src/features/cluster/cluster-modal-items.test.tsx +++ b/src/features/cluster/cluster-modal-items.test.tsx @@ -1,9 +1,15 @@ +/** + * Copyright (c) OpenLens Authors. All rights reserved. + * Licensed under MIT License. See LICENSE in root directory for more information. + */ import { getInjectable } from "@ogre-tools/injectable"; import type { RenderResult } from "@testing-library/react"; import { computed, runInAction } from "mobx"; import React from "react"; -import { ClusterModalRegistration, clusterModalsInjectionToken } from "../../extensions/registries"; -import { ApplicationBuilder, getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder"; +import type { ClusterModalRegistration } from "../../extensions/registries"; +import { clusterModalsInjectionToken } from "../../extensions/registries"; +import type { ApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder"; +import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder"; describe("cluster modal elements", () => { let builder: ApplicationBuilder; @@ -50,8 +56,8 @@ const testClusterModalsInjectable = getInjectable({ id: "test-modal-id", Component: () =>
test modal
, visible: computed(() => true), - }]) + }]); }, - injectionToken: clusterModalsInjectionToken -}); \ No newline at end of file + injectionToken: clusterModalsInjectionToken, +}); diff --git a/src/renderer/cluster-modals/cluster-modals-cluster-frame-child-component.injectable.ts b/src/renderer/cluster-modals/cluster-modals-cluster-frame-child-component.injectable.ts index 1c22bce356..b26bc69ddb 100644 --- a/src/renderer/cluster-modals/cluster-modals-cluster-frame-child-component.injectable.ts +++ b/src/renderer/cluster-modals/cluster-modals-cluster-frame-child-component.injectable.ts @@ -1,3 +1,7 @@ +/** + * Copyright (c) OpenLens Authors. All rights reserved. + * Licensed under MIT License. See LICENSE in root directory for more information. + */ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; import { clusterFrameChildComponentInjectionToken } from "../frames/cluster-frame/cluster-frame-child-component-injection-token"; @@ -15,4 +19,4 @@ const clusterModalsClusterFrameChildComponentInjectable = getInjectable({ injectionToken: clusterFrameChildComponentInjectionToken, }); -export default clusterModalsClusterFrameChildComponentInjectable; \ No newline at end of file +export default clusterModalsClusterFrameChildComponentInjectable; diff --git a/src/renderer/cluster-modals/cluster-modals-registrator.injectable.ts b/src/renderer/cluster-modals/cluster-modals-registrator.injectable.ts index 8cba221cdd..f3560ffa4d 100644 --- a/src/renderer/cluster-modals/cluster-modals-registrator.injectable.ts +++ b/src/renderer/cluster-modals/cluster-modals-registrator.injectable.ts @@ -1,5 +1,10 @@ +/** + * Copyright (c) OpenLens Authors. All rights reserved. + * Licensed under MIT License. See LICENSE in root directory for more information. + */ import { getInjectable } from "@ogre-tools/injectable"; -import { ExtensionRegistrator, extensionRegistratorInjectionToken } from "../../extensions/extension-loader/extension-registrator-injection-token"; +import type { ExtensionRegistrator } from "../../extensions/extension-loader/extension-registrator-injection-token"; +import { extensionRegistratorInjectionToken } from "../../extensions/extension-loader/extension-registrator-injection-token"; import type { LensRendererExtension } from "../../extensions/lens-renderer-extension"; const clusterModalsRegistratorInjectable = getInjectable({ @@ -24,4 +29,4 @@ const clusterModalsRegistratorInjectable = getInjectable({ injectionToken: extensionRegistratorInjectionToken, }); -export default clusterModalsRegistratorInjectable; \ No newline at end of file +export default clusterModalsRegistratorInjectable; diff --git a/src/renderer/cluster-modals/cluster-modals.injectable.ts b/src/renderer/cluster-modals/cluster-modals.injectable.ts index 4f21767e88..61d9c56c2f 100644 --- a/src/renderer/cluster-modals/cluster-modals.injectable.ts +++ b/src/renderer/cluster-modals/cluster-modals.injectable.ts @@ -1,9 +1,14 @@ +/** + * Copyright (c) OpenLens Authors. All rights reserved. + * Licensed under MIT License. See LICENSE in root directory for more information. + */ import { pipeline } from "@ogre-tools/fp"; import { getInjectable } from "@ogre-tools/injectable"; import { computedInjectManyInjectable } from "@ogre-tools/injectable-extension-for-mobx"; import { flatMap } from "lodash/fp"; import type { IComputedValue } from "mobx"; -import { ClusterModalRegistration, clusterModalsInjectionToken } from "../../extensions/registries"; +import type { ClusterModalRegistration } from "../../extensions/registries"; +import { clusterModalsInjectionToken } from "../../extensions/registries"; const clusterModalsInjectable = getInjectable({ id: "cluster-modals", @@ -18,10 +23,10 @@ const clusterModalsInjectable = getInjectable({ ); return registrations; - } + }, }); const dereference = (items: IComputedValue) => items.get(); -export default clusterModalsInjectable; \ No newline at end of file +export default clusterModalsInjectable; diff --git a/src/renderer/cluster-modals/cluster-modals.tsx b/src/renderer/cluster-modals/cluster-modals.tsx index a8f6910ad1..ded19232cf 100644 --- a/src/renderer/cluster-modals/cluster-modals.tsx +++ b/src/renderer/cluster-modals/cluster-modals.tsx @@ -1,3 +1,7 @@ +/** + * Copyright (c) OpenLens Authors. All rights reserved. + * Licensed under MIT License. See LICENSE in root directory for more information. + */ import styles from "./cluster-modals.module.css"; import { withInjectables } from "@ogre-tools/injectable-react"; @@ -17,11 +21,11 @@ export const NonInjectedClusterModals = ({ clusterModals }: Dependencies) => { })} ); -} +}; export const ClusterModals = withInjectables(NonInjectedClusterModals, { getProps: (di, props) => ({ ...props, clusterModals: di.inject(clusterModalsInjectable), }), -}); \ No newline at end of file +});