mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Enable consistent-type-imports eslint rule (#5205)
This commit is contained in:
1 parent
93a8d0f157
commit
1a29759bff
402 files changed
+991
-503
No files matched your search
@@ -5,7 +5,8 @@
|
||||
|
||||
import directoryForUserDataInjectable from "../../../../common/app-paths/directory-for-user-data/directory-for-user-data.injectable";
|
||||
import { getDiForUnitTesting } from "../../../getDiForUnitTesting";
|
||||
import { DockStore, DockTab, TabKind } from "../dock/store";
|
||||
import type { DockStore, DockTab } from "../dock/store";
|
||||
import { TabKind } from "../dock/store";
|
||||
import dockStoreInjectable from "../dock/store.injectable";
|
||||
import fse from "fs-extra";
|
||||
|
||||
|
||||
@@ -8,7 +8,8 @@ import { fireEvent } from "@testing-library/react";
|
||||
import "@testing-library/jest-dom/extend-expect";
|
||||
import fse from "fs-extra";
|
||||
import { DockTabs } from "../dock-tabs";
|
||||
import { DockStore, DockTab, TabKind } from "../dock/store";
|
||||
import type { DockStore, DockTab } from "../dock/store";
|
||||
import { TabKind } from "../dock/store";
|
||||
import { noop } from "../../../utils";
|
||||
import { ThemeStore } from "../../../theme.store";
|
||||
import { UserStore } from "../../../../common/user-store";
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import dockStoreInjectable from "../dock/store.injectable";
|
||||
import { DockTabCreateSpecific, TabKind } from "../dock/store";
|
||||
import type { DockTabCreateSpecific } from "../dock/store";
|
||||
import { TabKind } from "../dock/store";
|
||||
|
||||
const createResourceTabInjectable = getInjectable({
|
||||
id: "create-resource-tab",
|
||||
|
||||
@@ -9,7 +9,8 @@ import "../../../../common/vars";
|
||||
import readFileInjectable from "../../../../common/fs/read-file.injectable";
|
||||
import readDirInjectable from "../../../../common/fs/read-dir.injectable";
|
||||
import type { RawTemplates } from "./create-resource-templates.injectable";
|
||||
import getAbsolutePathInjectable, { GetAbsolutePath } from "../../../../common/path/get-absolute-path.injectable";
|
||||
import type { GetAbsolutePath } from "../../../../common/path/get-absolute-path.injectable";
|
||||
import getAbsolutePathInjectable from "../../../../common/path/get-absolute-path.injectable";
|
||||
|
||||
interface Dependencies {
|
||||
readDir: (dirPath: string) => Promise<string[]>;
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
|
||||
import type { StorageHelper } from "../../../utils";
|
||||
import { DockTabStorageState, DockTabStore } from "../dock-tab-store/dock-tab.store";
|
||||
import type { DockTabStorageState } from "../dock-tab-store/dock-tab.store";
|
||||
import { DockTabStore } from "../dock-tab-store/dock-tab.store";
|
||||
|
||||
interface Dependencies {
|
||||
createStorage:<T> (storageKey: string, options: DockTabStorageState<T>) => StorageHelper<DockTabStorageState<T>>;
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { computed, IComputedValue, observable } from "mobx";
|
||||
import type { IComputedValue } from "mobx";
|
||||
import { computed, observable } from "mobx";
|
||||
import path from "path";
|
||||
import os from "os";
|
||||
import { delay, getOrInsert, waitForPath } from "../../../utils";
|
||||
|
||||
@@ -4,9 +4,11 @@
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { GroupSelectOption, Select, SelectOption } from "../../select";
|
||||
import type { GroupSelectOption, SelectOption } from "../../select";
|
||||
import { Select } from "../../select";
|
||||
import yaml from "js-yaml";
|
||||
import { IComputedValue, makeObservable, observable } from "mobx";
|
||||
import type { IComputedValue } from "mobx";
|
||||
import { makeObservable, observable } from "mobx";
|
||||
import { observer } from "mobx-react";
|
||||
import type { CreateResourceTabStore } from "./store";
|
||||
import type { DockTab } from "../dock/store";
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { DockTabStore, DockTabStoreOptions } from "./dock-tab.store";
|
||||
import type { DockTabStoreOptions } from "./dock-tab.store";
|
||||
import { DockTabStore } from "./dock-tab.store";
|
||||
import createStorageInjectable from "../../../utils/create-storage/create-storage.injectable";
|
||||
|
||||
const createDockTabStoreInjectable = getInjectable({
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
|
||||
import { action, observable, reaction } from "mobx";
|
||||
import { autoBind, StorageHelper, toJS } from "../../../utils";
|
||||
import type { StorageHelper } from "../../../utils";
|
||||
import { autoBind, toJS } from "../../../utils";
|
||||
import type { TabId } from "../dock/store";
|
||||
|
||||
export interface DockTabStoreOptions {
|
||||
|
||||
@@ -9,7 +9,8 @@ import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { boundMethod, cssNames, prevDefault, isMiddleClick } from "../../utils";
|
||||
import type { DockStore, DockTab as DockTabModel } from "./dock/store";
|
||||
import { Tab, TabProps } from "../tabs";
|
||||
import type { TabProps } from "../tabs";
|
||||
import { Tab } from "../tabs";
|
||||
import { Icon } from "../icon";
|
||||
import { Menu, MenuItem } from "../menu";
|
||||
import { observable, makeObservable } from "mobx";
|
||||
|
||||
@@ -13,7 +13,8 @@ import { MenuActions } from "../menu/menu-actions";
|
||||
import { ResizeDirection, ResizingAnchor } from "../resizing-anchor";
|
||||
import { CreateResource } from "./create-resource/view";
|
||||
import { DockTabs } from "./dock-tabs";
|
||||
import { DockStore, DockTab, TabKind } from "./dock/store";
|
||||
import type { DockStore, DockTab } from "./dock/store";
|
||||
import { TabKind } from "./dock/store";
|
||||
import { EditResource } from "./edit-resource/view";
|
||||
import { InstallChart } from "./install-chart/view";
|
||||
import { LogsDockTab } from "./logs/view";
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import createStorageInjectable from "../../../utils/create-storage/create-storage.injectable";
|
||||
import { DockStorageState, TabKind } from "./store";
|
||||
import type { DockStorageState } from "./store";
|
||||
import { TabKind } from "./store";
|
||||
|
||||
const dockStorageInjectable = getInjectable({
|
||||
id: "dock-storage",
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
import * as uuid from "uuid";
|
||||
import { action, comparer, computed, makeObservable, observable, reaction, runInAction } from "mobx";
|
||||
import { autoBind, StorageHelper } from "../../../utils";
|
||||
import type { StorageHelper } from "../../../utils";
|
||||
import { autoBind } from "../../../utils";
|
||||
import throttle from "lodash/throttle";
|
||||
|
||||
export type TabId = string;
|
||||
|
||||
@@ -6,7 +6,8 @@ import { getInjectable } from "@ogre-tools/injectable";
|
||||
import editResourceTabStoreInjectable from "./store.injectable";
|
||||
import dockStoreInjectable from "../dock/store.injectable";
|
||||
import type { KubeObject } from "../../../../common/k8s-api/kube-object";
|
||||
import { DockStore, DockTabCreateSpecific, TabId, TabKind } from "../dock/store";
|
||||
import type { DockStore, DockTabCreateSpecific, TabId } from "../dock/store";
|
||||
import { TabKind } from "../dock/store";
|
||||
import type { EditResourceTabStore } from "./store";
|
||||
import { runInAction } from "mobx";
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
|
||||
import type { StorageHelper } from "../../../utils";
|
||||
import { DockTabStorageState, DockTabStore } from "../dock-tab-store/dock-tab.store";
|
||||
import type { DockTabStorageState } from "../dock-tab-store/dock-tab.store";
|
||||
import { DockTabStore } from "../dock-tab-store/dock-tab.store";
|
||||
import type { TabId } from "../dock/store";
|
||||
import type { KubeObject } from "../../../../common/k8s-api/kube-object";
|
||||
import { apiManager } from "../../../../common/k8s-api/api-manager";
|
||||
|
||||
@@ -10,7 +10,8 @@ import { makeObservable, observable, reaction } from "mobx";
|
||||
import { disposeOnUnmount, observer } from "mobx-react";
|
||||
import type { DockStore, TabId } from "./dock/store";
|
||||
import { cssNames } from "../../utils";
|
||||
import { MonacoEditor, MonacoEditorProps } from "../monaco-editor";
|
||||
import type { MonacoEditorProps } from "../monaco-editor";
|
||||
import { MonacoEditor } from "../monaco-editor";
|
||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||
import dockStoreInjectable from "./dock/store.injectable";
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
import "./info-panel.scss";
|
||||
|
||||
import React, { Component, ReactNode } from "react";
|
||||
import type { ReactNode } from "react";
|
||||
import React, { Component } from "react";
|
||||
import { computed, observable, reaction, makeObservable } from "mobx";
|
||||
import { disposeOnUnmount, observer } from "mobx-react";
|
||||
import { cssNames } from "../../utils";
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import installChartTabStoreInjectable from "./store.injectable";
|
||||
import type { HelmChart } from "../../../../common/k8s-api/endpoints/helm-charts.api";
|
||||
import {
|
||||
import type {
|
||||
DockTab,
|
||||
DockTabCreate,
|
||||
DockTabCreateSpecific,
|
||||
DockTabCreateSpecific } from "../dock/store";
|
||||
import {
|
||||
TabKind,
|
||||
} from "../dock/store";
|
||||
import type { InstallChartTabStore } from "./store";
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
import { action, makeObservable, when } from "mobx";
|
||||
import type { TabId } from "../dock/store";
|
||||
import { DockTabStorageState, DockTabStore } from "../dock-tab-store/dock-tab.store";
|
||||
import type { DockTabStorageState } from "../dock-tab-store/dock-tab.store";
|
||||
import { DockTabStore } from "../dock-tab-store/dock-tab.store";
|
||||
import { getChartDetails, getChartValues } from "../../../../common/k8s-api/endpoints/helm-charts.api";
|
||||
import type { IReleaseUpdateDetails } from "../../../../common/k8s-api/endpoints/helm-releases.api";
|
||||
import type { StorageHelper } from "../../../utils";
|
||||
|
||||
@@ -18,7 +18,8 @@ import { Spinner } from "../../spinner";
|
||||
import { Icon } from "../../icon";
|
||||
import { Button } from "../../button";
|
||||
import { LogsDialog } from "../../dialog/logs-dialog";
|
||||
import { Select, SelectOption } from "../../select";
|
||||
import type { SelectOption } from "../../select";
|
||||
import { Select } from "../../select";
|
||||
import { Input } from "../../input";
|
||||
import { EditorPanel } from "../editor-panel";
|
||||
import type { IReleaseCreatePayload, IReleaseUpdateDetails } from "../../../../common/k8s-api/endpoints/helm-releases.api";
|
||||
|
||||
@@ -17,7 +17,8 @@ import type { DiRender } from "../../../test-utils/renderFor";
|
||||
import { renderFor } from "../../../test-utils/renderFor";
|
||||
import directoryForUserDataInjectable from "../../../../../common/app-paths/directory-for-user-data/directory-for-user-data.injectable";
|
||||
import callForLogsInjectable from "../call-for-logs.injectable";
|
||||
import { LogTabViewModel, LogTabViewModelDependencies } from "../logs-view-model";
|
||||
import type { LogTabViewModelDependencies } from "../logs-view-model";
|
||||
import { LogTabViewModel } from "../logs-view-model";
|
||||
import type { TabId } from "../../dock/store";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { SearchStore } from "../../../../search-store/search-store";
|
||||
|
||||
@@ -10,7 +10,8 @@ import { dockerPod } from "./pod.mock";
|
||||
import { getDiForUnitTesting } from "../../../../getDiForUnitTesting";
|
||||
import type { DiRender } from "../../../test-utils/renderFor";
|
||||
import { renderFor } from "../../../test-utils/renderFor";
|
||||
import { LogTabViewModel, LogTabViewModelDependencies } from "../logs-view-model";
|
||||
import type { LogTabViewModelDependencies } from "../logs-view-model";
|
||||
import { LogTabViewModel } from "../logs-view-model";
|
||||
import type { TabId } from "../../dock/store";
|
||||
import { LogSearch } from "../search";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { DockTabCreate, DockTab, TabKind, TabId } from "../dock/store";
|
||||
import type { DockTabCreate, DockTab, TabId } from "../dock/store";
|
||||
import { TabKind } from "../dock/store";
|
||||
import type { LogTabData } from "./tab-store";
|
||||
import * as uuid from "uuid";
|
||||
import { runInAction } from "mobx";
|
||||
|
||||
@@ -6,7 +6,8 @@ import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { podsStore } from "../../+workloads-pods/pods.store";
|
||||
import type { WorkloadKubeObject } from "../../../../common/k8s-api/workload-kube-object";
|
||||
import type { TabId } from "../dock/store";
|
||||
import createLogsTabInjectable, { CreateLogsTabData } from "./create-logs-tab.injectable";
|
||||
import type { CreateLogsTabData } from "./create-logs-tab.injectable";
|
||||
import createLogsTabInjectable from "./create-logs-tab.injectable";
|
||||
|
||||
export interface WorkloadLogsTabData {
|
||||
workload: WorkloadKubeObject;
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import type { LogTabData } from "./tab-store";
|
||||
import { computed, IComputedValue } from "mobx";
|
||||
import type { IComputedValue } from "mobx";
|
||||
import { computed } from "mobx";
|
||||
import type { TabId } from "../dock/store";
|
||||
import type { SearchStore } from "../../../search-store/search-store";
|
||||
import type { Pod } from "../../../../common/k8s-api/endpoints";
|
||||
|
||||
@@ -9,7 +9,8 @@ import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
|
||||
import { Badge } from "../../badge";
|
||||
import { Select, SelectOption } from "../../select";
|
||||
import type { SelectOption } from "../../select";
|
||||
import { Select } from "../../select";
|
||||
import type { LogTabViewModel } from "./logs-view-model";
|
||||
import type { IPodContainer, Pod } from "../../../../common/k8s-api/endpoints";
|
||||
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { observable, IComputedValue, when } from "mobx";
|
||||
import type { IComputedValue } from "mobx";
|
||||
import { observable, when } from "mobx";
|
||||
import type { IPodLogsQuery, Pod } from "../../../../common/k8s-api/endpoints";
|
||||
import { getOrInsertWith, interval, IntervalFn } from "../../../utils";
|
||||
import type { IntervalFn } from "../../../utils";
|
||||
import { getOrInsertWith, interval } from "../../../utils";
|
||||
import type { TabId } from "../dock/store";
|
||||
import type { LogTabData } from "./tab-store";
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { DockTabStorageState, DockTabStore } from "../dock-tab-store/dock-tab.store";
|
||||
import type { DockTabStorageState } from "../dock-tab-store/dock-tab.store";
|
||||
import { DockTabStore } from "../dock-tab-store/dock-tab.store";
|
||||
import type { StorageHelper } from "../../../utils";
|
||||
import type { TabId } from "../dock/store";
|
||||
import { logTabDataValidator } from "./log-tab-data.validator";
|
||||
|
||||
@@ -14,7 +14,8 @@ import { withInjectables } from "@ogre-tools/injectable-react";
|
||||
import logsViewModelInjectable from "./logs-view-model.injectable";
|
||||
import type { LogTabViewModel } from "./logs-view-model";
|
||||
import type { DockTab } from "../dock/store";
|
||||
import { cssNames, Disposer } from "../../../utils";
|
||||
import type { Disposer } from "../../../utils";
|
||||
import { cssNames } from "../../../utils";
|
||||
import type { KubeWatchSubscribeStoreOptions } from "../../../kube-watch-api/kube-watch-api";
|
||||
import subscribeStoresInjectable from "../../../kube-watch-api/subscribe-stores.injectable";
|
||||
import type { KubeObjectStore } from "../../../../common/k8s-api/kube-object.store";
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import dockStoreInjectable from "../dock/store.injectable";
|
||||
import { DockTabCreateSpecific, TabKind } from "../dock/store";
|
||||
import type { DockTabCreateSpecific } from "../dock/store";
|
||||
import { TabKind } from "../dock/store";
|
||||
|
||||
const createTerminalTabInjectable = getInjectable({
|
||||
id: "create-terminal-tab",
|
||||
|
||||
@@ -7,7 +7,8 @@ import "./terminal-dock-tab.scss";
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { boundMethod, cssNames } from "../../../utils";
|
||||
import { DockTab, DockTabProps } from "../dock-tab";
|
||||
import type { DockTabProps } from "../dock-tab";
|
||||
import { DockTab } from "../dock-tab";
|
||||
import { Icon } from "../../icon";
|
||||
import type { TerminalStore } from "./store";
|
||||
import type { DockStore } from "../dock/store";
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { when } from "mobx";
|
||||
import { TerminalApi, TerminalChannels } from "../../../api/terminal-api";
|
||||
import type { TerminalApi } from "../../../api/terminal-api";
|
||||
import { TerminalChannels } from "../../../api/terminal-api";
|
||||
import { noop } from "../../../utils";
|
||||
import { Notifications } from "../../notifications";
|
||||
import selectDockTabInjectable from "../dock/select-dock-tab.injectable";
|
||||
|
||||
@@ -8,7 +8,8 @@ import { reaction } from "mobx";
|
||||
import { Terminal as XTerm } from "xterm";
|
||||
import { FitAddon } from "xterm-addon-fit";
|
||||
import type { TabId } from "../dock/store";
|
||||
import { TerminalApi, TerminalChannels } from "../../../api/terminal-api";
|
||||
import type { TerminalApi } from "../../../api/terminal-api";
|
||||
import { TerminalChannels } from "../../../api/terminal-api";
|
||||
import { ThemeStore } from "../../../theme.store";
|
||||
import { disposer } from "../../../utils";
|
||||
import { isMac } from "../../../../common/vars";
|
||||
|
||||
@@ -6,7 +6,8 @@ import { getInjectable } from "@ogre-tools/injectable";
|
||||
import upgradeChartTabStoreInjectable from "./store.injectable";
|
||||
import dockStoreInjectable from "../dock/store.injectable";
|
||||
import type { HelmRelease } from "../../../../common/k8s-api/endpoints/helm-releases.api";
|
||||
import { DockStore, DockTabCreateSpecific, TabId, TabKind } from "../dock/store";
|
||||
import type { DockStore, DockTabCreateSpecific, TabId } from "../dock/store";
|
||||
import { TabKind } from "../dock/store";
|
||||
import type { UpgradeChartTabStore } from "./store";
|
||||
import { runInAction } from "mobx";
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
import { action, computed, makeObservable } from "mobx";
|
||||
import type { TabId } from "../dock/store";
|
||||
import { DockTabStorageState, DockTabStore } from "../dock-tab-store/dock-tab.store";
|
||||
import type { DockTabStorageState } from "../dock-tab-store/dock-tab.store";
|
||||
import { DockTabStore } from "../dock-tab-store/dock-tab.store";
|
||||
import { getReleaseValues } from "../../../../common/k8s-api/endpoints/helm-releases.api";
|
||||
import type { StorageHelper } from "../../../utils";
|
||||
|
||||
|
||||
@@ -17,8 +17,10 @@ import { Badge } from "../../badge";
|
||||
import { EditorPanel } from "../editor-panel";
|
||||
import { helmChartStore, type IChartVersion } from "../../+helm-charts/helm-chart.store";
|
||||
import type { HelmRelease, IReleaseUpdateDetails, IReleaseUpdatePayload } from "../../../../common/k8s-api/endpoints/helm-releases.api";
|
||||
import { Select, SelectOption } from "../../select";
|
||||
import { IAsyncComputed, withInjectables } from "@ogre-tools/injectable-react";
|
||||
import type { SelectOption } from "../../select";
|
||||
import { Select } from "../../select";
|
||||
import type { IAsyncComputed } from "@ogre-tools/injectable-react";
|
||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||
import upgradeChartTabStoreInjectable from "./store.injectable";
|
||||
import updateReleaseInjectable from "../../+helm-releases/update-release/update-release.injectable";
|
||||
import releasesInjectable from "../../+helm-releases/releases.injectable";
|
||||
|
||||
Reference in new issue
Block a user