Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions webapps/console/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,25 @@ const eslintConfig = defineConfig([
"no-restricted-properties": "off",
},
},
// Type-aware unsafe-`any` rules on the admin API surface. The config export
// endpoints feed bulker/rotor/syncctl directly; an implicit `any` here is how
// the 2026-07-30 blank-options incident compiled (JITSU-158) — a
// destructuring typo on a Prisma result the checker had silently collapsed
// to `any`. These rules make any such collapse a lint failure instead.
{
files: ["pages/api/admin/**/*.ts"],
languageOptions: {
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-argument": "error",
},
},
]);

export default eslintConfig;
4 changes: 2 additions & 2 deletions webapps/console/lib/schema/destinations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ export function getCoreDestinationType(typeId: string): DestinationType {
return destinationType;
}

export function getCoreDestinationTypeNonStrict(typeId: string): DestinationType | undefined {
return coreDestinationsMap[typeId];
export function getCoreDestinationTypeNonStrict(typeId: string | undefined): DestinationType | undefined {
return typeId ? coreDestinationsMap[typeId] : undefined;
}

export const ClickhouseCredentials = z.object({
Expand Down
4 changes: 4 additions & 0 deletions webapps/console/pages/api/admin/become.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment --
* Pre-existing implicit-`any` debt, exempted when the unsafe-any gate was
* introduced for pages/api/admin (JITSU-158 action item 3). Fix the `any`
* flows in this file, then remove this header - do not add new ones. */
import { createRoute } from "../../../lib/api";
import { z } from "zod";
import { assertDefined, assertTrue, requireDefined } from "juava";
Expand Down
4 changes: 4 additions & 0 deletions webapps/console/pages/api/admin/catalog-refresh.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument --
* Pre-existing implicit-`any` debt, exempted when the unsafe-any gate was
* introduced for pages/api/admin (JITSU-158 action item 3). Fix the `any`
* flows in this file, then remove this header - do not add new ones. */
import { createRoute, verifyAdmin } from "../../../lib/api";
import { db } from "../../../lib/server/db";
import { rpc } from "juava";
Expand Down
4 changes: 4 additions & 0 deletions webapps/console/pages/api/admin/domains-report.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument --
* Pre-existing implicit-`any` debt, exempted when the unsafe-any gate was
* introduced for pages/api/admin (JITSU-158 action item 3). Fix the `any`
* flows in this file, then remove this header - do not add new ones. */
import { createRoute } from "../../../lib/api";
import { db } from "../../../lib/server/db";
import { assertDefined, assertTrue } from "juava";
Expand Down
4 changes: 4 additions & 0 deletions webapps/console/pages/api/admin/events-log-trim.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access --
* Pre-existing implicit-`any` debt, exempted when the unsafe-any gate was
* introduced for pages/api/admin (JITSU-158 action item 3). Fix the `any`
* flows in this file, then remove this header - do not add new ones. */
import { createRoute, getUser, verifyAdmin } from "../../../lib/api";
import { stopwatch, getClickhouseConfig } from "juava";
import { clickhouse } from "../../../lib/server/clickhouse";
Expand Down
Loading
Loading