solidjs / solidjs/solid-router

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

Open Beginner friendly
#605 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.3k
Forks
180
Avg merge
1d 13h
Merged PRs (30d)
19

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the README.md references at lines 419, 427, and 915 with the anchor declaration in packages/web/types/jsx.d.ts around line 1131. Check src/data/events.ts around line 97 to confirm runtime handling, then resolve the documented spelling and update the relevant documentation or type reference so the README and TypeScript usage agree.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.