no-navigation-without-resolve: Allow URL.href

#1487

Development PRs

Issue

M
marekdedic
Mar 7, 2026, 4:15 PM

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?

latest

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

master

What did you do?

<script>
  const one = new URL("https://svelte.dev");
  const two = new URL("/blog", "https://svelte.dev");
</script>

<a href={one.href}>One</a>
<a href={two.href}>Two</a>
<a href={one.toString()}>One</a>
<a href={two.toString()}>Two</a>
<a href={one}>One</a> <!-- Not 100% sure this calls toString -->
<a href={two}>Two</a> <!-- Not 100% sure this calls toString -->

What did you expect to happen?

No error

What actually happened?

Error

Link to GitHub Repo with Minimal Reproducible Example

Will make a PR

Additional comments

No response