Skip to content

lint: add tests for three caption rules that have none #5388

Closed

Description

@jrusso1020

Problem

These lint rules have no test that mentions their code, so a change that breaks them would go unnoticed:

Code Severity Defined at
caption_transcript_not_inline error packages/lint/src/rules/captions.ts:90
caption_textshadow_on_group_container warning packages/lint/src/rules/captions.ts:171
caption_fittext_scale_mismatch warning packages/lint/src/rules/captions.ts:212

Tests go in packages/lint/src/rules/captions.test.ts.

Proposed solution

Add tests to the matching *.test.ts file next to each rule, following the style of the other tests in that file. For each rule, add at least:

  • one composition that triggers the finding, asserting the code and severity, and
  • one similar composition that should not trigger it.

Read the rule's code first: the condition it checks tells you what the minimal triggering composition looks like.

Acceptance criteria

  • Each code above is asserted by at least one positive and one negative test.
  • bun run --cwd packages/lint test passes.
  • No rule behaviour changes. If writing a test shows a rule misbehaving, note it in the PR or open a separate issue rather than changing the rule in the same PR.

Activity

  1. added
    difficulty/easyLocalized change with a known approach, limited risk, and straightforward verification.
    enhancementNew feature or request
    help wantedReady, available work with maintainer review support; any difficulty.
    triage/readyAccepted scope, current evidence, acceptance criteria, and validation path are recorded.
    on Oct 10, 2026
  2. lbianlbian commented on Oct 12, 2026

    @lbianlbian
    Contributor

    I'm claiming this issue for my CS 146S OSS contribution assignment.

  3. lbianlbian commented on Oct 28, 2026

    @lbianlbian
    Contributor

    Commenting that I'll still take this issue for my required second CS 146S OSS contribution. As stated in the slack channel, the team will prioritize merging Stanford PRs.

  4. added a commit that references this issue on Oct 28, 2026
    6ad2b7f
  5. jrusso1020 commented on Nov 5, 2026

    @jrusso1020
    CollaboratorAuthor

    Fixed in #5436, released in v0.8.206. Reopen if a case is still missing.

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

    difficulty/easyLocalized change with a known approach, limited risk, and straightforward verification.enhancementNew feature or requesthelp 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