microsoft / microsoft/TypeScript

'Move to a new file' operation reformats code (typescript)

Open
#60,414 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs More Info
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
1d 19h
Merged PRs (30d)
117

Description

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.95.0

when i refactor my typescript code by using the 'Move to a new file' operation, it reformats the selected code instead of keeping it as it was.

for example, it

  • removes empty lines between functions
  • removes line breaks in function parameters

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in VS Code 1.95.0 with all extensions disabled by applying the “Move to a new file” operation to TypeScript code containing blank lines and multiline parameters. Compare the result with the original formatting; done means the refactoring preserves those empty lines and line breaks.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.