diff --git a/.github/actions/ai-generated-release-notes/check-release-notes-exists.js b/.github/actions/ai-generated-release-notes/check-release-notes-exists.js index 977ec25f97..5c21997748 100755 --- a/.github/actions/ai-generated-release-notes/check-release-notes-exists.js +++ b/.github/actions/ai-generated-release-notes/check-release-notes-exists.js @@ -74,4 +74,4 @@ async function checkReleaseNotesExists() { } } -checkReleaseNotesExists(); +void checkReleaseNotesExists(); diff --git a/.github/actions/ai-generated-release-notes/comment-on-pr.js b/.github/actions/ai-generated-release-notes/comment-on-pr.js index b0ff5897a5..36a5e4f28f 100755 --- a/.github/actions/ai-generated-release-notes/comment-on-pr.js +++ b/.github/actions/ai-generated-release-notes/comment-on-pr.js @@ -74,4 +74,4 @@ async function commentOnPR() { } } -commentOnPR(); +void commentOnPR(); diff --git a/.github/actions/ai-generated-release-notes/create-release-notes-file.js b/.github/actions/ai-generated-release-notes/create-release-notes-file.js index aba3bc840b..1709a3d912 100755 --- a/.github/actions/ai-generated-release-notes/create-release-notes-file.js +++ b/.github/actions/ai-generated-release-notes/create-release-notes-file.js @@ -94,4 +94,4 @@ ${summaryData.summary} } } -createReleaseNotesFile(); +void createReleaseNotesFile(); diff --git a/.github/scripts/count-points.mjs b/.github/scripts/count-points.mjs index c051bc7ce8..85062be697 100644 --- a/.github/scripts/count-points.mjs +++ b/.github/scripts/count-points.mjs @@ -96,7 +96,7 @@ async function getLastCommitBeforeDate(octokit, owner, repo, beforeDate) { * @param {string} repo - Repository name. * @param {number} prNumber - PR number. * @param {Date} monthEnd - The end date of the month to use as base revision. - * @returns {Object} Object with category and points, or null if error. + * @returns {Promise} Object with category and points, or null if error. */ async function getPRCategoryAndPoints( octokit, diff --git a/.oxlintrc.json b/.oxlintrc.json index e41c28c941..9bc9841aa4 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -101,6 +101,8 @@ "typescript/no-var-requires": "error", // we want to allow unions such as "{ name: DbAccount['name'] | DbPayee['name'] }" "typescript/no-duplicate-type-constituents": "off", + "typescript/await-thenable": "error", + "typescript/no-floating-promises": "warn", // TODO: covert to error // Import rules "import/consistent-type-specifier-style": "error", diff --git a/bin/release-note-generator.ts b/bin/release-note-generator.ts index b23e0fd023..931e71c124 100644 --- a/bin/release-note-generator.ts +++ b/bin/release-note-generator.ts @@ -178,4 +178,4 @@ async function execAsync(cmd: string, errorLog?: string): Promise { }); } -run(); +void run(); diff --git a/packages/desktop-client/e2e/accounts.mobile.test.ts b/packages/desktop-client/e2e/accounts.mobile.test.ts index 93ddc086be..2cb15af140 100644 --- a/packages/desktop-client/e2e/accounts.mobile.test.ts +++ b/packages/desktop-client/e2e/accounts.mobile.test.ts @@ -46,7 +46,7 @@ test.describe('Mobile Accounts', () => { await expect(accountPage.heading).toHaveText('Bank of America'); await expect(accountPage.transactionList).toBeVisible(); - await expect(await accountPage.getBalance()).toBeGreaterThan(0); + expect(await accountPage.getBalance()).toBeGreaterThan(0); await expect(accountPage.noTransactionsMessage).not.toBeVisible(); await expect(page).toMatchThemeScreenshots(); diff --git a/packages/desktop-client/e2e/accounts.test.ts b/packages/desktop-client/e2e/accounts.test.ts index 08ca9302b7..85903c1c03 100644 --- a/packages/desktop-client/e2e/accounts.test.ts +++ b/packages/desktop-client/e2e/accounts.test.ts @@ -158,9 +158,7 @@ test.describe('Accounts', () => { await expect(page).toMatchThemeScreenshots(); await expect(importButton).toBeDisabled(); - await expect(await importButton.innerText()).toMatch( - /Import 0 transactions/, - ); + expect(await importButton.innerText()).toMatch(/Import 0 transactions/); await accountPage.page.getByRole('button', { name: 'Close' }).click(); diff --git a/packages/desktop-client/e2e/page-models/mobile-account-page.ts b/packages/desktop-client/e2e/page-models/mobile-account-page.ts index aa1687c727..702ed67876 100644 --- a/packages/desktop-client/e2e/page-models/mobile-account-page.ts +++ b/packages/desktop-client/e2e/page-models/mobile-account-page.ts @@ -56,7 +56,7 @@ export class MobileAccountPage { * Go to transaction creation page */ async clickCreateTransaction() { - this.createTransactionButton.click(); + await this.createTransactionButton.click(); return new MobileTransactionEntryPage(this.page); } } diff --git a/packages/desktop-client/e2e/page-models/mobile-budget-page.ts b/packages/desktop-client/e2e/page-models/mobile-budget-page.ts index 5aa6a91ee2..189a15b7bb 100644 --- a/packages/desktop-client/e2e/page-models/mobile-budget-page.ts +++ b/packages/desktop-client/e2e/page-models/mobile-budget-page.ts @@ -148,7 +148,7 @@ export class MobileBudgetPage { return groupNameText; } - #getButtonForCategoryGroup(categoryGroupName: string | RegExp) { + async #getButtonForCategoryGroup(categoryGroupName: string | RegExp) { return this.categoryGroupRows.getByRole('button', { name: categoryGroupName, exact: true, @@ -169,7 +169,7 @@ export class MobileBudgetPage { return categoryNameText; } - #getButtonForCategory(categoryName: string | RegExp) { + async #getButtonForCategory(categoryName: string | RegExp) { return this.categoryRows.getByRole('button', { name: categoryName, exact: true, diff --git a/packages/desktop-client/e2e/settings.mobile.test.ts b/packages/desktop-client/e2e/settings.mobile.test.ts index 979c310091..616bb46e3d 100644 --- a/packages/desktop-client/e2e/settings.mobile.test.ts +++ b/packages/desktop-client/e2e/settings.mobile.test.ts @@ -36,9 +36,7 @@ test.describe('Mobile Settings', () => { const download = await downloadPromise; - expect(await download.suggestedFilename()).toMatch( - /^\d{4}-\d{2}-\d{2}-.*.zip$/, - ); + expect(download.suggestedFilename()).toMatch(/^\d{4}-\d{2}-\d{2}-.*.zip$/); await expect(page).toMatchThemeScreenshots(); }); }); diff --git a/packages/desktop-client/e2e/settings.test.ts b/packages/desktop-client/e2e/settings.test.ts index 59c8218287..411a0e1453 100644 --- a/packages/desktop-client/e2e/settings.test.ts +++ b/packages/desktop-client/e2e/settings.test.ts @@ -37,8 +37,6 @@ test.describe('Settings', () => { const download = await downloadPromise; - expect(await download.suggestedFilename()).toMatch( - /^\d{4}-\d{2}-\d{2}-.*.zip$/, - ); + expect(download.suggestedFilename()).toMatch(/^\d{4}-\d{2}-\d{2}-.*.zip$/); }); }); diff --git a/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-creates-a-transfer-test-transaction-4-chromium-linux.png b/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-creates-a-transfer-test-transaction-4-chromium-linux.png index dc77a1fa28..5e00c7c462 100644 Binary files a/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-creates-a-transfer-test-transaction-4-chromium-linux.png and b/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-creates-a-transfer-test-transaction-4-chromium-linux.png differ diff --git a/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-creates-a-transfer-test-transaction-5-chromium-linux.png b/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-creates-a-transfer-test-transaction-5-chromium-linux.png index 84a922f5c3..7ee7523708 100644 Binary files a/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-creates-a-transfer-test-transaction-5-chromium-linux.png and b/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-creates-a-transfer-test-transaction-5-chromium-linux.png differ diff --git a/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-creates-a-transfer-test-transaction-6-chromium-linux.png b/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-creates-a-transfer-test-transaction-6-chromium-linux.png index d4cc503b14..be479b13d0 100644 Binary files a/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-creates-a-transfer-test-transaction-6-chromium-linux.png and b/packages/desktop-client/e2e/transactions.test.ts-snapshots/Transactions-creates-a-transfer-test-transaction-6-chromium-linux.png differ diff --git a/packages/desktop-client/src/accounts/mutations.ts b/packages/desktop-client/src/accounts/mutations.ts index cc74939a77..d15aa24376 100644 --- a/packages/desktop-client/src/accounts/mutations.ts +++ b/packages/desktop-client/src/accounts/mutations.ts @@ -32,7 +32,7 @@ import type { AppDispatch } from '@desktop-client/redux/store'; import { setNewTransactions } from '@desktop-client/transactions/transactionsSlice'; const invalidateQueries = (queryClient: QueryClient, queryKey?: QueryKey) => { - queryClient.invalidateQueries({ + void queryClient.invalidateQueries({ queryKey: queryKey ?? accountQueries.lists(), }); }; diff --git a/packages/desktop-client/src/app/appSlice.ts b/packages/desktop-client/src/app/appSlice.ts index 18732a4dfb..fd0273ee00 100644 --- a/packages/desktop-client/src/app/appSlice.ts +++ b/packages/desktop-client/src/app/appSlice.ts @@ -65,7 +65,7 @@ export const resetSync = createAppAsyncThunk( options: { onSuccess: () => { // TODO: There won't be a loading indicator for this - dispatch(resetSync()); + void dispatch(resetSync()); }, }, }, diff --git a/packages/desktop-client/src/browser-preload.browser.js b/packages/desktop-client/src/browser-preload.browser.js index 384927717a..a659f63727 100644 --- a/packages/desktop-client/src/browser-preload.browser.js +++ b/packages/desktop-client/src/browser-preload.browser.js @@ -161,7 +161,7 @@ global.Actual = { reader.onload = async function (ev) { const filepath = `/uploads/${filename}`; - window.__actionsForMenu + void window.__actionsForMenu .uploadFile(filename, ev.target.result) .then(() => resolve([filepath])); }; diff --git a/packages/desktop-client/src/budget/mutations.ts b/packages/desktop-client/src/budget/mutations.ts index 5d499df51d..3c7b87d3f0 100644 --- a/packages/desktop-client/src/budget/mutations.ts +++ b/packages/desktop-client/src/budget/mutations.ts @@ -20,7 +20,7 @@ import { useDispatch } from '@desktop-client/redux'; import type { AppDispatch } from '@desktop-client/redux/store'; function invalidateQueries(queryClient: QueryClient, queryKey?: QueryKey) { - queryClient.invalidateQueries({ + void queryClient.invalidateQueries({ queryKey: queryKey ?? categoryQueries.lists(), }); } diff --git a/packages/desktop-client/src/budgetfiles/budgetfilesSlice.ts b/packages/desktop-client/src/budgetfiles/budgetfilesSlice.ts index 7571c6151f..b42b5d9a08 100644 --- a/packages/desktop-client/src/budgetfiles/budgetfilesSlice.ts +++ b/packages/desktop-client/src/budgetfiles/budgetfilesSlice.ts @@ -22,7 +22,7 @@ export const loadBudgets = createAppAsyncThunk( async (_, { dispatch }) => { const budgets = await send('get-budgets'); - await dispatch(setBudgets({ budgets })); + dispatch(setBudgets({ budgets })); }, ); @@ -31,7 +31,7 @@ export const loadRemoteFiles = createAppAsyncThunk( async (_, { dispatch }) => { const files = await send('get-remote-files'); - await dispatch(setRemoteFiles({ remoteFiles: files })); + dispatch(setRemoteFiles({ remoteFiles: files })); }, ); @@ -41,7 +41,7 @@ export const loadAllFiles = createAppAsyncThunk( const budgets = await send('get-budgets'); const files = await send('get-remote-files'); - await dispatch(setAllFiles({ budgets, remoteFiles: files })); + dispatch(setAllFiles({ budgets, remoteFiles: files })); return getState().budgetfiles.allFiles; }, @@ -56,7 +56,7 @@ type LoadBudgetPayload = { export const loadBudget = createAppAsyncThunk( `${sliceName}/loadBudget`, async ({ id, options = {} }: LoadBudgetPayload, { dispatch }) => { - await dispatch(setAppState({ loadingText: t('Loading...') })); + dispatch(setAppState({ loadingText: t('Loading...') })); // Loading a budget may fail const { error } = await send('load-budget', { id, ...options }); @@ -64,9 +64,7 @@ export const loadBudget = createAppAsyncThunk( if (error) { const message = getSyncError(error, id); if (error === 'out-of-sync-migrations') { - await dispatch( - pushModal({ modal: { name: 'out-of-sync-migrations' } }), - ); + dispatch(pushModal({ modal: { name: 'out-of-sync-migrations' } })); } else if (error === 'out-of-sync-data') { // confirm is not available on iOS if (typeof window.confirm !== 'undefined') { @@ -79,7 +77,7 @@ export const loadBudget = createAppAsyncThunk( ); if (showBackups) { - await dispatch( + dispatch( pushModal({ modal: { name: 'load-backup', options: {} } }), ); } @@ -90,11 +88,11 @@ export const loadBudget = createAppAsyncThunk( alert(message); } } else { - await dispatch(closeModal()); + dispatch(closeModal()); await dispatch(loadPrefs()); } - await dispatch(setAppState({ loadingText: null })); + dispatch(setAppState({ loadingText: null })); }, ); @@ -103,11 +101,11 @@ export const closeBudget = createAppAsyncThunk( async (_, { dispatch, getState, extra: { queryClient } }) => { const prefs = getState().prefs.local; if (prefs && prefs.id) { - await dispatch(resetApp()); + dispatch(resetApp()); queryClient.clear(); - await dispatch(setAppState({ loadingText: t('Closing...') })); + dispatch(setAppState({ loadingText: t('Closing...') })); await send('close-budget'); - await dispatch(setAppState({ loadingText: null })); + dispatch(setAppState({ loadingText: null })); if (localStorage.getItem('SharedArrayBufferOverride')) { window.location.reload(); } @@ -120,7 +118,7 @@ export const closeBudgetUI = createAppAsyncThunk( async (_, { dispatch, getState, extra: { queryClient } }) => { const prefs = getState().prefs.local; if (prefs && prefs.id) { - await dispatch(resetApp()); + dispatch(resetApp()); queryClient.clear(); } }, @@ -150,7 +148,7 @@ export const createBudget = createAppAsyncThunk( { testMode = false, demoMode = false }: CreateBudgetPayload, { dispatch }, ) => { - await dispatch( + dispatch( setAppState({ loadingText: testMode || demoMode ? t('Making demo...') : t('Creating budget...'), @@ -163,14 +161,14 @@ export const createBudget = createAppAsyncThunk( await send('create-budget', { testMode }); } - await dispatch(closeModal()); + dispatch(closeModal()); await dispatch(loadAllFiles()); await dispatch(loadPrefs()); // Set the loadingText to null after we've loaded the budget prefs // so that the existing manager page doesn't flash - await dispatch(setAppState({ loadingText: null })); + dispatch(setAppState({ loadingText: null })); }, ); @@ -206,7 +204,7 @@ export const duplicateBudget = createAppAsyncThunk( } try { - await dispatch( + dispatch( setAppState({ loadingText: t('Duplicating: {{oldName}} to: {{newName}}', { oldName, @@ -222,7 +220,7 @@ export const duplicateBudget = createAppAsyncThunk( open: loadBudget, }); - await dispatch(closeModal()); + dispatch(closeModal()); if (managePage) { await dispatch(loadAllFiles()); @@ -233,7 +231,7 @@ export const duplicateBudget = createAppAsyncThunk( ? error : new Error('Error duplicating budget: ' + String(error)); } finally { - await dispatch(setAppState({ loadingText: null })); + dispatch(setAppState({ loadingText: null })); } }, ); @@ -251,7 +249,7 @@ export const importBudget = createAppAsyncThunk( throw new Error(error); } - await dispatch(closeModal()); + dispatch(closeModal()); await dispatch(loadPrefs()); }, ); @@ -308,7 +306,7 @@ export const downloadBudget = createAppAsyncThunk( { cloudFileId, replace = false }: DownloadBudgetPayload, { dispatch }, ): Promise => { - await dispatch( + dispatch( setAppState({ loadingText: t('Downloading...'), }), @@ -329,14 +327,14 @@ export const downloadBudget = createAppAsyncThunk( ), cloudFileId, onSuccess: () => { - dispatch(downloadBudget({ cloudFileId, replace })); + void dispatch(downloadBudget({ cloudFileId, replace })); }, }; - await dispatch( + dispatch( pushModal({ modal: { name: 'fix-encryption-key', options: opts } }), ); - await dispatch(setAppState({ loadingText: null })); + dispatch(setAppState({ loadingText: null })); } else if (error.reason === 'file-exists') { alert( t( @@ -362,7 +360,7 @@ export const downloadBudget = createAppAsyncThunk( downloadBudget({ cloudFileId, replace: true }), ).unwrap(); } else { - await dispatch(setAppState({ loadingText: null })); + dispatch(setAppState({ loadingText: null })); alert(getDownloadError(error)); } return null; @@ -375,7 +373,7 @@ export const downloadBudget = createAppAsyncThunk( dispatch(loadAllFiles()), dispatch(loadBudget({ id })), ]); - await dispatch(setAppState({ loadingText: null })); + dispatch(setAppState({ loadingText: null })); return id; } }, diff --git a/packages/desktop-client/src/components/App.tsx b/packages/desktop-client/src/components/App.tsx index d42f907c1d..ea5904cb1f 100644 --- a/packages/desktop-client/src/components/App.tsx +++ b/packages/desktop-client/src/components/App.tsx @@ -115,7 +115,7 @@ function AppInner() { if (files) { const remoteFile = files.find(f => f.fileId === cloudFileId); if (remoteFile && remoteFile.deleted) { - dispatch(closeBudget()); + void dispatch(closeBudget()); } } @@ -146,7 +146,7 @@ function AppInner() { button: { title: t('Go to login'), action: () => { - dispatch(signOut()); + void dispatch(signOut()); }, }, }, diff --git a/packages/desktop-client/src/components/CommandBar.tsx b/packages/desktop-client/src/components/CommandBar.tsx index 27965aa241..477c97142c 100644 --- a/packages/desktop-client/src/components/CommandBar.tsx +++ b/packages/desktop-client/src/components/CommandBar.tsx @@ -168,7 +168,7 @@ export function CommandBar() { const handleNavigate = useCallback( (path: string) => { setOpen(false); - navigate(path); + void navigate(path); }, [navigate], ); diff --git a/packages/desktop-client/src/components/FinancesApp.tsx b/packages/desktop-client/src/components/FinancesApp.tsx index ca05a40041..7cba4f177e 100644 --- a/packages/desktop-client/src/components/FinancesApp.tsx +++ b/packages/desktop-client/src/components/FinancesApp.tsx @@ -51,7 +51,7 @@ function NarrowNotSupported({ const navigate = useNavigate(); useEffect(() => { if (isNarrowWidth) { - navigate(redirectTo); + void navigate(redirectTo); } }, [isNarrowWidth, navigate, redirectTo]); return isNarrowWidth ? null : children; @@ -68,7 +68,7 @@ function WideNotSupported({ const navigate = useNavigate(); useEffect(() => { if (!isNarrowWidth) { - navigate(redirectTo); + void navigate(redirectTo); } }, [isNarrowWidth, navigate, redirectTo]); return isNarrowWidth ? children : null; @@ -136,13 +136,13 @@ export function FinancesApp() { ); } - run(); + void run(); }); useEffect(() => init(), []); useEffect(() => { - dispatch(getLatestAppVersion()); + void dispatch(getLatestAppVersion()); }, [dispatch]); useEffect(() => { diff --git a/packages/desktop-client/src/components/GlobalKeys.ts b/packages/desktop-client/src/components/GlobalKeys.ts index c2c86c67ee..0877ea8a3b 100644 --- a/packages/desktop-client/src/components/GlobalKeys.ts +++ b/packages/desktop-client/src/components/GlobalKeys.ts @@ -15,17 +15,17 @@ export function GlobalKeys() { if (e.metaKey) { switch (e.key) { case '1': - navigate('/budget'); + void navigate('/budget'); break; case '2': - navigate('/reports'); + void navigate('/reports'); break; case '3': - navigate('/accounts'); + void navigate('/accounts'); break; case ',': if (Platform.OS === 'mac') { - navigate('/settings'); + void navigate('/settings'); } break; default: diff --git a/packages/desktop-client/src/components/LoggedInUser.tsx b/packages/desktop-client/src/components/LoggedInUser.tsx index c386b4f6a8..5dc4a411c3 100644 --- a/packages/desktop-client/src/components/LoggedInUser.tsx +++ b/packages/desktop-client/src/components/LoggedInUser.tsx @@ -68,7 +68,7 @@ export function LoggedInUser({ }, [dispatch]); useEffect(() => { - initializeUserData(); + void initializeUserData(); }, [initializeUserData]); useEffect(() => { @@ -85,7 +85,7 @@ export function LoggedInUser({ (type === 'error' && !userData.offline)); if (shouldReinitialize) { - initializeUserData(); + void initializeUserData(); } else { setLoading(false); } @@ -98,7 +98,7 @@ export function LoggedInUser({ async function onChangePassword() { await onCloseBudget(); - navigate('/change-password'); + void navigate('/change-password'); } const handleMenuSelect = async (type: string) => { @@ -106,27 +106,27 @@ export function LoggedInUser({ switch (type) { case 'change-password': - onChangePassword(); + void onChangePassword(); break; case 'sign-in': await onCloseBudget(); - navigate('/login'); + void navigate('/login'); break; case 'user-access': - navigate('/user-access'); + void navigate('/user-access'); break; case 'user-directory': - navigate('/user-directory'); + void navigate('/user-directory'); break; case 'index': - navigate('/'); + void navigate('/'); break; case 'sign-out': - dispatch(signOut()); + void dispatch(signOut()); break; case 'config-server': await onCloseBudget(); - navigate('/config-server'); + void navigate('/config-server'); break; default: break; diff --git a/packages/desktop-client/src/components/ManageRules.tsx b/packages/desktop-client/src/components/ManageRules.tsx index 61395cbcec..482379419e 100644 --- a/packages/desktop-client/src/components/ManageRules.tsx +++ b/packages/desktop-client/src/components/ManageRules.tsx @@ -197,7 +197,7 @@ export function ManageRules({ undo.setUndoState('openModal', { name: 'manage-rules', options: {} }); } - loadData(); + void loadData(); return () => { undo.setUndoState('openModal', null); diff --git a/packages/desktop-client/src/components/Modals.tsx b/packages/desktop-client/src/components/Modals.tsx index 856279616f..69448ba472 100644 --- a/packages/desktop-client/src/components/Modals.tsx +++ b/packages/desktop-client/src/components/Modals.tsx @@ -190,7 +190,7 @@ export function Modals() { {...modal.options} onClose={() => { modal.options.onClose?.(); - send('gocardless-poll-web-token-stop'); + void send('gocardless-poll-web-token-stop'); }} /> ); diff --git a/packages/desktop-client/src/components/Notifications.tsx b/packages/desktop-client/src/components/Notifications.tsx index 455b34ab33..01c240ec01 100644 --- a/packages/desktop-client/src/components/Notifications.tsx +++ b/packages/desktop-client/src/components/Notifications.tsx @@ -58,7 +58,7 @@ function compileMessage( e.preventDefault(); if (actions[actionName]) { setLoading(true); - await actions[actionName](); + actions[actionName](); onRemove?.(); } }} @@ -162,13 +162,13 @@ function Notification({ // Update scale, opacity, and y-position when index changes useEffect(() => { - api.start({ scale, opacity: stackOpacity, y: yOffset }); + void api.start({ scale, opacity: stackOpacity, y: yOffset }); }, [index, scale, stackOpacity, yOffset, api]); const swipeHandlers = useSwipeable({ onSwiping: ({ deltaX }) => { if (!isSwiped) { - api.start({ x: deltaX }); + void api.start({ x: deltaX }); } }, onSwiped: ({ velocity, deltaX }) => { @@ -178,7 +178,7 @@ function Notification({ if (Math.abs(deltaX) > threshold || velocity > 0.5) { // Animate out & remove item after animation - api.start({ + void api.start({ x: direction * 1000, opacity: 0, onRest: onRemove, @@ -186,7 +186,7 @@ function Notification({ setIsSwiped(true); } else { // Reset position if not swiped far enough - api.start({ x: 0 }); + void api.start({ x: 0 }); } }, trackMouse: true, diff --git a/packages/desktop-client/src/components/ServerContext.tsx b/packages/desktop-client/src/components/ServerContext.tsx index ea6f49edf5..bd404aff9b 100644 --- a/packages/desktop-client/src/components/ServerContext.tsx +++ b/packages/desktop-client/src/components/ServerContext.tsx @@ -107,7 +107,7 @@ export function ServerProvider({ children }: { children: ReactNode }) { setServerURL(serverURL); setVersion(await getServerVersion()); } - run(); + void run(); }, []); const refreshLoginMethods = useCallback(async () => { @@ -135,7 +135,7 @@ export function ServerProvider({ children }: { children: ReactNode }) { useEffect(() => { if (serverURL) { - send('subscribe-needs-bootstrap').then( + void send('subscribe-needs-bootstrap').then( (data: Awaited>) => { if ('hasServer' in data && data.hasServer) { setAvailableLoginMethods(data.availableLoginMethods || []); diff --git a/packages/desktop-client/src/components/UpdateNotification.tsx b/packages/desktop-client/src/components/UpdateNotification.tsx index 43e7c5d249..deb60c8c5b 100644 --- a/packages/desktop-client/src/components/UpdateNotification.tsx +++ b/packages/desktop-client/src/components/UpdateNotification.tsx @@ -21,7 +21,7 @@ export function UpdateNotification() { const dispatch = useDispatch(); const onRestart = () => { - dispatch(updateApp()); + void dispatch(updateApp()); }; if (updateInfo && showUpdateNotification) { diff --git a/packages/desktop-client/src/components/accounts/Account.tsx b/packages/desktop-client/src/components/accounts/Account.tsx index fbf94c0058..9a175663b8 100644 --- a/packages/desktop-client/src/components/accounts/Account.tsx +++ b/packages/desktop-client/src/components/accounts/Account.tsx @@ -383,13 +383,13 @@ class AccountInternal extends PureComponent< // Important that any async work happens last so that the // listeners are set up synchronously - await this.fetchTransactions(this.state.filterConditions); + this.fetchTransactions(this.state.filterConditions); // If there is a pending undo, apply it immediately (this happens // when an undo changes the location to this page) const lastUndoEvent = undo.getUndoState('undoEvent'); if (lastUndoEvent) { - onUndo(lastUndoEvent); + void onUndo(lastUndoEvent); } } @@ -407,7 +407,7 @@ class AccountInternal extends PureComponent< // things are listening to transactions and refetch // automatically (use ActualQL?) setTimeout(() => { - this.refetchTransactions(); + void this.refetchTransactions(); }, 100); } @@ -442,13 +442,13 @@ class AccountInternal extends PureComponent< }; refetchTransactions = async () => { - this.paged?.run(); + void this.paged?.run(); }; fetchTransactions = (filterConditions?: ConditionEntity[]) => { const query = this.makeRootTransactionsQuery(); this.rootQuery = this.currentQuery = query; - if (filterConditions) this.applyFilters(filterConditions); + if (filterConditions) void this.applyFilters(filterConditions); else this.updateQuery(query); if (this.props.accountId) { @@ -622,7 +622,7 @@ class AccountInternal extends PureComponent< accountName && accountName.replace(/[()]/g, '').replace(/\s+/g, '-'); const filename = `${normalizedName || 'transactions'}.csv`; - window.Actual.saveFile( + void window.Actual.saveFile( exportedTransactions, filename, t('Export transactions'), @@ -817,14 +817,14 @@ class AccountInternal extends PureComponent< ); break; case 'close': - this.props.dispatch(openAccountCloseModal({ accountId })); + void this.props.dispatch(openAccountCloseModal({ accountId })); break; case 'reopen': this.props.onReopenAccount(accountId); break; case 'export': const accountName = this.getAccountTitle(account, accountId); - this.onExport(accountName); + void this.onExport(accountName); break; case 'toggle-balance': if (this.state.showBalances) { @@ -851,7 +851,7 @@ class AccountInternal extends PureComponent< this.setState({ sort: null }, () => { const filterConditions = this.state.filterConditions; if (filterConditions.length > 0) { - this.applyFilters([...filterConditions]); + void this.applyFilters([...filterConditions]); } else { this.fetchTransactions(); } @@ -1070,18 +1070,18 @@ class AccountInternal extends PureComponent< }; onShowTransactions = async (ids: string[]) => { - this.onApplyFilter({ + void this.onApplyFilter({ customName: t('Selected transactions'), queryFilter: { id: { $oneof: ids } }, }); }; onBatchEdit = (name: keyof TransactionEntity, ids: string[]) => { - this.props.onBatchEdit({ + void this.props.onBatchEdit({ name, ids, onSuccess: updatedIds => { - this.refetchTransactions(); + void this.refetchTransactions(); if (this.table.current) { this.table.current.edit(updatedIds[0], 'select', false); @@ -1091,11 +1091,14 @@ class AccountInternal extends PureComponent< }; onBatchDuplicate = (ids: string[]) => { - this.props.onBatchDuplicate({ ids, onSuccess: this.refetchTransactions }); + void this.props.onBatchDuplicate({ + ids, + onSuccess: this.refetchTransactions, + }); }; onBatchDelete = (ids: string[]) => { - this.props.onBatchDelete({ ids, onSuccess: this.refetchTransactions }); + void this.props.onBatchDelete({ ids, onSuccess: this.refetchTransactions }); }; onMakeAsSplitTransaction = async (ids: string[]) => { @@ -1134,7 +1137,7 @@ class AccountInternal extends PureComponent< updated: childTransactions, }); - this.refetchTransactions(); + void this.refetchTransactions(); }; onMakeAsNonSplitTransactions = async (ids: string[]) => { @@ -1204,7 +1207,7 @@ class AccountInternal extends PureComponent< await send('transactions-batch-update', changes); - this.refetchTransactions(); + void this.refetchTransactions(); const transactionsToSelect = changes.updated.map(t => t.id); this.dispatchSelected?.({ @@ -1257,7 +1260,7 @@ class AccountInternal extends PureComponent< }; onBatchLinkSchedule = (ids: string[]) => { - this.props.onBatchLinkSchedule({ + void this.props.onBatchLinkSchedule({ ids, account: this.props.accounts.find(a => a.id === this.props.accountId), onSuccess: this.refetchTransactions, @@ -1265,7 +1268,7 @@ class AccountInternal extends PureComponent< }; onBatchUnlinkSchedule = (ids: string[]) => { - this.props.onBatchUnlinkSchedule({ + void this.props.onBatchUnlinkSchedule({ ids, onSuccess: this.refetchTransactions, }); @@ -1364,7 +1367,7 @@ class AccountInternal extends PureComponent< this.setState({ filterId: { ...this.state.filterId, status: 'changed' } as SavedFilter, }); - this.applyFilters([...this.state.filterConditions]); + void this.applyFilters([...this.state.filterConditions]); if (this.state.search !== '') { this.onSearch(this.state.search); } @@ -1376,13 +1379,13 @@ class AccountInternal extends PureComponent< f => f.id === this.state.filterId?.id, ); this.setState({ filterConditionsOp: savedFilter.conditionsOp ?? 'and' }); - this.applyFilters([...savedFilter.conditions]); + void this.applyFilters([...savedFilter.conditions]); } else { if (savedFilter.status) { this.setState({ filterConditionsOp: savedFilter.conditionsOp ?? 'and', }); - this.applyFilters([...(savedFilter.conditions ?? [])]); + void this.applyFilters([...(savedFilter.conditions ?? [])]); } } this.setState({ filterId: { ...this.state.filterId, ...savedFilter } }); @@ -1391,7 +1394,7 @@ class AccountInternal extends PureComponent< onClearFilters = () => { this.setState({ filterConditionsOp: 'and' }); this.setState({ filterId: undefined }); - this.applyFilters([]); + void this.applyFilters([]); if (this.state.search !== '') { this.onSearch(this.state.search); } @@ -1401,7 +1404,7 @@ class AccountInternal extends PureComponent< oldCondition: RuleConditionEntity, updatedCondition: RuleConditionEntity, ) => { - this.applyFilters( + void this.applyFilters( this.state.filterConditions.map(c => c === oldCondition ? updatedCondition : c, ), @@ -1418,7 +1421,9 @@ class AccountInternal extends PureComponent< }; onDeleteFilter = (condition: RuleConditionEntity) => { - this.applyFilters(this.state.filterConditions.filter(c => c !== condition)); + void this.applyFilters( + this.state.filterConditions.filter(c => c !== condition), + ); if (this.state.filterConditions.length === 1) { this.setState({ filterId: undefined }); this.setState({ filterConditionsOp: 'and' }); @@ -1456,7 +1461,7 @@ class AccountInternal extends PureComponent< filterId: { ...savedFilter, status: 'saved' }, }); this.setState({ filterConditionsOp: savedFilter.conditionsOp }); - this.applyFilters([...savedFilter.conditions]); + void this.applyFilters([...savedFilter.conditions]); } else { // A condition was passed in. const condition = conditionOrSavedFilter; @@ -1472,7 +1477,7 @@ class AccountInternal extends PureComponent< status: this.state.filterId && 'changed', } as SavedFilter, }); - this.applyFilters([...filterConditions, condition]); + void this.applyFilters([...filterConditions, condition]); } if (this.state.search !== '') { @@ -1491,13 +1496,13 @@ class AccountInternal extends PureComponent< for (const id of scheduleIds) { await send('schedule/post-transaction', { id }); } - this.refetchTransactions(); + void this.refetchTransactions(); break; case 'post-transaction-today': for (const id of scheduleIds) { await send('schedule/post-transaction', { id, today: true }); } - this.refetchTransactions(); + void this.refetchTransactions(); break; case 'skip': for (const id of scheduleIds) { @@ -1642,7 +1647,7 @@ class AccountInternal extends PureComponent< // called directly from UI by sorting a column. // active filters need to be applied before sorting case isFiltered: - this.applyFilters([...filterConditions]); + void this.applyFilters([...filterConditions]); sortCurrentQuery(this, sortField, sortAscDesc); break; diff --git a/packages/desktop-client/src/components/accounts/AccountSyncCheck.tsx b/packages/desktop-client/src/components/accounts/AccountSyncCheck.tsx index ca147e0d5b..9d78ad4734 100644 --- a/packages/desktop-client/src/components/accounts/AccountSyncCheck.tsx +++ b/packages/desktop-client/src/components/accounts/AccountSyncCheck.tsx @@ -99,7 +99,7 @@ export function AccountSyncCheck() { setOpen(false); if (acc.account_id) { - authorizeBank(dispatch); + void authorizeBank(dispatch); } }, [dispatch], diff --git a/packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx b/packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx index 2fd540d1f0..97edc76918 100644 --- a/packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx +++ b/packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx @@ -108,7 +108,7 @@ function UserAccessContent({ isModal }: ManageUserAccessContentProps) { } } - loadData(); + void loadData(); return () => { undo.setUndoState('openModal', null); diff --git a/packages/desktop-client/src/components/admin/UserAccess/UserAccessRow.tsx b/packages/desktop-client/src/components/admin/UserAccess/UserAccessRow.tsx index b8ddeda905..478c7302b0 100644 --- a/packages/desktop-client/src/components/admin/UserAccess/UserAccessRow.tsx +++ b/packages/desktop-client/src/components/admin/UserAccess/UserAccessRow.tsx @@ -81,7 +81,7 @@ export const UserAccessRow = memo( button: { title: t('Go to login'), action: () => { - dispatch(signOut()); + void dispatch(signOut()); }, }, }, diff --git a/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx b/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx index d73d168c76..864636020d 100644 --- a/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx +++ b/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx @@ -135,7 +135,7 @@ function UserDirectoryContent({ isModal }: ManageUserDirectoryContentProps) { await loadUsers(); } - loadData(); + void loadData(); return () => { undo.setUndoState('openModal', null); @@ -164,7 +164,7 @@ function UserDirectoryContent({ isModal }: ManageUserDirectoryContentProps) { button: { title: t('Go to login'), action: () => { - dispatch(signOut()); + void dispatch(signOut()); }, }, }, diff --git a/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx b/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx index 43ccc93d9f..5a2ea59c1e 100644 --- a/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx +++ b/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx @@ -246,7 +246,7 @@ export function EditSyncAccount({ account }: EditSyncAccountProps) { , ]} onSetOpenId={async config => { - onSetOpenId(config); + void onSetOpenId(config); }} /> @@ -316,7 +316,7 @@ export function Login() { useEffect(() => { if (checked && !searchParams.has('error')) { - (async () => { + void (async () => { if (method === 'header') { setError(null); const { error } = await send('subscribe-sign-in', { @@ -327,7 +327,7 @@ export function Login() { if (error) { setError(error); } else { - dispatch(loggedIn()); + void dispatch(loggedIn()); } } })(); diff --git a/packages/desktop-client/src/components/manager/subscribe/OpenIdCallback.ts b/packages/desktop-client/src/components/manager/subscribe/OpenIdCallback.ts index 86be63a8c8..d5059955a0 100644 --- a/packages/desktop-client/src/components/manager/subscribe/OpenIdCallback.ts +++ b/packages/desktop-client/src/components/manager/subscribe/OpenIdCallback.ts @@ -9,8 +9,8 @@ export function OpenIdCallback() { const dispatch = useDispatch(); useEffect(() => { const token = new URLSearchParams(window.location.search).get('token'); - send('subscribe-set-token', { token: token as string }).then(() => { - dispatch(loggedIn()); + void send('subscribe-set-token', { token: token as string }).then(() => { + void dispatch(loggedIn()); }); }); return null; diff --git a/packages/desktop-client/src/components/manager/subscribe/common.tsx b/packages/desktop-client/src/components/manager/subscribe/common.tsx index 542144767b..ee3ecae997 100644 --- a/packages/desktop-client/src/components/manager/subscribe/common.tsx +++ b/packages/desktop-client/src/components/manager/subscribe/common.tsx @@ -36,7 +36,7 @@ export function useBootstrapped(redirect = true) { const ensure = url => { if (location.pathname !== url) { if (redirect) { - navigate(url); + void navigate(url); } } else { setChecked(true); @@ -56,7 +56,7 @@ export function useBootstrapped(redirect = true) { if ('error' in result || !result.hasServer) { console.log('error' in result && result.error); - navigate('/config-server'); + void navigate('/config-server'); return; } @@ -76,7 +76,7 @@ export function useBootstrapped(redirect = true) { > = await send('subscribe-needs-bootstrap'); if ('error' in result) { - navigate('/error', { state: { error: result.error } }); + void navigate('/error', { state: { error: result.error } }); } else if (result.bootstrapped) { ensure(`/login`); @@ -89,7 +89,7 @@ export function useBootstrapped(redirect = true) { } } } - run(); + void run(); }, [ location, navigate, diff --git a/packages/desktop-client/src/components/mobile/accounts/AccountPage.tsx b/packages/desktop-client/src/components/mobile/accounts/AccountPage.tsx index 948564ccfe..a520901be3 100644 --- a/packages/desktop-client/src/components/mobile/accounts/AccountPage.tsx +++ b/packages/desktop-client/src/components/mobile/accounts/AccountPage.tsx @@ -141,7 +141,7 @@ function AccountHeader({ account }: { readonly account: AccountEntity }) { ); const onCloseAccount = useCallback(() => { - dispatch(openAccountCloseModal({ accountId: account.id })); + void dispatch(openAccountCloseModal({ accountId: account.id })); }, [account.id, dispatch]); const { mutate: reopenAccount } = useReopenAccountMutation(); diff --git a/packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx b/packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx index 8597ee9a8e..2095130a6e 100644 --- a/packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx +++ b/packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx @@ -133,7 +133,7 @@ function TransactionListWithPreviews({ const onOpenTransaction = useCallback( (transaction: TransactionEntity) => { if (!isPreviewId(transaction.id)) { - navigate(`/transactions/${transaction.id}`); + void navigate(`/transactions/${transaction.id}`); } else { dispatch( pushModal({ diff --git a/packages/desktop-client/src/components/mobile/accounts/AccountsPage.tsx b/packages/desktop-client/src/components/mobile/accounts/AccountsPage.tsx index 3f653b6503..0da3b60a85 100644 --- a/packages/desktop-client/src/components/mobile/accounts/AccountsPage.tsx +++ b/packages/desktop-client/src/components/mobile/accounts/AccountsPage.tsx @@ -515,7 +515,7 @@ export function AccountsPage() { const onOpenAccount = useCallback( (account: AccountEntity) => { - navigate(`/accounts/${account.id}`); + void navigate(`/accounts/${account.id}`); }, [navigate], ); diff --git a/packages/desktop-client/src/components/mobile/accounts/AllAccountTransactions.tsx b/packages/desktop-client/src/components/mobile/accounts/AllAccountTransactions.tsx index cd5c46eb89..d21cb6c131 100644 --- a/packages/desktop-client/src/components/mobile/accounts/AllAccountTransactions.tsx +++ b/packages/desktop-client/src/components/mobile/accounts/AllAccountTransactions.tsx @@ -63,7 +63,7 @@ function TransactionListWithPreviews() { const onOpenTransaction = useCallback( (transaction: TransactionEntity) => { if (!isPreviewId(transaction.id)) { - navigate(`/transactions/${transaction.id}`); + void navigate(`/transactions/${transaction.id}`); } else { dispatch( pushModal({ diff --git a/packages/desktop-client/src/components/mobile/accounts/OffBudgetAccountTransactions.tsx b/packages/desktop-client/src/components/mobile/accounts/OffBudgetAccountTransactions.tsx index c9f37e5259..eede9d6ea6 100644 --- a/packages/desktop-client/src/components/mobile/accounts/OffBudgetAccountTransactions.tsx +++ b/packages/desktop-client/src/components/mobile/accounts/OffBudgetAccountTransactions.tsx @@ -74,7 +74,7 @@ function TransactionListWithPreviews() { const onOpenTransaction = useCallback( (transaction: TransactionEntity) => { if (!isPreviewId(transaction.id)) { - navigate(`/transactions/${transaction.id}`); + void navigate(`/transactions/${transaction.id}`); } else { dispatch( pushModal({ diff --git a/packages/desktop-client/src/components/mobile/accounts/OnBudgetAccountTransactions.tsx b/packages/desktop-client/src/components/mobile/accounts/OnBudgetAccountTransactions.tsx index cd84243927..9ec2cb4928 100644 --- a/packages/desktop-client/src/components/mobile/accounts/OnBudgetAccountTransactions.tsx +++ b/packages/desktop-client/src/components/mobile/accounts/OnBudgetAccountTransactions.tsx @@ -74,7 +74,7 @@ function TransactionListWithPreviews() { const onOpenTransaction = useCallback( (transaction: TransactionEntity) => { if (!isPreviewId(transaction.id)) { - navigate(`/transactions/${transaction.id}`); + void navigate(`/transactions/${transaction.id}`); } else { dispatch( pushModal({ diff --git a/packages/desktop-client/src/components/mobile/banksync/MobileBankSyncAccountEditPage.tsx b/packages/desktop-client/src/components/mobile/banksync/MobileBankSyncAccountEditPage.tsx index b65147a03f..074a2b9e35 100644 --- a/packages/desktop-client/src/components/mobile/banksync/MobileBankSyncAccountEditPage.tsx +++ b/packages/desktop-client/src/components/mobile/banksync/MobileBankSyncAccountEditPage.tsx @@ -46,12 +46,12 @@ export function MobileBankSyncAccountEditPage() { } = useBankSyncAccountSettings(accountId!); const handleCancel = () => { - navigate('/bank-sync'); + void navigate('/bank-sync'); }; const handleSave = async () => { saveSettings(); - navigate('/bank-sync'); + void navigate('/bank-sync'); }; const unlinkAccount = useUnlinkAccountMutation(); diff --git a/packages/desktop-client/src/components/mobile/banksync/MobileBankSyncPage.tsx b/packages/desktop-client/src/components/mobile/banksync/MobileBankSyncPage.tsx index 99335d1b0d..748f4464aa 100644 --- a/packages/desktop-client/src/components/mobile/banksync/MobileBankSyncPage.tsx +++ b/packages/desktop-client/src/components/mobile/banksync/MobileBankSyncPage.tsx @@ -98,7 +98,7 @@ export function MobileBankSyncPage() { (account: AccountEntity, action: 'link' | 'edit') => { switch (action) { case 'edit': - navigate(`/bank-sync/account/${account.id}/edit`); + void navigate(`/bank-sync/account/${account.id}/edit`); break; case 'link': dispatch( diff --git a/packages/desktop-client/src/components/mobile/budget/BudgetPage.tsx b/packages/desktop-client/src/components/mobile/budget/BudgetPage.tsx index 5c9456d461..d6578653fa 100644 --- a/packages/desktop-client/src/components/mobile/budget/BudgetPage.tsx +++ b/packages/desktop-client/src/components/mobile/budget/BudgetPage.tsx @@ -114,7 +114,7 @@ export function BudgetPage() { setInitialized(true); } - init(); + void init(); }, [budgetType, startMonth, dispatch, spreadsheet]); const onBudgetAction = useCallback( @@ -479,7 +479,7 @@ export function BudgetPage() { ); const onSwitchBudgetFile = useCallback(() => { - dispatch(closeBudget()); + void dispatch(closeBudget()); }, [dispatch]); const onOpenBudgetMonthMenu = useCallback( @@ -587,7 +587,7 @@ export function BudgetPage() { { - dispatch(sync()); + void dispatch(sync()); }} > {({ onRefresh }) => ( diff --git a/packages/desktop-client/src/components/mobile/budget/CategoryTransactions.tsx b/packages/desktop-client/src/components/mobile/budget/CategoryTransactions.tsx index 6e79b1794b..14d77c68f7 100644 --- a/packages/desktop-client/src/components/mobile/budget/CategoryTransactions.tsx +++ b/packages/desktop-client/src/components/mobile/budget/CategoryTransactions.tsx @@ -75,7 +75,7 @@ function TransactionListWithPreviews({ (transaction: TransactionEntity) => { // details of how the native app used to handle preview transactions here can be found at commit 05e58279 if (!isPreviewId(transaction.id)) { - navigate(`/transactions/${transaction.id}`); + void navigate(`/transactions/${transaction.id}`); } }, [navigate], diff --git a/packages/desktop-client/src/components/mobile/budget/ExpenseCategoryListItem.tsx b/packages/desktop-client/src/components/mobile/budget/ExpenseCategoryListItem.tsx index 6d2b925e42..f9fffc87f1 100644 --- a/packages/desktop-client/src/components/mobile/budget/ExpenseCategoryListItem.tsx +++ b/packages/desktop-client/src/components/mobile/budget/ExpenseCategoryListItem.tsx @@ -413,7 +413,7 @@ export function ExpenseCategoryListItem({ if (!category) { return; } - navigate(`/categories/${category.id}?month=${month}`); + void navigate(`/categories/${category.id}?month=${month}`); }, [category, month, navigate]); if (!category) { diff --git a/packages/desktop-client/src/components/mobile/budget/IncomeCategoryListItem.tsx b/packages/desktop-client/src/components/mobile/budget/IncomeCategoryListItem.tsx index e84bcbe424..b328495924 100644 --- a/packages/desktop-client/src/components/mobile/budget/IncomeCategoryListItem.tsx +++ b/packages/desktop-client/src/components/mobile/budget/IncomeCategoryListItem.tsx @@ -196,7 +196,7 @@ export function IncomeCategoryListItem({ return null; } - navigate(`/categories/${category.id}?month=${month}`); + void navigate(`/categories/${category.id}?month=${month}`); }, [category, month, navigate]); const onCarryover = useCallback( diff --git a/packages/desktop-client/src/components/mobile/budget/UncategorizedTransactions.tsx b/packages/desktop-client/src/components/mobile/budget/UncategorizedTransactions.tsx index 64e4c15944..c628ab5c7e 100644 --- a/packages/desktop-client/src/components/mobile/budget/UncategorizedTransactions.tsx +++ b/packages/desktop-client/src/components/mobile/budget/UncategorizedTransactions.tsx @@ -43,7 +43,7 @@ export function UncategorizedTransactions() { (transaction: TransactionEntity) => { // details of how the native app used to handle preview transactions here can be found at commit 05e58279 if (!isPreviewId(transaction.id)) { - navigate(`/transactions/${transaction.id}`); + void navigate(`/transactions/${transaction.id}`); } }, [navigate], diff --git a/packages/desktop-client/src/components/mobile/payees/MobilePayeeEditPage.tsx b/packages/desktop-client/src/components/mobile/payees/MobilePayeeEditPage.tsx index 10f22ed86d..9c83e38240 100644 --- a/packages/desktop-client/src/components/mobile/payees/MobilePayeeEditPage.tsx +++ b/packages/desktop-client/src/components/mobile/payees/MobilePayeeEditPage.tsx @@ -43,13 +43,13 @@ export function MobilePayeeEditPage() { setIsLoading(false); } else { // Payee not found, navigate back to payees list - navigate('/payees'); + void navigate('/payees'); } } }, [id, payees, navigate]); const handleCancel = useCallback(() => { - navigate(-1); + void navigate(-1); }, [navigate]); const handleSave = useCallback(async () => { @@ -67,7 +67,7 @@ export function MobilePayeeEditPage() { newName: editedPayeeName.trim(), }), }); - navigate('/payees'); + void navigate('/payees'); } catch (error) { console.error('Failed to update payee:', error); dispatch( diff --git a/packages/desktop-client/src/components/mobile/payees/MobilePayeesPage.tsx b/packages/desktop-client/src/components/mobile/payees/MobilePayeesPage.tsx index 632875391c..f9c575bc6b 100644 --- a/packages/desktop-client/src/components/mobile/payees/MobilePayeesPage.tsx +++ b/packages/desktop-client/src/components/mobile/payees/MobilePayeesPage.tsx @@ -42,7 +42,7 @@ export function MobilePayeesPage() { const handlePayeePress = useCallback( (payee: PayeeEntity) => { - navigate(`/payees/${payee.id}`); + void navigate(`/payees/${payee.id}`); }, [navigate], ); @@ -56,18 +56,18 @@ export function MobilePayeesPage() { id: payee.id, }); const ruleIds = associatedRules.map(rule => rule.id).join(','); - navigate(`/rules?visible-rules=${ruleIds}`); + void navigate(`/rules?visible-rules=${ruleIds}`); return; } catch (error) { console.error('Failed to fetch payee rules:', error); // Fallback to general rules page - navigate('/rules'); + void navigate('/rules'); return; } } // Create a new rule for the payee - navigate('/rules/new', { + void navigate('/rules/new', { state: { rule: { conditions: [ diff --git a/packages/desktop-client/src/components/mobile/rules/AddRuleButton.tsx b/packages/desktop-client/src/components/mobile/rules/AddRuleButton.tsx index 6be024a607..fbab6199ae 100644 --- a/packages/desktop-client/src/components/mobile/rules/AddRuleButton.tsx +++ b/packages/desktop-client/src/components/mobile/rules/AddRuleButton.tsx @@ -11,7 +11,7 @@ export function AddRuleButton() { const navigate = useNavigate(); const handleAddRule = useCallback(() => { - navigate('/rules/new'); + void navigate('/rules/new'); }, [navigate]); return ( diff --git a/packages/desktop-client/src/components/mobile/rules/MobileRuleEditPage.tsx b/packages/desktop-client/src/components/mobile/rules/MobileRuleEditPage.tsx index 4fe9eef1af..2e2aaa51df 100644 --- a/packages/desktop-client/src/components/mobile/rules/MobileRuleEditPage.tsx +++ b/packages/desktop-client/src/components/mobile/rules/MobileRuleEditPage.tsx @@ -56,13 +56,13 @@ export function MobileRuleEditPage() { setRule(loadedRule); } else { // Rule not found, navigate back to rules list - navigate('/rules'); + void navigate('/rules'); } }) .catch(error => { console.error('Failed to load rule:', error); // Navigate back to rules list if rule not found - navigate('/rules'); + void navigate('/rules'); }) .finally(() => { setIsLoading(false); @@ -100,11 +100,11 @@ export function MobileRuleEditPage() { }); } // Navigate back to rules list - navigate('/rules'); + void navigate('/rules'); }; const handleCancel = () => { - navigate(-1); + void navigate(-1); }; const handleDelete = () => { @@ -125,7 +125,7 @@ export function MobileRuleEditPage() { showUndoNotification({ message: t('Rule deleted successfully'), }); - navigate('/rules'); + void navigate('/rules'); } catch (error) { console.error('Failed to delete rule:', error); dispatch( diff --git a/packages/desktop-client/src/components/mobile/rules/MobileRulesPage.tsx b/packages/desktop-client/src/components/mobile/rules/MobileRulesPage.tsx index 365dc622f5..58ed7322d2 100644 --- a/packages/desktop-client/src/components/mobile/rules/MobileRulesPage.tsx +++ b/packages/desktop-client/src/components/mobile/rules/MobileRulesPage.tsx @@ -94,13 +94,13 @@ export function MobileRulesPage() { }, []); useEffect(() => { - loadRules(); + void loadRules(); }, [loadRules]); // Listen for undo events to refresh rules list useEffect(() => { const onUndo = () => { - loadRules(); + void loadRules(); }; const lastUndoEvent = undo.getUndoState('undoEvent'); @@ -113,7 +113,7 @@ export function MobileRulesPage() { const handleRulePress = useCallback( (rule: RuleEntity) => { - navigate(`/rules/${rule.id}`); + void navigate(`/rules/${rule.id}`); }, [navigate], ); diff --git a/packages/desktop-client/src/components/mobile/schedules/AddScheduleButton.tsx b/packages/desktop-client/src/components/mobile/schedules/AddScheduleButton.tsx index 37d55fe4be..c1961b45aa 100644 --- a/packages/desktop-client/src/components/mobile/schedules/AddScheduleButton.tsx +++ b/packages/desktop-client/src/components/mobile/schedules/AddScheduleButton.tsx @@ -11,7 +11,7 @@ export function AddScheduleButton() { const navigate = useNavigate(); const handleAddSchedule = useCallback(() => { - navigate('/schedules/new'); + void navigate('/schedules/new'); }, [navigate]); return ( diff --git a/packages/desktop-client/src/components/mobile/schedules/MobileScheduleEditPage.tsx b/packages/desktop-client/src/components/mobile/schedules/MobileScheduleEditPage.tsx index 532e411ef2..0acc89ea11 100644 --- a/packages/desktop-client/src/components/mobile/schedules/MobileScheduleEditPage.tsx +++ b/packages/desktop-client/src/components/mobile/schedules/MobileScheduleEditPage.tsx @@ -126,11 +126,11 @@ export function MobileScheduleEditPage() { }); // Navigate back to schedules list - navigate('/schedules'); + void navigate('/schedules'); } async function onEditRule(ruleId: string) { - navigate(`/rules/${ruleId}`); + void navigate(`/rules/${ruleId}`); } async function onLinkTransactions(ids: string[], scheduleId?: string) { diff --git a/packages/desktop-client/src/components/mobile/schedules/MobileSchedulesPage.tsx b/packages/desktop-client/src/components/mobile/schedules/MobileSchedulesPage.tsx index cc5360296a..d442c17fe8 100644 --- a/packages/desktop-client/src/components/mobile/schedules/MobileSchedulesPage.tsx +++ b/packages/desktop-client/src/components/mobile/schedules/MobileSchedulesPage.tsx @@ -90,7 +90,7 @@ export function MobileSchedulesPage() { const handleSchedulePress = useCallback( (schedule: ScheduleEntity) => { - navigate(`/schedules/${schedule.id}`); + void navigate(`/schedules/${schedule.id}`); }, [navigate], ); diff --git a/packages/desktop-client/src/components/mobile/transactions/AddTransactionButton.tsx b/packages/desktop-client/src/components/mobile/transactions/AddTransactionButton.tsx index 7dbe638fd0..cc6bfc01d7 100644 --- a/packages/desktop-client/src/components/mobile/transactions/AddTransactionButton.tsx +++ b/packages/desktop-client/src/components/mobile/transactions/AddTransactionButton.tsx @@ -25,7 +25,7 @@ export function AddTransactionButton({ aria-label={t('Add transaction')} style={{ margin: 10 }} onPress={() => { - navigate(to, { state: { accountId, categoryId } }); + void navigate(to, { state: { accountId, categoryId } }); }} > diff --git a/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx b/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx index fd4c6ed29d..7b87f7aa74 100644 --- a/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx +++ b/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx @@ -683,7 +683,7 @@ const TransactionEditInner = memo( } onSave(transactionsToSave); - navigate(-1); + void navigate(-1); }; const today = monthUtils.currentDay(); @@ -741,7 +741,7 @@ const TransactionEditInner = memo( }, }), ); - navigate(-1); + void navigate(-1); }, onCancel: onConfirmSave, }, @@ -787,7 +787,7 @@ const TransactionEditInner = memo( value: TransactionEntity[Field], ) => { const newTransaction = { ...serializedTransaction, [name]: value }; - await onUpdate(newTransaction, name); + onUpdate(newTransaction, name); onClearActiveEdit(); if (name === 'account') { @@ -800,7 +800,7 @@ const TransactionEditInner = memo( const onTotalAmountUpdate = useCallback( (value: number) => { if (transaction.amount !== value) { - onUpdateInner(transaction, 'amount', value); + void onUpdateInner(transaction, 'amount', value); } }, [onUpdateInner, transaction], @@ -836,7 +836,7 @@ const TransactionEditInner = memo( unserializedTransaction.date, ), onSelect: categoryId => { - onUpdateInner(transactionToEdit, name, categoryId); + void onUpdateInner(transactionToEdit, name, categoryId); }, onClose: () => { onClearActiveEdit(); @@ -853,7 +853,7 @@ const TransactionEditInner = memo( name: 'account-autocomplete', options: { onSelect: accountId => { - onUpdateInner(transactionToEdit, name, accountId); + void onUpdateInner(transactionToEdit, name, accountId); }, onClose: () => { onClearActiveEdit(); @@ -870,7 +870,7 @@ const TransactionEditInner = memo( name: 'payee-autocomplete', options: { onSelect: payeeId => { - onUpdateInner(transactionToEdit, name, payeeId); + void onUpdateInner(transactionToEdit, name, payeeId); }, onClose: () => { onClearActiveEdit(); @@ -889,7 +889,7 @@ const TransactionEditInner = memo( name, onSubmit: (name, value) => { if (typeof value === 'object' && 'useRegex' in value) { - onUpdateInner( + void onUpdateInner( transactionToEdit, name, applyFindReplace( @@ -900,7 +900,7 @@ const TransactionEditInner = memo( ), ); } else { - onUpdateInner(transactionToEdit, name, value); + void onUpdateInner(transactionToEdit, name, value); } }, onClose: () => { @@ -949,7 +949,7 @@ const TransactionEditInner = memo( return; } - navigate(-1); + void navigate(-1); }, }, }, @@ -1360,7 +1360,7 @@ function TransactionEditUnconnected({ } } if (transactionId !== 'new') { - fetchTransaction(); + void fetchTransaction(); } else { isAdding.current = true; } @@ -1632,7 +1632,7 @@ function TransactionEditUnconnected({