Skip to content

Fixing an unused import at the end of a line removes the newline #51301

@jakebailey

Description

@jakebailey

Given this code, which roughly matches what the module-ified compiler will look like:

import {
    readFile, readFileSync, read, readSync,
    chmod, chmodSync,
} from "fs";


readFile;
readFileSync;
read;
// readSync;
chmod;
chmodSync;

Using the quick fix to remove the unused readSync leaves the code looking like this:

import {
    readFile, readFileSync, read, chmod, chmodSync,
} from "fs";


readFile;
readFileSync;
read;
// readSync;
chmod;
chmodSync;

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions