Skip to content

feat(no-navigation-without-resolve): added support for ResolvedPathname types#1321

Open
marekdedic wants to merge 3 commits intosveltejs:mainfrom
marekdedic:no-navigation-without-resove-ResolvedPathname
Open

feat(no-navigation-without-resolve): added support for ResolvedPathname types#1321
marekdedic wants to merge 3 commits intosveltejs:mainfrom
marekdedic:no-navigation-without-resove-ResolvedPathname

Conversation

@marekdedic
Copy link
Copy Markdown
Contributor

@marekdedic marekdedic commented Sep 4, 2025

Closes #1319
Closes #1320
Closes #1370
Closes #1450

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Sep 4, 2025

🦋 Changeset detected

Latest commit: 76e7148

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-plugin-svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@marekdedic marekdedic force-pushed the no-navigation-without-resove-ResolvedPathname branch from 0977c4a to 911af1c Compare September 14, 2025 20:26
@marekdedic marekdedic force-pushed the no-navigation-without-resove-ResolvedPathname branch 2 times, most recently from 6620c3a to a81abe5 Compare September 23, 2025 14:46
@marekdedic marekdedic force-pushed the no-navigation-without-resove-ResolvedPathname branch 2 times, most recently from 9ad2044 to 51a0858 Compare November 1, 2025 08:05
@marekdedic marekdedic force-pushed the no-navigation-without-resove-ResolvedPathname branch from 51a0858 to 9a7b9dd Compare December 13, 2025 10:01
@marekdedic marekdedic force-pushed the no-navigation-without-resove-ResolvedPathname branch from 9a7b9dd to 87f712d Compare January 8, 2026 12:40
@marekdedic marekdedic force-pushed the no-navigation-without-resove-ResolvedPathname branch 2 times, most recently from 99bcaad to 46d02c7 Compare January 28, 2026 21:20
@marekdedic marekdedic force-pushed the no-navigation-without-resove-ResolvedPathname branch 2 times, most recently from 9c30bbf to ec4ffa8 Compare March 5, 2026 17:50
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2026

Try the Instant Preview in Online Playground

ESLint Online Playground

Install the Instant Preview to Your Local

npm i https://pkg.pr.new/eslint-plugin-svelte@e509b00

Published Instant Preview Packages:

View Commit

@marekdedic marekdedic force-pushed the no-navigation-without-resove-ResolvedPathname branch 13 times, most recently from e157249 to 09704e9 Compare March 7, 2026 12:54
@marekdedic marekdedic force-pushed the no-navigation-without-resove-ResolvedPathname branch 3 times, most recently from f4caee1 to cdf409b Compare March 7, 2026 14:05
@marekdedic marekdedic marked this pull request as ready for review March 7, 2026 14:11
@marekdedic
Copy link
Copy Markdown
Contributor Author

Hello, I think this one is ready for review. I think it should help a large part of users of the rule as it basically "hides" some other issues (which should be fixed nevertheless, but in the meantime would not impact TS users).

Given that I needed to finagle the tests to get this to work, I'd appreciate someone testing it on their own, real-world project. Tagging those who reacted to the PR, maybe you'd have the time to test it out? @shyakadavis @aladh @enchart @lishaduck

@marekdedic marekdedic force-pushed the no-navigation-without-resove-ResolvedPathname branch from cdf409b to 76e7148 Compare March 10, 2026 09:00
@lishaduck
Copy link
Copy Markdown

The projects I was working on certainly weren't real world scale and I'm not working on them actively anymore, but just spun up an old project and this seems to be an improvement in it (although, props to the team, it took me some work to find false-positives as is; much improved from when I first set it up). ❤️

Copy link
Copy Markdown
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!
It looks mostly good to me, but I have one question.

return false;
}
const checker = tsTools.service.program.getTypeChecker() as TypeChecker & {
isTypeAssignableTo(source: Type, target: Type): boolean;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this additional declaration necessary? Doesn't TypeChecker already have it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is a non-public part of the API and therefore not in the types. Nonetheless, it's used by e.g. typescript-eslint. There's an open issue (by typescript-eslint) in TypeScript to make this function part of the public API, so we may be able to remove this assertion once that lands.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really non-public? Could you please confirm?
It appears to be a public API on my local machine. Am I doing something wrong?

image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, strange, I'll take a look in the evening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants