Skip to content

vscode's javascript.preferences.importModuleSpecifierEnding preference has no effectΒ #53512

Description

Bug Report

πŸ”Ž Search Terms

javascript.preferences.importModuleSpecifierEnding

πŸ•— Version & Regression Information

  • This changed between versions 4.9.5 and 5.0.2

⏯ Playground Link

n/a

πŸ’» Steps to reproduce

  1. Set vscode's javascript.preferences.importModuleSpecifierEnding preference to "js"
  2. Set typescript.preferences.importModuleSpecifierEnding to "auto"
  3. Type the name of a function inside of a JavaScript file and press enter to automatically import it

πŸ™ Actual behavior

The import path is missing .js at the end.

πŸ™‚ Expected behavior

The import path includes .js at the end. It seems as though vscode thinks all .js files are actually .ts files in regard to this preference. Because when I set typescript.preferences.importModuleSpecifierEnding to "js" my imports behave as expected.
When I switch the TypeScript version to the one bundled with vscode, the issue is resolved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions