Fix ESLint issues
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-06-16 21:52:00 +02:00
parent 12833dc6da
commit c968b64b51

View File

@ -1,3 +1,5 @@
/* eslint-disable @typescript-eslint/no-base-to-string */
import Editor from "@monaco-editor/react";
import BookIcon from "@mui/icons-material/Book";
import RefreshIcon from "@mui/icons-material/Refresh";
@ -262,7 +264,7 @@ function CloudInitUserDataAssistant(p: CloudInitProps): React.ReactElement {
editable={p.editable}
label="Show all startup messages on tty1, not serial"
checked={
!!(user_data.get("runcmd") as any | undefined)?.items.find(
!!(user_data.get("runcmd") as any)?.items.find(
(a: any) => a.value === SYSTEMD_NOT_SERIAL
)
}
@ -292,7 +294,7 @@ function CloudInitTextInput(p: {
refUrl: string;
attrPath: Iterable<unknown>;
yaml: YAML.Document;
onChange: () => void;
onChange?: () => void;
}): React.ReactElement {
return (
<TextInput
@ -321,7 +323,7 @@ function CloudInitBooleanInput(p: {
refUrl: string;
attrPath: Iterable<unknown>;
yaml: YAML.Document;
onChange: () => void;
onChange?: () => void;
}): React.ReactElement {
return (
<CheckboxInput
@ -329,7 +331,7 @@ function CloudInitBooleanInput(p: {
label={p.name}
checked={p.yaml.getIn(p.attrPath) === true}
onValueChange={(v) => {
if (v !== undefined) p.yaml.setIn(p.attrPath, v);
if (v) p.yaml.setIn(p.attrPath, v);
else p.yaml.deleteIn(p.attrPath);
p.onChange?.();
}}