mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Turn on noUnusedLocals, noImplicitReturns, importsNotUsedAsValues: error, and isolatedModules (#2777)
This commit is contained in:
1 parent
489cef9595
commit
5ed4537979
287 files changed
+704
-628
No files matched your search
@@ -27,7 +27,7 @@ import { DrawerItem, DrawerTitle } from "../drawer";
|
||||
import { Link } from "react-router-dom";
|
||||
import { observer } from "mobx-react";
|
||||
import { KubeObjectDetailsProps, getDetailsUrl } from "../kube-object";
|
||||
import { KubeEvent } from "../../api/endpoints/events.api";
|
||||
import type { KubeEvent } from "../../api/endpoints/events.api";
|
||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
||||
import { Table, TableCell, TableHead, TableRow } from "../table";
|
||||
import { lookupApiLink } from "../../api/kube-api";
|
||||
@@ -42,7 +42,7 @@ export class EventDetails extends React.Component<Props> {
|
||||
render() {
|
||||
const { object: event } = this.props;
|
||||
|
||||
if (!event) return;
|
||||
if (!event) return null;
|
||||
const { message, reason, count, type, involvedObject } = event;
|
||||
const { kind, name, namespace, fieldPath } = involvedObject;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import compact from "lodash/compact";
|
||||
import { KubeObjectStore } from "../../kube-object.store";
|
||||
import { autobind } from "../../utils";
|
||||
import { eventApi, KubeEvent } from "../../api/endpoints/events.api";
|
||||
import { KubeObject } from "../../api/kube-object";
|
||||
import type { KubeObject } from "../../api/kube-object";
|
||||
import { Pod } from "../../api/endpoints/pods.api";
|
||||
import { podsStore } from "../+workloads-pods/pods.store";
|
||||
import { apiManager } from "../../api/api-manager";
|
||||
@@ -65,7 +65,7 @@ export class EventStore extends KubeObjectStore<KubeEvent> {
|
||||
if (kind == Pod.kind) { // Wipe out running pods
|
||||
const pod = podsStore.items.find(pod => pod.getId() == uid);
|
||||
|
||||
if (!pod || (!pod.hasIssues() && pod.spec.priority < 500000)) return;
|
||||
if (!pod || (!pod.hasIssues() && pod.spec.priority < 500000)) return undefined;
|
||||
}
|
||||
|
||||
return recent;
|
||||
|
||||
@@ -28,9 +28,9 @@ import { orderBy } from "lodash";
|
||||
import { TabLayout } from "../layout/tab-layout";
|
||||
import { EventStore, eventStore } from "./event.store";
|
||||
import { getDetailsUrl, KubeObjectListLayout, KubeObjectListLayoutProps } from "../kube-object";
|
||||
import { KubeEvent } from "../../api/endpoints/events.api";
|
||||
import { TableSortCallbacks, TableSortParams, TableProps } from "../table";
|
||||
import { IHeaderPlaceholders } from "../item-object-list";
|
||||
import type { KubeEvent } from "../../api/endpoints/events.api";
|
||||
import type { TableSortCallbacks, TableSortParams, TableProps } from "../table";
|
||||
import type { IHeaderPlaceholders } from "../item-object-list";
|
||||
import { Tooltip } from "../tooltip";
|
||||
import { Link } from "react-router-dom";
|
||||
import { cssNames, IClassName, stopPropagation } from "../../utils";
|
||||
|
||||
@@ -23,7 +23,7 @@ import "./kube-event-details.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { KubeObject } from "../../api/kube-object";
|
||||
import type { KubeObject } from "../../api/kube-object";
|
||||
import { DrawerItem, DrawerTitle } from "../drawer";
|
||||
import { cssNames } from "../../utils";
|
||||
import { eventStore } from "./event.store";
|
||||
|
||||
@@ -23,10 +23,10 @@ import "./kube-event-icon.scss";
|
||||
|
||||
import React from "react";
|
||||
import { Icon } from "../icon";
|
||||
import { KubeObject } from "../../api/kube-object";
|
||||
import type { KubeObject } from "../../api/kube-object";
|
||||
import { eventStore } from "./event.store";
|
||||
import { cssNames } from "../../utils";
|
||||
import { KubeEvent } from "../../api/endpoints/events.api";
|
||||
import type { KubeEvent } from "../../api/endpoints/events.api";
|
||||
|
||||
interface Props {
|
||||
object: KubeObject;
|
||||
|
||||
Reference in new issue
Block a user