Skip to content

re-implement the eslint prefer-const rule #404

Closed
sveltejs/svelte-eslint-parser
#299
@DetachHead

Description

@DetachHead

Description

the prefer-const rule included by default in eslint does not understand reactive statements with curly braces:

<script lang="ts">
    let foo: number
    $: {
        foo = 1 // 'foo' is never reassigned. Use 'const' instead. (prefer-const)
    }
</script>

{foo}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions