Skip to content

Move to file adds too many new lines #54375

Description

Bug Report

🔎 Search Terms

refactoring, move to file

💻 Code

source.ts:

import{b}from'./other';consta=1;constc=a+b;

target.ts:

exportconsttt=2;

Select const c = a + b;, trigger move to file refactoring and select target.ts file.

🙁 Actual behavior

target.ts:

import{a}from'./source';import{b}from"./other";exportconsttt=2;constc=a+b;

🙂 Expected behavior

target.ts:

import{a}from'./source';import{b}from"./other";exportconsttt=2;constc=a+b;

More examples in the test changes of #54358.

Metadata

Metadata

Assignees

Labels

7.0 LS MigrationBugA bug in TypeScriptDomain: LS: Refactoringse.g. extract to constant or function, rename symbolFix AvailableA PR has been opened for this issueRescheduledThis issue was previously scheduled to an earlier milestone

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions