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
@@ -31,7 +31,7 @@ import { autobind, createStorage, cssNames, IClassName, isReactNode, noop, Obser
|
||||
import { AddRemoveButtons, AddRemoveButtonsProps } from "../add-remove-buttons";
|
||||
import { NoItems } from "../no-items";
|
||||
import { Spinner } from "../spinner";
|
||||
import { ItemObject, ItemStore } from "../../item.store";
|
||||
import type { ItemObject, ItemStore } from "../../item.store";
|
||||
import { SearchInputUrl } from "../input";
|
||||
import { Filter, FilterType, pageFilters } from "./page-filters.store";
|
||||
import { PageFiltersList } from "./page-filters-list";
|
||||
@@ -247,7 +247,7 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
|
||||
const { isSelected } = store;
|
||||
const item = this.items.find(item => item.getId() == uid);
|
||||
|
||||
if (!item) return;
|
||||
if (!item) return null;
|
||||
const itemId = item.getId();
|
||||
|
||||
return (
|
||||
@@ -279,6 +279,8 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
|
||||
if (!headCell || this.showColumn(headCell)) {
|
||||
return <TableCell key={index} {...cellProps} />;
|
||||
}
|
||||
|
||||
return null;
|
||||
})
|
||||
}
|
||||
{renderItemMenu && (
|
||||
@@ -320,7 +322,7 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
|
||||
const { isReady, filters } = this;
|
||||
|
||||
if (!isReady || !filters.length || hideFilters || !this.showFilters) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
return <PageFiltersList filters={filters}/>;
|
||||
@@ -392,7 +394,7 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
|
||||
renderHeader() {
|
||||
const { showHeader, customizeHeader, renderHeaderTitle, headerClassName, isClusterScoped } = this.props;
|
||||
|
||||
if (!showHeader) return;
|
||||
if (!showHeader) return null;
|
||||
const title = typeof renderHeaderTitle === "function" ? renderHeaderTitle(this) : renderHeaderTitle;
|
||||
const placeholders: IHeaderPlaceholders = {
|
||||
title: <h5 className="title">{title}</h5>,
|
||||
@@ -431,7 +433,7 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
|
||||
const { customizeTableRowProps, renderTableHeader, isSelectable, isConfigurable, store } = this.props;
|
||||
|
||||
if (!renderTableHeader) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
const enabledItems = this.items.filter(item => !customizeTableRowProps(item).disabled);
|
||||
@@ -520,9 +522,7 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
|
||||
}
|
||||
|
||||
renderFooter() {
|
||||
if (this.props.renderFooter) {
|
||||
return this.props.renderFooter(this);
|
||||
}
|
||||
return this.props.renderFooter?.(this);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
Reference in new issue
Block a user