-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Tooling to prevent writing code in legacy mode #14848
Comments
Hello, You can use Note that will impact external library, and could be set dynamically via Vite config. |
@adiguba This is almost perfect.
|
You can specify it in the Here's an example of how I did it on sveltelab. |
I have a Vite project (no SvelteKit), can you give an example of how to set this option? |
The svelte config should work the same |
Since this seem what the OP wanted I'm gonna close this issue, thanks for reporting |
Describe the problem
I've been using Svelte 5 for a few weeks now and I love it!
As someone who's been writing in the legacy syntax for years now though, I occasionally slip up and use legacy APIs when creating components.
It's also a problem working with teammates who are new to Svelte 5, as they fallback constantly to legacy APIs, and we only catch them during code reviews.
Describe the proposed solution
I've searched and I'm not sure if it exists already, but isn't there some lint rule or editor setting that creates an error warning when writing components in the legacy syntax?
VSCode has a setting to highlight when a component is written in the legacy syntax, but AFAIK there's no way to enforce that components are written in runes mode.
On an aside, it's also mildly annoying that this feature defaults to legacy mode instead of runes mode.
Importance
would make my life easier
The text was updated successfully, but these errors were encountered: