Skip to content

False positive with svelte/no-navigation-without-resolve when href is null or undefined #1336

@Stadly

Description

@Stadly

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.

What version of ESLint are you using?

9.34.0

What version of eslint-plugin-svelte are you using?

3.12.2

What did you do?

Updated to eslint-plugin-svelte v3.12

<a href={undefined}>test</a>
<a href={null}>test</a>

What did you expect to happen?

href can be null or undefined:
Image

svelte/no-navigation-without-resolve should not require null or undefined to be resolved.

What actually happened?

error Found a link with a url that isn't resolved svelte/no-navigation-without-resolve

Link to GitHub Repo with Minimal Reproducible Example

I'll provide one if needed.

Additional comments

No response

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