Skip to content

Commit f7f59ef

Browse files
committed
Satisfy Biome's lint in rn-shell (no then property, node: imports, a template string).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012xYtaUjbkB1hwLtK4TEzhq
1 parent 1ea0c2e commit f7f59ef

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

‎rn-shell/__tests__/machine.test.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ describe("sign-in through the system sheet", () => {
110110
expect(state.signIn).toBe("entering");
111111
// Nothing loads until the site's data (somebody else's session, perhaps) is cleared.
112112
expect(state.source).toBeNull();
113-
expect(effects).toContainEqual({ type: "clearSiteData", then: "continue" });
113+
expect(effects).toContainEqual({
114+
type: "clearSiteData",
115+
andThen: "continue",
116+
});
114117
expect(showsSkeleton(state)).toBe(true);
115118
({ state, effects } = run([{ type: "siteDataCleared" }], state));
116119
expect(state.source).toEqual({
@@ -207,7 +210,7 @@ describe("sign-in through the system sheet", () => {
207210
{ type: "configAnswered", mode: scheme, pair },
208211
{ type: "callbackUrl", url: "openbotshell://signed-in?ticket=" },
209212
{ type: "callbackUrl", url: "openbotshell://signed-in" },
210-
{ type: "callbackUrl", url: "openbotshell://evil?ticket=" + T },
213+
{ type: "callbackUrl", url: `openbotshell://evil?ticket=${T}` },
211214
] as Event[]) {
212215
state = reduce(android, state, event, 2_000).state;
213216
}

‎rn-shell/plugins/withOpenBotShell.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const {
1212
withDangerousMod,
1313
AndroidConfig,
1414
} = require("expo/config-plugins");
15-
const fs = require("fs");
16-
const path = require("path");
15+
const fs = require("node:fs");
16+
const path = require("node:path");
1717

1818
const NETWORK_CONFIG = `<?xml version="1.0" encoding="utf-8"?>
1919
<!-- TEST BUILD ONLY (rn-shell/plugins/withOpenBotShell.js): cleartext to this machine, for the mocks. -->

‎rn-shell/src/logic/machine.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export type Effect =
7676
| { type: "timer"; name: TimerName; ms: number }
7777
| { type: "cancelTimer"; name: TimerName }
7878
| { type: "checkSession"; reason: SessionCheckReason }
79-
| { type: "clearSiteData"; then?: "continue" }
79+
| { type: "clearSiteData"; andThen?: "continue" }
8080
| { type: "flushCookies" }
8181
| { type: "dismissKeyboard" }
8282
| { type: "inject"; script: string }
@@ -608,7 +608,7 @@ function startWebSignIn(config: Config, step: Step, at: number) {
608608
source: null,
609609
});
610610
startCovering(step, at);
611-
fx(step, { type: "clearSiteData", then: "continue" });
611+
fx(step, { type: "clearSiteData", andThen: "continue" });
612612
}
613613

614614
function enter(config: Config, step: Step, ticket: string, at: number) {
@@ -639,7 +639,7 @@ function enter(config: Config, step: Step, ticket: string, at: number) {
639639
// person's live session, and the web app would otherwise carry on as that person.
640640
set(step, { signIn: "entering", afterClear: source, source: null });
641641
startCovering(step, at);
642-
fx(step, { type: "clearSiteData", then: "continue" });
642+
fx(step, { type: "clearSiteData", andThen: "continue" });
643643
}
644644

645645
function onOffOriginFailure(

‎rn-shell/src/ui/useShell.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ export function useShell(webRef: RefObject<WebView | null>) {
224224
.then((count) => diag("site-data-cleared", { cookies: count }))
225225
.catch(() => diag("site-data-clear-failed"))
226226
.finally(() => {
227-
if (effect.then === "continue")
227+
if (effect.andThen === "continue")
228228
dispatch({ type: "siteDataCleared" });
229229
});
230230
return;

0 commit comments

Comments
 (0)