Before You File a Bug Report Please Confirm You Have Done The Following...
What version of ESLint are you using?
9.36.0
What version of eslint-plugin-svelte are you using?
3.12.3
What did you do?
This works
<script lang"ts>
import { resolve } from '$app/paths';
</script>
<a href={resolve("/")}>home</a>
This also works
<script lang="ts">
import { resolve } from '$app/paths';
const home = resolve("/");
</script>
<a href={home}>home</a>
However this generates a Found a link with a url that isn't resolved error:
// src/lib/routes
import { resolve } from '$app/paths';
export const home = resolve("/");
<script lang="ts">
import { home } from '$lib/routes';
</script>
<a href={home}>home</a>
What did you expect to happen?
I would expect the externalised route to be treated the same as the one that is resolved inline.
What actually happened?
Found a link with a url that isn't resolved svelte/no-navigation-without-resolve
Link to GitHub Repo with Minimal Reproducible Example
https://github.com/thobson/svelte-eslint-errors
See src/routes/+page.svelte
Additional comments
No response
Before You File a Bug Report Please Confirm You Have Done The Following...
What version of ESLint are you using?
9.36.0
What version of
eslint-plugin-svelteare you using?3.12.3
What did you do?
This works
This also works
However this generates a
Found a link with a url that isn't resolvederror:What did you expect to happen?
I would expect the externalised route to be treated the same as the one that is resolved inline.
What actually happened?
Found a link with a url that isn't resolved svelte/no-navigation-without-resolveLink to GitHub Repo with Minimal Reproducible Example
https://github.com/thobson/svelte-eslint-errors
See
src/routes/+page.svelteAdditional comments
No response