diff --git a/.oxlintrc.json b/.oxlintrc.json
index 509f9e488..5774f6ad1 100644
--- a/.oxlintrc.json
+++ b/.oxlintrc.json
@@ -62,6 +62,17 @@
"typescript/unbound-method": "off"
}
},
+ {
+ "files": ["apps/local/**/*.{ts,tsx,js,mjs,cjs}"],
+ "plugins": ["react"],
+ "rules": {
+ "react/rules-of-hooks": "error",
+ "react/only-export-components": [
+ "warn",
+ { "allowConstantExport": true }
+ ]
+ }
+ },
{
"files": ["packages/mcp-cloudflare/src/client/**/*.tsx"],
"rules": {
diff --git a/apps/docs-mcp/src/agent/query-agent.ts b/apps/docs-mcp/src/agent/query-agent.ts
index 6e3af3806..351154524 100644
--- a/apps/docs-mcp/src/agent/query-agent.ts
+++ b/apps/docs-mcp/src/agent/query-agent.ts
@@ -81,7 +81,7 @@ export function finalizeDocsAnswer(
const body = answer.replace(SOURCES_SECTION_RE, "").trim();
const citations = uniqueCanonicalDocsUrls(
- [...body.matchAll(MARKDOWN_LINK_URL_RE)].map((match) => match[1]),
+ [...body.matchAll(MARKDOWN_LINK_URL_RE)].map((match) => match[1]!),
);
if (citations.length === 0) {
throw new Error("Docs query answer must include an inline citation.");
diff --git a/apps/docs-mcp/tsconfig.json b/apps/docs-mcp/tsconfig.json
index d915be489..7be5af381 100644
--- a/apps/docs-mcp/tsconfig.json
+++ b/apps/docs-mcp/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
- "strict": true,
"target": "ESNext",
"lib": ["ESNext", "WebWorker"],
"jsx": "react-jsx",
diff --git a/apps/games-api/src/leaderboard.test.ts b/apps/games-api/src/leaderboard.test.ts
index 7032343e6..4d76ee4ca 100644
--- a/apps/games-api/src/leaderboard.test.ts
+++ b/apps/games-api/src/leaderboard.test.ts
@@ -103,7 +103,7 @@ describe("games leaderboard route", () => {
});
expect(fetchMock).toHaveBeenCalledTimes(1);
- const [url, init] = fetchMock.mock.calls[0];
+ const [url, init] = fetchMock.mock.calls[0]!;
const parsed = new URL(url as string);
expect(parsed.origin + parsed.pathname).toBe(
"https://us.sentry.io/api/0/organizations/sentry/events/",
@@ -125,7 +125,7 @@ describe("games leaderboard route", () => {
});
expect(cachePut).toHaveBeenCalledTimes(1);
- const [key, cachedResponse] = cachePut.mock.calls[0];
+ const [key, cachedResponse] = cachePut.mock.calls[0]!;
expect(key).toBe(CACHE_URL);
expect((cachedResponse as Response).headers.get("Cache-Control")).toBe(
"max-age=300",
@@ -211,7 +211,7 @@ describe("games leaderboard route", () => {
expect(res.status).toBe(502);
expect(text).not.toContain("secret-upstream-detail");
expect(text).not.toContain(TOKEN);
- const reported = vi.mocked(Sentry.captureException).mock.calls[0][0];
+ const reported = vi.mocked(Sentry.captureException).mock.calls[0]![0];
expect(String(reported)).toContain("Snake leaderboard upstream failed");
expect(String(reported)).not.toContain(TOKEN);
});
@@ -243,8 +243,8 @@ describe("games leaderboard route", () => {
it("uses a hashed IP rate limit key", async () => {
const limit = vi.fn().mockResolvedValue({ success: false });
await app.request(PATH, REQ, makeEnv({ GAMES_RATE_LIMITER: { limit } }));
- expect(limit.mock.calls[0][0].key).toMatch(/^games:ip:[a-f0-9]{16}$/);
- expect(limit.mock.calls[0][0].key).not.toContain("192.0.2.1");
+ expect(limit.mock.calls[0]![0].key).toMatch(/^games:ip:[a-f0-9]{16}$/);
+ expect(limit.mock.calls[0]![0].key).not.toContain("192.0.2.1");
});
it("fails open when the rate limiter throws", async () => {
diff --git a/apps/games-api/tsconfig.json b/apps/games-api/tsconfig.json
index 50fe6f5ba..6c9736edc 100644
--- a/apps/games-api/tsconfig.json
+++ b/apps/games-api/tsconfig.json
@@ -1,12 +1,9 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
- "strict": true,
"lib": ["ES2023", "ES2024.String"],
"types": ["@cloudflare/workers-types"],
- "allowJs": true,
- "noFallthroughCasesInSwitch": true,
- "noUncheckedSideEffectImports": true
+ "allowJs": true
},
"include": ["src"]
}
diff --git a/apps/local/.oxlintrc.json b/apps/local/.oxlintrc.json
deleted file mode 100644
index 72cf41a39..000000000
--- a/apps/local/.oxlintrc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "$schema": "./node_modules/oxlint/configuration_schema.json",
- "plugins": ["react", "typescript", "oxc"],
- "rules": {
- "react/rules-of-hooks": "error",
- "typescript/return-await": ["error", "always"],
- "react/only-export-components": ["warn", { "allowConstantExport": true }]
- }
-}
diff --git a/apps/local/package.json b/apps/local/package.json
index 6f27dcc8f..5e4d07877 100644
--- a/apps/local/package.json
+++ b/apps/local/package.json
@@ -6,7 +6,7 @@
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
- "lint": "oxlint",
+ "lint": "pnpm -w exec oxlint --report-unused-disable-directives apps/local",
"preview": "vite preview",
"test": "pnpm --filter sentry exec node script/ensure-generated.mjs schema grammar && vitest run",
"test:integration": "pnpm run test src/App.integration.test.tsx",
diff --git a/apps/local/src/App.capture-lifecycle.test.tsx b/apps/local/src/App.capture-lifecycle.test.tsx
index f4eec10a6..2ea5c03ed 100644
--- a/apps/local/src/App.capture-lifecycle.test.tsx
+++ b/apps/local/src/App.capture-lifecycle.test.tsx
@@ -393,12 +393,10 @@ test("pending deletion disables Reload capture and ignores queued events until c
"before pending reset",
);
expect(
- (
- screen.getByRole("button", {
- name: "Reload capture",
- exact: true,
- }) as HTMLButtonElement
- ).disabled,
+ screen.getByRole
+
+ ) : content !== undefined ? ( attachment.contentType.includes("json") ? (
{copyButton}
{copied ? (
-
+
+
) : null}
Applies to all captures in this viewer.
-
{THEME_OPTIONS.map(({ value, label, Icon }) => (
+
History capacity
diff --git a/apps/local/src/components/performance-workspace.tsx b/apps/local/src/components/performance-workspace.tsx
index bcd0a4053..70b4b269f 100644
--- a/apps/local/src/components/performance-workspace.tsx
+++ b/apps/local/src/components/performance-workspace.tsx
@@ -13,9 +13,9 @@ function ms(value?: number) {
}
function Empty({ children }: { children: string }) {
return (
-
+
+
);
}
export function SpanAnalysis({
@@ -306,6 +306,7 @@ export function WebVitalsWorkspace({
role="img"
aria-label={`${config.label}: ${valueLabel(measurement.value)}, ${measurement.rating}`}
className="mt-1 h-3 bg-muted"
diff --git a/apps/local/src/components/profile-workspace.tsx b/apps/local/src/components/profile-workspace.tsx
index 147168087..4e43304dd 100644
--- a/apps/local/src/components/profile-workspace.tsx
+++ b/apps/local/src/components/profile-workspace.tsx
@@ -135,6 +135,7 @@ function ProfileChart({
return (