-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: LS: Refactoringse.g. extract to constant or function, rename symbole.g. extract to constant or function, rename symbolRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
Milestone
Description
Bug Report
π Search Terms
importModuleSpecifierEnding
Import Module Specifier Ending
π Version & Regression Information
I've confirmed this in TS 3.9.7 (installed by npm) and 4.4.2 (Arch Linux package).
β― Playground Link
Sorry, I don't know how I could reproduce this outside of VS Code.
π» Code
// We can quickly address your report if:
// - The code sample is short. Nearly all TypeScript bugs can be demonstrated in 20-30 lines of code!
// - It doesn't use external libraries. These are often issues with the type definitions rather than TypeScript bugs.
// - The incorrectness of the behavior is readily apparent from reading the sample.
// Reports are slower to investigate if:
// - We have to pare too much extraneous code.
// - We have to clone a large repo and validate that the problem isn't elsewhere.
// - The sample is confusing or doesn't clearly demonstrate what's wrong.π Actual behavior
I have "typescript.preferences.importModuleSpecifierEnding": "js" in my settings. I renamed a project folder in VS Code (using F2 in the Linux version), then clicked Yes to refactor all the other TS code that imported from that folder, using ".js" extensions. The folder was renamed successfully for each import, but they were all given a second ".js" extension, ie they were renamed to "*.js.js".
π Expected behavior
The additional ".js" shouldn't have been added where one was already present.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: LS: Refactoringse.g. extract to constant or function, rename symbole.g. extract to constant or function, rename symbolRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone