sveltejs/language-tools

I can't use js snippet by SvelteKit Files

stalkerg opened this issue · 3 comments

Describe the bug

It generates only .ts files.

Reproduction

You should try to create file (page.js and etc) by dropdown menu

Expected behaviour

It creates .js file or ask me about file type.

System Info

  • OS: Linux
  • IDE: VSCode

Which package is the issue about?

No response

Additional Information, eg. Screenshots

No response

Currently, the file type is determined by the presence of tsconfig.json. If it is jsconfig.json instead it'll generate a js file. Does your project have both ts and js? Or is there any reason why it's a tsconfig.json instead of jsconfig.json? They mostly differ in some default config differences.

@jasonlyu123 yes, I have tsconfig.json to support JSDoc highlight. But yes, thanks for hint, I will check.

Closing since it sounds like using a jsconfig.json instead solves this.