-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
chore: Deprecated rules that are irrelevant is Svelte 5 #899
Conversation
🦋 Changeset detectedLatest commit: edd4928 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 |
f0f913c
to
05870f3
Compare
05870f3
to
28f70c4
Compare
@@ -10,6 +10,8 @@ since: 'v2.18.0' | |||
|
|||
> require slot type declaration using the `$$Slots` interface | |||
|
|||
- :warning: This rule was **deprecated**. Slots are deprecated in Svelte 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should be deprecated. Because still Svelte5 can use slot
. And still there are a lot of Svelte3/4 users.
My suggestion is that just remove this from recommended rules config.
(Same for other rules also.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, then we didn't understand each other in the original issue. Out of the discussed rules, only one was present in the recommended config - no-dynamic-slot-name
. I proposed to mark as deprecated all rules that rely on features that are deprecated in Svelte itself. They would still be present for users of Svelte 4 and users relying on legacy svelte features. Only when Svelte itself removes the deprecated features do I think this plugin should remove the rules deprecated in this PR...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply🙏
Indeed, that would be true if all Svelte users were using Svelte 5, but many are still on Svelte 3 or 4. Therefore, eslint-plugin-svelte should continue supporting Svelte 3/4 as well. we could deprecate or remove Svelte 3/4 rules in version 4 of eslint-plugin-svelte.
So, my opinion is not to deprecate these rules but to remove the Svelte 3/4-specific rules from the recommended config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After hearing your opinion, I think that's a good idea 👍
Additionally, it might be good to add documentation for those rules to say that they are no longer useful in Svelte v5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let's clarify this a bit -> #907
28f70c4
to
edd4928
Compare
Closes #894