Skip to content

Migration rules #1206

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

Open
mroforolhc opened this issue Apr 24, 2025 · 2 comments
Open

Migration rules #1206

mroforolhc opened this issue Apr 24, 2025 · 2 comments

Comments

@mroforolhc
Copy link

I'm curious if there are any plans to create linting rules or warnings for deprecated Svelte syntax, such as export let, createEventDispatcher, or the on: directive?

@baseballyama
Copy link
Member

We should prepare these rules!

@mroforolhc
Copy link
Author

No problem, we already have migration guide with deprecated syntax:

  1. export let / $$restProps / $$props – to suggest replacing it with $props();
  2. $: – to suggest replacing it with $effect / $effect.pre / $derived;
  3. on:{event}on{event};
  4. createEventDispatcher();
  5. <slot />, let:{var}, slot={var}, $$slots – snippets;
  6. <svelte:component>, <svelte:fragment>, <svelte:self>;
  7. beforeUpdate/afterUpdate;

How can I help to prepare rules? I never wrote rules for linter...

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

No branches or pull requests

2 participants