From a4a780340721d37b34eb555dcbeb8a93b33a40e4 Mon Sep 17 00:00:00 2001 From: James Long Date: Sat, 12 Nov 2022 22:13:25 -0500 Subject: [PATCH] Fix lint --- packages/loot-core/src/mocks/index.js | 6 +++--- packages/loot-core/src/server/budget/actions.js | 2 +- packages/loot-core/src/server/budget/util.js | 2 +- packages/loot-core/src/shared/util.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/loot-core/src/mocks/index.js b/packages/loot-core/src/mocks/index.js index b63d50b..9a0e56a 100644 --- a/packages/loot-core/src/mocks/index.js +++ b/packages/loot-core/src/mocks/index.js @@ -6,9 +6,9 @@ export function generateAccount(name, isConnected, type, offbudget) { return { id: uuid.v4Sync(), name, - balance_current: isConnected ? Math.floor(Math.random() * 100000): null, - bank: isConnected ? Math.floor(Math.random() * 10000): null, - bankId: isConnected ? Math.floor(Math.random() * 10000): null, + balance_current: isConnected ? Math.floor(Math.random() * 100000) : null, + bank: isConnected ? Math.floor(Math.random() * 10000) : null, + bankId: isConnected ? Math.floor(Math.random() * 10000) : null, bankName: isConnected ? 'boa' : null, type: type || 'checking', offbudget: offbudget ? 1 : 0, diff --git a/packages/loot-core/src/server/budget/actions.js b/packages/loot-core/src/server/budget/actions.js index 7bae85a..1e8266d 100644 --- a/packages/loot-core/src/server/budget/actions.js +++ b/packages/loot-core/src/server/budget/actions.js @@ -1,9 +1,9 @@ import * as monthUtils from '../../shared/months'; +import { safeNumber } from '../../shared/util'; import * as db from '../db'; import * as prefs from '../prefs'; import * as sheet from '../sheet'; import { batchMessages } from '../sync'; -import { safeNumber } from '../../shared/util'; async function getSheetValue(sheetName, cell) { const node = await sheet.getCell(sheetName, cell); diff --git a/packages/loot-core/src/server/budget/util.js b/packages/loot-core/src/server/budget/util.js index 73f5d46..f6d288e 100644 --- a/packages/loot-core/src/server/budget/util.js +++ b/packages/loot-core/src/server/budget/util.js @@ -1,5 +1,5 @@ -import { number } from '../spreadsheet/globals'; import { safeNumber } from '../../shared/util'; +import { number } from '../spreadsheet/globals'; export { number } from '../spreadsheet/globals'; diff --git a/packages/loot-core/src/shared/util.js b/packages/loot-core/src/shared/util.js index a89b5b1..c9c5770 100644 --- a/packages/loot-core/src/shared/util.js +++ b/packages/loot-core/src/shared/util.js @@ -307,7 +307,7 @@ setNumberFormat('comma-dot'); // because we always do that on numbers, the app would potentially // display wrong numbers. Instead of `2**53` we use `2**51` which // gives division more room to be correct -const MAX_SAFE_NUMBER = 2**51 - 1; +const MAX_SAFE_NUMBER = 2 ** 51 - 1; const MIN_SAFE_NUMBER = -MAX_SAFE_NUMBER; export function safeNumber(value) {