diff --git a/packages/core/src/utils/metadata-activation-store.test.ts b/packages/core/src/utils/metadata-activation-store.test.ts index f65b44283f2..d4d1837e700 100644 --- a/packages/core/src/utils/metadata-activation-store.test.ts +++ b/packages/core/src/utils/metadata-activation-store.test.ts @@ -55,7 +55,6 @@ const TABLE = 'sys_metadata_activation'; * gate then reports the matcher UNJUDGED, and unjudged is never treated as * passing. */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any function matches(row: any, where: any): boolean { return Object.entries(where ?? {}).every(([k, v]) => { // Equality ONLY, and a loud REFUSAL for anything else rather than a @@ -84,22 +83,17 @@ function matches(row: any, where: any): boolean { * read by `metadata_type` and a double that answered every row regardless would * pin nothing about the discriminator — which is this file's whole subject. */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any function makeStoreEngine(rows: any[] = []) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any const calls: Array<{ op: string; object: string; data?: any; options?: any }> = []; const engine = { - // eslint-disable-next-line @typescript-eslint/no-explicit-any find: vi.fn(async (object: string, options?: any) => { calls.push({ op: 'find', object, options }); return rows.filter((r) => matches(r, options?.where)); }), - // eslint-disable-next-line @typescript-eslint/no-explicit-any insert: vi.fn(async (object: string, data: any, options?: any) => { calls.push({ op: 'insert', object, data, options }); return { id: 'row_new', ...data }; }), - // eslint-disable-next-line @typescript-eslint/no-explicit-any update: vi.fn(async (object: string, data: any, options?: any) => { // Routed through the producer's OWN dispatch predicate, so this // fake cannot be looser than the engine it stands in for — #4434 diff --git a/packages/plugins/plugin-auth/src/first-session-membership-ordering.test.ts b/packages/plugins/plugin-auth/src/first-session-membership-ordering.test.ts index 0e80a84e407..877312545a3 100644 --- a/packages/plugins/plugin-auth/src/first-session-membership-ordering.test.ts +++ b/packages/plugins/plugin-auth/src/first-session-membership-ordering.test.ts @@ -86,11 +86,9 @@ function makeEngine(seed: MemberRow[] = []) { return { rows, insert, - // eslint-disable-next-line @typescript-eslint/no-explicit-any find: vi.fn(async (model: string, q: any) => model === 'sys_member' ? rows.filter((r) => match(r, q?.where)).slice(0, q?.limit ?? 100) : [], ), - // eslint-disable-next-line @typescript-eslint/no-explicit-any findOne: vi.fn(async (model: string, q: any) => { assertEngineFindOnePredicate(model, q); @@ -107,11 +105,9 @@ interface ManagerOpts { membershipPolicy?: 'auto' | 'invite-only'; /** What `tenancy.defaultOrgId()` answers. `null` = no unambiguous target. */ defaultOrgId?: string | null; - // eslint-disable-next-line @typescript-eslint/no-explicit-any databaseHooks?: any; } -// eslint-disable-next-line @typescript-eslint/no-explicit-any function hooksFor(opts: ManagerOpts): any { const manager = new AuthManager({ secret: 'test-secret-at-least-32-chars-long', @@ -119,14 +115,11 @@ function hooksFor(opts: ManagerOpts): any { dataEngine: opts.engine, ...(opts.membershipPolicy ? { membershipPolicy: opts.membershipPolicy } : {}), getTenancy: () => ({ defaultOrgId: async () => opts.defaultOrgId ?? null }), - // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const hooks = (manager as any).composeDatabaseHooks(opts.databaseHooks); // What the adapter's `create` does for a `sys_user` row inside the creating // request (`onRecordCreated`; the real wiring is pinned in // `user-created-in-request.test.ts`). - // eslint-disable-next-line @typescript-eslint/no-explicit-any hooks.__stageCreated = (request: unknown, userId: string) => (manager as any).stageUserCreatedInRequest(request, userId); return hooks; } @@ -136,7 +129,6 @@ function hooksFor(opts: ManagerOpts): any { * session minted inside ONE endpoint context (the request), and * `user.create.after` is deferred past both. Returns the session hook's result. */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any async function firstSessionOfCreation(hooks: any, session: Record = { userId: USER }): Promise { const request = {}; hooks.__stageCreated(request, USER); @@ -251,7 +243,6 @@ describe("[#8247 rule 2] a user's FIRST session settles the membership before re it('the HOST session hook still chains first and still wins', async () => { const engine = makeEngine(); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const hostHook = vi.fn(async (session: any) => ({ data: { ...session, activeOrganizationId: 'org_host' }, })); @@ -274,7 +265,6 @@ describe("[#8247 rule 2] a user's FIRST session settles the membership before re find: vi.fn(async () => { throw new Error('db down'); }), insert: vi.fn(async () => { throw new Error('db down'); }), }; - // eslint-disable-next-line @typescript-eslint/no-explicit-any const hooks = hooksFor({ engine: engine as any, defaultOrgId: DEFAULT_ORG }); const result = await firstSessionOfCreation(hooks); expect(result?.data?.activeOrganizationId).toBeUndefined(); diff --git a/packages/plugins/plugin-security/src/app-default-permission-set.test.ts b/packages/plugins/plugin-security/src/app-default-permission-set.test.ts index e06540574c8..124928385f0 100644 --- a/packages/plugins/plugin-security/src/app-default-permission-set.test.ts +++ b/packages/plugins/plugin-security/src/app-default-permission-set.test.ts @@ -90,7 +90,6 @@ describe('the resolved options reach the constructed plugin (#7001)', () => { if (name === 'manifest') return { register() {} }; return undefined; }, - // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any); return services.get('security.fallbackPermissionSet'); }; diff --git a/packages/plugins/plugin-security/src/deployment-platform-global-exemption.test.ts b/packages/plugins/plugin-security/src/deployment-platform-global-exemption.test.ts index f7c2647237e..8d9f2db234b 100644 --- a/packages/plugins/plugin-security/src/deployment-platform-global-exemption.test.ts +++ b/packages/plugins/plugin-security/src/deployment-platform-global-exemption.test.ts @@ -90,9 +90,7 @@ async function boot( }, }; const plugin = new SecurityPlugin({ fallbackPermissionSet: 'member_default' }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any await plugin.init(ctx as any); - // eslint-disable-next-line @typescript-eslint/no-explicit-any await plugin.start(ctx as any); return { plugin, logger }; } @@ -103,7 +101,6 @@ describe('[ADR-0131 D7] plugin-security reads no platformGlobalObjects — the s { sys_widget_registry: walledSchema('sys_widget_registry') }, { entitlement: { platformGlobalObjects: ['sys_widget_registry'] } }, ); - // eslint-disable-next-line @typescript-eslint/no-explicit-any expect(await (plugin as any).getReadFilter('sys_widget_registry', MEMBER_CTX)).toEqual({ organization_id: 'org-1', }); @@ -115,7 +112,6 @@ describe('[ADR-0131 D7] plugin-security reads no platformGlobalObjects — the s { entitlement: { platformGlobalObjects: ['sys_widget_registry'] }, tenancy: { posture: 'group' } }, ); const groupCtx = { ...MEMBER_CTX, accessible_org_ids: ['org-1', 'org-2'] }; - // eslint-disable-next-line @typescript-eslint/no-explicit-any expect(await (plugin as any).getReadFilter('sys_widget_registry', groupCtx)).toEqual({ organization_id: { $in: ['org-1', 'org-2'] }, }); @@ -126,7 +122,6 @@ describe('[ADR-0131 D7] plugin-security reads no platformGlobalObjects — the s { sys_widget_registry: walledSchema('sys_widget_registry') }, { entitlement: { platformGlobalObjects: ['sys_widget_registry'] } }, ); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const walled = await (plugin as any).computeWriteTenantCheckFilter( [PLAIN_MEMBER], 'sys_widget_registry', 'insert', NO_ORG_CTX, ); @@ -138,14 +133,11 @@ describe('[ADR-0131 D7] plugin-security reads no platformGlobalObjects — the s sys_widget_registry: plannedSchema('sys_widget_registry'), crm_task: walledSchema('crm_task'), }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any expect(await (plugin as any).getReadFilter('sys_widget_registry', MEMBER_CTX)).toBeUndefined(); - // eslint-disable-next-line @typescript-eslint/no-explicit-any expect(await (plugin as any).computeWriteTenantCheckFilter( [PLAIN_MEMBER], 'sys_widget_registry', 'insert', NO_ORG_CTX, )).toBeNull(); // CONTROL — a sibling on the same deployment walls as today. - // eslint-disable-next-line @typescript-eslint/no-explicit-any expect(await (plugin as any).getReadFilter('crm_task', MEMBER_CTX)).toEqual({ organization_id: 'org-1' }); }); @@ -154,9 +146,7 @@ describe('[ADR-0131 D7] plugin-security reads no platformGlobalObjects — the s { sys_widget_registry: walledSchema('sys_widget_registry'), crm_task: walledSchema('crm_task') }, { entitlement: { platformGlobalObjects: ['sys_widget_registry'] }, tenancy: { posture: 'single' } }, ); - // eslint-disable-next-line @typescript-eslint/no-explicit-any expect(await (plugin as any).getReadFilter('sys_widget_registry', MEMBER_CTX)).toBeUndefined(); - // eslint-disable-next-line @typescript-eslint/no-explicit-any expect(await (plugin as any).getReadFilter('crm_task', MEMBER_CTX)).toBeUndefined(); }); }); @@ -167,7 +157,6 @@ describe('[#12699] refusals: this plugin warns only for the key it reads', () => { sys_widget_registry: walledSchema('sys_widget_registry') }, { entitlement: { platformGlobalObjects: 'sys_widget_registry' } }, ); - // eslint-disable-next-line @typescript-eslint/no-explicit-any await (plugin as any).getReadFilter('sys_widget_registry', MEMBER_CTX); const warned = logger.warn.mock.calls.map((c) => String(c[0])); expect(warned.filter((m) => m.includes('org-scoping entitlement key'))).toEqual([]); diff --git a/packages/plugins/plugin-security/src/federated-tenant-layer0.test.ts b/packages/plugins/plugin-security/src/federated-tenant-layer0.test.ts index 9c88d2815a9..f04875506bc 100644 --- a/packages/plugins/plugin-security/src/federated-tenant-layer0.test.ts +++ b/packages/plugins/plugin-security/src/federated-tenant-layer0.test.ts @@ -73,9 +73,7 @@ async function bootWithSchema(schema: Record, opts: { tenancy?: }, }; const plugin = new SecurityPlugin({ fallbackPermissionSet: 'member_default' }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any await plugin.init(ctx as any); - // eslint-disable-next-line @typescript-eslint/no-explicit-any await plugin.start(ctx as any); return plugin; } @@ -102,7 +100,6 @@ const federatedSchema = (extra: Record = {}) => ({ describe('[#7835] Layer 0 vs federated (external) objects', () => { it('federated object with the INJECTED anchor: no organization_id predicate under `isolated`', async () => { const plugin = await bootWithSchema(federatedSchema()); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const filter = await (plugin as any).getReadFilter('ext_customer', MEMBER_CTX); // No Layer 1 policies and no Layer 0 contribution → nothing to AND at all. expect(filter).toBeUndefined(); @@ -114,7 +111,6 @@ describe('[#7835] Layer 0 vs federated (external) objects', () => { // suppression must hold — otherwise the fix would cover one posture and leave // the other emitting `organization_id IN (…)` against a table without it. const plugin = await bootWithSchema(federatedSchema(), { tenancy: { posture: 'group' } }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const filter = await (plugin as any).getReadFilter('ext_customer', { ...MEMBER_CTX, accessible_org_ids: ['org-1', 'org-2'], @@ -135,7 +131,6 @@ describe('[#7835] Layer 0 vs federated (external) objects', () => { ...REMOTE_COLUMNS, }, }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const filter = await (plugin as any).getReadFilter('ext_customer', MEMBER_CTX); expect(filter).toEqual({ organization_id: 'org-1' }); }); @@ -147,7 +142,6 @@ describe('[#7835] Layer 0 vs federated (external) objects', () => { name: 'task', fields: { organization_id: { ...TENANT_SCOPE_FIELD_DEF }, ...REMOTE_COLUMNS }, }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const filter = await (plugin as any).getReadFilter('task', MEMBER_CTX); expect(filter).toEqual({ organization_id: 'org-1' }); }); @@ -159,7 +153,6 @@ describe('[#7835] Layer 0 vs federated (external) objects', () => { // so there was never isolation here to lose. Object-level CRUD is still the // gate, and a caller without read permission is refused before this point. const plugin = await bootWithSchema(federatedSchema()); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const filter = await (plugin as any).getReadFilter('ext_customer', { ...MEMBER_CTX, tenantId: undefined }); expect(filter).toBeUndefined(); }); @@ -196,9 +189,7 @@ describe('[#7835] Layer 0 vs federated (external) objects', () => { }, }; const plugin = new SecurityPlugin({ fallbackPermissionSet: 'member_default' }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any await plugin.init(ctx as any); await plugin.start(ctx as any); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const filter = await (plugin as any).getReadFilter('ext_customer', MEMBER_CTX); // Layer 0 gone, Layer 1's authored predicate intact — no `$and`, no org column. expect(filter).toEqual({ region: 'org-1' }); diff --git a/packages/plugins/plugin-security/src/no-active-organization-write-refusal.test.ts b/packages/plugins/plugin-security/src/no-active-organization-write-refusal.test.ts index 5587178771c..2675b4f99de 100644 --- a/packages/plugins/plugin-security/src/no-active-organization-write-refusal.test.ts +++ b/packages/plugins/plugin-security/src/no-active-organization-write-refusal.test.ts @@ -117,14 +117,11 @@ async function boot(opts: BootOpts = {}) { }, }; const plugin = new SecurityPlugin({ fallbackPermissionSet: opts.fallback ?? 'member_default' }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any await plugin.init(ctx as any); - // eslint-disable-next-line @typescript-eslint/no-explicit-any await plugin.start(ctx as any); return { plugin, warn, - // eslint-disable-next-line @typescript-eslint/no-explicit-any readFilter: (object: string, context: any) => (plugin as any).getReadFilter(object, context), // [#20013] The terminal stands in for the engine, which runs the installed // `postHookWriteImageCheck` on an INSERT's rows once its `beforeInsert` @@ -132,7 +129,6 @@ async function boot(opts: BootOpts = {}) { // installs that seam on every insert it walls, and a terminal that skipped // it would be refused fail-closed. Only the insert path is modelled: every // walled write in this file that reaches the terminal is an insert. - // eslint-disable-next-line @typescript-eslint/no-explicit-any run: async (opCtx: any) => { await middleware!(opCtx, async () => { const seam = opCtx.postHookWriteImageCheck; @@ -156,7 +152,6 @@ const ORG_BOUND = { userId: 'u1', tenantId: 'org-1', positions: [], permissions: * not: the sibling forge guard is also `PERMISSION_DENIED`/403, and any 403 at * all satisfies the first two. */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any function expectConformingRefusal(err: any, opts: { principal?: 'session' | 'delegator' } = {}) { expect(err, 'the write was not refused at all').toBeDefined(); expect(err.code).toBe('PERMISSION_DENIED'); @@ -174,10 +169,8 @@ function expectConformingRefusal(err: any, opts: { principal?: 'session' | 'dele expect(err.developerMessage).toMatch(/ADR-0123 D2/); } -// eslint-disable-next-line @typescript-eslint/no-explicit-any async function refusalFrom(run: (opCtx: any) => Promise, opCtx: unknown): Promise { try { - // eslint-disable-next-line @typescript-eslint/no-explicit-any await run(opCtx as any); return undefined; } catch (e) { @@ -399,7 +392,6 @@ describe('[ADR-0123 D2] tenant-scoped READS with no active organization resolve // would be `undefined` (unrestricted) and an ordinary wall would be // `organization_id = …`; both are different verdicts from this one. expect(filter).toEqual(RLS_DENY_FILTER); - // eslint-disable-next-line @typescript-eslint/no-explicit-any expect(matchesFilterCondition(ROW as any, filter as any)).toBe(false); }); @@ -411,7 +403,6 @@ describe('[ADR-0123 D2] tenant-scoped READS with no active organization resolve const h = await boot(); const filter = await h.readFilter('task', { isSystem: true, userId: 'sys', positions: [], permissions: [] }); expect(filter).toBeUndefined(); // no scoping imposed at all - // eslint-disable-next-line @typescript-eslint/no-explicit-any expect(matchesFilterCondition(ROW as any, (filter ?? {}) as any)).toBe(true); }); @@ -422,7 +413,6 @@ describe('[ADR-0123 D2] tenant-scoped READS with no active organization resolve const h = await boot(); const filter = await h.readFilter('task', { ...ORG_BOUND }); expect(filter).toEqual({ organization_id: 'org-1' }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any expect(matchesFilterCondition(ROW as any, filter as any)).toBe(true); }); diff --git a/packages/plugins/plugin-security/src/objects/default-permission-sets.test.ts b/packages/plugins/plugin-security/src/objects/default-permission-sets.test.ts index 0ce1c038eb9..66c92de3870 100644 --- a/packages/plugins/plugin-security/src/objects/default-permission-sets.test.ts +++ b/packages/plugins/plugin-security/src/objects/default-permission-sets.test.ts @@ -152,7 +152,6 @@ describe('default permission sets carry the managed denies (static baseline)', ( describe('sys_invitation is row-scoped to its addressee (#8095)', () => { const SELF_PREDICATE = 'email == current_user.email'; - // eslint-disable-next-line @typescript-eslint/no-explicit-any const policiesFor = (setName: string, object: string): any[] => (setByName(setName)?.rowLevelSecurity ?? []).filter((p: any) => p.object === object); @@ -297,7 +296,6 @@ describe('sys_invitation is row-scoped to its addressee (#8095)', () => { * they have now. So it is pinned here, structurally, next to the declaration. */ describe('sys_comment delete is moderation-shaped, not ownership-shaped (#8839)', () => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any const policiesFor = (setName: string, object: string): any[] => (setByName(setName)?.rowLevelSecurity ?? []).filter((p: any) => p.object === object); @@ -367,7 +365,6 @@ describe('sys_comment_reaction delete is ownership-shaped (#22566)', () => { it('no shipped set carries a row-level policy on sys_comment_reaction', () => { expect(defaultPermissionSets.length).toBeGreaterThanOrEqual(6); for (const set of defaultPermissionSets) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any const scoped = (set.rowLevelSecurity ?? []).filter((p: any) => p.object === 'sys_comment_reaction'); expect(scoped, `${set.name} sys_comment_reaction policies`).toEqual([]); } diff --git a/packages/plugins/plugin-security/src/platform-owner-wall-bypass.test.ts b/packages/plugins/plugin-security/src/platform-owner-wall-bypass.test.ts index f530ca8e669..ef1f7b6bcfd 100644 --- a/packages/plugins/plugin-security/src/platform-owner-wall-bypass.test.ts +++ b/packages/plugins/plugin-security/src/platform-owner-wall-bypass.test.ts @@ -113,9 +113,7 @@ async function boot(opts: { }, }; const plugin = new SecurityPlugin({ fallbackPermissionSet: 'member_default' }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any await plugin.init(ctx as any); - // eslint-disable-next-line @typescript-eslint/no-explicit-any await plugin.start(ctx as any); return { plugin, findOne, warn }; } @@ -131,7 +129,6 @@ const sessionCtx = (over: Record = {}) => ({ }); const readFilter = (plugin: unknown, ctx: unknown) => - // eslint-disable-next-line @typescript-eslint/no-explicit-any (plugin as any).getReadFilter('task', ctx); const OLD_OWNER = process.env.OS_PLATFORM_OWNER_EMAIL; @@ -266,12 +263,10 @@ describe('[#12974] the bypass lifts ONLY Layer 0', () => { users: { u_owner: { id: 'u_owner', email: OWNER_EMAIL, email_verified: true } }, }); // Org-carrying owner write: the equality wall stands. - // eslint-disable-next-line @typescript-eslint/no-explicit-any const owner = await (plugin as any).computeWriteTenantCheckFilter([PLAIN_MEMBER], 'task', 'update', sessionCtx()); expect(owner).toEqual({ organization_id: 'org-1' }); // Org-LESS owner write: the deny sentinel stands — this is the exact // verdict the ADR-0123 D2 refusal derives its 403 from. - // eslint-disable-next-line @typescript-eslint/no-explicit-any const ownerOrgless = await (plugin as any).computeWriteTenantCheckFilter( [PLAIN_MEMBER], 'task', @@ -280,7 +275,6 @@ describe('[#12974] the bypass lifts ONLY Layer 0', () => { ); expect(ownerOrgless).toEqual({ ...RLS_DENY_FILTER }); // Everyone else: unchanged, same wall. - // eslint-disable-next-line @typescript-eslint/no-explicit-any const member = await (plugin as any).computeWriteTenantCheckFilter( [PLAIN_MEMBER], 'task', @@ -302,7 +296,6 @@ describe('[#12974] audit — the ruled floor', () => { await readFilter(plugin, sessionCtx({ userId: 'u_m', email: 'member@corp.example' })); expect(bypassEvents()).toHaveLength(0); // Owner WRITE: no bypass happens, so no event may claim one did. - // eslint-disable-next-line @typescript-eslint/no-explicit-any await (plugin as any).computeWriteTenantCheckFilter([PLAIN_MEMBER], 'task', 'update', sessionCtx()); expect(bypassEvents()).toHaveLength(0); await readFilter(plugin, sessionCtx()); diff --git a/packages/qa/dogfood/test/analytics-contains-membership.dogfood.test.ts b/packages/qa/dogfood/test/analytics-contains-membership.dogfood.test.ts index 26042205074..abdce844f9b 100644 --- a/packages/qa/dogfood/test/analytics-contains-membership.dogfood.test.ts +++ b/packages/qa/dogfood/test/analytics-contains-membership.dogfood.test.ts @@ -208,7 +208,6 @@ describe.each(DRIVERS)('dogfood: analytics counts a $contains policy on a multi- it('premise: the policy admits only the row holding the member through the data door, and the other rows exist', async () => { expect(await namesFor(memberToken, 'mbr_tagged')).toEqual(['t1']); // Ground truth under a system context: every row was stored. - // eslint-disable-next-line @typescript-eslint/no-explicit-any const ql = await stack.kernel.getServiceAsync('objectql'); const all = (await ql.find('mbr_tagged', { context: { isSystem: true } })) as Array<{ name: string }>; expect(all.map((r) => r.name).sort()).toEqual(['t1', 't2', 't3', 't4']); diff --git a/packages/qa/dogfood/test/analytics-label-scope.dogfood.test.ts b/packages/qa/dogfood/test/analytics-label-scope.dogfood.test.ts index 727c69c0486..1cd9c26c0b3 100644 --- a/packages/qa/dogfood/test/analytics-label-scope.dogfood.test.ts +++ b/packages/qa/dogfood/test/analytics-label-scope.dogfood.test.ts @@ -41,7 +41,6 @@ describe('dogfood: dimension-label lookup is RLS-scoped to the referenced object adminToken = await stack.signIn(); memberToken = await stack.signUp('lbl-member@verify.test'); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const ql = await stack.kernel.getServiceAsync('objectql'); const sys = { context: { isSystem: true } }; const uid = async (email: string): Promise => { diff --git a/packages/qa/dogfood/test/analytics-rls.dogfood.test.ts b/packages/qa/dogfood/test/analytics-rls.dogfood.test.ts index f67412dec83..2e491e4ec8e 100644 --- a/packages/qa/dogfood/test/analytics-rls.dogfood.test.ts +++ b/packages/qa/dogfood/test/analytics-rls.dogfood.test.ts @@ -135,7 +135,6 @@ describe('dogfood: analytics aggregates are RLS-scoped to the caller (#3597)', ( // Ground truth straight from the engine under a system context: the table // really holds every note. Without this, "member counts 2" would also pass // on a broken setup that simply never persisted the admin's rows. - // eslint-disable-next-line @typescript-eslint/no-explicit-any const ql = await stack.kernel.getServiceAsync('objectql'); const all = (await ql.find('rls_note', { context: { isSystem: true } })) as unknown[]; expect(all).toHaveLength(ADMIN_NOTES + MEMBER_NOTES); @@ -209,7 +208,6 @@ describe('dogfood: engine-side RLS scopes analytics even with the analytics belt }); it('the rows it cannot see DO exist — the belt is scoping, not an empty table', async () => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any const ql = await stack.kernel.getServiceAsync('objectql'); const all = (await ql.find('rls_note', { context: { isSystem: true } })) as unknown[]; diff --git a/packages/qa/dogfood/test/analytics-timezone.dogfood.test.ts b/packages/qa/dogfood/test/analytics-timezone.dogfood.test.ts index 4c5767aac7a..b2b0e57c33b 100644 --- a/packages/qa/dogfood/test/analytics-timezone.dogfood.test.ts +++ b/packages/qa/dogfood/test/analytics-timezone.dogfood.test.ts @@ -63,7 +63,6 @@ describe('dogfood: org timezone drives analytics date bucketing (#1982/#2018)', // `plugin-audit-created-at-create-side.test.ts`. `preserveAudit` is the flag // REST's `treatAsHistorical` import sets on the write context // (`packages/rest/src/import-runner.ts`), reaching this same hook. - // eslint-disable-next-line @typescript-eslint/no-explicit-any const ql = await stack.kernel.getServiceAsync('objectql'); for (let i = 0; i < N_LEADS; i++) { await ql.insert( diff --git a/packages/qa/dogfood/test/anonymous-door-sweep.dogfood.test.ts b/packages/qa/dogfood/test/anonymous-door-sweep.dogfood.test.ts index cdead7e6336..0297ba80655 100644 --- a/packages/qa/dogfood/test/anonymous-door-sweep.dogfood.test.ts +++ b/packages/qa/dogfood/test/anonymous-door-sweep.dogfood.test.ts @@ -298,7 +298,6 @@ interface Swept { let stack: VerifyStack; let tempDir: string; let adminToken: string; -// eslint-disable-next-line @typescript-eslint/no-explicit-any let ql: any; let portRoutes: ReadonlyArray<{ method: string; pattern: string }>; diff --git a/packages/qa/dogfood/test/email-template-boot-sweep.test.ts b/packages/qa/dogfood/test/email-template-boot-sweep.test.ts index f6fc749255e..a9df04a559c 100644 --- a/packages/qa/dogfood/test/email-template-boot-sweep.test.ts +++ b/packages/qa/dogfood/test/email-template-boot-sweep.test.ts @@ -86,7 +86,6 @@ async function boot() { const start = async () => { await plugin.start(ctx as never); for (const fn of hooks['kernel:ready'] ?? []) await fn(); - // eslint-disable-next-line @typescript-eslint/no-explicit-any return services.email as any; }; return { engine, statements, sent, start }; diff --git a/packages/qa/dogfood/test/email-template-materialization.dogfood.test.ts b/packages/qa/dogfood/test/email-template-materialization.dogfood.test.ts index 0114daf74ff..ff0ad71d07d 100644 --- a/packages/qa/dogfood/test/email-template-materialization.dogfood.test.ts +++ b/packages/qa/dogfood/test/email-template-materialization.dogfood.test.ts @@ -72,11 +72,9 @@ describe('objectstack verify EMAIL TEMPLATE: authored template materializes and }); it('materializes no row: the registry serves the authored item beside the built-in it overrides', async () => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any const engine = (await stack.kernel.getServiceAsync('objectql')) as any; expect(await engine.find('sys_email_template', { context: SYSTEM_CTX })).toEqual([]); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const protocol = (await stack.kernel.getServiceAsync('protocol')) as any; const listed = await protocol.getMetaItemsForExecution({ type: 'email_template' }); const slot = (listed.items as Array>) @@ -89,7 +87,6 @@ describe('objectstack verify EMAIL TEMPLATE: authored template materializes and }); it('renders the authored template through sendTemplate — the built-in copy does not reach the wire', async () => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any const email = (await stack.kernel.getServiceAsync('email')) as any; const result = await email.sendTemplate({ @@ -108,7 +105,6 @@ describe('objectstack verify EMAIL TEMPLATE: authored template materializes and }); it('still renders the built-in member where the app declares none (the zh-CN send)', async () => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any const email = (await stack.kernel.getServiceAsync('email')) as any; const result = await email.sendTemplate({ @@ -130,7 +126,6 @@ describe('objectstack verify EMAIL TEMPLATE: authored template materializes and }); expect(put.status, await put.clone().text()).toBe(200); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const email = (await stack.kernel.getServiceAsync('email')) as any; const result = await email.sendTemplate({ to: 'someone@example.com', diff --git a/packages/qa/dogfood/test/flow-door-elevated-start.dogfood.test.ts b/packages/qa/dogfood/test/flow-door-elevated-start.dogfood.test.ts index f7c6884e308..e94209f4f9f 100644 --- a/packages/qa/dogfood/test/flow-door-elevated-start.dogfood.test.ts +++ b/packages/qa/dogfood/test/flow-door-elevated-start.dogfood.test.ts @@ -264,12 +264,10 @@ async function knock(door: Door, token: string, flow: Target): Promise<{ answer: ), }); expect(res.status, `the MCP transport itself answered ${res.status}: ${await res.clone().text()}`).toBe(200); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const rpc: any = await res.json(); expect(rpc.error, `run_action JSON-RPC error: ${JSON.stringify(rpc.error)}`).toBeUndefined(); if (rpc.result?.isError !== true) return { answer: 200 }; const text = String(rpc.result?.content?.[0]?.text ?? ''); - // eslint-disable-next-line @typescript-eslint/no-explicit-any let parsed: any; try { parsed = JSON.parse(text); @@ -302,7 +300,6 @@ describe('control: the member cannot write the ledger directly', () => { } catch (e) { err = e; } - // eslint-disable-next-line @typescript-eslint/no-explicit-any const refusal = err as any; expect(refusal?.code).toBe('PERMISSION_DENIED'); expect(refusal?.statusCode ?? refusal?.status).toBe(403); diff --git a/packages/qa/dogfood/test/form-self-auth.dogfood.test.ts b/packages/qa/dogfood/test/form-self-auth.dogfood.test.ts index 41f190688e3..875b0aed912 100644 --- a/packages/qa/dogfood/test/form-self-auth.dogfood.test.ts +++ b/packages/qa/dogfood/test/form-self-auth.dogfood.test.ts @@ -17,7 +17,6 @@ const idOf = (r: any) => r?.id ?? r?.record?.id ?? r?.data?.id ?? r; describe('ADR-0056 Option A — public-form grant (declaration-derived)', () => { let stack: VerifyStack; - // eslint-disable-next-line @typescript-eslint/no-explicit-any let ql: any; beforeAll(async () => { diff --git a/packages/qa/dogfood/test/identity-mail-read-gate.dogfood.test.ts b/packages/qa/dogfood/test/identity-mail-read-gate.dogfood.test.ts index 6d4e5819ab3..62ee90b9943 100644 --- a/packages/qa/dogfood/test/identity-mail-read-gate.dogfood.test.ts +++ b/packages/qa/dogfood/test/identity-mail-read-gate.dogfood.test.ts @@ -66,9 +66,7 @@ const SYS = { context: { isSystem: true } } as const; const BODY_FIELDS = ['body_text', 'body_html'] as const; type Row = Record; -// eslint-disable-next-line @typescript-eslint/no-explicit-any const rowsOf = (body: any): Row[] => (Array.isArray(body) ? body : (body?.records ?? body?.data ?? body?.value ?? [])); -// eslint-disable-next-line @typescript-eslint/no-explicit-any const recordOf = (body: any): Row => body?.record ?? body?.data ?? body; const filterOf = (where: Record) => encodeURIComponent(JSON.stringify(where)); const hasBodyKey = (row: Row) => BODY_FIELDS.some((f) => f in row); @@ -91,7 +89,6 @@ function credentialSpanOf(row: Row): string { describe('[#24625] identity-mail bodies over a ceremonied 18.0 database: principal × door', () => { const dir = mkdtempSync(join(tmpdir(), 'dogfood-identity-mail-gate-')); let stack: VerifyStack; - // eslint-disable-next-line @typescript-eslint/no-explicit-any let ql: any; const tok: Record<'platform' | 'orgAdmin' | 'member', string> = { platform: '', orgAdmin: '', member: '' }; /** diff --git a/packages/qa/dogfood/test/install-local-listing-not-loaded.dogfood.test.ts b/packages/qa/dogfood/test/install-local-listing-not-loaded.dogfood.test.ts index 34c3b73a508..a2e44264601 100644 --- a/packages/qa/dogfood/test/install-local-listing-not-loaded.dogfood.test.ts +++ b/packages/qa/dogfood/test/install-local-listing-not-loaded.dogfood.test.ts @@ -63,7 +63,7 @@ const loadableInstallBody = { manifest: { id: LOADABLE, name: 'qa_21822', version: '1.0.0', type: 'app', scope: 'project', engines: { protocol: `^${PROTOCOL_MAJOR}` } }, }; -async function json(res: Response): Promise<{ status: number; body: any }> { // eslint-disable-line @typescript-eslint/no-explicit-any +async function json(res: Response): Promise<{ status: number; body: any }> { return { status: res.status, body: await res.json().catch(() => null) }; } @@ -74,37 +74,37 @@ async function captureOutput(run: () => Promise): Promise<{ value: T; line const stderr = process.stderr.write.bind(process.stderr); const warn = console.warn; const error = console.error; - (process.stdout as any).write = (chunk: unknown, ...rest: any[]) => { lines.push(String(chunk)); return stdout(chunk as any, ...rest); }; // eslint-disable-line @typescript-eslint/no-explicit-any - (process.stderr as any).write = (chunk: unknown, ...rest: any[]) => { lines.push(String(chunk)); return stderr(chunk as any, ...rest); }; // eslint-disable-line @typescript-eslint/no-explicit-any + (process.stdout as any).write = (chunk: unknown, ...rest: any[]) => { lines.push(String(chunk)); return stdout(chunk as any, ...rest); }; + (process.stderr as any).write = (chunk: unknown, ...rest: any[]) => { lines.push(String(chunk)); return stderr(chunk as any, ...rest); }; console.warn = (...args: unknown[]) => { lines.push(args.map(String).join(' ')); warn(...args); }; console.error = (...args: unknown[]) => { lines.push(args.map(String).join(' ')); error(...args); }; try { return { value: await run(), lines }; } finally { - (process.stdout as any).write = stdout; // eslint-disable-line @typescript-eslint/no-explicit-any - (process.stderr as any).write = stderr; // eslint-disable-line @typescript-eslint/no-explicit-any + (process.stdout as any).write = stdout; + (process.stderr as any).write = stderr; console.warn = warn; console.error = error; } } type Item = Record & { manifestId: string }; -const itemsOf = (listing: { body: any }): Item[] => listing.body?.data?.items ?? []; // eslint-disable-line @typescript-eslint/no-explicit-any -const itemOf = (listing: { body: any }, manifestId: string): Item | undefined => itemsOf(listing).find((i) => i.manifestId === manifestId); // eslint-disable-line @typescript-eslint/no-explicit-any +const itemsOf = (listing: { body: any }): Item[] => listing.body?.data?.items ?? []; +const itemOf = (listing: { body: any }, manifestId: string): Item | undefined => itemsOf(listing).find((i) => i.manifestId === manifestId); describe('dogfood: the install-local listing marks a package the restart refused to load as not loaded (#21822)', () => { let stack: VerifyStack | undefined; let storageDir: string; let dbDir: string; - let crmInstall: { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any - let loadableInstall: { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any + let crmInstall: { status: number; body: any }; + let loadableInstall: { status: number; body: any }; let crmVersion: string; - let beforeRestart: { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any + let beforeRestart: { status: number; body: any }; let bootLines: string[]; - let afterRestart: { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any + let afterRestart: { status: number; body: any }; let listLines: string[]; - let uninstall: { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any - let afterUninstall: { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any + let uninstall: { status: number; body: any }; + let afterUninstall: { status: number; body: any }; const boot = (databaseFile: string) => bootShowcase({ databaseFile, diff --git a/packages/qa/dogfood/test/install-local-listing-sample-data.dogfood.test.ts b/packages/qa/dogfood/test/install-local-listing-sample-data.dogfood.test.ts index 979becd69c2..615ba28f9cc 100644 --- a/packages/qa/dogfood/test/install-local-listing-sample-data.dogfood.test.ts +++ b/packages/qa/dogfood/test/install-local-listing-sample-data.dogfood.test.ts @@ -48,7 +48,6 @@ const SEEDED: Record = { }; const SEED_TOTAL = Object.values(SEEDED).reduce((a, b) => a + b, 0); -// eslint-disable-next-line @typescript-eslint/no-explicit-any const rowsOf = (r: any): any[] => (Array.isArray(r) ? r : Array.isArray(r?.records) ? r.records : []); /** The install body `os package install .json` sends. */ @@ -67,7 +66,7 @@ async function countRows(ql: IObjectQLEngine, organizationId: string): Promise { // eslint-disable-line @typescript-eslint/no-explicit-any +async function json(res: Response): Promise<{ status: number; body: any }> { return { status: res.status, body: await res.json().catch(() => null) }; } @@ -80,8 +79,8 @@ describe('dogfood: the install-local listing answers withSampleData per organiza let dbDir: string; let tenancy: { posture?: string; isolationActive?: boolean } | undefined; let installSeeded: unknown; - let reseedB: { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any - let purgeA: { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any + let reseedB: { status: number; body: any }; + let purgeA: { status: number; body: any }; let recordAfterPurge: { withSampleData?: boolean; sampleDataPurged?: boolean } | null | undefined; const beforeRestart: Record<'A' | 'B', View> = {} as never; const afterRestart: Record<'A' | 'B', View> = {} as never; diff --git a/packages/qa/dogfood/test/install-local-no-active-organization.dogfood.test.ts b/packages/qa/dogfood/test/install-local-no-active-organization.dogfood.test.ts index 828d72e0324..39c2aaa5c44 100644 --- a/packages/qa/dogfood/test/install-local-no-active-organization.dogfood.test.ts +++ b/packages/qa/dogfood/test/install-local-no-active-organization.dogfood.test.ts @@ -60,7 +60,6 @@ const SEED_TOTAL = Object.values(SEEDED).reduce((a, b) => a + b, 0); /** The words ADR-0123 D4 requires the refusal to carry. */ const NAMES_THE_MISSING_ORGANIZATION = 'this session has no active organization'; -// eslint-disable-next-line @typescript-eslint/no-explicit-any const rowsOf = (r: any): any[] => (Array.isArray(r) ? r : Array.isArray(r?.records) ? r.records : []); /** The install body `os package install .json` sends. */ @@ -82,7 +81,7 @@ async function countRows(ql: IObjectQLEngine, organizationId?: string): Promise< return total; } -async function json(res: Response): Promise<{ status: number; body: any }> { // eslint-disable-line @typescript-eslint/no-explicit-any +async function json(res: Response): Promise<{ status: number; body: any }> { return { status: res.status, body: await res.json().catch(() => null) }; } @@ -95,7 +94,7 @@ describe('dogfood: install-local under an organization wall, with a session that let sessionOrgBefore: unknown; let sessionOrgAfter: unknown; let memberships: number; - type Answer = { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any + type Answer = { status: number; body: any }; const orgless: Record<'install' | 'reseed' | 'purge', Answer> = {} as never; const inOrgB: Record<'reseed' | 'purge' | 'reinstall', Answer> = {} as never; let rowsAfterOrgless: number; diff --git a/packages/qa/dogfood/test/install-local-purge-sample-data.dogfood.test.ts b/packages/qa/dogfood/test/install-local-purge-sample-data.dogfood.test.ts index 62f7b961f6a..ee6112bd542 100644 --- a/packages/qa/dogfood/test/install-local-purge-sample-data.dogfood.test.ts +++ b/packages/qa/dogfood/test/install-local-purge-sample-data.dogfood.test.ts @@ -66,7 +66,6 @@ const SEEDED: Record = { const SEED_TOTAL = Object.values(SEEDED).reduce((a, b) => a + b, 0); const OBSERVER = 'dogfood.install-local-purge-observer'; -// eslint-disable-next-line @typescript-eslint/no-explicit-any const rowsOf = (r: any): any[] => (Array.isArray(r) ? r : Array.isArray(r?.records) ? r.records : []); /** @@ -97,11 +96,8 @@ async function countSeeded(ql: IObjectQLEngine, organizationId?: string): Promis function observeDeletes(ql: IObjectQLEngine): { before: string[]; after: string[] } { const seen = { before: [] as string[], after: [] as string[] }; const objects = Object.keys(SEEDED); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const idOf = (ctx: any) => String(ctx?.input?.id ?? ctx?.previous?.id ?? ''); - // eslint-disable-next-line @typescript-eslint/no-explicit-any ql.registerHook('beforeDelete', (ctx: any) => { seen.before.push(`${ctx.object}#${idOf(ctx)}`); }, { object: objects, packageId: OBSERVER }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any ql.registerHook('afterDelete', (ctx: any) => { seen.after.push(`${ctx.object}#${idOf(ctx)}`); }, { object: objects, packageId: OBSERVER }); return seen; } @@ -117,7 +113,7 @@ async function rowKeys(ql: IObjectQLEngine, where?: Record): Pr return keys.sort(); } -async function json(res: Response): Promise<{ status: number; body: any }> { // eslint-disable-line @typescript-eslint/no-explicit-any +async function json(res: Response): Promise<{ status: number; body: any }> { return { status: res.status, body: await res.json().catch(() => null) }; } @@ -135,9 +131,9 @@ describe('dogfood: install-local purge on the single-tenant posture — the card let stack: VerifyStack; let storageDir: string; let ql: IObjectQLEngine; - let install: { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any - let purge: { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any - let reseed: { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any + let install: { status: number; body: any }; + let purge: { status: number; body: any }; + let reseed: { status: number; body: any }; let afterInstall: Record; let afterPurge: Record; let afterReseed: Record; @@ -230,8 +226,8 @@ describe('dogfood: install-local purge under an organization wall — one organi let storageDir: string; let ql: IObjectQLEngine; let token: string; - let purge: { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any - let reseedA: { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any + let purge: { status: number; body: any }; + let reseedA: { status: number; body: any }; let orgARowsBefore: Record; let orgBKeysBefore: string[]; let orgBKeysAfter: string[]; diff --git a/packages/qa/dogfood/test/install-local-reseed-intact-baseline.dogfood.test.ts b/packages/qa/dogfood/test/install-local-reseed-intact-baseline.dogfood.test.ts index f61e1c4944f..a94f42dbfe6 100644 --- a/packages/qa/dogfood/test/install-local-reseed-intact-baseline.dogfood.test.ts +++ b/packages/qa/dogfood/test/install-local-reseed-intact-baseline.dogfood.test.ts @@ -52,7 +52,6 @@ const SEEDED: Record = { const SEED_TOTAL = Object.values(SEEDED).reduce((a, b) => a + b, 0); const EMPTY = Object.fromEntries(Object.keys(SEEDED).map((o) => [o, 0])); -// eslint-disable-next-line @typescript-eslint/no-explicit-any const rowsOf = (r: any): any[] => (Array.isArray(r) ? r : Array.isArray(r?.records) ? r.records : []); type Dataset = { object: string; records: unknown[]; env?: string[] }; @@ -88,7 +87,7 @@ async function rowStamps(ql: IObjectQLEngine): Promise { return stamps.sort(); } -async function json(res: Response): Promise<{ status: number; body: any }> { // eslint-disable-line @typescript-eslint/no-explicit-any +async function json(res: Response): Promise<{ status: number; body: any }> { return { status: res.status, body: await res.json().catch(() => null) }; } @@ -96,10 +95,10 @@ describe('dogfood: install-local reseed over an intact baseline, then after a pu let stack: VerifyStack; let storageDir: string; let ql: IObjectQLEngine; - let install: { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any - let intact: { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any - let purge: { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any - let afterPurge: { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any + let install: { status: number; body: any }; + let intact: { status: number; body: any }; + let purge: { status: number; body: any }; + let afterPurge: { status: number; body: any }; let afterInstall: Record; let stampsBefore: string[]; let stampsAfterIntact: string[]; @@ -177,8 +176,8 @@ describe('dogfood: install-local reseed of a package with no seed record for thi let storageDir: string; let ql: IObjectQLEngine; let body: { manifest: Record }; - let install: { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any - let reseed: { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any + let install: { status: number; body: any }; + let reseed: { status: number; body: any }; let counts: Record; beforeAll(async () => { diff --git a/packages/qa/dogfood/test/install-local-sample-data-not-loaded.dogfood.test.ts b/packages/qa/dogfood/test/install-local-sample-data-not-loaded.dogfood.test.ts index ef5bcaa7c90..7631a4182be 100644 --- a/packages/qa/dogfood/test/install-local-sample-data-not-loaded.dogfood.test.ts +++ b/packages/qa/dogfood/test/install-local-sample-data-not-loaded.dogfood.test.ts @@ -61,9 +61,8 @@ const SEED_TOTAL = Object.values(SEEDED).reduce((a, b) => a + b, 0); /** One seed dataset per seeded object. */ const CRM_DATASETS = Object.keys(SEEDED).length; -type Answer = { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any +type Answer = { status: number; body: any }; -// eslint-disable-next-line @typescript-eslint/no-explicit-any const rowsOf = (r: any): any[] => (Array.isArray(r) ? r : Array.isArray(r?.records) ? r.records : []); /** The install body `os package install .json` sends. */ @@ -88,13 +87,13 @@ async function captureOutput(run: () => Promise): Promise<{ value: T; line const lines: string[] = []; const stdout = process.stdout.write.bind(process.stdout); const stderr = process.stderr.write.bind(process.stderr); - (process.stdout as any).write = (chunk: unknown, ...rest: any[]) => { lines.push(String(chunk)); return stdout(chunk as any, ...rest); }; // eslint-disable-line @typescript-eslint/no-explicit-any - (process.stderr as any).write = (chunk: unknown, ...rest: any[]) => { lines.push(String(chunk)); return stderr(chunk as any, ...rest); }; // eslint-disable-line @typescript-eslint/no-explicit-any + (process.stdout as any).write = (chunk: unknown, ...rest: any[]) => { lines.push(String(chunk)); return stdout(chunk as any, ...rest); }; + (process.stderr as any).write = (chunk: unknown, ...rest: any[]) => { lines.push(String(chunk)); return stderr(chunk as any, ...rest); }; try { return { value: await run(), lines }; } finally { - (process.stdout as any).write = stdout; // eslint-disable-line @typescript-eslint/no-explicit-any - (process.stderr as any).write = stderr; // eslint-disable-line @typescript-eslint/no-explicit-any + (process.stdout as any).write = stdout; + (process.stderr as any).write = stderr; } } diff --git a/packages/qa/dogfood/test/install-local-unmanaged-mode.dogfood.test.ts b/packages/qa/dogfood/test/install-local-unmanaged-mode.dogfood.test.ts index dd3227869c4..568dd9d446f 100644 --- a/packages/qa/dogfood/test/install-local-unmanaged-mode.dogfood.test.ts +++ b/packages/qa/dogfood/test/install-local-unmanaged-mode.dogfood.test.ts @@ -66,11 +66,10 @@ const BASE_ID = 'com.example.crm-copy'; const ROUTE = '/marketplace/install-local'; const BOTH = ['managed', 'unmanaged']; -type Answer = { status: number; body: any }; // eslint-disable-line @typescript-eslint/no-explicit-any +type Answer = { status: number; body: any }; type Item = { type: string; name: string }; -// eslint-disable-next-line @typescript-eslint/no-explicit-any const rowsOf = (r: any): any[] => (Array.isArray(r) ? r : Array.isArray(r?.records) ? r.records : []); async function json(res: Response): Promise { @@ -92,8 +91,8 @@ const DATASET_LOCK_REASON = 'Forecast reports read these measures; change them i * dataset through the author-facing `protection` block (`no-overlay`). */ function lockedCrmStack(): Record { - const stack = crmStack as unknown as Record; // eslint-disable-line @typescript-eslint/no-explicit-any - const lockOne = (items: any[], name: string, lock: Record) => { // eslint-disable-line @typescript-eslint/no-explicit-any + const stack = crmStack as unknown as Record; + const lockOne = (items: any[], name: string, lock: Record) => { if (!items.some((item) => item?.name === name)) throw new Error(`fixture: the CRM ships no '${name}' to lock`); return items.map((item) => (item?.name === name ? { ...item, ...lock } : item)); }; @@ -141,14 +140,14 @@ function editableBody(item: Record): Record { } /** The active `sys_metadata` rows of the copied items, as `type/name` → row. */ -async function copiedRows(ql: IObjectQLEngine, items: readonly Item[]): Promise> { // eslint-disable-line @typescript-eslint/no-explicit-any +async function copiedRows(ql: IObjectQLEngine, items: readonly Item[]): Promise> { const names = [...new Set(items.map((i) => i.name))]; const rows = rowsOf(await ql.find('sys_metadata', { where: { name: { $in: names }, state: 'active' }, context: SYS, })); const wanted = new Set(items.map((i) => `${i.type}/${i.name}`)); - const out = new Map(); // eslint-disable-line @typescript-eslint/no-explicit-any + const out = new Map(); for (const row of rows) { const key = `${row.type}/${row.name}`; if (wanted.has(key)) out.set(key, row); @@ -165,7 +164,7 @@ describe('dogfood: the unmanaged install mode on `single` — P1 and P3 (ADR-013 let copied: Item[] = []; let reads: Array = []; let saves: Array = []; - let rowsAfterInstall = new Map(); // eslint-disable-line @typescript-eslint/no-explicit-any + let rowsAfterInstall = new Map(); let sourcePackageAfterInstall: unknown; let ledgerFilesAfterInstall: string[] = []; let translationServed: Answer; @@ -217,7 +216,6 @@ describe('dogfood: the unmanaged install mode on `single` — P1 and P3 (ADR-013 const put = await json(await stack.apiAs(token, 'PUT', `/meta/${item.type}/${item.name}`, editableBody(served ?? {}))); saves.push({ ...item, status: put.status, body: put.status === 200 ? undefined : put.body }); } - // eslint-disable-next-line @typescript-eslint/no-explicit-any sourcePackageAfterInstall = (ql as any).registry?.getPackage?.(CRM); ledgerFilesAfterInstall = ledgerFiles(); translationServed = await json(await stack.apiAs(token, 'GET', '/meta/translation/crm_zh_cn')); @@ -232,7 +230,6 @@ describe('dogfood: the unmanaged install mode on `single` — P1 and P3 (ADR-013 const read = await json(await stack.apiAs(token, 'GET', `/meta/${item.type}/${item.name}`)); readsAfterRestart.push({ ...item, status: read.status }); } - // eslint-disable-next-line @typescript-eslint/no-explicit-any const registry = (ql as any).registry; sourcePackageAfterRestart = registry?.getPackage?.(CRM); basePackageAfterRestart = registry?.getPackage?.(BASE_ID); @@ -250,10 +247,9 @@ describe('dogfood: the unmanaged install mode on `single` — P1 and P3 (ADR-013 // The import's three registry reads, on the REAL registry (the verb // itself, through the protocol service — the door always names the // default target). - // eslint-disable-next-line @typescript-eslint/no-explicit-any const protocol: any = await stack.kernel.getServiceAsync('protocol'); const flat = (() => { - const body = installBody().manifest as Record; // eslint-disable-line @typescript-eslint/no-explicit-any + const body = installBody().manifest as Record; const { manifest: meta, ...sections } = body; return { ...meta, ...sections }; })(); @@ -261,7 +257,7 @@ describe('dogfood: the unmanaged install mode on `single` — P1 and P3 (ADR-013 try { await protocol.importUnmanagedPackage({ manifest: flat, targetPackageId }); return null; - } catch (e: any) { // eslint-disable-line @typescript-eslint/no-explicit-any + } catch (e: any) { return { code: e?.code, status: e?.status, message: e?.message, details: e?.details }; } }; @@ -421,7 +417,6 @@ describe('dogfood: the unmanaged install mode on `isolated` — P2 (ADR-0131 D6) const ql = stack.kernel.getService('objectql'); refused = await json(await stack.apiAs(token, 'POST', ROUTE, installBody({ installMode: 'unmanaged' }))); - // eslint-disable-next-line @typescript-eslint/no-explicit-any baseAfterRefusal = (ql as any).registry?.getPackage?.(BASE_ID); baseRowsAfterRefusal = rowsOf(await ql.find('sys_metadata', { where: { package_id: BASE_ID }, context: SYS })).length; ledgerAfterRefusal = readdirSync(storageDir).filter((f) => f.endsWith('.json')); diff --git a/packages/qa/dogfood/test/invitation-ledger-row-scope.dogfood.test.ts b/packages/qa/dogfood/test/invitation-ledger-row-scope.dogfood.test.ts index aafad76daf0..e9c2d24c3c6 100644 --- a/packages/qa/dogfood/test/invitation-ledger-row-scope.dogfood.test.ts +++ b/packages/qa/dogfood/test/invitation-ledger-row-scope.dogfood.test.ts @@ -95,14 +95,12 @@ const DELEGATE_EMAIL = 'delegate.8240@acme-test.example'; /** The one invitation the DELEGATE issues — the only row it is entitled to. */ const DELEGATE_INVITEE_EMAIL = 'invitee.8240@acme-test.example'; -// eslint-disable-next-line @typescript-eslint/no-explicit-any async function findRows(ql: any, object: string, where: any, limit = 50): Promise { const rows = await ql.find(object, { where, limit }, { context: SYSTEM_CTX }); return Array.isArray(rows) ? rows : (rows?.records ?? []); } /** The membership row the sign-up reconciler writes lands asynchronously. */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any async function waitForMembership(ql: any, userId: string): Promise { for (let i = 0; i < 40; i++) { const rows = await findRows(ql, 'sys_member', { user_id: userId }, 5); @@ -112,7 +110,6 @@ async function waitForMembership(ql: any, userId: string): Promise { throw new Error(`no sys_member row appeared for ${userId}`); } -// eslint-disable-next-line @typescript-eslint/no-explicit-any async function userIdOf(ql: any, email: string): Promise { const [user] = await findRows(ql, 'sys_user', { email }, 1); if (!user) throw new Error(`no sys_user row for ${email}`); @@ -124,7 +121,6 @@ async function userIdOf(ql: any, email: string): Promise { * wire field a real org switch sets, and what `resolveAuthzContext` reads into * `ExecutionContext.tenantId`. */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any async function setActiveOrg(ql: any, userId: string, orgId: string): Promise { for (const s of await findRows(ql, 'sys_session', { user_id: userId }, 20)) { await ql.update( @@ -135,7 +131,6 @@ async function setActiveOrg(ql: any, userId: string, orgId: string): Promise { let stack: VerifyStack; - // eslint-disable-next-line @typescript-eslint/no-explicit-any let ql: any; let orgId: string; let ownerToken: string; diff --git a/packages/qa/dogfood/test/no-active-organization-write-refusal.dogfood.test.ts b/packages/qa/dogfood/test/no-active-organization-write-refusal.dogfood.test.ts index e9f34eca7e0..9974daf5955 100644 --- a/packages/qa/dogfood/test/no-active-organization-write-refusal.dogfood.test.ts +++ b/packages/qa/dogfood/test/no-active-organization-write-refusal.dogfood.test.ts @@ -60,7 +60,6 @@ const LOCAL = 'showcase_private_note'; const SYS = { isSystem: true } as ExecutionContext; const ORG = 'org_8208_pin'; -// eslint-disable-next-line @typescript-eslint/no-explicit-any const rowsOf = (r: any): any[] => (Array.isArray(r) ? r : Array.isArray(r?.records) ? r.records : []); describe('[ADR-0123 D2 / #8208] a tenant-scoped write with no active organization is refused over HTTP', () => { diff --git a/packages/qa/dogfood/test/org-scoped-sharing-rule-listing.dogfood.test.ts b/packages/qa/dogfood/test/org-scoped-sharing-rule-listing.dogfood.test.ts index a3c3317bfdf..073b7f3b5e7 100644 --- a/packages/qa/dogfood/test/org-scoped-sharing-rule-listing.dogfood.test.ts +++ b/packages/qa/dogfood/test/org-scoped-sharing-rule-listing.dogfood.test.ts @@ -70,7 +70,6 @@ interface RuleRow { describe('#7676 — package-seeded (org-less) sharing rules stay visible to an ORG-BOUND admin', () => { let stack: VerifyStack; - // eslint-disable-next-line @typescript-eslint/no-explicit-any let ql: any; let admin: string; diff --git a/packages/qa/dogfood/test/permission-metadata-door-reaches-catalog.dogfood.test.ts b/packages/qa/dogfood/test/permission-metadata-door-reaches-catalog.dogfood.test.ts index 702198ce71d..e7f2e4a9c4a 100644 --- a/packages/qa/dogfood/test/permission-metadata-door-reaches-catalog.dogfood.test.ts +++ b/packages/qa/dogfood/test/permission-metadata-door-reaches-catalog.dogfood.test.ts @@ -27,7 +27,6 @@ describe('a metadata-door permission save reaches the security catalog (ADR-0131 let stack: VerifyStack; let admin: string; let reader: ReturnType; - // eslint-disable-next-line @typescript-eslint/no-explicit-any let ql: any; let userId: string; diff --git a/packages/qa/dogfood/test/public-form-withdrawal-walled.dogfood.test.ts b/packages/qa/dogfood/test/public-form-withdrawal-walled.dogfood.test.ts index 459c37898e2..f7f17e50df4 100644 --- a/packages/qa/dogfood/test/public-form-withdrawal-walled.dogfood.test.ts +++ b/packages/qa/dogfood/test/public-form-withdrawal-walled.dogfood.test.ts @@ -81,7 +81,6 @@ interface Probe { describe('walled posture: withdrawing a public form from anonymous intake', () => { let stack: VerifyStack; let admin: string; - // eslint-disable-next-line @typescript-eslint/no-explicit-any let ql: any; let published: Record; let orgId: string; diff --git a/packages/qa/dogfood/test/registry-gate-wiring.dogfood.test.ts b/packages/qa/dogfood/test/registry-gate-wiring.dogfood.test.ts index 16999ac283b..ea57c1c13cf 100644 --- a/packages/qa/dogfood/test/registry-gate-wiring.dogfood.test.ts +++ b/packages/qa/dogfood/test/registry-gate-wiring.dogfood.test.ts @@ -107,7 +107,6 @@ describe('dogfood: the object-existence gates are actually WIRED (#3770, #3867, // Ground truth through the DRIVER, the declared internal path a body // cannot reach (host code holding the engine). Without this, every 404 // below could be passing for the wrong reason. - // eslint-disable-next-line @typescript-eslint/no-explicit-any const ql = await stack.kernel.getServiceAsync('objectql'); const driver = ql.getDriverForObject(UNREGISTERED_BUT_REAL); expect(driver, 'the default driver answers the name').toBeDefined(); diff --git a/packages/qa/dogfood/test/schedule-acting-organization.dogfood.test.ts b/packages/qa/dogfood/test/schedule-acting-organization.dogfood.test.ts index 950484a92ef..4d0f95dde00 100644 --- a/packages/qa/dogfood/test/schedule-acting-organization.dogfood.test.ts +++ b/packages/qa/dogfood/test/schedule-acting-organization.dogfood.test.ts @@ -135,9 +135,7 @@ function recordingLogger(): { logger: TriggerLogger; errors: string[]; warns: st }; } -// eslint-disable-next-line @typescript-eslint/no-explicit-any type Ql = any; -// eslint-disable-next-line @typescript-eslint/no-explicit-any type Engine = any; const SYS = { context: { isSystem: true } }; diff --git a/packages/qa/dogfood/test/schedule-sweep-organization-scope.dogfood.test.ts b/packages/qa/dogfood/test/schedule-sweep-organization-scope.dogfood.test.ts index d4525ed5ab6..79678ec6d21 100644 --- a/packages/qa/dogfood/test/schedule-sweep-organization-scope.dogfood.test.ts +++ b/packages/qa/dogfood/test/schedule-sweep-organization-scope.dogfood.test.ts @@ -110,9 +110,7 @@ function recordingLogger(): { logger: TriggerLogger; errors: string[]; warns: st }; } -// eslint-disable-next-line @typescript-eslint/no-explicit-any type Ql = any; -// eslint-disable-next-line @typescript-eslint/no-explicit-any type Engine = any; const SYS = { context: { isSystem: true } }; diff --git a/packages/qa/dogfood/test/security-catalog-showcase.dogfood.test.ts b/packages/qa/dogfood/test/security-catalog-showcase.dogfood.test.ts index 0611bba25aa..22c5ba13fe2 100644 --- a/packages/qa/dogfood/test/security-catalog-showcase.dogfood.test.ts +++ b/packages/qa/dogfood/test/security-catalog-showcase.dogfood.test.ts @@ -82,7 +82,6 @@ describe.each(POSTURES)('showcase, $label: the security catalog read', ({ opts, beforeAll(async () => { booted = await bootShowcase(opts); admin = await booted.signIn(); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const ql: any = await booted.kernel.getServiceAsync('objectql'); reader = createSecurityCatalogReader({ registry: ql.registry, metadata: booted.kernel.getService('metadata') }); }, 180_000); diff --git a/packages/qa/dogfood/test/settings-audit-global-rung-sibling.dogfood.test.ts b/packages/qa/dogfood/test/settings-audit-global-rung-sibling.dogfood.test.ts index 5fd964c62e4..783789f8c0b 100644 --- a/packages/qa/dogfood/test/settings-audit-global-rung-sibling.dogfood.test.ts +++ b/packages/qa/dogfood/test/settings-audit-global-rung-sibling.dogfood.test.ts @@ -37,7 +37,6 @@ const AI_KEY = 'expand-18x-not-a-real-api-key'; const WORKSPACE = 'Expand 18x Workspace'; const SYSTEM = { context: { isSystem: true } }; -// eslint-disable-next-line @typescript-eslint/no-explicit-any const rowsOf = (body: any): any[] => (Array.isArray(body) ? body : (body?.records ?? body?.data ?? [])); function boot(databaseFile: string): Promise { diff --git a/packages/qa/dogfood/test/share-links-self-list.dogfood.test.ts b/packages/qa/dogfood/test/share-links-self-list.dogfood.test.ts index 36b129f9042..4d9b1b31407 100644 --- a/packages/qa/dogfood/test/share-links-self-list.dogfood.test.ts +++ b/packages/qa/dogfood/test/share-links-self-list.dogfood.test.ts @@ -70,14 +70,11 @@ const B_EMAIL = 'share-links.member-b.21328@verify.test'; const C_EMAIL = 'share-links.member-c.21328@verify.test'; /** The listed link ids, sorted — compared as a set, never as a count. */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any const idsOf = (rows: any[]): string[] => rows.map((r) => String(r?.id)).sort(); describe('#21328: GET /share-links is self-scoped for a plain member', () => { let stack: VerifyStack; - // eslint-disable-next-line @typescript-eslint/no-explicit-any let ql: any; - // eslint-disable-next-line @typescript-eslint/no-explicit-any let shareLinks: any; let adminTok = ''; let aTok = ''; @@ -103,10 +100,8 @@ describe('#21328: GET /share-links is self-scoped for a plain member', () => { const path = `/share-links${query}`; const res = token === null ? await stack.api(path) : await stack.apiAs(token, 'GET', path); const text = await res.text(); - // eslint-disable-next-line @typescript-eslint/no-explicit-any let body: any = null; try { body = JSON.parse(text); } catch { /* the status still reports */ } - // eslint-disable-next-line @typescript-eslint/no-explicit-any const rows: any[] = Array.isArray(body?.data) ? body.data : []; return { status: res.status, text, body, rows }; }; @@ -151,7 +146,6 @@ describe('#21328: GET /share-links is self-scoped for a plain member', () => { const res = await stack.apiAs(aTok, 'GET', '/security/explain?object=sys_share_link&operation=read'); const text = await res.text(); expect(res.status, text).toBe(200); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const layers: any[] = JSON.parse(text)?.layers ?? []; const setNames = layers.flatMap((l) => l.contributors ?? []).map((c: { name?: unknown }) => String(c?.name)); expect(setNames, 'a showcase member resolves the platform `member_default`').toContain('member_default'); diff --git a/packages/qa/dogfood/test/sharing-rule-org-less-caller.dogfood.test.ts b/packages/qa/dogfood/test/sharing-rule-org-less-caller.dogfood.test.ts index 5bb0860d4bb..f179dfc31cd 100644 --- a/packages/qa/dogfood/test/sharing-rule-org-less-caller.dogfood.test.ts +++ b/packages/qa/dogfood/test/sharing-rule-org-less-caller.dogfood.test.ts @@ -95,7 +95,6 @@ interface RuleRow { describe('#8158 — a manage_sharing holder with NO active organization cannot read every tenant', () => { let stack: VerifyStack; - // eslint-disable-next-line @typescript-eslint/no-explicit-any let ql: any; /** * A platform operator with no active organization: the Default @@ -247,7 +246,6 @@ describe('#8158 — a manage_sharing holder with NO active organization cannot r expect(Array.isArray(members) ? members : members?.records ?? []).toHaveLength(0); const sessions = await ql.find('sys_session', { where: { user_id: orgLessUserId }, context: SYS }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const all: any[] = Array.isArray(sessions) ? sessions : sessions?.records ?? []; // [ADR-0131 D3] The sign-up session was minted while the reconciler's // membership held, and leaving the organization revoked it (#15784); the @@ -264,7 +262,6 @@ describe('#8158 — a manage_sharing holder with NO active organization cannot r it('PRECONDITION: the CONTROL persona’s session DOES carry one (so the difference is the membership, not the harness)', async () => { const sessions = await ql.find('sys_session', { where: { user_id: orgBoundUserId }, context: SYS }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const rows: any[] = Array.isArray(sessions) ? sessions : sessions?.records ?? []; expect(rows.length).toBeGreaterThan(0); expect(rows.some((s) => (s.active_organization_id ?? s.activeOrganizationId) === ORG_A)).toBe(true); @@ -362,7 +359,6 @@ describe('#8158 — a manage_sharing holder with NO active organization cannot r const members = await ql.find('sys_member', { where: { user_id: orgScopedOrgLessUserId }, context: SYS }); expect(Array.isArray(members) ? members : members?.records ?? []).toHaveLength(0); const sessions = await ql.find('sys_session', { where: { user_id: orgScopedOrgLessUserId }, context: SYS }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const all: any[] = Array.isArray(sessions) ? sessions : sessions?.records ?? []; // The live session only — the sign-up one was revoked on leaving (see above). const rows = all.filter((s) => !(s.revoked_at ?? s.revokedAt)); diff --git a/packages/qa/dogfood/test/showcase-client-liaison-fixtures.dogfood.test.ts b/packages/qa/dogfood/test/showcase-client-liaison-fixtures.dogfood.test.ts index 3c7d22063ea..b0ab6edf39e 100644 --- a/packages/qa/dogfood/test/showcase-client-liaison-fixtures.dogfood.test.ts +++ b/packages/qa/dogfood/test/showcase-client-liaison-fixtures.dogfood.test.ts @@ -54,17 +54,13 @@ const PUBLIC_FIELDS = ['title', 'summary']; /** The three figures `showcase_client_liaison` withholds. */ const MASKED_FIELDS = ['budget', 'spent', 'budget_remaining']; -// eslint-disable-next-line @typescript-eslint/no-explicit-any const rowsOf = (b: any): any[] => b?.records ?? b?.data ?? (Array.isArray(b) ? b : []); /** Unwrap a by-id read — same shape helper the sibling FLS proof uses. */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any const recordOf = (b: any): Record => b?.record ?? b?.data ?? b; -// eslint-disable-next-line @typescript-eslint/no-explicit-any const idOf = (b: any) => b?.id ?? b?.record?.id ?? b?.data?.id; describe('showcase client-liaison fixtures (#9308 fixtures 2 + 4)', () => { let stack: VerifyStack; - // eslint-disable-next-line @typescript-eslint/no-explicit-any let ql: any; let adminTok = ''; let liaisonTok = ''; diff --git a/packages/qa/dogfood/test/showcase-demo-personas-loginable.dogfood.test.ts b/packages/qa/dogfood/test/showcase-demo-personas-loginable.dogfood.test.ts index 8b8ba08efca..c5ca103a865 100644 --- a/packages/qa/dogfood/test/showcase-demo-personas-loginable.dogfood.test.ts +++ b/packages/qa/dogfood/test/showcase-demo-personas-loginable.dogfood.test.ts @@ -84,7 +84,6 @@ const rowsOf = (r: unknown): Array> => describe('showcase demo personas are real logins (#9308 fixture 1)', () => { let stack: VerifyStack; - // eslint-disable-next-line @typescript-eslint/no-explicit-any let ql: any; let adminId = ''; diff --git a/packages/qa/dogfood/test/showcase-demo-personas-membership.dogfood.test.ts b/packages/qa/dogfood/test/showcase-demo-personas-membership.dogfood.test.ts index 2699d8f6084..88bac2fc955 100644 --- a/packages/qa/dogfood/test/showcase-demo-personas-membership.dogfood.test.ts +++ b/packages/qa/dogfood/test/showcase-demo-personas-membership.dogfood.test.ts @@ -24,7 +24,6 @@ const rowsOf = (r: unknown): Array> => describe('showcase demo personas are created into the admin\'s organization (ADR-0093 D7)', () => { let stack: VerifyStack; - // eslint-disable-next-line @typescript-eslint/no-explicit-any let ql: any; const membersOf = async (userId: string) => diff --git a/packages/qa/dogfood/test/showcase-invoice-cbp.dogfood.test.ts b/packages/qa/dogfood/test/showcase-invoice-cbp.dogfood.test.ts index 5d04c370d70..fd58e63d104 100644 --- a/packages/qa/dogfood/test/showcase-invoice-cbp.dogfood.test.ts +++ b/packages/qa/dogfood/test/showcase-invoice-cbp.dogfood.test.ts @@ -37,7 +37,6 @@ const memberSet = PermissionSetSchema.parse({ describe('showcase: invoice-line controlled-by-parent (ADR-0055)', () => { let stack: VerifyStack; let memberToken: string; - // eslint-disable-next-line @typescript-eslint/no-explicit-any let ql: any; let adminInvoiceId: string; let adminLineId: string; @@ -53,7 +52,6 @@ describe('showcase: invoice-line controlled-by-parent (ADR-0055)', () => { await stack.signIn(); // seed dev admin memberToken = await stack.signUp(MEMBER_EMAIL); - // eslint-disable-next-line @typescript-eslint/no-explicit-any ql = await stack.kernel.getServiceAsync('objectql'); const sys = { context: { isSystem: true } }; const idOf = (r: any) => r?.id ?? r?.record?.id ?? r; diff --git a/packages/qa/dogfood/test/showcase-public-form-redirect.dogfood.test.ts b/packages/qa/dogfood/test/showcase-public-form-redirect.dogfood.test.ts index e13bedb3a58..adc82aed85a 100644 --- a/packages/qa/dogfood/test/showcase-public-form-redirect.dogfood.test.ts +++ b/packages/qa/dogfood/test/showcase-public-form-redirect.dogfood.test.ts @@ -83,7 +83,6 @@ const boot = (extra: { multiTenant?: 'posture-only' } = {}): Promise { let stack: VerifyStack; let admin: string; - // eslint-disable-next-line @typescript-eslint/no-explicit-any let ql: any; let published: Record; /** What an unrouted path answers on this boot: "today's 404". */ diff --git a/packages/qa/dogfood/test/showcase-public-form-walled-intake.dogfood.test.ts b/packages/qa/dogfood/test/showcase-public-form-walled-intake.dogfood.test.ts index a348eccb9b8..fff2eac21ce 100644 --- a/packages/qa/dogfood/test/showcase-public-form-walled-intake.dogfood.test.ts +++ b/packages/qa/dogfood/test/showcase-public-form-walled-intake.dogfood.test.ts @@ -30,7 +30,6 @@ const SYS = { isSystem: true } as const; describe('showcase, walled posture: the public contact form is not offered, and the admin read says why', () => { let stack: VerifyStack; let admin: string; - // eslint-disable-next-line @typescript-eslint/no-explicit-any let ql: any; let probeSeq = 0; diff --git a/packages/qa/dogfood/test/showcase-public-form-withdrawal-layers.dogfood.test.ts b/packages/qa/dogfood/test/showcase-public-form-withdrawal-layers.dogfood.test.ts index 432e93bdde2..556a0592f58 100644 --- a/packages/qa/dogfood/test/showcase-public-form-withdrawal-layers.dogfood.test.ts +++ b/packages/qa/dogfood/test/showcase-public-form-withdrawal-layers.dogfood.test.ts @@ -37,7 +37,6 @@ const SYS = { isSystem: true } as const; describe('showcase: a public form withdrawal at any metadata layer holds', () => { let stack: VerifyStack; let admin: string; - // eslint-disable-next-line @typescript-eslint/no-explicit-any let ql: any; let published: Record; let organizationId: string; diff --git a/packages/qa/dogfood/test/showcase-public-form-withdrawal.dogfood.test.ts b/packages/qa/dogfood/test/showcase-public-form-withdrawal.dogfood.test.ts index 124402a7c97..9955d487c59 100644 --- a/packages/qa/dogfood/test/showcase-public-form-withdrawal.dogfood.test.ts +++ b/packages/qa/dogfood/test/showcase-public-form-withdrawal.dogfood.test.ts @@ -44,7 +44,6 @@ interface Probe { describe('showcase: withdrawing the public contact form closes every intake door', () => { let stack: VerifyStack; let admin: string; - // eslint-disable-next-line @typescript-eslint/no-explicit-any let ql: any; let published: Record; let probeSeq = 0; diff --git a/packages/qa/dogfood/test/showcase-public-form.dogfood.test.ts b/packages/qa/dogfood/test/showcase-public-form.dogfood.test.ts index fc471d3ecd4..1129feca4cd 100644 --- a/packages/qa/dogfood/test/showcase-public-form.dogfood.test.ts +++ b/packages/qa/dogfood/test/showcase-public-form.dogfood.test.ts @@ -29,7 +29,6 @@ const SYS = { context: { isSystem: true } } as const; describe('showcase: web-to-lead public form (ADR-0056 Option A)', () => { let stack: VerifyStack; - // eslint-disable-next-line @typescript-eslint/no-explicit-any let ql: any; beforeAll(async () => { diff --git a/packages/qa/dogfood/test/showcase-readonly-when-parent.dogfood.test.ts b/packages/qa/dogfood/test/showcase-readonly-when-parent.dogfood.test.ts index bfeed640914..e63ad85d81c 100644 --- a/packages/qa/dogfood/test/showcase-readonly-when-parent.dogfood.test.ts +++ b/packages/qa/dogfood/test/showcase-readonly-when-parent.dogfood.test.ts @@ -44,7 +44,6 @@ describe('showcase: parent-scoped readonlyWhen is server-enforced (#4889)', () = stack = await getSharedShowcase(); token = await stack.signIn(); // the issue's own principal: admin@objectos.ai - // eslint-disable-next-line @typescript-eslint/no-explicit-any const ql = await stack.kernel.getServiceAsync('objectql'); const sys = { context: { isSystem: true } }; diff --git a/packages/qa/dogfood/test/upgrade-18x-harness.dogfood.test.ts b/packages/qa/dogfood/test/upgrade-18x-harness.dogfood.test.ts index a176f07e402..1627c4049f0 100644 --- a/packages/qa/dogfood/test/upgrade-18x-harness.dogfood.test.ts +++ b/packages/qa/dogfood/test/upgrade-18x-harness.dogfood.test.ts @@ -99,7 +99,6 @@ function expectCertified(file: string): void { } } -// eslint-disable-next-line @typescript-eslint/no-explicit-any const rowsOf = (body: any): any[] => (Array.isArray(body) ? body : (body?.records ?? body?.data ?? [])); describe(`[#24522] an 18.0 database (fixture from ${manifest.ref} @ ${manifest.sha.slice(0, 12)}) takes the ceremony, upgrades to HEAD and keeps its data`, () => { diff --git a/packages/qa/dogfood/test/webhook-materialization.dogfood.test.ts b/packages/qa/dogfood/test/webhook-materialization.dogfood.test.ts index c90ace2509e..faa5b0c96bc 100644 --- a/packages/qa/dogfood/test/webhook-materialization.dogfood.test.ts +++ b/packages/qa/dogfood/test/webhook-materialization.dogfood.test.ts @@ -69,7 +69,6 @@ describe('objectstack verify WEBHOOK: a declared webhook is dispatched from the }); it('writes no sys_webhook row for the declared webhook, and dispatches it with object→object_name applied', async () => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any const engine = (await stack.kernel.getServiceAsync('objectql')) as any; const rows = await engine.find('sys_webhook', { filter: { name: 'wm_task_changed' }, @@ -78,7 +77,6 @@ describe('objectstack verify WEBHOOK: a declared webhook is dispatched from the expect(rows, 'the retired seeder wrote a sys_webhook row for a declared webhook').toEqual([]); // The reader the plugin bound on the data engine alone — no realtime here. - // eslint-disable-next-line @typescript-eslint/no-explicit-any const declaredWebhooks = (await stack.kernel.getServiceAsync('declaredWebhooks')) as any; expect(declaredWebhooks, 'the declared-webhook reader was not bound').toBeTruthy(); const declared = await declaredWebhooks.declaredWebhookNamed('wm_task_changed'); diff --git a/packages/runtime/src/external-validation-checkonboot.test.ts b/packages/runtime/src/external-validation-checkonboot.test.ts index 0bdcec5c4d5..8234cd3a026 100644 --- a/packages/runtime/src/external-validation-checkonboot.test.ts +++ b/packages/runtime/src/external-validation-checkonboot.test.ts @@ -44,7 +44,6 @@ function makeCtx(services: Record) { info: (...a: unknown[]) => infos.push(a), warn: (...a: unknown[]) => warnings.push(a), }, - // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any; return { ctx, warnings, infos }; } diff --git a/packages/types/src/node.test.ts b/packages/types/src/node.test.ts index f331c53b2c8..cf065e9fa4f 100644 --- a/packages/types/src/node.test.ts +++ b/packages/types/src/node.test.ts @@ -507,7 +507,7 @@ describe('the undeclared fallback resolves from the CALLER (#10943)', () => { /** A framework package that calls the helper, with its own `node_modules`. */ let callerRoot: string; /** `(s) => import(s)` evaluated INSIDE `callerRoot` — a real caller base. */ - let fallbackImport: (specifier: string) => Promise; // eslint-disable-line @typescript-eslint/no-explicit-any + let fallbackImport: (specifier: string) => Promise; beforeAll(async () => { callerRoot = mkdtempSync(join(tmpdir(), 'os-import-caller-pkg-')); diff --git a/packages/verify/src/action-flow-elevated-door.test.ts b/packages/verify/src/action-flow-elevated-door.test.ts index 503fcd600ae..48d063ba250 100644 --- a/packages/verify/src/action-flow-elevated-door.test.ts +++ b/packages/verify/src/action-flow-elevated-door.test.ts @@ -182,9 +182,7 @@ afterAll(async () => { await stack?.stop().catch(() => undefined); }); -// eslint-disable-next-line @typescript-eslint/no-explicit-any const codeOf = (e: unknown): string | undefined => (e as any)?.code; -// eslint-disable-next-line @typescript-eslint/no-explicit-any const statusOf = (e: unknown): number | undefined => (e as any)?.statusCode ?? (e as any)?.status; /** Ledger rows a writer flow named `flow` has created so far. */ diff --git a/packages/verify/src/automation-trigger-elevated-door.test.ts b/packages/verify/src/automation-trigger-elevated-door.test.ts index 6121f575daa..e499b52a1a8 100644 --- a/packages/verify/src/automation-trigger-elevated-door.test.ts +++ b/packages/verify/src/automation-trigger-elevated-door.test.ts @@ -169,9 +169,7 @@ afterAll(async () => { await stack?.stop().catch(() => undefined); }); -// eslint-disable-next-line @typescript-eslint/no-explicit-any const codeOf = (e: unknown): string | undefined => (e as any)?.code; -// eslint-disable-next-line @typescript-eslint/no-explicit-any const statusOf = (e: unknown): number | undefined => (e as any)?.statusCode ?? (e as any)?.status; /** Ledger rows a writer flow named `flow` has created so far. */ diff --git a/packages/verify/src/delete-behavior.test.ts b/packages/verify/src/delete-behavior.test.ts index 5be00cf7748..778ae4d4758 100644 --- a/packages/verify/src/delete-behavior.test.ts +++ b/packages/verify/src/delete-behavior.test.ts @@ -265,7 +265,6 @@ const controlApp = { name: 'nc_target_rewrites_dependents', object: 'nc_target', events: ['beforeDelete'], - // eslint-disable-next-line @typescript-eslint/no-explicit-any handler: async (ctx: { input: { id?: unknown }; api: any }) => { const id = ctx.input.id; const holders = ctx.api.object('nc_holder'); diff --git a/packages/verify/src/erasure-transaction-authorization.test.ts b/packages/verify/src/erasure-transaction-authorization.test.ts index bbd5c98db70..6b84a71e03e 100644 --- a/packages/verify/src/erasure-transaction-authorization.test.ts +++ b/packages/verify/src/erasure-transaction-authorization.test.ts @@ -63,7 +63,6 @@ interface Answer { status: number; code?: string; ms: number; body: string } describe('#10792 — the erasure route answers authorization on a pool max=1 dialect', () => { let stack: VerifyStack; - // eslint-disable-next-line @typescript-eslint/no-explicit-any let ql: any; let priorScim: string | undefined; let admittedAdminToken = ''; diff --git a/packages/verify/src/handle.flows-system-start.test.ts b/packages/verify/src/handle.flows-system-start.test.ts index 1212e514d37..fd8215810eb 100644 --- a/packages/verify/src/handle.flows-system-start.test.ts +++ b/packages/verify/src/handle.flows-system-start.test.ts @@ -164,9 +164,7 @@ afterAll(async () => { await stack?.stop().catch(() => undefined); }); -// eslint-disable-next-line @typescript-eslint/no-explicit-any const codeOf = (e: unknown): string | undefined => (e as any)?.code; -// eslint-disable-next-line @typescript-eslint/no-explicit-any const statusOf = (e: unknown): number | undefined => (e as any)?.statusCode ?? (e as any)?.status; /** Ledger rows named `name` so far. */ diff --git a/packages/verify/src/handle.observe-writes.test.ts b/packages/verify/src/handle.observe-writes.test.ts index f21a5fdc216..18cfbd7802d 100644 --- a/packages/verify/src/handle.observe-writes.test.ts +++ b/packages/verify/src/handle.observe-writes.test.ts @@ -62,7 +62,6 @@ const armAsyncGate = () => { }); }; -// eslint-disable-next-line @typescript-eslint/no-explicit-any type HookCtx = { input?: { data?: Record }; api: any }; /** Write through the hook's `ctx.api` and record what the engine answered, swallowing a refusal. */ @@ -215,7 +214,6 @@ async function refusalOf(p: Promise): Promise { } /** The ADR-0112 pair: `code`, and `status` (or the engine's `statusCode`). */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any const envelope = (e: unknown) => ({ code: (e as any)?.code, status: (e as any)?.statusCode ?? (e as any)?.status }); /** The observed writes to the fixture's objects: the window also holds the stack's own writes. */ diff --git a/packages/verify/src/handle.public-form-door.test.ts b/packages/verify/src/handle.public-form-door.test.ts index b0f5957d8eb..0a90730855d 100644 --- a/packages/verify/src/handle.public-form-door.test.ts +++ b/packages/verify/src/handle.public-form-door.test.ts @@ -77,7 +77,6 @@ function snapshot(value: T): T { } } -// eslint-disable-next-line @typescript-eslint/no-explicit-any type HookCtx ={ event: string; input: Record; session?: Record; user?: { id?: string } }; /** diff --git a/packages/verify/src/handle.system-insert-delete.test.ts b/packages/verify/src/handle.system-insert-delete.test.ts index 0f37452af0a..eec540a5af1 100644 --- a/packages/verify/src/handle.system-insert-delete.test.ts +++ b/packages/verify/src/handle.system-insert-delete.test.ts @@ -55,7 +55,6 @@ interface HookSeen { } const hookSaw: HookSeen[] = []; -// eslint-disable-next-line @typescript-eslint/no-explicit-any type HookCtx = { event: string; input?: Record; previous?: Record; session?: Record }; const capture = async (ctx: HookCtx) => { @@ -234,7 +233,6 @@ async function refusalOf(p: Promise): Promise { } /** The ADR-0112 pair: `code`, and `status` (or the engine's `statusCode`). */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any const envelope = (e: unknown) => ({ code: (e as any)?.code, status: (e as any)?.statusCode ?? (e as any)?.status }); const seenFor = (name: string): HookSeen[] => hookSaw.filter((h) => h.name === name); diff --git a/packages/verify/src/handle.test.ts b/packages/verify/src/handle.test.ts index c7bec8d6d27..1d7348b11b3 100644 --- a/packages/verify/src/handle.test.ts +++ b/packages/verify/src/handle.test.ts @@ -87,9 +87,7 @@ async function freshHandleFixtureStack(): Promise { /** Unique per run, so list assertions never see another test's rows. */ const uniq = (prefix: string): string => `${prefix}-${Math.random().toString(36).slice(2, 8)}`; -// eslint-disable-next-line @typescript-eslint/no-explicit-any const codeOf = (e: unknown): string | undefined => (e as any)?.code; -// eslint-disable-next-line @typescript-eslint/no-explicit-any const statusOf = (e: unknown): number | undefined => (e as any)?.statusCode ?? (e as any)?.status; describe('contextFor — the dispatcher resolves the caller, the handle never assembles one', () => { @@ -160,7 +158,6 @@ describe('parity pin — hooks.run is the REST write minus HTTP', () => { const viaHandle = await stack.hooks.run('hnd_deal', 'insert', { name: uniq('parity'), ...input }, { as: member }); const viaRest = await stack.apiAs(member, 'POST', '/data/hnd_deal', { name: uniq('parity'), ...input }); expect(viaRest.status).toBe(201); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const restBody = (await viaRest.json()) as any; const restId: string = restBody?.id ?? restBody?.record?.id; expect(typeof restId).toBe('string'); @@ -193,7 +190,6 @@ describe('parity pin — hooks.run is the REST write minus HTTP', () => { const viaRest = await stack.apiAs(member, 'POST', '/data/hnd_vault', { name: uniq('vault') }); expect(viaRest.status).toBe(403); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const restBody = (await viaRest.json()) as any; expect(restBody?.code ?? restBody?.error?.code).toBe('PERMISSION_DENIED'); @@ -262,7 +258,6 @@ describe('actions.run — the declared action, through the route that carries it it('runs the sandboxed body against the loaded record and returns its value', async () => { const [deal] = await stack.seed('hnd_deal', [{ name: uniq('discount'), amount: 1_000, stage: 'proposal' }]); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const result = (await stack.actions.run('hnd_deal', 'apply_discount', { as: admin, recordId: deal.id, diff --git a/packages/verify/src/handle.ts b/packages/verify/src/handle.ts index b18cec017dd..bf5c92ca9fc 100644 --- a/packages/verify/src/handle.ts +++ b/packages/verify/src/handle.ts @@ -107,7 +107,6 @@ import type { TenancyService } from '@objectstack/plugin-auth'; import type { AutomationEngine } from '@objectstack/service-automation'; /** Any row the engine hands back. Untyped on purpose: the engine's, not the handle's. */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any export type EngineRow = Record; /** @@ -628,7 +627,6 @@ function namesSystem(opts: AsUser | AsSystem, door: string): boolean { } function refusalFrom(status: number, body: unknown, fallback: string): VerifyRefusal { - // eslint-disable-next-line @typescript-eslint/no-explicit-any const b = body as any; const envelope = b?.error && typeof b.error === 'object' ? b.error : undefined; const message = @@ -700,7 +698,6 @@ export async function createHandle(kernel: ObjectKernel, origin: string): Promis } const { status, body: rb } = res.response; if (status >= 400) throw refusalFrom(status, rb, `${method} ${API_PREFIX}${path} answered ${status}`); - // eslint-disable-next-line @typescript-eslint/no-explicit-any return (rb as any)?.data; }; diff --git a/packages/verify/src/handle.update-doors.test.ts b/packages/verify/src/handle.update-doors.test.ts index 62675c541cc..08cea7b63fc 100644 --- a/packages/verify/src/handle.update-doors.test.ts +++ b/packages/verify/src/handle.update-doors.test.ts @@ -66,7 +66,6 @@ interface HookSeen { } const hookSaw: HookSeen[] = []; -// eslint-disable-next-line @typescript-eslint/no-explicit-any type HookCtx = { event: string; input: Record; previous?: Record; session?: Record; dispatch?: { mode?: string } }; const capture = (object: string, prior: 'stage' | 'status') => async (ctx: HookCtx) => { @@ -237,7 +236,6 @@ async function refusalOf(p: Promise): Promise { } /** The ADR-0112 pair: `code`, and `status` (or the engine's `statusCode`). */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any const envelope = (e: unknown) => ({ code: (e as any)?.code, status: (e as any)?.statusCode ?? (e as any)?.status }); const seenFor = (id: unknown, event?: string): HookSeen[] => diff --git a/packages/verify/src/harness.key-custody.test.ts b/packages/verify/src/harness.key-custody.test.ts index 7561de5df8e..a3f372ffebb 100644 --- a/packages/verify/src/harness.key-custody.test.ts +++ b/packages/verify/src/harness.key-custody.test.ts @@ -105,12 +105,9 @@ const settingsManifest: SettingsManifest = { specifiers: [{ type: 'password', key: SETTINGS_KEY, label: 'API key', required: false }], }; -// eslint-disable-next-line @typescript-eslint/no-explicit-any type Engine = any; -// eslint-disable-next-line @typescript-eslint/no-explicit-any type Settings = any; -// eslint-disable-next-line @typescript-eslint/no-explicit-any const rowsOf = (r: any): any[] => (Array.isArray(r) ? r : Array.isArray(r?.records) ? r.records : []); interface SealedRow { diff --git a/packages/verify/src/harness.org-context.test.ts b/packages/verify/src/harness.org-context.test.ts index 839036edb94..d4657a9e5e1 100644 --- a/packages/verify/src/harness.org-context.test.ts +++ b/packages/verify/src/harness.org-context.test.ts @@ -77,7 +77,6 @@ async function posture(stack: VerifyStack): Promise { }; } -// eslint-disable-next-line @typescript-eslint/no-explicit-any function rowsOf(r: any): any[] { return Array.isArray(r) ? r : Array.isArray(r?.records) ? r.records : []; } @@ -85,7 +84,6 @@ function rowsOf(r: any): any[] { /** The org id the admin's SESSION carries — the one wire field a real login sets. */ async function sessionOrgId(stack: VerifyStack): Promise { await stack.signIn(); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const ql = await stack.kernel.getServiceAsync('objectql'); const users = rowsOf( await ql.find('sys_user', { where: { email: 'admin@objectos.ai' }, limit: 1, context: SYS }), @@ -105,7 +103,6 @@ async function sessionOrgId(stack: VerifyStack): Promise { /** What one boot of `app` answered, read while it was live. */ interface BootReading { posture: TenancyShape; - // eslint-disable-next-line @typescript-eslint/no-explicit-any orgs: any[]; sessionOrgId: string | null; /** The roles of the admin's `sys_member` rows in the first organization. */ @@ -122,7 +119,6 @@ async function bootAndRead(opts: BootOptions): Promise { const stack = await bootStack(app, opts); try { const shape = await posture(stack); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const ql = await stack.kernel.getServiceAsync('objectql'); const orgs = rowsOf(await ql.find('sys_organization', { limit: 10, context: SYS })); const orgId = await sessionOrgId(stack); diff --git a/packages/verify/src/harness.posture.test.ts b/packages/verify/src/harness.posture.test.ts index be0de400342..a00df5e8025 100644 --- a/packages/verify/src/harness.posture.test.ts +++ b/packages/verify/src/harness.posture.test.ts @@ -23,7 +23,6 @@ class FakeOrganizationsPlugin { readonly name = 'fake-organizations'; readonly version = '0.0.0'; readonly supportedPostures = ['group', 'isolated'] as const; - // eslint-disable-next-line @typescript-eslint/no-explicit-any async init(ctx: any): Promise { ctx.registerService('org-scoping', this); } diff --git a/packages/verify/src/unique-scope.test.ts b/packages/verify/src/unique-scope.test.ts index 761b94d4ede..3715a8476e3 100644 --- a/packages/verify/src/unique-scope.test.ts +++ b/packages/verify/src/unique-scope.test.ts @@ -426,7 +426,6 @@ const attributionApp = { name: 'uqa_contact_dedupes_email', object: 'uqa_contact', events: ['beforeInsert', 'beforeUpdate'], - // eslint-disable-next-line @typescript-eslint/no-explicit-any handler: async (ctx: { input: { email?: unknown; id?: unknown }; api: any }) => { const email = ctx.input.email; if (typeof email !== 'string') return;