Skip to content

Lint: report data-duration values the parser rejects #7272

Open

Description

@jrusso1020

The parser already marks some data-duration values as invalid (for example "2s" or "-3") with an invalid-duration problem (packages/parsers/src/compositionContract.ts, around lines 268-270). The linter only turns deprecated-layer, deprecated-end and conflicting-end into findings (packages/lint/src/rules/composition.ts, around lines 1062-1081), so these values lint clean and the clip silently gets a different duration than the author wrote.

Scope

  • Report invalid-duration as a lint error with the element and the bad value.
  • Optional: do the same for invalid-track-index.

Files: packages/lint/src/rules/composition.ts, packages/lint/src/rules/composition.test.ts

Done when: hyperframes lint --json on a clip with data-duration="2s" reports an error (today it reports 0 findings), with a unit test for "2s" and "-3" and a passing case for a valid number.

Mentor: @jrusso1020. Comment here before you start so we can avoid duplicate PRs.

Activity

  1. added
    bugSomething isn't working
    difficulty/easyLocalized change with a known approach, limited risk, and straightforward verification.
    triage/readyAccepted scope, current evidence, acceptance criteria, and validation path are recorded.
    help wantedReady, available work with maintainer review support; any difficulty.
    good first issueEasy, available, ready work with code/test pointers and a confirmed newcomer mentor.
    on Nov 6, 2026
  2. wanjinhao1 commented on Nov 6, 2026

    @wanjinhao1

    I'd like to work on this one — I'll report invalid-duration (and invalid-track-index) as lint errors in composition.ts with tests for "2s", "-3", and a valid number.

  3. added a commit that references this issue on Nov 6, 2026
    4d587bc
  4. added a commit that references this issue on Nov 7, 2026
    3106a75
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdifficulty/easyLocalized change with a known approach, limited risk, and straightforward verification.good first issueEasy, available, ready work with code/test pointers and a confirmed newcomer mentor.help wantedReady, available work with maintainer review support; any difficulty.triage/readyAccepted scope, current evidence, acceptance criteria, and validation path are recorded.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions