Skip to content

Commit c02c270

Browse files
committed
fixed linting problems
1 parent 1c841d8 commit c02c270

3 files changed

Lines changed: 11 additions & 9 deletions

File tree

apps/vscode/src/extension/editor/project.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export async function resolveProject(
6868
};
6969

7070
try {
71-
const p = await fork<Args>(
71+
const projectProcess = await fork<Args>(
7272
process.env.NODE_ENV === "production"
7373
? join(context.extensionPath, "dist/project.js")
7474
: join(context.extensionPath, "src/project/index.ts"),
@@ -86,15 +86,16 @@ export async function resolveProject(
8686

8787
if (project.active === 0) {
8888
projectCache.delete(cwd);
89-
p.kill();
89+
projectProcess.kill();
9090
}
9191
},
92-
on: p.on,
92+
on: projectProcess.on,
9393
ports,
9494
};
9595

9696
resolve(project);
97-
} catch (err) {
97+
// eslint-disable-next-line unicorn/prefer-optional-catch-binding, @typescript-eslint/no-unused-vars
98+
} catch (error) {
9899
// free up the cache on failure to initialize after standdown time.
99100
setTimeout(() => {
100101
projectCache.delete(cwd);

apps/vscode/src/extension/util/fork.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ export function fork<TData extends Record<string, unknown>>(
9494
const err = data.toString();
9595
if (
9696
err.includes("inspector") ||
97-
(err.includes("Statsig") && err.includes("fetch failed")) // excludes Statsig fetch errors
98-
(err.includes("Statsig") && err.includes("Timeout")) // excludes Statsig timeout error
97+
(err.includes("Statsig") && err.includes("fetch failed")) || // excludes Statsig fetch errors
98+
(err.includes("Statsig") && err.includes("Timeout")) // excludes Statsig timeout error
9999
) {
100100
// Ignore inspector errors.
101101
return;

packages/lib/src/fg.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,16 @@ export async function initFeatureGates({
4646
{ userID: userId },
4747
{
4848
environment: { tier: environment },
49-
networkConfig: { preventAllNetworkTraffic: environment === "local", networkTimeoutMs: 2500 },
49+
networkConfig: { networkTimeoutMs: 2500, preventAllNetworkTraffic: environment === "local" },
5050
overrideAdapter,
5151
},
5252
);
5353

5454
await client.initializeAsync();
5555
} catch (error) {
56-
// Ignore initialization errors to prevent blocking app startup
57-
console.error("[Statsig] Failed to initialize Statsig:", error);
56+
// Ignore initialization errors to prevent blocking app startup but report to console for now
57+
// eslint-disable-next-line no-console
58+
console.log("[Statsig] Failed to initialize Statsig:", error);
5859
}
5960

6061
if (typeof document !== "undefined") {

0 commit comments

Comments
 (0)