From 9936c1d318ed6c3d853c0abbee7a24401ef5befe Mon Sep 17 00:00:00 2001 From: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Date: Sun, 21 Jun 2026 14:39:42 +0800 Subject: [PATCH] ci(lint): extend the authoring-entry guard to packages/apps (#2035) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The #2088 guard only covered examples/**. Broadens it to the platform's own apps (account/setup/studio) so the "author metadata via defineX, never a bare `: DomainType` literal" convention holds across every authoring surface, not just the example corpus. Explicitly excludes packages/downstream-contract, whose bare literals are an intentional frozen backward-compat fixture (#2089). No migrations — apps author no bare-literal metadata today; this is future- proofing. Verified the guard fires on a probe under packages/apps and that `pnpm lint` is green. Co-Authored-By: Claude Opus 4.8 --- eslint.config.mjs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index d05fe59e94..5413303546 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -78,14 +78,16 @@ export default [ }], }, }, - // issue #2035 — authoring-entry guard. Flags exported consts in example - // metadata files that are annotated with a spec domain type (simple `Page` - // or qualified `UI.Page`) instead of being wrapped in the `defineX` factory. - // AST-only (no type info): matches the declaration shape, not local vars or - // function params. Scoped to examples — the reference corpus AI learns from. + // issue #2035 — authoring-entry guard. Flags exported consts in metadata + // files that are annotated with a spec domain type (simple `Page` or qualified + // `UI.Page`) instead of being wrapped in the `defineX` factory. AST-only (no + // type info): matches the declaration shape, not local vars or function params. + // Scoped to the authoring surfaces — the example corpus AI learns from and the + // platform's own apps. NOT downstream-contract: its bare literals are a frozen + // backward-compat fixture (#2089) and are intentional. { - files: ['examples/**/*.{ts,tsx,mts,cts}'], - ignores: ['**/node_modules/**', '**/dist/**'], + files: ['examples/**/*.{ts,tsx,mts,cts}', 'packages/apps/**/*.{ts,tsx,mts,cts}'], + ignores: ['**/node_modules/**', '**/dist/**', 'packages/downstream-contract/**'], languageOptions: { parser: tsParser, parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },