-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: rune-prefer-let rule #806
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 642e4dd The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
fe63e88
to
9cfb0d8
Compare
9cfb0d8
to
f5775b7
Compare
Thank you for the PR! This is just small point but return value of const cleanup = $effect.root(() => {
$effect(() => {
console.log(count);
});
return () => {
console.log('effect root cleanup');
};
}); |
Thank you for the rule suggestion and opening this PR! |
@ota-meshi I was thinking about implementing a @baseballyama |
|
If the svelte compiler injects |
I know. But we don't use the word "signals" for Svelte developers. We use "runes" instead. We need to use word which mentioned in the docs as much as possible to reduce cognitive cost. |
Svelte 5 allows using both
let
andconst
for signals, in regular JavaScriptconst
means:But signals do change and are reassigned by Svelte's reactivity system.
This ESLint rule converts:
into