Fix all ESLint errors

This commit is contained in:
2025-03-28 12:25:04 +01:00
parent 3bf8859ff9
commit f5202f596d
21 changed files with 74 additions and 44 deletions

@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */
import { Paper, Typography } from "@mui/material";
import React, { PropsWithChildren } from "react";
import Grid from "@mui/material/Grid";

@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
import React from "react";
import { TextInput } from "./TextInput";
@ -32,7 +33,7 @@ export function IPInputWithMask(p: {
const currValue =
p.ipAndMask ??
(p.ip ?? "") + (p.mask || showSlash.current ? "/" : "") + (p.mask ?? "");
`${p.ip ?? ""}${p.mask || showSlash.current ? "/" : ""}${p.mask ?? ""}`;
const { onValueChange, ...props } = p;
return (

@ -1,3 +1,5 @@
/* eslint-disable react-x/no-array-index-key */
/* eslint-disable react-hooks/exhaustive-deps */
import React from "react";
import { useNavigate } from "react-router-dom";
import { NWFilter, NWFilterURL } from "../../api/NWFilterApi";

@ -25,9 +25,7 @@ export function NWFilterSelectInput(p: {
value={selectedValue}
onDelete={p.editable ? () => p.onChange?.(undefined) : undefined}
onClick={
!p.editable && selectedValue
? () => navigate(NWFilterURL(selectedValue))
: undefined
!p.editable ? () => navigate(NWFilterURL(selectedValue)) : undefined
}
/>
);
@ -48,7 +46,7 @@ export function NWFilterSelectInput(p: {
renderInput={(params) => (
<TextField {...params} variant="standard" label={p.label} />
)}
renderOption={(_props, option, _state) => (
renderOption={(_props, option) => (
<NWFilterItem
dense
onClick={() => {

@ -24,10 +24,13 @@ export function RadioGroupInput(p: {
<RadioGroup
row
value={p.value}
onChange={(_ev, v) => { p.onValueChange(v); }}
onChange={(_ev, v) => {
p.onValueChange(v);
}}
>
{p.options.map((o) => (
<FormControlLabel
key={o.value}
disabled={!p.editable}
value={o.value}
control={<Radio />}

@ -1,3 +1,4 @@
/* eslint-disable react-x/no-array-index-key */
import { mdiNetworkOutline } from "@mdi/js";
import Icon from "@mdi/react";
import DeleteIcon from "@mui/icons-material/Delete";
@ -51,7 +52,6 @@ export function VMNetworksList(p: {
{p.vm.networks.map((n, num) => (
<EditSection key={num}>
<NetworkInfoWidget
key={num}
network={n}
removeFromList={() => {
p.vm.networks.splice(num, 1);