Open marekdedic opened 2 hours ago
@ota-meshi There's also pushState
and replaceState
- I could add a rule for them or fold them into no-goto-without-base
, what do you think? Or maybe all of this could be merged into one no-navigation-without-base
rule?
Motivation
The motivation is basically similar to #675 - when doing internal navigation, you almost always want to prepend the base path. However, unlike
goto
, links can also be used for external navigation. To navigate this complicated issue, I propose to only check relative links (at least by default).Description
Add a rule that would trigger on any link without a base path. However, there are quite some edge cases
Examples
Additional comments
Based on https://github.com/sveltejs/eslint-plugin-svelte/pull/679#issuecomment-1975067137