BOLL
BOLL•4d ago

Files with extension .mts do not get linting in WebStorm

I know this is probably IDE specific, but when asking JetBrains if they are responsible for language server issues or not, as they publish the various plugins, they avoided my question. I only asked once though so there's that. I've been using .mts for some time now, maybe overkill, but they are ESM files so it made sense. That said, I've had random success since moving to extended TypeScript language servers. In vanilla TypeScript it works as expected, but... outside of that it seems mildly random. Vue: linting breaks Svelte: linting works Deno: linting breaks Node: apparently uses the standard TS server so linting works This has slowly crept up on me since venturing from years of just TypeScript first into Vue, then Deno. Because type checking and linting worked well before I used any of the extended language servers, I wasn't expecting it. It was just last week I finally figured it out for Vue, as random errors kept cropping up and not even missing imports are indicated. I reported it to JetBrains, and it was marked as a duplicate, as they should as other people have also reported it. Now when I am back to working on my Deno project, I notice the same problem, which might explain previous bewilderment when I was working on this a month ago. Just renaming a file to .ts resumes linting and things act like they should. My question then is: Can Deno affect this at all? Or is this entirely up to JetBrains as they publish the Deno plugin? I will report it to them, again, when I find my previous issue for Vue so I can reference it. Just figured I'd check here as well as I want to know that I'm poking the right people. Looking this up, TypeScript added .mts and other variants in 4.5 beta and then 4.7 prod, I've been using this for some time, it's in the handbook. It is also included under TypeScript filetypes in WS, but to no avail. That's it! Cheers!
2 Replies
BOLL
BOLLOP•3d ago
I did report it to JetBrains, hopefully they'll look at it, but similar issues have been idle for some time so I don't hold high hopes 😅 Now I'm instead slowly renaming my files to .ts as soon as I work on them, hah. I recall when I was instead naming them all .mts to be a better developer or something, hah. How good intentions go bad. They could not replicate, so I gave them detailed steps and two videos... 👀
BOLL
BOLLOP•3d ago

Did you find this page helpful?