Skip to content

Conversation

paoloricciuti
Copy link
Member

@paoloricciuti paoloricciuti commented Oct 10, 2025

Closes #30

This adds an autofixer so that when the LLm tries to do this

<script>
    let x = $state(0);
    $x;
</script>

It will yell that you don't need a dollar to access a stateful variable.

Suggestion:

You are reading the stateful variable "$x" with a "$" prefix. Stateful variables are not stores and should be read without the "$". Please read it as a normal variable "x"

I had to remove the tokens from the parsed AST because zimmerframe was walking into them, and those are not estree nodes.

Copy link

changeset-bot bot commented Oct 10, 2025

🦋 Changeset detected

Latest commit: 33a0e17

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/mcp Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Oct 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
mcp Ready Ready Preview Comment Oct 10, 2025 2:07pm

@paoloricciuti paoloricciuti merged commit 534a72c into main Oct 10, 2025
6 checks passed
@github-actions github-actions bot mentioned this pull request Oct 10, 2025
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.

[Autofixer Request] Accessing stateful variables with $

1 participant