diff --git a/src/App.test.tsx b/src/App.test.tsx index f31db5ff..a162092c 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -1,5 +1,6 @@ import { act, cleanup, render, screen, waitFor } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; +import { describe, expect, it } from "vitest"; import App from "./App"; import { budgetsDB, calcHistDB, optionsDB } from "./db"; import { diff --git a/src/components/Budget/Budget.test.ts b/src/components/Budget/Budget.test.ts index f4e12d24..e01b45a4 100644 --- a/src/components/Budget/Budget.test.ts +++ b/src/components/Budget/Budget.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from "vitest"; import { itemForm1, itemForm2 } from "../../setupTests"; import { Budget } from "./Budget"; diff --git a/src/components/Budget/BudgetPage.test.tsx b/src/components/Budget/BudgetPage.test.tsx index 951ed651..53af02c1 100644 --- a/src/components/Budget/BudgetPage.test.tsx +++ b/src/components/Budget/BudgetPage.test.tsx @@ -1,5 +1,6 @@ import { cleanup, render, screen, waitFor } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; +import { describe, expect, it } from "vitest"; import { budgetsDB } from "../../db"; import { budgetContextSpy, diff --git a/src/components/Budget/BudgetPage.tsx b/src/components/Budget/BudgetPage.tsx index 026182a8..7cad256a 100644 --- a/src/components/Budget/BudgetPage.tsx +++ b/src/components/Budget/BudgetPage.tsx @@ -76,6 +76,7 @@ export function BudgetPage() { // useWhatChanged([budget, name]); + // biome-ignore lint/correctness/useExhaustiveDependencies: useEffect(() => { try { const shouldLoadBudgetsFromList = @@ -98,7 +99,6 @@ export function BudgetPage() { handleError(e); setLoadingFromDB(false); } - // eslint-disable-next-line react-hooks/exhaustive-deps }, [name, loadingFromDB]); return ( diff --git a/src/components/Budget/CsvItem.test.ts b/src/components/Budget/CsvItem.test.ts index 366fc81f..697544d6 100644 --- a/src/components/Budget/CsvItem.test.ts +++ b/src/components/Budget/CsvItem.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from "vitest"; import { CsvItem } from "./CsvItem"; describe("CsvItem", () => { diff --git a/src/components/CalculateButton/CalculateButton.test.tsx b/src/components/CalculateButton/CalculateButton.test.tsx index 57bad05f..9202a6dd 100644 --- a/src/components/CalculateButton/CalculateButton.test.tsx +++ b/src/components/CalculateButton/CalculateButton.test.tsx @@ -1,6 +1,7 @@ import { render, screen, waitFor } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import { vi } from "vitest"; +import { describe, expect, it } from "vitest"; import { itemForm1 } from "../../setupTests"; import { CalculateButton } from "./CalculateButton"; diff --git a/src/components/CalculateButton/CalculateButton.tsx b/src/components/CalculateButton/CalculateButton.tsx index 51cfd699..14a1ebcb 100644 --- a/src/components/CalculateButton/CalculateButton.tsx +++ b/src/components/CalculateButton/CalculateButton.tsx @@ -89,9 +89,9 @@ export function CalculateButton({ }); } + // biome-ignore lint/correctness/useExhaustiveDependencies: useEffect(() => { getHistory(); - // eslint-disable-next-line react-hooks/exhaustive-deps }, [showHistory]); return ( diff --git a/src/components/Chart/Chart.test.tsx b/src/components/Chart/Chart.test.tsx index 333137b8..9d64a765 100644 --- a/src/components/Chart/Chart.test.tsx +++ b/src/components/Chart/Chart.test.tsx @@ -1,5 +1,6 @@ import { render, screen } from "@testing-library/react"; import { vi } from "vitest"; +import { afterEach, beforeEach, describe, expect, it } from "vitest"; import { testBudgetList } from "../../setupTests"; import { Budget } from "../Budget/Budget"; import { Chart } from "./Chart"; @@ -20,7 +21,6 @@ describe("Chart", () => { ); beforeEach(() => { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment //@ts-ignore delete window.ResizeObserver; window.ResizeObserver = vi.fn().mockImplementation(() => ({ diff --git a/src/components/Chart/ChartTooltip.test.tsx b/src/components/Chart/ChartTooltip.test.tsx index 52a3be47..1494efcf 100644 --- a/src/components/Chart/ChartTooltip.test.tsx +++ b/src/components/Chart/ChartTooltip.test.tsx @@ -1,4 +1,5 @@ import { render, screen } from "@testing-library/react"; +import { describe, expect, it } from "vitest"; import { ChartTooltip } from "./ChartTooltip"; describe("ChartTooltip", () => { diff --git a/src/components/Chart/DynamicYAxis.ts b/src/components/Chart/DynamicYAxis.ts index d32afaf3..b93d7c85 100644 --- a/src/components/Chart/DynamicYAxis.ts +++ b/src/components/Chart/DynamicYAxis.ts @@ -1,13 +1,6 @@ -/* eslint-disable eqeqeq */ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable @typescript-eslint/no-unsafe-argument */ -/* eslint-disable @typescript-eslint/no-unsafe-call */ -/* eslint-disable @typescript-eslint/no-unsafe-return */ -/* eslint-disable @typescript-eslint/no-unsafe-assignment */ -/* eslint-disable @typescript-eslint/no-unsafe-member-access */ import { useCallback, useMemo, useState } from "react"; -const RECHART_CERTESIAN_AXIS_TICK_VALUE_SELECTOR = `.recharts-cartesian-axis-tick-value[orientation="left"], +const RECHART_CARTESIAN_AXIS_TICK_VALUE_SELECTOR = `.recharts-cartesian-axis-tick-value[orientation="left"], .recharts-cartesian-axis-tick-value[orientation="right"]`; interface Props { @@ -23,31 +16,28 @@ export function useDynamicYAxisWidth(props: void | Props): ReturnValues { const { yAxisWidthModifier } = props || {}; const [yAxisWidthState, setYAxisWidthState] = useState(undefined); - const setChartRef = useCallback( - (chartRef: any) => { - if (chartRef?.container != null) { - const tickValueElements = chartRef.container.querySelectorAll( - RECHART_CERTESIAN_AXIS_TICK_VALUE_SELECTOR, - ); - const highestWidth = [...tickValueElements] - .map((el) => { - const boundingRect = el.getBoundingClientRect(); - if (boundingRect?.width != null) { - return boundingRect.width; - } - return 0; - }) - .reduce((accumulator, value) => { - if (accumulator < value) { - return value; - } - return accumulator; - }, 0); - setYAxisWidthState(highestWidth); - } - }, - [setYAxisWidthState], - ); + const setChartRef = useCallback((chartRef: any) => { + if (chartRef?.container != null) { + const tickValueElements = chartRef.container.querySelectorAll( + RECHART_CARTESIAN_AXIS_TICK_VALUE_SELECTOR, + ); + const highestWidth = [...tickValueElements] + .map((el) => { + const boundingRect = el.getBoundingClientRect(); + if (boundingRect?.width != null) { + return boundingRect.width; + } + return 0; + }) + .reduce((accumulator, value) => { + if (accumulator < value) { + return value; + } + return accumulator; + }, 0); + setYAxisWidthState(highestWidth); + } + }, []); const yAxisWidth = useMemo(() => { if (yAxisWidthModifier != null && yAxisWidthState != null) { diff --git a/src/components/ChartsPage/ChartsPage.test.tsx b/src/components/ChartsPage/ChartsPage.test.tsx index b0f2f0ad..c677f60d 100644 --- a/src/components/ChartsPage/ChartsPage.test.tsx +++ b/src/components/ChartsPage/ChartsPage.test.tsx @@ -1,6 +1,7 @@ import { render, screen } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import { vi } from "vitest"; +import { afterEach, beforeEach, describe, expect, it } from "vitest"; import ChartsPage from "./ChartsPage"; describe("ChartsPage", () => { @@ -8,7 +9,6 @@ describe("ChartsPage", () => { const comp = ; beforeEach(() => { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment //@ts-ignore delete window.ResizeObserver; window.ResizeObserver = vi.fn().mockImplementation(() => ({ diff --git a/src/components/ChartsPage/ChartsPage.tsx b/src/components/ChartsPage/ChartsPage.tsx index 15f3d403..8d14d1b6 100644 --- a/src/components/ChartsPage/ChartsPage.tsx +++ b/src/components/ChartsPage/ChartsPage.tsx @@ -1,4 +1,4 @@ -import { useRef, useState } from "react"; +import { MutableRefObject, useRef, useState } from "react"; import { Button, Col, @@ -75,9 +75,7 @@ function ChartsPage({ onShowGraphs }: GraphProps) { ["/", "f"], (e) => !e.repeat && - focusRef( - filterRef as unknown as React.MutableRefObject, - ), + focusRef(filterRef as unknown as MutableRefObject), { preventDefault: true }, ); diff --git a/src/components/ErrorModal/ErrorModal.test.tsx b/src/components/ErrorModal/ErrorModal.test.tsx index 347a5316..bfea07ea 100644 --- a/src/components/ErrorModal/ErrorModal.test.tsx +++ b/src/components/ErrorModal/ErrorModal.test.tsx @@ -1,5 +1,6 @@ import { render, screen, waitFor } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; +import { beforeEach, describe, expect, it } from "vitest"; import { generalContextSpy, testCsvErrorGeneralContext, diff --git a/src/components/ItemForm/ItemForm.test.ts b/src/components/ItemForm/ItemForm.test.ts index 482e3c2d..36544857 100644 --- a/src/components/ItemForm/ItemForm.test.ts +++ b/src/components/ItemForm/ItemForm.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from "vitest"; import { ItemForm } from "./ItemForm"; describe("ItemForm", () => { diff --git a/src/components/ItemForm/ItemFormGroup.test.tsx b/src/components/ItemForm/ItemFormGroup.test.tsx index c4a4b22f..5524b00e 100644 --- a/src/components/ItemForm/ItemFormGroup.test.tsx +++ b/src/components/ItemForm/ItemFormGroup.test.tsx @@ -1,6 +1,7 @@ import { cleanup, render, screen, waitFor } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; -import React from "react"; +import { createRef } from "react"; +import { describe, expect, it } from "vitest"; import { configContextSpy, itemForm1, @@ -11,7 +12,7 @@ import { import { ItemFormGroup } from "./ItemFormGroup"; describe("ItemFormGroup", () => { - const ref = React.createRef(); + const ref = createRef(); const comp = ( { - isExpense ? (draft.expenses = newTable) : (draft.incomes = newTable); + if (isExpense) { + draft.expenses = newTable; + } else { + draft.incomes = newTable; + } newTable.items = table.items.filter((item) => item.id !== toBeDeleted.id); newTable.total = roundBig(calcTotal(newTable.items), 2); draft.stats.available = roundBig(calcAvailable(draft), 2); diff --git a/src/components/LandingPage/LandingPage.test.tsx b/src/components/LandingPage/LandingPage.test.tsx index 138c9472..ba84ef91 100644 --- a/src/components/LandingPage/LandingPage.test.tsx +++ b/src/components/LandingPage/LandingPage.test.tsx @@ -1,5 +1,6 @@ import { render, screen } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; +import { beforeEach, describe, expect, it } from "vitest"; import { budgetContextSpy, generalContextSpy, diff --git a/src/components/LandingPage/LandingPage.tsx b/src/components/LandingPage/LandingPage.tsx index 74652919..6c90fd00 100644 --- a/src/components/LandingPage/LandingPage.tsx +++ b/src/components/LandingPage/LandingPage.tsx @@ -1,3 +1,4 @@ +import React from "react"; import { useRef } from "react"; import { Button, Container, Form, Row, Stack } from "react-bootstrap"; import { useWindowSize } from "usehooks-ts"; diff --git a/src/components/Loading/Loading.test.tsx b/src/components/Loading/Loading.test.tsx index 9f8476d8..c0138967 100644 --- a/src/components/Loading/Loading.test.tsx +++ b/src/components/Loading/Loading.test.tsx @@ -1,4 +1,5 @@ import { render, screen } from "@testing-library/react"; +import { describe, expect, it } from "vitest"; import { Loading } from "./Loading"; describe("Loading", () => { diff --git a/src/components/NavBar/NavBar.test.tsx b/src/components/NavBar/NavBar.test.tsx index 940dc34b..d99fa15a 100644 --- a/src/components/NavBar/NavBar.test.tsx +++ b/src/components/NavBar/NavBar.test.tsx @@ -1,5 +1,6 @@ import { render, screen, waitFor } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; +import { describe, expect, it } from "vitest"; import { budgetContextSpy, setBudgetMock, diff --git a/src/components/NavBar/NavBar.tsx b/src/components/NavBar/NavBar.tsx index 3509fd93..4490c2c9 100644 --- a/src/components/NavBar/NavBar.tsx +++ b/src/components/NavBar/NavBar.tsx @@ -1,4 +1,4 @@ -import { useEffect, useRef, useState } from "react"; +import React, { useEffect, useRef, useState } from "react"; import { Offcanvas, OverlayTrigger, Tooltip } from "react-bootstrap"; import { AsyncTypeahead } from "react-bootstrap-typeahead"; import "react-bootstrap-typeahead/css/Typeahead.bs5.css"; diff --git a/src/components/NavBar/NavBarDelete.tsx b/src/components/NavBar/NavBarDelete.tsx index 62da847f..01308e02 100644 --- a/src/components/NavBar/NavBarDelete.tsx +++ b/src/components/NavBar/NavBarDelete.tsx @@ -1,9 +1,10 @@ +import { RefObject } from "react"; import { Button, Nav, OverlayTrigger, Popover, Tooltip } from "react-bootstrap"; import { BsXLg } from "react-icons/bs"; import { useBudget } from "../../context/BudgetContext"; interface NavBarDeleteProps { - deleteButtonRef: React.RefObject; + deleteButtonRef: RefObject; handleRemove: (i: string) => void; expanded: boolean; } diff --git a/src/components/NavBar/NavBarImpExp.tsx b/src/components/NavBar/NavBarImpExp.tsx index 9719c535..2550a548 100644 --- a/src/components/NavBar/NavBarImpExp.tsx +++ b/src/components/NavBar/NavBarImpExp.tsx @@ -1,4 +1,4 @@ -import { Dispatch, SetStateAction, useRef } from "react"; +import React, { Dispatch, SetStateAction, useRef } from "react"; import { Button, Form, diff --git a/src/components/NavBar/NavBarSettings.tsx b/src/components/NavBar/NavBarSettings.tsx index 3315e638..e2f88c70 100644 --- a/src/components/NavBar/NavBarSettings.tsx +++ b/src/components/NavBar/NavBarSettings.tsx @@ -97,6 +97,7 @@ export function NavBarSettings({ expanded }: NavBarSettingsProps) { ref={versionRef} rel="noreferrer" > + {/* biome-ignore lint/correctness/noUndeclaredVariables: */} v{APP_VERSION} diff --git a/src/components/Notification/Notification.test.tsx b/src/components/Notification/Notification.test.tsx index aaf4783d..30b3fd2c 100644 --- a/src/components/Notification/Notification.test.tsx +++ b/src/components/Notification/Notification.test.tsx @@ -1,5 +1,6 @@ import { render, screen } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; +import { describe, expect, it } from "vitest"; import { BudgetNotification } from "../../context/GeneralContext"; import { setNotificationsMock, undoMock } from "../../setupTests"; import { Notification } from "./Notification"; diff --git a/src/components/StatCard/Stat.test.ts b/src/components/StatCard/Stat.test.ts index 64f3f5d1..86fdc8a8 100644 --- a/src/components/StatCard/Stat.test.ts +++ b/src/components/StatCard/Stat.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from "vitest"; import { Stat } from "./Stat"; describe("Stat", () => { diff --git a/src/components/StatCard/StatCard.test.tsx b/src/components/StatCard/StatCard.test.tsx index 804f6b4f..68bf8f48 100644 --- a/src/components/StatCard/StatCard.test.tsx +++ b/src/components/StatCard/StatCard.test.tsx @@ -1,6 +1,7 @@ import { render, screen, waitFor } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import { vi } from "vitest"; +import { describe, expect, it } from "vitest"; import { setBudgetMock, testBudget } from "../../setupTests"; import { StatCard } from "./StatCard"; diff --git a/src/components/StatCard/StatCard.tsx b/src/components/StatCard/StatCard.tsx index 7f132d69..c0f9d997 100644 --- a/src/components/StatCard/StatCard.tsx +++ b/src/components/StatCard/StatCard.tsx @@ -1,4 +1,4 @@ -import { useRef, useState } from "react"; +import React, { useRef, useState } from "react"; import { Button, Card, diff --git a/src/components/TableCard/Expense.test.ts b/src/components/TableCard/Expense.test.ts index 6f1e9205..ef63c094 100644 --- a/src/components/TableCard/Expense.test.ts +++ b/src/components/TableCard/Expense.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from "vitest"; import { itemForm1, itemForm2 } from "../../setupTests"; import { Expense } from "./Expense"; diff --git a/src/components/TableCard/Income.test.ts b/src/components/TableCard/Income.test.ts index 0e221d41..2213f6ea 100644 --- a/src/components/TableCard/Income.test.ts +++ b/src/components/TableCard/Income.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from "vitest"; import { itemForm1, itemForm2 } from "../../setupTests"; import { Income } from "./Income"; diff --git a/src/components/TableCard/TableCard.test.tsx b/src/components/TableCard/TableCard.test.tsx index a9d85909..964398f7 100644 --- a/src/components/TableCard/TableCard.test.tsx +++ b/src/components/TableCard/TableCard.test.tsx @@ -1,5 +1,6 @@ import { cleanup, render, screen, waitFor } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; +import { describe, expect, it } from "vitest"; import { setBudgetMock, testBudget } from "../../setupTests"; import { TableCard } from "./TableCard"; diff --git a/src/components/TableCard/TableCard.tsx b/src/components/TableCard/TableCard.tsx index b96c407a..dc886666 100644 --- a/src/components/TableCard/TableCard.tsx +++ b/src/components/TableCard/TableCard.tsx @@ -47,9 +47,11 @@ export function TableCard({ header: label }: TableCardProps) { function reorderTable(newOrder: ItemForm[]) { if (!budget) return; const newState = produce((draft) => { - isExpense - ? (draft.expenses.items = newOrder) - : (draft.incomes.items = newOrder); + if (isExpense) { + draft.expenses.items = newOrder; + } else { + draft.incomes.items = newOrder; + } }, budget); setBudget(newState(), true); } @@ -57,7 +59,11 @@ export function TableCard({ header: label }: TableCardProps) { function handleTableChange(item: Income | Expense) { if (!budget) return; const newState = produce((draft) => { - isExpense ? (draft.expenses = item) : (draft.incomes = item); + if (isExpense) { + draft.expenses = item; + } else { + draft.incomes = item; + } draft.stats.available = roundBig(calcAvailable(draft), 2); draft.stats.withGoal = calcWithGoal(draft); draft.stats.saved = calcSaved(draft); diff --git a/src/context/BudgetContext.test.tsx b/src/context/BudgetContext.test.tsx index 2de102b8..c1bbc3e6 100644 --- a/src/context/BudgetContext.test.tsx +++ b/src/context/BudgetContext.test.tsx @@ -1,4 +1,5 @@ import { render, screen } from "@testing-library/react"; +import { describe, expect, it } from "vitest"; import { testBudget, testBudgetList } from "../setupTests"; import { BudgetProvider, useBudget } from "./BudgetContext"; diff --git a/src/context/BudgetContext.tsx b/src/context/BudgetContext.tsx index 3d548061..955bfb10 100644 --- a/src/context/BudgetContext.tsx +++ b/src/context/BudgetContext.tsx @@ -23,11 +23,9 @@ interface BudgetContextInterface { const BudgetContext = createContext({ budget: undefined, - setBudget: (value: Budget | undefined, saveInHistory: boolean) => { - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - value; - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - saveInHistory; + setBudget: (_value: Budget | undefined, _saveInHistory: boolean) => { + _value; + _saveInHistory; }, budgetList: [], setBudgetList: (value: Budget[] | undefined) => value, @@ -149,5 +147,4 @@ function BudgetProvider({ children }: PropsWithChildren) { ); } -// eslint-disable-next-line react-refresh/only-export-components export { BudgetProvider, useBudget }; diff --git a/src/context/ConfigContext.test.tsx b/src/context/ConfigContext.test.tsx index f7b0146a..efb78046 100644 --- a/src/context/ConfigContext.test.tsx +++ b/src/context/ConfigContext.test.tsx @@ -1,4 +1,5 @@ import { render, screen } from "@testing-library/react"; +import { describe, expect, it } from "vitest"; import { ConfigProvider, useConfig } from "./ConfigContext"; function TestComponent() { diff --git a/src/context/ConfigContext.tsx b/src/context/ConfigContext.tsx index 2d40ef0a..1e0eb630 100644 --- a/src/context/ConfigContext.tsx +++ b/src/context/ConfigContext.tsx @@ -53,5 +53,4 @@ function ConfigProvider({ children }: PropsWithChildren) { ); } -// eslint-disable-next-line react-refresh/only-export-components export { ConfigProvider, useConfig }; diff --git a/src/context/GeneralContext.test.tsx b/src/context/GeneralContext.test.tsx index 6789fda0..4aeb5228 100644 --- a/src/context/GeneralContext.test.tsx +++ b/src/context/GeneralContext.test.tsx @@ -1,4 +1,5 @@ import { render, screen } from "@testing-library/react"; +import { beforeEach, describe, expect, it } from "vitest"; import { generalContextSpy, testErrorGeneralContext } from "../setupTests"; import { GeneralProvider, useGeneralContext } from "./GeneralContext"; diff --git a/src/context/GeneralContext.tsx b/src/context/GeneralContext.tsx index 7f6687ef..d67d2cce 100644 --- a/src/context/GeneralContext.tsx +++ b/src/context/GeneralContext.tsx @@ -130,5 +130,4 @@ function GeneralProvider({ children }: PropsWithChildren) { ); } -// eslint-disable-next-line react-refresh/only-export-components export { GeneralProvider, useGeneralContext }; diff --git a/src/hooks/useDB.ts b/src/hooks/useDB.ts index ca36bf27..e27aa807 100644 --- a/src/hooks/useDB.ts +++ b/src/hooks/useDB.ts @@ -1,6 +1,6 @@ import { produce } from "immer"; import Papa from "papaparse"; -import { useEffect, useState } from "react"; +import React, { useEffect, useState } from "react"; import { Option } from "react-bootstrap-typeahead/types/types"; import { useParams } from "react-router-dom"; import { Budget } from "../components/Budget/Budget"; @@ -446,9 +446,9 @@ export function useDB() { }); } + // biome-ignore lint/correctness/useExhaustiveDependencies: useEffect(() => { saveBudget(budget); - // eslint-disable-next-line react-hooks/exhaustive-deps }, [budget]); return { diff --git a/src/index.tsx b/src/index.tsx index e14b9f61..8b9b0e59 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,14 +1,13 @@ +import { registerSW } from "virtual:pwa-register"; import React from "react"; import ReactDOM from "react-dom/client"; -import { registerSW } from "virtual:pwa-register"; import App from "./App"; import "./index.css"; const updateSW = registerSW({ onNeedRefresh() { - // eslint-disable-next-line no-restricted-globals + // biome-ignore lint/style/noRestrictedGlobals: if (confirm("A new version of guitos is available. Update?")) { - // eslint-disable-next-line @typescript-eslint/no-floating-promises updateSW(true); } }, diff --git a/src/utils.ts b/src/utils.ts index abcfb160..c8405ad4 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -40,7 +40,9 @@ export function calcTotal(values: ItemForm[]): Big { values && values .filter((x) => !isNaN(x.value)) - .forEach((i) => (total = total.add(Big(i.value)))); + .forEach((i) => { + total = total.add(Big(i.value)); + }); return total; }