mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
add no-unused and react/recommended to eslint (#1523)
* add no-unused-vars and no-unused-imports * added quotes: double, and remove ignore pattern * move itif and describeif into utils Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
10eb082854
commit
7451869c25
199 files changed
+1178
-807
No files matched your search
@@ -106,8 +106,9 @@ export class Dock extends React.Component<Props> {
|
||||
autoFocus={isOpen}
|
||||
className="dock-tabs"
|
||||
value={selectedTab} onChange={this.onChangeTab}
|
||||
children={tabs.map(tab => <Fragment key={tab.id}>{this.renderTab(tab)}</Fragment>)}
|
||||
/>
|
||||
>
|
||||
{tabs.map(tab => <Fragment key={tab.id}>{this.renderTab(tab)}</Fragment>)}
|
||||
</Tabs>
|
||||
<div className="toolbar flex gaps align-center box grow">
|
||||
<div className="dock-menu box grow">
|
||||
<MenuActions usePortal triggerIcon={{ material: "add", className: "new-dock-tab", tooltip: <Trans>New tab</Trans> }} closeOnScroll={false}>
|
||||
|
||||
@@ -47,7 +47,7 @@ export class EditResourceStore extends DockTabStore<KubeEditResource> {
|
||||
}
|
||||
|
||||
getTabByResource(object: KubeObject): IDockTab {
|
||||
const [tabId] = Array.from(this.data).find(([tabId, { resource }]) => {
|
||||
const [tabId] = Array.from(this.data).find(([, { resource }]) => {
|
||||
return object.selfLink === resource;
|
||||
}) || [];
|
||||
return dockStore.getTabById(tabId);
|
||||
@@ -87,4 +87,4 @@ export function editResourceTab(object: KubeObject, tabParams: Partial<IDockTab>
|
||||
|
||||
export function isEditResourceTab(tab: IDockTab) {
|
||||
return tab && tab.kind === TabKind.EDIT_RESOURCE;
|
||||
}
|
||||
}
|
||||
@@ -60,17 +60,15 @@ export class InstallChartStore extends DockTabStore<IChartInstallData> {
|
||||
}
|
||||
|
||||
@action
|
||||
async loadValues(tabId: TabId) {
|
||||
async loadValues(tabId: TabId, attempt = 0): Promise<void> {
|
||||
const data = this.getData(tabId);
|
||||
const { repo, name, version } = data;
|
||||
|
||||
// This loop is for "retrying" the "getValues" call
|
||||
for (const _ of Array(3)) {
|
||||
const values = await helmChartsApi.getValues(repo, name, version);
|
||||
if (values) {
|
||||
this.setData(tabId, { ...data, values });
|
||||
return;
|
||||
}
|
||||
const values = await helmChartsApi.getValues(repo, name, version);
|
||||
if (values) {
|
||||
this.setData(tabId, { ...data, values });
|
||||
} else if (attempt < 4) {
|
||||
return this.loadValues(tabId, attempt + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ export class PodLogs extends React.Component<Props> {
|
||||
* @param query {string} A text from search field
|
||||
*/
|
||||
@autobind()
|
||||
onSearch(query: string) {
|
||||
onSearch() {
|
||||
this.toOverlay();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user