Upgrade to latest for all linting deps (#4755)

* Upgrade to eslint latest

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix OOM error

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* resolve PR comments

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-01-29 07:46:37 -05:00
1 parent 2ad78c2a86
commit 38790eb886
35 files changed
+284 -470

No files matched your search

@@ -276,8 +276,7 @@ export class DockStore implements DockStorageState {
}
}
@action
createTab = (rawTabDesc: DockTabCreate, addNumber = true): DockTab => {
createTab = action((rawTabDesc: DockTabCreate, addNumber = true): DockTab => {
const {
id = uuid.v4(),
kind,
@@ -307,7 +306,7 @@ export class DockStore implements DockStorageState {
this.open();
return tab;
};
});
@action
closeTab(tabId: TabId) {
@@ -93,16 +93,14 @@ class NonInjectedInstallChart extends Component<Props & Dependencies> {
this.props.installChartStore.loadValues(this.tabId);
};
@action
onChange = (values: string) => {
onChange = action((values: string) => {
this.error = "";
this.save({ values });
};
});
@action
onError = (error: Error | string) => {
onError = action((error: Error | string) => {
this.error = error.toString();
};
});
onNamespaceChange = (opt: SelectOption) => {
this.save({ namespace: opt.value });
+4 -6
View File
@@ -103,8 +103,7 @@ export class LogList extends React.Component<LogListProps> {
* Checks if JumpToBottom button should be visible and sets its observable
* @param props Scrolling props from virtual list core
*/
@action
setButtonVisibility = (props: ListOnScrollProps) => {
setButtonVisibility = action((props: ListOnScrollProps) => {
const offset = 100 * this.lineHeight;
const { scrollHeight } = this.virtualListDiv.current;
const { scrollOffset } = props;
@@ -114,19 +113,18 @@ export class LogList extends React.Component<LogListProps> {
} else {
this.isJumpButtonVisible = true;
}
};
});
/**
* Checks if last log line considered visible to user, setting its observable
* @param props Scrolling props from virtual list core
*/
@action
setLastLineVisibility = (props: ListOnScrollProps) => {
setLastLineVisibility = action((props: ListOnScrollProps) => {
const { scrollHeight, clientHeight } = this.virtualListDiv.current;
const { scrollOffset } = props;
this.isLastLineVisible = (clientHeight + scrollOffset) === scrollHeight;
};
});
/**
* Check if user scrolled to top and new logs should be loaded
@@ -86,16 +86,14 @@ export class NonInjectedUpgradeChart extends React.Component<Props & Dependencie
this.version = this.versions[0];
}
@action
onChange = (value: string) => {
onChange = action((value: string) => {
this.error = "";
this.props.upgradeChartStore.values.setData(this.tabId, value);
};
});
@action
onError = (error: Error | string) => {
onError = action((error: Error | string) => {
this.error = error.toString();
};
});
upgrade = async () => {
if (this.error) return null;