Skip to content

Commit b871185

Browse files
xuyushun441-sysos-zhuangclaude
authored
ci(lint): extend the authoring-entry guard to packages/apps (#2035) (#2097)
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: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 98ca40b commit b871185

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

eslint.config.mjs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,16 @@ export default [
7878
}],
7979
},
8080
},
81-
// issue #2035 — authoring-entry guard. Flags exported consts in example
82-
// metadata files that are annotated with a spec domain type (simple `Page`
83-
// or qualified `UI.Page`) instead of being wrapped in the `defineX` factory.
84-
// AST-only (no type info): matches the declaration shape, not local vars or
85-
// function params. Scoped to examples — the reference corpus AI learns from.
81+
// issue #2035 — authoring-entry guard. Flags exported consts in metadata
82+
// files that are annotated with a spec domain type (simple `Page` or qualified
83+
// `UI.Page`) instead of being wrapped in the `defineX` factory. AST-only (no
84+
// type info): matches the declaration shape, not local vars or function params.
85+
// Scoped to the authoring surfaces — the example corpus AI learns from and the
86+
// platform's own apps. NOT downstream-contract: its bare literals are a frozen
87+
// backward-compat fixture (#2089) and are intentional.
8688
{
87-
files: ['examples/**/*.{ts,tsx,mts,cts}'],
88-
ignores: ['**/node_modules/**', '**/dist/**'],
89+
files: ['examples/**/*.{ts,tsx,mts,cts}', 'packages/apps/**/*.{ts,tsx,mts,cts}'],
90+
ignores: ['**/node_modules/**', '**/dist/**', 'packages/downstream-contract/**'],
8991
languageOptions: {
9092
parser: tsParser,
9193
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },

0 commit comments

Comments
 (0)