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

README says noScroll becomes lowercase noscroll, but @solidjs/web types the anchor attribute as noScroll

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
68/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
documentation

调研方向

首先,将 README.md 第 419、427 和 915 行的引用与 packages/web/types/jsx.d.ts 第 1131 行附近的 anchor 声明进行比较。然后检查 src/data/events.ts 第 97 行附近的内容,以确认运行时处理,接着确定文档中使用的拼写,并更新相关文档或类型引用,使 README 和 TypeScript 中的用法保持一致。

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

描述

Two sources disagree on the spelling of the scroll opt-out attribute on plain anchors (router next, f7602bf; core next, 344ed054):

  • README.md line 419 lists noscroll in the attribute table, line 427 shows <a href={paths.docs} noscroll>Docs</a>, and line 915 in the migration section says <A href replace noScroll state> → <a href replace noscroll state> "(attributes, all lowercase)".
  • packages/web/types/jsx.d.ts line 1131 in @solidjs/web declares the anchor attribute as noScroll?: BooleanAttribute | RemoveAttribute; (with link, state, replace, preload lowercase beside it).

Consequences today:

  • <a href={...} noscroll> is a type error: Property 'noscroll' does not exist on type 'AnchorHTMLAttributes<HTMLAnchorElement>'. Did you mean 'noScroll'?
  • <a href={...} noScroll> type-checks and also works at runtime, because setAttribute and the HTML parser lowercase the name and src/data/events.ts line 97 reads a.hasAttribute("noscroll").

So the README documents the spelling that does not compile. Either the README should say noScroll (matching the type, and the only spelling TypeScript users can write), or the type should be noscroll to match the README's "all lowercase" rule for the other attributes. The 2.0 docs have gone with noScroll for now since that is what type-checks.

主要语言
TypeScript
星标
1.3k
派生
182
平均合并
15 小时 56 分钟
30 天内合并 PR
51

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

solidjs/solid-router 的其他 Issue

查看 solidjs/solid-router 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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