Skip to content
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

Closed

Conversation

marekdedic
Copy link
Contributor

@marekdedic marekdedic commented Oct 31, 2024

Closes #894

Copy link

changeset-bot bot commented Oct 31, 2024

🦋 Changeset detected

Latest commit: edd4928

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

This PR includes changesets to release 1 package
Name Type
eslint-plugin-svelte Major

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

@marekdedic marekdedic force-pushed the svelte-4-rule-deprecation branch from f0f913c to 05870f3 Compare October 31, 2024 17:18
@marekdedic marekdedic force-pushed the svelte-4-rule-deprecation branch from 05870f3 to 28f70c4 Compare October 31, 2024 21:44
@marekdedic marekdedic marked this pull request as ready for review October 31, 2024 21:47
@@ -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
Copy link
Member

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.)

Copy link
Contributor Author

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...

Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor Author

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

@marekdedic marekdedic force-pushed the svelte-4-rule-deprecation branch from 28f70c4 to edd4928 Compare November 3, 2024 19:14
@marekdedic marekdedic mentioned this pull request Nov 6, 2024
@marekdedic
Copy link
Contributor Author

Based on the discussion here and in #907 I am closing this in favor of #943

@marekdedic marekdedic closed this Nov 30, 2024
@marekdedic marekdedic deleted the svelte-4-rule-deprecation branch November 30, 2024 10:44
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.

Rule deprecation request
3 participants