From 4c01236c54e4883b8f1deea541ba66e616b8d58f Mon Sep 17 00:00:00 2001 From: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Date: Sun, 21 Jun 2026 15:41:08 +0800 Subject: [PATCH] fix(example-crm): author SalesByAccountReport via defineReport (lint #2035) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The fixture added in #2107 used a bare `: UI.ReportInput` typed literal, which the `no-restricted-syntax` rule (#2035) disallows — metadata must go through its `defineX` factory so it validates at parse time. The sibling sales-by-stage report already uses `defineReport`; this aligns the new one. The CI lint only checks changed files, so #2107 landed with the violation — this fixes it on main. No behavior change: same exported `SalesByAccountReport`, same fields. Co-Authored-By: Claude Opus 4.8 --- examples/app-crm/src/reports/sales-by-account.report.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/app-crm/src/reports/sales-by-account.report.ts b/examples/app-crm/src/reports/sales-by-account.report.ts index 499e3abce2..6584f097f2 100644 --- a/examples/app-crm/src/reports/sales-by-account.report.ts +++ b/examples/app-crm/src/reports/sales-by-account.report.ts @@ -1,6 +1,6 @@ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license. -import type * as UI from '@objectstack/spec/ui'; +import { defineReport } from '@objectstack/spec/ui'; /** * Example report — total opportunity amount grouped by ACCOUNT. @@ -13,7 +13,7 @@ import type * as UI from '@objectstack/spec/ui'; * `total_amount` measure (USD), this exercises both render paths — Intl * currency formatting AND raw-value lookup drill — end to end. */ -export const SalesByAccountReport: UI.ReportInput = { +export const SalesByAccountReport = defineReport({ name: 'crm_sales_by_account', label: 'Sales by Account', description: 'Total opportunity amount grouped by account (lookup-dimension drill).', @@ -21,4 +21,4 @@ export const SalesByAccountReport: UI.ReportInput = { dataset: 'opportunity_metrics', rows: ['account'], values: ['total_amount'], -}; +});