fix: allow JS snapshots within TS plugin

#2565

Pull request

Draft
D
dummdidumm
Nov 5, 2024, 4:33 PM

So far we've always assumed that a Svelte file is a TS file for simplicity, due to our default language (which was removed a long time ago) and also because IIRC there were issues with TS having its snapshot scriptKind being switched. That seems to be no longer the case, and so we can get better at properly analyzing whether or not this is a TS file, to allow JSDoc to take action when it's a JS file.

#2555

@jasonlyu123 do you remember why that scriptKind switch broke previously, but apparently doesn't anymore? I vaguely remember us having the same problem within the language server, but you PRd a change at some point stating that it's no longer a problem.

Also, is this a breaking change, because if someone has no allowJS in their config they would get errors?

Info

Assignees None
Reviewers None
Labels None
Milestone None