Repository navigation
feat: align rules with the stable Solid 2.0.0 API - #262
Merged
Merged
Conversation
- 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
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Ryan · project thread
A pass over the rules against the stable Solid 2.0.0 API (
solid-js,@solidjs/web2.0.0 exports anddocumentation/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
createDeferred(async () => ...)is allowed: in 2.0 it is an async memo that may lag but never leads (reactivity: createDeferred(async () => ...) reports noAsyncTrackedScope under Solid 2 #259).until(fn)tracks its predicate, sountil(() => count() > 3)outside a tracked scope is no longer reported.onFlush(fn)is treated likeonSettled: the callback runs later, so reading current values is fine.removed-api
createDynamic(use thedynamic()factory),pipeToWritable/pipeToNodeWritable(userenderToStream(...).pipeTo/pipeor.readable) andenableScheduling.solid-js/h,solid-js/htmlandsolid-js/universalimports to@solidjs/h,@solidjs/htmland@solidjs/universal, likesolid-js/webtoday.<Ctx.Provider>whenCtxis a local SolidcreateContext()and autofixes it to<Ctx value>. 2.0 contexts have no.Provider, so that rendersundefined. Contexts imported from other files or other libraries are left alone.Others
no-unknown-namespaces: theuse:message points at ref directive factories (ref={tooltip(options)}), as in the migration guide, instead ofref={(el) => myDirective(el)}, which runs unowned in 2.0.imports(v2): addscreateDeferred,createTrackedEffect,onFlush,until,from,Hydration,NoHydration,dynamicComponentandisHydratingtosolid-js, anddynamic,clientOnly,useHead,getRequestEvent,redirect,reload,respond,httpStatusandhttpHeaderto@solidjs/web. DropsstorePath, which is not a publicsolid-jsexport.no-write-in-pure-computationandno-module-scope-reactive-primitivecovercreateDeferred.rule-confidence.mdsay 2.0.0 instead of RC. Docs regenerated.Not included, for a separate call:
<Dynamic component>is deprecated in 2.0 in favor ofdynamic(), but still works, soremoved-apidoes not report it.Tests
New cases for each change; the three reactivity cases fail without the fix.
PARSER=allturbo 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