-
-
Notifications
You must be signed in to change notification settings - Fork 58
Explain the no-navigation-without-resolve rationale #1372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@baseballyama Why not both? :D I actually like both :) |
I think the correct approach to the original issue is to improve the rule so that it doesn’t report an error when either |
@baseballyama I like your change to the linter messages, as it removes the source of my original confusion. I see my doc change to be complementary, as I’m trying to clarify why the rule exists at all. The added link points to paths.base documentation, which I believe adequately explains the need for resolve():
In other words, if multiple apps coexist on a single domain a page belonging to app1 https://my.company/app1/page1 must prepend I didn’t think the rule docs is the right place to go into such details, but if you meant the wording I chose is unhelpful in getting the point across, perhaps this is better:
I don’t care much about the wording or this PR, so please feel free to just make the changes you want, if that’s easier. |
If original issue refers to my API endpoint problem (sveltejs/kit#13195), I believe I’d actually need the (On the other hand, I would argue that supporting non-empty |
I was completely baffled by the explanation at https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-resolve/ , since I had no idea there was even a possibility to configure the base URL of an app.
Before finding the docs I assumed the "Found a link with a url that isn't resolved." message shown in VS code meant it couldn't find my API route (cf. sveltejs/kit#13195), which I was accessing like this:
<a href="/report/download>Download</a>
— perhaps "Found a link with a URL that would break if the app is configured with a non-root base path" would be clearer?