Skip to content

feat: align rules with the stable Solid 2.0.0 API - #262

Merged
ryansolid merged 2 commits into
mainfrom
feat/solid-2-stable-api
Nov 17, 2026
Merged

ryansolid merged 2 commits into
mainfrom
feat/solid-2-stable-api

Conversation

@ryansolid

Copy link
Copy Markdown
Member

Requested by Ryan · project thread

A pass over the rules against the stable Solid 2.0.0 API (solid-js, @solidjs/web 2.0.0 exports and documentation/solid-2.0/MIGRATION.md). No 2.0.0 export was removed or renamed since rc.21, so this is about gaps the plugin already had.

Fixes #259.

reactivity

removed-api

  • Reports createDynamic (use the dynamic() factory), pipeToWritable / pipeToNodeWritable (use renderToStream(...).pipeTo/pipe or .readable) and enableScheduling.
  • Rewrites solid-js/h, solid-js/html and solid-js/universal imports to @solidjs/h, @solidjs/html and @solidjs/universal, like solid-js/web today.
  • Reports <Ctx.Provider> when Ctx is a local Solid createContext() and autofixes it to <Ctx value>. 2.0 contexts have no .Provider, so that renders undefined. Contexts imported from other files or other libraries are left alone.

Others

  • no-unknown-namespaces: the use: message points at ref directive factories (ref={tooltip(options)}), as in the migration guide, instead of ref={(el) => myDirective(el)}, which runs unowned in 2.0.
  • imports (v2): adds createDeferred, createTrackedEffect, onFlush, until, from, Hydration, NoHydration, dynamicComponent and isHydrating to solid-js, and dynamic, clientOnly, useHead, getRequestEvent, redirect, reload, respond, httpStatus and httpHeader to @solidjs/web. Drops storePath, which is not a public solid-js export.
  • no-write-in-pure-computation and no-module-scope-reactive-primitive cover createDeferred.
  • Comments and rule-confidence.md say 2.0.0 instead of RC. Docs regenerated.

Not included, for a separate call: <Dynamic component> is deprecated in 2.0 in favor of dynamic(), but still works, so removed-api does not report it.

Tests

New cases for each change; the three reactivity cases fail without the fix. PARSER=all turbo build/test/docs/lint/tsc pass (3,167 plugin tests, 14 fixture tests), also when merged together with #260 and the other two PRs from this pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_0117BoWPBR5hjwWf2VYS9c3p

- reactivity: createDeferred is an async memo in 2.0 and may take an async
  function (fixes #259); until(fn) tracks its predicate; onFlush runs its
  callback after the flush and is no longer reported as an untracked
  function.
- removed-api: report createDynamic (use the dynamic() factory),
  pipeToWritable / pipeToNodeWritable (use renderToStream().pipe/pipeTo),
  and enableScheduling; rewrite solid-js/h, solid-js/html and
  solid-js/universal imports to their @solidjs/* packages; report and fix
  <Ctx.Provider> on a Solid context, since the context is the provider in
  2.0.
- no-unknown-namespaces: `use:` guidance points at ref directive factories.
- imports (v2): add createDeferred, createTrackedEffect, onFlush, until,
  from, Hydration, NoHydration, dynamicComponent and isHydrating to
  solid-js; add dynamic, clientOnly, useHead, getRequestEvent, redirect,
  reload, respond, httpStatus and httpHeader to @solidjs/web; drop
  storePath, which isn't a public solid-js export.
- no-write-in-pure-computation and no-module-scope-reactive-primitive
  cover createDeferred.
- Comments and rule-confidence docs say 2.0.0 instead of RC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWPBR5hjwWf2VYS9c3p
@ryansolid ryansolid self-assigned this Nov 17, 2026
@ryansolid
ryansolid merged commit 3884413 into main Nov 17, 2026
3 checks passed
@ryansolid
ryansolid deleted the feat/solid-2-stable-api branch November 17, 2026 17:46
@ryansolid ryansolid mentioned this pull request Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reactivity: createDeferred(async () => ...) reports noAsyncTrackedScope under Solid 2

1 participant