Skip to content

Suppress prefer-const warnings for $props() and $derived() #889

Closed
@Conduitry

Description

@Conduitry

I'm not sure what mechanism is being used to suppress prefer-const warnings for variables that have bind:s in the template, but these warnings should also be suppressed for $props() and $derived(). Using a const for a $derived() feels like a weird thing to force on people, and a mixture of bindable and non-bindable $props() can cause more serious issues where ESLint will encourage components that can't be compiled - sveltejs/svelte#13897

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