Skip to content

Add possibility to silence module-script-reactive-declaration warning #5954

@dummdidumm

Description

@dummdidumm

Is your feature request related to a problem? Please describe.
In #5847 I expressed the concern that people might want to use module variables inside reactive statements, knowing that reactivity will not be triggered on changes to them. This means it should be possible to silence the warning.

Describe the solution you'd like
<!-- svelte-ignore module-script-reactive-declaration --> at the top of the component or // svelte-ignore module-script-reactive-declaration should silence the warning

How important is this feature to you?
Nice to have to not have this warning make unnecessary noise

Workaround in the meantime
You can globally silence this. For svelte-check, do --compiler-warnings "module-script-reactive-declaration:ignore". A similar option is available for the VS Code extension.

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