Skip to content

Tooling to prevent writing code in legacy modeΒ #14848

@wilsonowilson

Description

@wilsonowilson

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.

CleanShot 2024-12-28 at 10 47 31@2x

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions