diff --git a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx
index 142ffb75d55..1d8dd916ccf 100644
--- a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx
+++ b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx
@@ -26,12 +26,7 @@ type NetWorthGraphProps = {
};
};
-function NetWorthGraph({
- style,
- graphData,
- compact,
- domain,
-}: NetWorthGraphProps) {
+function NetWorthGraph({ style, graphData, compact }: NetWorthGraphProps) {
const tickFormatter = tick => {
return `${Math.round(tick).toLocaleString()}`; // Formats the tick values as strings with commas
};
@@ -69,7 +64,7 @@ function NetWorthGraph({
};
// eslint-disable-next-line react/no-unstable-nested-components
- const CustomTooltip = ({ active, payload, label }: CustomTooltipProps) => {
+ const CustomTooltip = ({ active, payload }: CustomTooltipProps) => {
if (active && payload && payload.length) {
return (
- {(width, height, portalHost) =>
+ {(width, height) =>
graphData && (
diff --git a/packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx b/packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx
index de73a14d6f2..1bf88d8487d 100644
--- a/packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx
+++ b/packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx
@@ -113,7 +113,7 @@ function SankeyGraph({ style, data, compact }: SankeyProps) {
...(compact && { height: 'auto' }),
}}
>
- {(width, height, portalHost) => (
+ {width => (
- {(width, height, portalHost) =>
+ {(width, height) =>
data.stackedData && (
diff --git a/packages/desktop-client/src/components/reports/spreadsheets/cash-flow-spreadsheet.tsx b/packages/desktop-client/src/components/reports/spreadsheets/cash-flow-spreadsheet.tsx
index 34502fb48a2..9d7540f10b2 100644
--- a/packages/desktop-client/src/components/reports/spreadsheets/cash-flow-spreadsheet.tsx
+++ b/packages/desktop-client/src/components/reports/spreadsheets/cash-flow-spreadsheet.tsx
@@ -57,7 +57,7 @@ export function cashFlowByDate(
});
const conditionsOpKey = conditionsOp === 'or' ? '$or' : '$and';
- function makeQuery(where) {
+ function makeQuery(_where) {
let query = q('transactions')
.filter({
[conditionsOpKey]: [...filters],
diff --git a/packages/desktop-client/src/components/select/DateSelect.tsx b/packages/desktop-client/src/components/select/DateSelect.tsx
index e08d8e60bb0..b2ead90cc4f 100644
--- a/packages/desktop-client/src/components/select/DateSelect.tsx
+++ b/packages/desktop-client/src/components/select/DateSelect.tsx
@@ -343,7 +343,7 @@ export default function DateSelect({
{...inputProps}
inputRef={inputRef}
value={value}
- onPointerUp={e => {
+ onPointerUp={() => {
if (!embedded) {
setOpen(true);
}
diff --git a/packages/desktop-client/src/components/sidebar/Accounts.tsx b/packages/desktop-client/src/components/sidebar/Accounts.tsx
index d250ec3311a..0ee408eea1c 100644
--- a/packages/desktop-client/src/components/sidebar/Accounts.tsx
+++ b/packages/desktop-client/src/components/sidebar/Accounts.tsx
@@ -77,7 +77,7 @@ function Accounts({
setIsDragging(drag.state === 'start');
}
- let makeDropPadding = (i, length) => {
+ let makeDropPadding = (i, _length) => {
if (i === 0) {
return {
paddingTop: isDragging ? 15 : 0,
@@ -156,7 +156,7 @@ function Accounts({
)}
{showClosedAccounts &&
- closedAccounts.map((account, i) => (
+ closedAccounts.map(account => (
(({ fields, ...props }, ref) => {
+>(({ fields, ...props }) => {
let navigator = useTableNavigator(props.items, fields);
return ;
});
@@ -905,7 +905,6 @@ export const Table: (
style,
navigator,
onScroll,
- version = 'v1',
allowPopupsEscape,
isSelected,
saveScrollWidth,
@@ -1044,7 +1043,7 @@ export const Table: (
);
}
- function onItemsRendered({ overscanStartIndex, overscanStopIndex }) {
+ function onItemsRendered({ overscanStopIndex }) {
if (loadMore && overscanStopIndex > items.length - 100) {
loadMore();
}
@@ -1136,9 +1135,7 @@ export const Table: (
renderRow={renderRow}
itemCount={count || items.length}
itemSize={rowHeight - 1}
- itemKey={
- getItemKey || ((index, data) => items[index].id)
- }
+ itemKey={getItemKey || (index => items[index].id)}
indexForKey={key =>
items.findIndex(item => item.id === key)
}
diff --git a/packages/desktop-client/src/components/transactions/MobileTransaction.js b/packages/desktop-client/src/components/transactions/MobileTransaction.js
index 688ff6f294e..d6e20d04488 100644
--- a/packages/desktop-client/src/components/transactions/MobileTransaction.js
+++ b/packages/desktop-client/src/components/transactions/MobileTransaction.js
@@ -228,7 +228,7 @@ class TransactionEditInner extends PureComponent {
this.props.navigate(`/accounts/${account.id}`, { replace: true });
};
- onSaveChild = childTransaction => {
+ onSaveChild = () => {
this.setState({ editingChild: null });
};
@@ -871,7 +871,7 @@ function TransactionEditUnconnected(props) {
navigate={navigate}
// TODO: ChildEdit is complicated and heavily relies on RN
// renderChildEdit={props => }
- renderChildEdit={props => {}}
+ renderChildEdit={() => {}}
dateFormat={dateFormat}
// TODO: was this a mistake in the original code?
// onTapField={this.onTapField}
diff --git a/packages/desktop-client/src/components/transactions/SimpleTransactionsTable.js b/packages/desktop-client/src/components/transactions/SimpleTransactionsTable.js
index 076a682c5ed..b637e1cdde0 100644
--- a/packages/desktop-client/src/components/transactions/SimpleTransactionsTable.js
+++ b/packages/desktop-client/src/components/transactions/SimpleTransactionsTable.js
@@ -36,7 +36,6 @@ function serializeTransaction(transaction, dateFormat) {
const TransactionRow = memo(function TransactionRow({
transaction,
fields,
- payees,
categories,
accounts,
selected,
@@ -137,7 +136,6 @@ const TransactionRow = memo(function TransactionRow({
export default function SimpleTransactionsTable({
transactions,
- schedules,
renderEmpty,
fields = ['date', 'payee', 'amount'],
style,
diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.test.js b/packages/desktop-client/src/components/transactions/TransactionsTable.test.js
index 27849cc6463..5af5a525143 100644
--- a/packages/desktop-client/src/components/transactions/TransactionsTable.test.js
+++ b/packages/desktop-client/src/components/transactions/TransactionsTable.test.js
@@ -774,7 +774,7 @@ describe('Transactions', () => {
updateProps({ transactions });
function expectErrorToNotExist(transactions) {
- transactions.forEach((transaction, idx) => {
+ transactions.forEach(transaction => {
expect(transaction.error).toBeFalsy();
});
}
diff --git a/packages/desktop-client/src/global-events.js b/packages/desktop-client/src/global-events.js
index 1cc54f8766f..f141db02ce4 100644
--- a/packages/desktop-client/src/global-events.js
+++ b/packages/desktop-client/src/global-events.js
@@ -7,7 +7,7 @@ export function handleGlobalEvents(actions, store) {
actions.setAppState({ updateInfo: info });
});
- global.Actual.onEventFromMain('update-error', msg => {
+ global.Actual.onEventFromMain('update-error', () => {
// Ignore errors. We don't want to constantly bug the user if they
// always have a flaky connection or have intentionally disabled
// updates. They will see the error in the about page if they try
@@ -18,7 +18,7 @@ export function handleGlobalEvents(actions, store) {
actions.saveGlobalPrefs({ theme });
};
- listen('server-error', info => {
+ listen('server-error', () => {
actions.addGenericErrorNotification();
});
diff --git a/packages/desktop-electron/security.js b/packages/desktop-electron/security.js
index 08ef6933db3..b8d4ca06fda 100644
--- a/packages/desktop-electron/security.js
+++ b/packages/desktop-electron/security.js
@@ -1,7 +1,7 @@
const electron = require('electron');
electron.app.on('web-contents-created', function (event, contents) {
- contents.on('will-attach-webview', function (event, webPreferences, params) {
+ contents.on('will-attach-webview', function (event, webPreferences) {
delete webPreferences.preloadURL;
delete webPreferences.preload;
@@ -15,11 +15,11 @@ electron.app.on('web-contents-created', function (event, contents) {
event.preventDefault();
});
- contents.on('will-navigate', (event, navigationUrl) => {
+ contents.on('will-navigate', event => {
event.preventDefault();
});
- contents.on('new-window', (event, navigationUrl) => {
+ contents.on('new-window', event => {
event.preventDefault();
});
});
diff --git a/packages/desktop-electron/updater.js b/packages/desktop-electron/updater.js
index df447317e24..a01f62f0e1e 100644
--- a/packages/desktop-electron/updater.js
+++ b/packages/desktop-electron/updater.js
@@ -43,7 +43,7 @@ function fireEvent(type, args) {
lastEvent = type;
}
-function start(handler) {
+function start() {
if (updateTimer) {
return null;
}
@@ -53,7 +53,7 @@ function start(handler) {
updateTimer = setInterval(() => {
if (!isCheckingForUpdates) {
- autoUpdater.checkForUpdates().catch(err => {
+ autoUpdater.checkForUpdates().catch(() => {
// Do nothing with the error (make sure it's not logged to sentry)
});
}
@@ -74,7 +74,7 @@ function stop() {
function check() {
if (!isDev && !isCheckingForUpdates) {
- autoUpdater.checkForUpdates().catch(err => {
+ autoUpdater.checkForUpdates().catch(() => {
// Do nothing with the error (make sure it's not logged to sentry)
});
}
diff --git a/packages/loot-core/migrations/1632571489012_remove_cache.js b/packages/loot-core/migrations/1632571489012_remove_cache.js
index 2f3764c47de..1e4b132f0f7 100644
--- a/packages/loot-core/migrations/1632571489012_remove_cache.js
+++ b/packages/loot-core/migrations/1632571489012_remove_cache.js
@@ -1,4 +1,4 @@
-export default async function runMigration(db, uuid) {
+export default async function runMigration(db) {
function getValue(node) {
return node.expr != null ? node.expr : node.cachedValue;
}
diff --git a/packages/loot-core/src/client/actions/account.ts b/packages/loot-core/src/client/actions/account.ts
index cecc9d8f3d4..5956d28e9fc 100644
--- a/packages/loot-core/src/client/actions/account.ts
+++ b/packages/loot-core/src/client/actions/account.ts
@@ -199,7 +199,7 @@ export function setLastTransaction(
}
export function parseTransactions(filepath, options) {
- return async (dispatch: Dispatch) => {
+ return async () => {
return await send('transactions-parse-file', {
filepath,
options,
diff --git a/packages/loot-core/src/client/actions/queries.ts b/packages/loot-core/src/client/actions/queries.ts
index c32d1ff5d65..d40e3d37a0c 100644
--- a/packages/loot-core/src/client/actions/queries.ts
+++ b/packages/loot-core/src/client/actions/queries.ts
@@ -217,7 +217,7 @@ export function updateGroup(group) {
}
export function deleteGroup(id, transferId?) {
- return async function (dispatch, getState) {
+ return async function (dispatch) {
await send('category-group-delete', { id, transferId });
await dispatch(getCategories());
// See `deleteCategory` for why we need this
diff --git a/packages/loot-core/src/client/query-helpers.test.ts b/packages/loot-core/src/client/query-helpers.test.ts
index 13b42a06f86..d8f9bb39630 100644
--- a/packages/loot-core/src/client/query-helpers.test.ts
+++ b/packages/loot-core/src/client/query-helpers.test.ts
@@ -361,7 +361,7 @@ describe('query helpers', () => {
await tracer.expect('server-query', [{ result: { $count: '*' } }]);
await tracer.expect('server-query', ['id']);
- await tracer.expect('data', data => {});
+ await tracer.expect('data', () => {});
paged.fetchNext();
paged.fetchNext();
@@ -369,7 +369,7 @@ describe('query helpers', () => {
paged.fetchNext();
await tracer.expect('server-query', ['id']);
- await tracer.expect('data', data => {});
+ await tracer.expect('data', () => {});
// Wait a bit and make sure nothing comes through
let p = Promise.race([tracer.expect('server-query'), wait(200)]);
diff --git a/packages/loot-core/src/platform/client/fetch/index.web.ts b/packages/loot-core/src/platform/client/fetch/index.web.ts
index b993bfc4bd6..6ceaa1c761d 100644
--- a/packages/loot-core/src/platform/client/fetch/index.web.ts
+++ b/packages/loot-core/src/platform/client/fetch/index.web.ts
@@ -69,7 +69,7 @@ function connectSocket(port, onOpen) {
}
};
- client.onopen = event => {
+ client.onopen = () => {
// Send any messages that were queued while closed
if (messageQueue.length > 0) {
messageQueue.forEach(msg => {
@@ -150,7 +150,7 @@ export const unlisten: T.Unlisten = function (name) {
};
async function closeSocket(onClose) {
- socketClient.onclose = event => {
+ socketClient.onclose = () => {
socketClient = null;
onClose();
};
diff --git a/packages/loot-core/src/platform/exceptions/index.browser.ts b/packages/loot-core/src/platform/exceptions/index.browser.ts
index 56ccc5c37bb..95adc82959a 100644
--- a/packages/loot-core/src/platform/exceptions/index.browser.ts
+++ b/packages/loot-core/src/platform/exceptions/index.browser.ts
@@ -4,4 +4,4 @@ export const captureException: T.CaptureException = function (exc) {
console.log('[Exception]', exc);
};
-export const captureBreadcrumb: T.CaptureBreadcrumb = function (breadcrumb) {};
+export const captureBreadcrumb: T.CaptureBreadcrumb = function () {};
diff --git a/packages/loot-core/src/platform/exceptions/index.electron.ts b/packages/loot-core/src/platform/exceptions/index.electron.ts
index 56ccc5c37bb..95adc82959a 100644
--- a/packages/loot-core/src/platform/exceptions/index.electron.ts
+++ b/packages/loot-core/src/platform/exceptions/index.electron.ts
@@ -4,4 +4,4 @@ export const captureException: T.CaptureException = function (exc) {
console.log('[Exception]', exc);
};
-export const captureBreadcrumb: T.CaptureBreadcrumb = function (breadcrumb) {};
+export const captureBreadcrumb: T.CaptureBreadcrumb = function () {};
diff --git a/packages/loot-core/src/platform/exceptions/index.testing.ts b/packages/loot-core/src/platform/exceptions/index.testing.ts
index 988d67f8266..82e6c5422d3 100644
--- a/packages/loot-core/src/platform/exceptions/index.testing.ts
+++ b/packages/loot-core/src/platform/exceptions/index.testing.ts
@@ -1,5 +1,5 @@
import type * as T from '.';
-export const captureException: T.CaptureException = function (exc) {};
+export const captureException: T.CaptureException = function () {};
-export const captureBreadcrumb: T.CaptureBreadcrumb = function (info) {};
+export const captureBreadcrumb: T.CaptureBreadcrumb = function () {};
diff --git a/packages/loot-core/src/platform/exceptions/index.web.ts b/packages/loot-core/src/platform/exceptions/index.web.ts
index 56ccc5c37bb..95adc82959a 100644
--- a/packages/loot-core/src/platform/exceptions/index.web.ts
+++ b/packages/loot-core/src/platform/exceptions/index.web.ts
@@ -4,4 +4,4 @@ export const captureException: T.CaptureException = function (exc) {
console.log('[Exception]', exc);
};
-export const captureBreadcrumb: T.CaptureBreadcrumb = function (breadcrumb) {};
+export const captureBreadcrumb: T.CaptureBreadcrumb = function () {};
diff --git a/packages/loot-core/src/platform/server/asyncStorage/index.web.ts b/packages/loot-core/src/platform/server/asyncStorage/index.web.ts
index b81081c7147..c84f217dac5 100644
--- a/packages/loot-core/src/platform/server/asyncStorage/index.web.ts
+++ b/packages/loot-core/src/platform/server/asyncStorage/index.web.ts
@@ -33,7 +33,7 @@ export const setItem: T.SetItem = async function (key, value) {
new Promise((resolve, reject) => {
let req = objectStore.put(value, key);
req.onerror = e => reject(e);
- req.onsuccess = e => resolve(undefined);
+ req.onsuccess = () => resolve(undefined);
commit(transaction);
});
};
@@ -47,7 +47,7 @@ export const removeItem: T.RemoveItem = async function (key) {
return new Promise((resolve, reject) => {
let req = objectStore.delete(key);
req.onerror = e => reject(e);
- req.onsuccess = e => resolve(undefined);
+ req.onsuccess = () => resolve(undefined);
commit(transaction);
});
};
@@ -83,7 +83,7 @@ export const multiSet: T.MultiSet = async function (keyValues) {
return new Promise((resolve, reject) => {
let req = objectStore.put(value, key);
req.onerror = e => reject(e);
- req.onsuccess = e => resolve(undefined);
+ req.onsuccess = () => resolve(undefined);
});
}),
);
@@ -103,7 +103,7 @@ export const multiRemove: T.MultiRemove = async function (keys) {
return new Promise((resolve, reject) => {
let req = objectStore.delete(key);
req.onerror = e => reject(e);
- req.onsuccess = e => resolve(undefined);
+ req.onsuccess = () => resolve(undefined);
});
}),
);
diff --git a/packages/loot-core/src/platform/server/connection/index.api.ts b/packages/loot-core/src/platform/server/connection/index.api.ts
index a28c787ae81..1aacd8372fa 100644
--- a/packages/loot-core/src/platform/server/connection/index.api.ts
+++ b/packages/loot-core/src/platform/server/connection/index.api.ts
@@ -2,7 +2,7 @@ import type * as T from '.';
export const init: T.Init = function () {};
-export const send: T.Send = function (type, args) {
+export const send: T.Send = function () {
// Nothing
};
diff --git a/packages/loot-core/src/platform/server/fs/index.web.ts b/packages/loot-core/src/platform/server/fs/index.web.ts
index d7685b82c7b..2bb399ece61 100644
--- a/packages/loot-core/src/platform/server/fs/index.web.ts
+++ b/packages/loot-core/src/platform/server/fs/index.web.ts
@@ -312,7 +312,7 @@ export const removeDirRecursively = async function (dirpath) {
}
};
-export const getModifiedTime = async function (filepath) {
+export const getModifiedTime = async function () {
throw new Error(
'getModifiedTime not supported on the web (only used for backups)',
);
diff --git a/packages/loot-core/src/platform/server/indexeddb/index.web.ts b/packages/loot-core/src/platform/server/indexeddb/index.web.ts
index d657a53f792..8e362b45bf5 100644
--- a/packages/loot-core/src/platform/server/indexeddb/index.web.ts
+++ b/packages/loot-core/src/platform/server/indexeddb/index.web.ts
@@ -33,7 +33,7 @@ function _openDatabase() {
openRequest.onblocked = e => console.log('blocked', e);
- openRequest.onerror = event => {
+ openRequest.onerror = () => {
console.log('openRequest error');
reject(new Error('indexeddb-failure: Could not open IndexedDB'));
};
@@ -101,7 +101,7 @@ export const getStore: T.GetStore = function (db, name) {
export const get: T.Get = async function (store, key, mapper = x => x) {
return new Promise((resolve, reject) => {
let req = store.get(key);
- req.onsuccess = e => {
+ req.onsuccess = () => {
resolve(mapper(req.result));
};
req.onerror = e => reject(e);
@@ -111,7 +111,7 @@ export const get: T.Get = async function (store, key, mapper = x => x) {
export const set: T.Set = async function (store, item) {
return new Promise((resolve, reject) => {
let req = store.put(item);
- req.onsuccess = e => resolve(undefined);
+ req.onsuccess = () => resolve(undefined);
req.onerror = e => reject(e);
});
};
@@ -119,7 +119,7 @@ export const set: T.Set = async function (store, item) {
export const del: T.Del = async function (store, key) {
return new Promise((resolve, reject) => {
let req = store.delete(key);
- req.onsuccess = e => resolve(undefined);
+ req.onsuccess = () => resolve(undefined);
req.onerror = e => reject(e);
});
};
diff --git a/packages/loot-core/src/server/__mocks__/post.ts b/packages/loot-core/src/server/__mocks__/post.ts
index 89a961b872e..0d63da5150f 100644
--- a/packages/loot-core/src/server/__mocks__/post.ts
+++ b/packages/loot-core/src/server/__mocks__/post.ts
@@ -3,6 +3,6 @@ export {
handleRequestBinary as postBinary,
} from '../tests/mockSyncServer';
-export const get = function (url) {
+export const get = function () {
throw new Error('get unimplemented');
};
diff --git a/packages/loot-core/src/server/accounts/rules.test.ts b/packages/loot-core/src/server/accounts/rules.test.ts
index f4942f1a154..b9ecb7c5b68 100644
--- a/packages/loot-core/src/server/accounts/rules.test.ts
+++ b/packages/loot-core/src/server/accounts/rules.test.ts
@@ -489,7 +489,7 @@ describe('Rule', () => {
];
let foundRules = [];
- iterateIds(rules, 'description', (rule, value) => {
+ iterateIds(rules, 'description', rule => {
foundRules.push(rule.getId());
});
expect(foundRules).toEqual(['first', 'second', 'second', 'third']);
diff --git a/packages/loot-core/src/server/accounts/rules.ts b/packages/loot-core/src/server/accounts/rules.ts
index 71aab527001..3cad9405676 100644
--- a/packages/loot-core/src/server/accounts/rules.ts
+++ b/packages/loot-core/src/server/accounts/rules.ts
@@ -518,7 +518,7 @@ export class Rule {
});
}
- execActions(object) {
+ execActions(_object) {
let changes = {};
this.actions.forEach(action => action.exec(changes));
return changes;
diff --git a/packages/loot-core/src/server/api.ts b/packages/loot-core/src/server/api.ts
index 01190365df1..c423c15d827 100644
--- a/packages/loot-core/src/server/api.ts
+++ b/packages/loot-core/src/server/api.ts
@@ -252,7 +252,7 @@ handlers['api/finish-import'] = async function () {
await handlers['get-budget-bounds']();
await sheet.waitOnSpreadsheet();
- await cloudStorage.upload().catch(err => {});
+ await cloudStorage.upload().catch(() => {});
connection.send('finish-import');
IMPORT_MODE = false;
@@ -420,7 +420,7 @@ handlers['api/transactions-get'] = async function ({
return data;
};
-handlers['api/transactions-filter'] = async function ({ text, accountId }) {
+handlers['api/transactions-filter'] = async function () {
throw new Error('`filterTransactions` is deprecated, use `runQuery` instead');
};
diff --git a/packages/loot-core/src/server/aql/compiler.ts b/packages/loot-core/src/server/aql/compiler.ts
index 03281504e93..20077c0083c 100644
--- a/packages/loot-core/src/server/aql/compiler.ts
+++ b/packages/loot-core/src/server/aql/compiler.ts
@@ -991,7 +991,7 @@ export function compileQuery(
let {
tableViews = {},
- tableFilters = name => [],
+ tableFilters = () => [],
customizeQuery = queryState => queryState,
} = schemaConfig;
diff --git a/packages/loot-core/src/server/bench.ts b/packages/loot-core/src/server/bench.ts
index cb50c267e22..2cd59860bc4 100644
--- a/packages/loot-core/src/server/bench.ts
+++ b/packages/loot-core/src/server/bench.ts
@@ -8,7 +8,7 @@ const queries = fs
.split('___BOUNDARY')
.map(q => q.trim());
-function runQueries(n?) {
+function runQueries() {
for (let i = 0; i < queries.length; i++) {
if (queries[i] !== '') {
db.runQuery(queries[i], [], true);
diff --git a/packages/loot-core/src/server/cloud-storage.ts b/packages/loot-core/src/server/cloud-storage.ts
index a7a7f9c7a42..901f4ec4c7e 100644
--- a/packages/loot-core/src/server/cloud-storage.ts
+++ b/packages/loot-core/src/server/cloud-storage.ts
@@ -326,7 +326,7 @@ export async function possiblyUpload() {
}
// Don't block on uploading
- upload().catch(err => {});
+ upload().catch(() => {});
}
export async function removeFile(fileId) {
diff --git a/packages/loot-core/src/server/db/index.ts b/packages/loot-core/src/server/db/index.ts
index a06e08dc2d9..f0d6cda6433 100644
--- a/packages/loot-core/src/server/db/index.ts
+++ b/packages/loot-core/src/server/db/index.ts
@@ -601,12 +601,7 @@ export async function getTransaction(id) {
return rows[0];
}
-export async function getTransactionsByDate(
- accountId,
- startDate,
- endDate,
- options = {},
-) {
+export async function getTransactionsByDate() {
throw new Error('`getTransactionsByDate` is deprecated');
}
diff --git a/packages/loot-core/src/server/importers/actual.ts b/packages/loot-core/src/server/importers/actual.ts
index ac1fe39dba4..16011de75de 100644
--- a/packages/loot-core/src/server/importers/actual.ts
+++ b/packages/loot-core/src/server/importers/actual.ts
@@ -42,5 +42,5 @@ export default async function importActual(_filepath: string, buffer: Buffer) {
await handlers['load-budget']({ id });
await handlers['get-budget-bounds']();
await waitOnSpreadsheet();
- await cloudStorage.upload().catch(err => {});
+ await cloudStorage.upload().catch(() => {});
}
diff --git a/packages/loot-core/src/server/importers/ynab4.ts b/packages/loot-core/src/server/importers/ynab4.ts
index bc314b644d7..dae37000f01 100644
--- a/packages/loot-core/src/server/importers/ynab4.ts
+++ b/packages/loot-core/src/server/importers/ynab4.ts
@@ -198,7 +198,7 @@ async function importTransactions(
subtransactions:
transaction.subTransactions &&
- transaction.subTransactions.map((t, i) => {
+ transaction.subTransactions.map(t => {
return {
id: entityIdMap.get(t.entityId),
amount: amountToInteger(t.amount),
diff --git a/packages/loot-core/src/server/main.ts b/packages/loot-core/src/server/main.ts
index 52802c93653..b9b94b555b2 100644
--- a/packages/loot-core/src/server/main.ts
+++ b/packages/loot-core/src/server/main.ts
@@ -1849,7 +1849,7 @@ handlers['delete-budget'] = async function ({ id, cloudFileId }) {
// If it's a cloud file, you can delete it from the server by
// passing its cloud id
if (cloudFileId) {
- await cloudStorage.removeFile(cloudFileId).catch(err => {});
+ await cloudStorage.removeFile(cloudFileId).catch(() => {});
}
// If a local file exists, you can delete it by passing its local id
diff --git a/packages/loot-core/src/server/migrate/cli.ts b/packages/loot-core/src/server/migrate/cli.ts
index 75cdf303c6e..117bbad2a2c 100755
--- a/packages/loot-core/src/server/migrate/cli.ts
+++ b/packages/loot-core/src/server/migrate/cli.ts
@@ -45,7 +45,7 @@ function create(migrationName) {
fs.writeFileSync(up, 'BEGIN TRANSACTION;\n\nCOMMIT;', 'utf8');
}
-async function list(db) {
+async function list(_db) {
const migrationsDir = getMigrationsDir();
const applied = await getAppliedMigrations(getDatabase());
const all = await getMigrationList(migrationsDir);
diff --git a/packages/loot-core/src/server/schedules/app.ts b/packages/loot-core/src/server/schedules/app.ts
index 7d3fcfbc71f..d2ecb300858 100644
--- a/packages/loot-core/src/server/schedules/app.ts
+++ b/packages/loot-core/src/server/schedules/app.ts
@@ -550,7 +550,7 @@ app.method('schedule/get-upcoming-dates', getUpcomingDates);
app.service(trackJSONPaths);
-app.events.on('sync', ({ type, subtype }) => {
+app.events.on('sync', ({ type }) => {
let completeEvent =
type === 'success' || type === 'error' || type === 'unauthorized';
diff --git a/packages/loot-core/src/server/schedules/find-schedules.ts b/packages/loot-core/src/server/schedules/find-schedules.ts
index 3eb2efe8ab9..dcb5acda879 100644
--- a/packages/loot-core/src/server/schedules/find-schedules.ts
+++ b/packages/loot-core/src/server/schedules/find-schedules.ts
@@ -48,7 +48,7 @@ function getRank(day1, day2) {
return 1 / (dayDiff + 1);
}
-function matchSchedules(allOccurs, config, partialMatchRank = 0.5) {
+function matchSchedules(allOccurs, config, _partialMatchRank = 0.5) {
allOccurs = [...allOccurs].reverse();
let baseOccur = allOccurs[0];
let occurs = allOccurs.slice(1);
@@ -363,7 +363,7 @@ export async function findSchedules() {
}
let schedules = [...groupBy(allSchedules, 'payee').entries()].map(
- ([payeeId, schedules]) => {
+ ([schedules]) => {
schedules.sort((s1, s2) => s2.rank - s1.rank);
let winner = schedules[0];
diff --git a/packages/loot-core/src/server/spreadsheet/spreadsheet.ts b/packages/loot-core/src/server/spreadsheet/spreadsheet.ts
index f098d85cd2e..04944028926 100644
--- a/packages/loot-core/src/server/spreadsheet/spreadsheet.ts
+++ b/packages/loot-core/src/server/spreadsheet/spreadsheet.ts
@@ -77,7 +77,7 @@ export default class Spreadsheet {
return this.nodes.has(name);
}
- add(name, expr, value) {
+ add(name, expr) {
this.set(name, expr);
}
diff --git a/packages/loot-core/src/server/sync/index.ts b/packages/loot-core/src/server/sync/index.ts
index 114c337906b..70a12bd1ede 100644
--- a/packages/loot-core/src/server/sync/index.ts
+++ b/packages/loot-core/src/server/sync/index.ts
@@ -130,7 +130,7 @@ async function fetchAll(table, ids) {
}
sql += ` WHERE `;
- sql += partIds.map(id => `${column} = ?`).join(' OR ');
+ sql += partIds.map(() => `${column} = ?`).join(' OR ');
try {
let rows = await db.runQuery(sql, partIds, true);
diff --git a/packages/loot-core/src/server/tests/mockSyncServer.ts b/packages/loot-core/src/server/tests/mockSyncServer.ts
index 09db3b76321..b1150fbafa5 100644
--- a/packages/loot-core/src/server/tests/mockSyncServer.ts
+++ b/packages/loot-core/src/server/tests/mockSyncServer.ts
@@ -81,7 +81,7 @@ handlers['/plaid/handoff_public_token'] = () => {
// Do nothing
};
-handlers['/plaid/accounts'] = ({ client_id, group_id, item_id }) => {
+handlers['/plaid/accounts'] = () => {
// Ignore the parameters and just return the accounts.
return { accounts: currentMockData.accounts };
};
diff --git a/packages/loot-core/src/shared/async.test.ts b/packages/loot-core/src/shared/async.test.ts
index 3f545b5da71..bd39a36384b 100644
--- a/packages/loot-core/src/shared/async.test.ts
+++ b/packages/loot-core/src/shared/async.test.ts
@@ -59,7 +59,7 @@ describe('async', () => {
test('sequential fn should still flush queue when error is thrown', async () => {
const test = async fn => {
fn(1);
- fn(2, { throwError: true }).catch(err => {});
+ fn(2, { throwError: true }).catch(() => {});
await fn(3);
};
@@ -85,7 +85,7 @@ describe('async', () => {
// happened in here, it wouldn't effect anything else)
expect(data).toEqual([1, 1, 1, 2]);
});
- fn(2, { throwError: true }).catch(err => {
+ fn(2, { throwError: true }).catch(() => {
// Same as above
expect(data).toEqual([1, 1, 1, 2, 3]);
});