You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, seeing as this is based on a lint rule I wrote, let me add a bit of context and push back on the optionality part. If I understand things correctly, goto should only ever be used for internal navigation - so for navigating to pages that (by definition) start with the base path. In that case, it seems to me that prepending the base path is always the correct option.
I haven't really used resolveRoute so I probably don't know all its uses, but it seems to me to be just a helper you use when constructing addresses for goto (and/or pushState and replaceState?). So it would make sense for resolveRoute to not prepend the base path and leave that to goto.
Relatedly, shouldn't pushState and replaceState prepend the base path as well? It seems to me that they are also intended to only be used for internal navigation (of course, passing an empty string to them would be handled as a special case...)
Describe the problem
sveltejs/eslint-plugin-svelte#679
Describe the proposed solution
Maybe can we improve interface of
goto
.For example
goto
considers basepath automatically ifbase
is set in config file.Alternatives considered
No response
Importance
would make my life easier
Additional Information
No response
The text was updated successfully, but these errors were encountered: