svelte-check-rs-repro Svelte Themes

Svelte Check Rs Repro

Reproduction of svelte-check-rs issues (false positives + duplicate warnings)

svelte-check-rs Issues Reproduction

Minimal reproduction for issues in svelte-check-rs compared to svelte-check.

Issues

1. False Positive: a11y-label-has-associated-control

Pattern: <label> wrapping a component that internally renders an <input>.

<label>
  <Checkbox checked={value} />  <!-- FALSE POSITIVE -->
  <span>Option</span>
</label>

The label IS associated with a control - the linter just can't see inside the component.

Route: /3-label-with-component

2. False Positive: a11y-click-events-have-key-events

Pattern: Click handlers on elements within tables with role="grid".

<table role="grid">
  <tr>
    <td onclick={() => select()}>  <!-- FALSE POSITIVE -->
      Content
    </td>
  </tr>
</table>

Tables with role="grid" handle keyboard events at the table level, not on individual cells.

Route: /4-click-on-td

3. Bug: Duplicate Warnings

svelte-check-rs reports state-referenced-locally warnings twice for each occurrence - once without the docs URL, once with it.

svelte-check:    1 warning
svelte-check-rs: 7 warnings (1 state-referenced-locally × 2 = 2, plus 5 a11y false positives)

Route: /5-duplicate-warnings

Running the Tests

bun install
bun run check      # svelte-check - 1 warning
svelte-check-rs    # 7 warnings (duplicates + false positives)

Project Structure

src/
  lib/
    Checkbox.svelte           # Simple checkbox component
  routes/
    3-label-with-component/   # a11y-label false positive
    4-click-on-td/            # a11y-click false positive
    5-duplicate-warnings/     # duplicate warnings bug

Top categories

Loading Svelte Themes