Skip to content

fix(render): scope strict lint to composition#2261

Open
miguel-heygen wants to merge 1 commit into
mainfrom
fix/strict-composition-lint-scope
Open

fix(render): scope strict lint to composition#2261
miguel-heygen wants to merge 1 commit into
mainfrom
fix/strict-composition-lint-scope

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

Scope pre-render lint to the file selected by render --composition.

Why

On CLI 0.7.53, render --composition standalone.html --strict still linted sibling root HTML files, emitted multiple_root_compositions, and aborted. Users had to copy the same entry and assets into an isolated temporary project even though the command explicitly selected one composition.

How

  • Allow lintProject to accept an explicit entry file.
  • Treat that file as the root lint source and resolve its local assets relative to its location.
  • Skip unrelated compositions/ discovery and the project-wide multiple-root rule only for explicit-entry lint.
  • Pass the resolved entry from the render command when --composition is set.
  • Preserve existing whole-project behavior when rendering index.html.

Test plan

  • Reproduced published 0.7.53 strict abort with two valid root compositions
  • bunx vitest run packages/cli/src/utils/lintProject.test.ts packages/cli/src/commands/render.test.ts (125 passed)
  • bun run --filter @hyperframes/cli typecheck
  • npx oxfmt --check packages/lint/src/project.ts packages/cli/src/commands/render.ts packages/cli/src/utils/lintProject.test.ts
  • npx oxlint packages/lint/src/project.ts packages/cli/src/commands/render.ts packages/cli/src/utils/lintProject.test.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant