Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

lint: add tests for three caption rules that have none

未关闭 适合新手
#5,388 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@aron-intframe 已经在做这个了。

开始于 2026年10月10日。

  • #5436 来自 @aron-intframe —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
85/100
Issue 类型
重构
描述清晰度
描述清楚
活跃度
活跃
技术栈
bun, typescript
领域
testing-qa

调研方向

这三条规则定义在 packages/lint/src/rules/captions.ts 的第 90、171 和 212 行;测试应放在 packages/lint/src/rules/captions.test.ts 中,与现有测试放在一起。先阅读每条规则的触发条件,然后编写一个会触发它的 composition,以及一个相近但不应触发的变体,并断言代码和严重级别。当 caption_transcript_not_inline、caption_textshadow_on_group_container 和 caption_fittext_scale_mismatch 各自都有正向和反向测试,并且 bun run --cwd packages/lint test 通过、没有修改规则时,即完成。

由索引模型根据 Issue 内容生成。

描述

difficulty/easy enhancement help wanted triage/ready

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.
主要语言
TypeScript
星标
54.1k
派生
4.9k
平均合并
8 小时 41 分钟
30 天内合并 PR
723

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

heygen-com/hyperframes 的其他 Issue

查看 heygen-com/hyperframes 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。