From df9b9ff87c52ee2539dc6cbca7b757b0db04ff6e Mon Sep 17 00:00:00 2001 From: dariusz-biela Date: Tue, 2 Sep 2025 16:07:07 +0200 Subject: [PATCH 1/2] chore: decrement number of max eslint warnings --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 15ce4ae41b2d0..10b7b5972a72e 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "test:debug": "TZ=utc NODE_OPTIONS='--inspect-brk --experimental-vm-modules' jest --runInBand", "perf-test": "NODE_OPTIONS=--experimental-vm-modules npx reassure", "typecheck": "NODE_OPTIONS=--max_old_space_size=8192 tsc", - "lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=216 --cache --cache-location=node_modules/.cache/eslint", + "lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=215 --cache --cache-location=node_modules/.cache/eslint", "lint-changed": "NODE_OPTIONS=--max_old_space_size=8192 ./scripts/lintChanged.sh", "lint-watch": "npx eslint-watch --watch --changed", "shellcheck": "./scripts/shellCheck.sh", From c352e9a281310187aa9d95ff60ca14e2a4544702 Mon Sep 17 00:00:00 2001 From: dariusz-biela Date: Tue, 2 Sep 2025 16:08:55 +0200 Subject: [PATCH 2/2] refactor: replaces Onyx.connect with Onyx.connectWithoutView in src/libs/actions/App.ts for ONYXKEYS.ACCOUNT --- src/libs/actions/App.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libs/actions/App.ts b/src/libs/actions/App.ts index a8fc974c3e79f..cb981baa94ea2 100644 --- a/src/libs/actions/App.ts +++ b/src/libs/actions/App.ts @@ -58,8 +58,11 @@ Onyx.connect({ }, }); +// preservedShouldUseStagingServer is used in the "clearOnyxAndResetApp" functions and is not directly associated with the View, +// so retrieving it using Onyx.connectWithoutView is correct. +// If this variable is ever needed for use in React components, it should be retrieved using useOnyx. let preservedShouldUseStagingServer: boolean | undefined; -Onyx.connect({ +Onyx.connectWithoutView({ key: ONYXKEYS.ACCOUNT, callback: (value) => { preservedShouldUseStagingServer = value?.shouldUseStagingServer;